diff options
author | crupest <crupest@outlook.com> | 2019-03-23 00:15:18 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-03-23 00:15:18 +0800 |
commit | 39d2c8b3d957e75c3a2a1c738c1628e3eb5c0173 (patch) | |
tree | 72fff34573ffc7e788051bd7911032283340588d /src/ui/render/render_object.hpp | |
parent | 63a5d619ac81ba3f48e95c890d96fa7d9047bb26 (diff) | |
download | cru-39d2c8b3d957e75c3a2a1c738c1628e3eb5c0173.tar.gz cru-39d2c8b3d957e75c3a2a1c738c1628e3eb5c0173.tar.bz2 cru-39d2c8b3d957e75c3a2a1c738c1628e3eb5c0173.zip |
...
Diffstat (limited to 'src/ui/render/render_object.hpp')
-rw-r--r-- | src/ui/render/render_object.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/render/render_object.hpp b/src/ui/render/render_object.hpp index a9950198..51b0c3ae 100644 --- a/src/ui/render/render_object.hpp +++ b/src/ui/render/render_object.hpp @@ -3,11 +3,13 @@ #include <optional> #include <vector> -#include "system_headers.hpp" #include "base.hpp" #include "ui/ui_base.hpp" +// forward declarations +struct ID2D1RenderTarget; + namespace cru::ui { class Control; } @@ -70,15 +72,14 @@ class RenderObject : public Object { virtual void OnSizeChanged(const Size& old_size, const Size& new_size); + virtual void OnMeasureCore(const Size& available_size); + virtual void OnLayoutCore(const Rect& rect); virtual Size OnMeasureContent(const Size& available_size) = 0; virtual void OnLayoutContent(const Rect& content_rect) = 0; private: void SetParent(RenderObject* new_parent); - void OnMeasureCore(const Size& available_size); - void OnLayoutCore(const Rect& rect); - private: Control* control_ = nullptr; |