aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/render/render_object.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-04-02 21:09:06 +0800
committercrupest <crupest@outlook.com>2020-04-02 21:09:06 +0800
commit7fd9ca808c908c67d9bec2183034ad16ea86a912 (patch)
treedd4287e511404aa2da07ea078b4bc2c76d4874fc /include/cru/ui/render/render_object.hpp
parent381d0831f72dc52831bbfb66d9e7db10a86760e5 (diff)
downloadcru-7fd9ca808c908c67d9bec2183034ad16ea86a912.tar.gz
cru-7fd9ca808c908c67d9bec2183034ad16ea86a912.tar.bz2
cru-7fd9ca808c908c67d9bec2183034ad16ea86a912.zip
...
Diffstat (limited to 'include/cru/ui/render/render_object.hpp')
-rw-r--r--include/cru/ui/render/render_object.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/cru/ui/render/render_object.hpp b/include/cru/ui/render/render_object.hpp
index ca31386a..33ef3d1a 100644
--- a/include/cru/ui/render/render_object.hpp
+++ b/include/cru/ui/render/render_object.hpp
@@ -53,9 +53,9 @@ class RenderObject : public Object {
RenderObject* GetParent() const { return parent_; }
const std::vector<RenderObject*>& GetChildren() const { return children_; }
- int GetChildCount() const { return static_cast<int>(children_.size()); }
- void AddChild(RenderObject* render_object, int position);
- void RemoveChild(int position);
+ Index GetChildCount() const { return static_cast<Index>(children_.size()); }
+ void AddChild(RenderObject* render_object, Index position);
+ void RemoveChild(Index position);
Point GetOffset() const { return offset_; }
void SetOffset(const Point& offset) { offset_ = offset; }
@@ -99,9 +99,9 @@ class RenderObject : public Object {
RenderObject* new_parent);
// default is to invalidate both layout and paint
- virtual void OnAddChild(RenderObject* new_child, int position);
+ virtual void OnAddChild(RenderObject* new_child, Index position);
// default is to invalidate both layout and paint
- virtual void OnRemoveChild(RenderObject* removed_child, int position);
+ virtual void OnRemoveChild(RenderObject* removed_child, Index position);
virtual void OnMeasureCore(const Size& available_size);
virtual void OnLayoutCore(const Rect& rect);