BoxModelMetrics.h 692 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <LibDraw/Size.h>
  3. #include <LibHTML/CSS/LengthBox.h>
  4. class BoxModelMetrics {
  5. public:
  6. BoxModelMetrics();
  7. ~BoxModelMetrics();
  8. LengthBox& margin() { return m_margin; }
  9. LengthBox& padding() { return m_padding; }
  10. LengthBox& border() { return m_border; }
  11. const LengthBox& margin() const { return m_margin; }
  12. const LengthBox& padding() const { return m_padding; }
  13. const LengthBox& border() const { return m_border; }
  14. struct PixelBox {
  15. int top;
  16. int right;
  17. int bottom;
  18. int left;
  19. };
  20. PixelBox full_margin() const;
  21. private:
  22. LengthBox m_margin;
  23. LengthBox m_padding;
  24. LengthBox m_border;
  25. };