35 #include "object_type_db.h" 36 #include "script_language.h" 37 #include "scene/main/scene_main_loop.h" 45 OBJ_CATEGORY(
"Nodes");
59 bool operator()(
const Node* p_a,
const Node* p_b)
const {
return p_b->is_greater_than(p_a); }
67 GroupData() { persistent=
false; }
106 bool unhandled_input;
107 bool unhandled_key_input;
111 bool use_placeholder;
117 void _print_tree(
const Node *p_node);
119 virtual bool _use_builtin_script()
const {
return true; }
125 void _validate_child_name(
Node *p_name,
bool p_force_human_readable=
false);
127 void _propagate_reverse_notification(
int p_notification);
128 void _propagate_deferred_notification(
int p_notification,
bool p_reverse);
129 void _propagate_enter_tree();
130 void _propagate_ready();
131 void _propagate_exit_tree();
132 void _propagate_validate_owner();
133 void _print_stray_nodes();
134 void _propagate_pause_owner(
Node*p_owner);
137 void _duplicate_signals(
const Node* p_original,
Node* p_copy)
const;
139 Node *_duplicate(
bool p_use_instancing)
const;
141 Array _get_children()
const;
142 Array _get_groups()
const;
149 void _block() { data.blocked++; }
150 void _unblock() { data.blocked--; }
152 void _notification(
int p_notification);
154 virtual void add_child_notify(
Node *p_child);
155 virtual void remove_child_notify(
Node *p_child);
156 virtual void move_child_notify(
Node *p_child);
159 void _propagate_replace_owner(
Node *p_owner,
Node* p_by_owner);
161 static void _bind_methods();
166 void _set_owner_nocheck(
Node* p_owner);
167 void _set_name_nocheck(
const StringName& p_name);
173 NOTIFICATION_ENTER_TREE=10,
174 NOTIFICATION_EXIT_TREE =11,
175 NOTIFICATION_MOVED_IN_PARENT =12,
176 NOTIFICATION_READY=13,
178 NOTIFICATION_PAUSED=14,
179 NOTIFICATION_UNPAUSED=15,
180 NOTIFICATION_FIXED_PROCESS = 16,
181 NOTIFICATION_PROCESS = 17,
182 NOTIFICATION_PARENTED=18,
183 NOTIFICATION_UNPARENTED=19,
184 NOTIFICATION_INSTANCED=20,
190 void set_name(
const String& p_name);
192 void add_child(
Node *p_child,
bool p_legible_unique_name=
false);
193 void remove_child(
Node *p_child);
195 int get_child_count()
const;
196 Node *get_child(
int p_index)
const;
197 bool has_node(
const NodePath& p_path)
const;
199 Node* find_node(
const String& p_mask,
bool p_recursive=
true,
bool p_owned=
true)
const;
200 bool has_node_and_resource(
const NodePath& p_path)
const;
203 Node *get_parent()
const;
204 _FORCE_INLINE_
SceneTree *get_tree()
const { ERR_FAIL_COND_V( !data.tree, NULL );
return data.tree; }
206 _FORCE_INLINE_
bool is_inside_tree()
const {
return data.inside_tree; }
208 bool is_a_parent_of(
const Node *p_node)
const;
209 bool is_greater_than(
const Node *p_node)
const;
214 void add_to_group(
const StringName& p_identifier,
bool p_persistent=
false);
215 void remove_from_group(
const StringName& p_identifier);
216 bool is_in_group(
const StringName& p_identifier)
const;
226 void move_child(
Node *p_child,
int p_pos);
229 void set_owner(
Node *p_owner);
230 Node *get_owner()
const;
234 void remove_and_skip();
235 int get_index()
const;
239 void set_filename(
const String& p_filename);
240 String get_filename()
const;
242 void set_editable_instance(
Node* p_node,
bool p_editable);
243 bool is_editable_instance(
Node* p_node)
const;
250 void propagate_notification(
int p_notification);
253 void set_fixed_process(
bool p_process);
254 float get_fixed_process_delta_time()
const;
255 bool is_fixed_processing()
const;
257 void set_process(
bool p_process);
258 float get_process_delta_time()
const;
259 bool is_processing()
const;
262 void set_process_input(
bool p_enable);
263 bool is_processing_input()
const;
265 void set_process_unhandled_input(
bool p_enable);
266 bool is_processing_unhandled_input()
const;
268 void set_process_unhandled_key_input(
bool p_enable);
269 bool is_processing_unhandled_key_input()
const;
271 int get_position_in_parent()
const;
273 Node *duplicate(
bool p_use_instancing=
false)
const;
285 void set_scene_instance_load_placeholder(
bool p_enable);
286 bool get_scene_instance_load_placeholder()
const;
290 void replace_by(
Node* p_node,
bool p_keep_data=
false);
293 PauseMode get_pause_mode()
const;
294 bool can_process()
const;
296 static void print_stray_nodes();
303 static void set_human_readable_collision_renaming(
bool p_enabled);
304 static void init_node_hrcr();
306 void force_parent_owned() { data.parent_owned=
true; }
309 void set_import_path(
const NodePath& p_import_path);
315 void clear_internal_tree_resource_paths();
317 _FORCE_INLINE_
Viewport *get_viewport()
const {
return data.viewport; }
Definition: viewport.h:75
void set_pause_mode(PauseMode p_mode)
Definition: node.cpp:371
Definition: string_db.h:48
Definition: packed_scene.h:36
Definition: scene_main_loop.h:51