diff options
Diffstat (limited to 'scene/gui/tab_container.h')
-rw-r--r-- | scene/gui/tab_container.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h index 7ea667d60f..9ff56afe6e 100644 --- a/scene/gui/tab_container.h +++ b/scene/gui/tab_container.h @@ -33,12 +33,13 @@ #include "scene/gui/container.h" #include "scene/gui/popup.h" +#include "scene/resources/text_line.h" + class TabContainer : public Container { GDCLASS(TabContainer, Container); public: enum TabAlign { - ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT @@ -51,6 +52,7 @@ private: int current; int previous; bool tabs_visible; + bool all_tabs_in_front; bool buttons_visible_cache; bool menu_hovered; int highlight_arrow; @@ -62,18 +64,23 @@ private: bool use_hidden_tabs_for_min_size; int tabs_rearrange_group; + Vector<Ref<TextLine>> text_buf; Vector<Control *> _get_tabs() const; int _get_tab_width(int p_index) const; + bool _theme_changing = false; void _on_theme_changed(); void _repaint(); void _on_mouse_exited(); void _update_current_tab(); + void _draw_tab(Ref<StyleBox> &p_tab_style, Color &p_font_color, int p_index, float p_x); + void _refresh_texts(); protected: void _child_renamed_callback(); void _gui_input(const Ref<InputEvent> &p_event); void _notification(int p_what); virtual void add_child_notify(Node *p_child) override; + virtual void move_child_notify(Node *p_child) override; virtual void remove_child_notify(Node *p_child) override; Variant get_drag_data(const Point2 &p_point) override; @@ -90,6 +97,9 @@ public: void set_tabs_visible(bool p_visible); bool are_tabs_visible() const; + void set_all_tabs_in_front(bool p_is_front); + bool is_all_tabs_in_front() const; + void set_tab_title(int p_tab, const String &p_title); String get_tab_title(int p_tab) const; |