diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-09-03 14:22:16 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-11-26 14:25:48 +0200 |
commit | 99666de00fb30cb86473257776504ca70b4469c3 (patch) | |
tree | 6ad5723c1a429e82b8b4b12cc10f2bec3102cac3 /scene/gui/tabs.h | |
parent | 07d14f5bb8e8a2cb3b2137d1ef4fb6c3b46c0873 (diff) |
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
Diffstat (limited to 'scene/gui/tabs.h')
-rw-r--r-- | scene/gui/tabs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h index 62142e1cde..bf62ba7210 100644 --- a/scene/gui/tabs.h +++ b/scene/gui/tabs.h @@ -32,6 +32,7 @@ #define TABS_H #include "scene/gui/control.h" +#include "scene/resources/text_line.h" class Tabs : public Control { GDCLASS(Tabs, Control); @@ -55,6 +56,12 @@ private: struct Tab { String text; String xl_text; + + Dictionary opentype_features; + String language; + Control::TextDirection text_direction = Control::TEXT_DIRECTION_INHERITED; + + Ref<TextLine> text_buf; Ref<Texture2D> icon; int ofs_cache; bool disabled; @@ -101,6 +108,8 @@ private: void _on_mouse_exited(); + void _shape(int p_tab); + protected: void _gui_input(const Ref<InputEvent> &p_event); void _notification(int p_what); @@ -117,6 +126,16 @@ public: void set_tab_title(int p_tab, const String &p_title); String get_tab_title(int p_tab) const; + void set_tab_text_direction(int p_tab, TextDirection p_text_direction); + TextDirection get_tab_text_direction(int p_tab) const; + + void set_tab_opentype_feature(int p_tab, const String &p_name, int p_value); + int get_tab_opentype_feature(int p_tab, const String &p_name) const; + void clear_tab_opentype_features(int p_tab); + + void set_tab_language(int p_tab, const String &p_language); + String get_tab_language(int p_tab) const; + void set_tab_icon(int p_tab, const Ref<Texture2D> &p_icon); Ref<Texture2D> get_tab_icon(int p_tab) const; |