32 #include "scene/main/node.h" 33 #include "servers/visual_server.h" 34 #include "scene/resources/world_2d.h" 36 #include "scene/resources/texture.h" 61 virtual int get_width()
const;
62 virtual int get_height()
const;
63 virtual Size2 get_size()
const;
64 virtual RID get_rid()
const;
66 virtual bool has_alpha()
const;
68 virtual void set_flags(uint32_t p_flags);
69 virtual uint32_t get_flags()
const;
80 enum RenderTargetUpdateMode {
81 RENDER_TARGET_UPDATE_DISABLED,
82 RENDER_TARGET_UPDATE_ONCE,
83 RENDER_TARGET_UPDATE_WHEN_VISIBLE,
84 RENDER_TARGET_UPDATE_ALWAYS
105 bool audio_listener_2d;
113 Rect2 to_screen_rect;
115 RID contact_2d_debug;
116 RID contact_3d_debug_multimesh;
117 RID contact_3d_debug_instance;
122 bool size_override_stretch;
123 Size2 size_override_size;
124 Size2 size_override_margin;
129 bool render_target_vflip;
130 bool render_target_clear_on_new_frame;
131 bool render_target_filter;
132 bool render_target_gen_mipmaps;
134 bool physics_object_picking;
136 ObjectID physics_object_capture;
137 ObjectID physics_object_over;
139 void _test_new_mouseover(ObjectID new_collider);
144 void _parent_resized();
146 void _parent_visibility_changed();
157 void _update_listener();
158 void _update_listener_2d();
160 void _propagate_enter_world(
Node *p_node);
161 void _propagate_exit_world(
Node *p_node);
164 void _update_stretch_transform();
165 void _update_global_transform();
168 RenderTargetUpdateMode render_target_update_mode;
169 RID render_target_texture_rid;
176 bool key_event_accepted;
178 int mouse_focus_button;
182 Panel *tooltip_popup;
183 Label *tooltip_label;
193 unsigned int cancelled_input_ID;
195 bool subwindow_order_dirty;
197 bool roots_order_dirty;
207 void _gui_sort_subwindows();
208 void _gui_sort_roots();
209 void _gui_sort_modal_stack();
216 void update_worlds();
218 _FORCE_INLINE_
Matrix32 _get_input_pre_xform()
const;
220 void _vp_enter_tree();
221 void _vp_exit_tree();
224 void _vp_input_text(
const String& p_text);
225 void _vp_unhandled_input(
const InputEvent& p_ev);
234 void _gui_set_subwindow_order_dirty();
235 void _gui_set_root_order_dirty();
243 void _gui_cancel_tooltip();
244 void _gui_show_tooltip();
247 void _gui_remove_control(
Control *p_control);
248 void _gui_hid_control(
Control *p_control);
253 bool _gui_is_modal_on_top(
const Control* p_control);
256 void _gui_remove_focus();
257 void _gui_unfocus_control(
Control *p_control);
258 bool _gui_control_has_focus(
const Control* p_control);
259 void _gui_control_grab_focus(
Control* p_control);
260 void _gui_grab_click_focus(
Control *p_control);
261 void _gui_accept_event();
263 Control *_gui_get_focus_owner();
266 void _camera_transform_changed_notify();
267 void _camera_set(
Camera* p_camera);
268 bool _camera_add(
Camera* p_camera);
269 void _camera_remove(
Camera* p_camera);
270 void _camera_make_next_current(
Camera* p_exclude);
274 void _notification(
int p_what);
275 static void _bind_methods();
279 Camera* get_camera()
const;
281 void set_as_audio_listener(
bool p_enable);
282 bool is_audio_listener()
const;
284 void set_as_audio_listener_2d(
bool p_enable);
285 bool is_audio_listener_2d()
const;
287 void set_rect(
const Rect2& p_rect);
288 Rect2 get_rect()
const;
289 Rect2 get_visible_rect()
const;
290 RID get_viewport()
const;
299 void set_canvas_transform(
const Matrix32& p_transform);
300 Matrix32 get_canvas_transform()
const;
302 void set_global_canvas_transform(
const Matrix32& p_transform);
303 Matrix32 get_global_canvas_transform()
const;
305 Matrix32 get_final_transform()
const;
307 void set_transparent_background(
bool p_enable);
308 bool has_transparent_background()
const;
312 Size2 get_size_override()
const;
313 bool is_size_override_enabled()
const;
314 void set_size_override_stretch(
bool p_enable);
315 bool is_size_override_stretch_enabled()
const;
317 void set_as_render_target(
bool p_enable);
318 bool is_set_as_render_target()
const;
320 void set_render_target_vflip(
bool p_enable);
321 bool get_render_target_vflip()
const;
323 void set_render_target_clear_on_new_frame(
bool p_enable);
324 bool get_render_target_clear_on_new_frame()
const;
325 void render_target_clear();
327 void set_render_target_filter(
bool p_enable);
328 bool get_render_target_filter()
const;
330 void set_render_target_gen_mipmaps(
bool p_enable);
331 bool get_render_target_gen_mipmaps()
const;
333 void set_render_target_update_mode(RenderTargetUpdateMode p_mode);
334 RenderTargetUpdateMode get_render_target_update_mode()
const;
338 Vector2 get_camera_coords(
const Vector2& p_viewport_coords)
const;
339 Vector2 get_camera_rect_size()
const;
341 void queue_screen_capture();
342 Image get_screen_capture()
const;
344 void set_use_own_world(
bool p_world);
345 bool is_using_own_world()
const;
348 void unhandled_input(
const InputEvent& p_event);
350 void set_disable_input(
bool p_disable);
351 bool is_input_disabled()
const;
353 void set_render_target_to_screen_rect(
const Rect2& p_rect);
354 Rect2 get_render_target_to_screen_rect()
const;
357 void warp_mouse(
const Vector2& p_pos);
359 void set_physics_object_picking(
bool p_enable);
360 bool get_physics_object_picking();
362 bool gui_has_modal_stack()
const;
370 VARIANT_ENUM_CAST(Viewport::RenderTargetUpdateMode);
Definition: viewport.h:75
Definition: math_2d.h:204
Definition: string_db.h:48
Definition: canvas_item.h:87
Definition: viewport.h:49
Definition: math_2d.h:554