diff options
Diffstat (limited to 'include/cru/ui/render/render_object.hpp')
-rw-r--r-- | include/cru/ui/render/render_object.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/cru/ui/render/render_object.hpp b/include/cru/ui/render/render_object.hpp index 0f0cb8df..d9851757 100644 --- a/include/cru/ui/render/render_object.hpp +++ b/include/cru/ui/render/render_object.hpp @@ -70,6 +70,8 @@ class RenderObject : public Object { Point GetOffset() const { return offset_; } void SetOffset(const Point& offset) { offset_ = offset; } + Point GetTotalOffset() const; + Point FromRootToContent(const Point& point) const; Size GetSize() const { return size_; } void SetSize(const Size& size) { size_ = size; } @@ -91,9 +93,7 @@ class RenderObject : public Object { virtual RenderObject* HitTest(const Point& point) = 0; - protected: - void SetChildMode(ChildMode mode) { child_mode_ = mode; } - + public: void InvalidateLayout() const { if (render_host_ != nullptr) render_host_->InvalidateLayout(); } @@ -103,6 +103,9 @@ class RenderObject : public Object { } protected: + void SetChildMode(ChildMode mode) { child_mode_ = mode; } + + protected: virtual void OnParentChanged(RenderObject* old_parent, RenderObject* new_parent); |