summaryrefslogtreecommitdiff
path: root/scene/gui/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/tree.h')
-rw-r--r--scene/gui/tree.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 49a410f115..a87f6d89e2 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -172,7 +172,9 @@ protected:
return d;
}
- void _remove_child(Object *p_child) { remove_child(p_child->cast_to<TreeItem>()); }
+ void _remove_child(Object *p_child) {
+ remove_child(Object::cast_to<TreeItem>(p_child));
+ }
public:
/* cell mode */
@@ -504,9 +506,17 @@ protected:
static void _bind_methods();
//bind helpers
- Object *_create_item(Object *p_parent) { return create_item(p_parent->cast_to<TreeItem>()); }
- TreeItem *_get_next_selected(Object *p_item) { return get_next_selected(p_item->cast_to<TreeItem>()); }
- Rect2 _get_item_rect(Object *p_item, int p_column) const { return get_item_rect(p_item->cast_to<TreeItem>(), p_column); }
+ Object *_create_item(Object *p_parent) {
+ return create_item(Object::cast_to<TreeItem>(p_parent));
+ }
+
+ TreeItem *_get_next_selected(Object *p_item) {
+ return get_next_selected(Object::cast_to<TreeItem>(p_item));
+ }
+
+ Rect2 _get_item_rect(Object *p_item, int p_column) const {
+ return get_item_rect(Object::cast_to<TreeItem>(p_item), p_column);
+ }
public:
virtual String get_tooltip(const Point2 &p_pos) const;