diff options
Diffstat (limited to 'scene/main/window.h')
-rw-r--r-- | scene/main/window.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scene/main/window.h b/scene/main/window.h index e11cbd8a72..a9a17ab9ba 100644 --- a/scene/main/window.h +++ b/scene/main/window.h @@ -69,6 +69,13 @@ public: CONTENT_SCALE_ASPECT_EXPAND, }; + enum LayoutDirection { + LAYOUT_DIRECTION_INHERITED, + LAYOUT_DIRECTION_LOCALE, + LAYOUT_DIRECTION_LTR, + LAYOUT_DIRECTION_RTL + }; + enum { DEFAULT_WINDOW_SIZE = 100, }; @@ -94,6 +101,8 @@ private: bool updating_child_controls = false; bool clamp_to_embedder = false; + LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED; + void _update_child_controls(); Size2i content_scale_size; @@ -149,7 +158,7 @@ public: enum { NOTIFICATION_VISIBILITY_CHANGED = 30, NOTIFICATION_POST_POPUP = 31, - NOTIFICATION_THEME_CHANGED = 32, + NOTIFICATION_THEME_CHANGED = 32 }; void set_title(const String &p_title); @@ -237,12 +246,17 @@ public: void grab_focus(); bool has_focus() const; + void set_layout_direction(LayoutDirection p_direction); + LayoutDirection get_layout_direction() const; + bool is_layout_rtl() const; + Rect2i get_usable_parent_rect() const; Ref<Texture2D> get_theme_icon(const StringName &p_name, const StringName &p_type = StringName()) const; Ref<Shader> get_theme_shader(const StringName &p_name, const StringName &p_type = StringName()) const; Ref<StyleBox> get_theme_stylebox(const StringName &p_name, const StringName &p_type = StringName()) const; Ref<Font> get_theme_font(const StringName &p_name, const StringName &p_type = StringName()) const; + int get_theme_font_size(const StringName &p_name, const StringName &p_type = StringName()) const; Color get_theme_color(const StringName &p_name, const StringName &p_type = StringName()) const; int get_theme_constant(const StringName &p_name, const StringName &p_type = StringName()) const; @@ -250,6 +264,7 @@ public: bool has_theme_shader(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_stylebox(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_font(const StringName &p_name, const StringName &p_type = StringName()) const; + bool has_theme_font_size(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_color(const StringName &p_name, const StringName &p_type = StringName()) const; bool has_theme_constant(const StringName &p_name, const StringName &p_type = StringName()) const; @@ -264,5 +279,6 @@ VARIANT_ENUM_CAST(Window::Mode); VARIANT_ENUM_CAST(Window::Flags); VARIANT_ENUM_CAST(Window::ContentScaleMode); VARIANT_ENUM_CAST(Window::ContentScaleAspect); +VARIANT_ENUM_CAST(Window::LayoutDirection); #endif // WINDOW_H |