LineBox.h 487 B

1234567891011121314151617181920
  1. #pragma once
  2. #include <AK/Vector.h>
  3. #include <LibHTML/Layout/LineBoxFragment.h>
  4. class LineBox {
  5. public:
  6. LineBox() {}
  7. int width() const { return m_width; }
  8. void add_fragment(const LayoutNode& layout_node, int start, int length, int width, int height);
  9. const Vector<LineBoxFragment>& fragments() const { return m_fragments; }
  10. Vector<LineBoxFragment>& fragments() { return m_fragments; }
  11. private:
  12. Vector<LineBoxFragment> m_fragments;
  13. int m_width { 0 };
  14. };