6 #ifndef TB_TAB_CONTAINER_H
7 #define TB_TAB_CONTAINER_H
9 #include "tb_widgets_common.h"
45 TB_ALIGN GetAlignment()
const {
return m_align; }
49 virtual long GetValue()
const {
return m_current_page; }
53 int GetCurrentPage() {
return GetValue(); }
59 virtual void OnInflate(
const INFLATE_INFO &info);
60 virtual bool OnEvent(
const TBWidgetEvent &ev);
64 TBLayout *GetTabLayout() {
return &m_tab_layout; }
66 TBLayout m_root_layout;
67 TBTabLayout m_tab_layout;
68 TBWidget m_content_root;
69 bool m_need_page_update;
76 #endif // TB_TAB_CONTAINER_H
AXIS
Definition: tb_widgets.h:251
virtual void SetValue(long value)
Set which page should be selected and visible.
Definition: tb_tab_container.cpp:76
virtual void SetAxis(AXIS axis)
Set along which axis the content should layouted.
Definition: tb_tab_container.cpp:68
TBTabLayout is a TBLayout used in TBTabContainer to apply some default properties on any TBButton add...
Definition: tb_tab_container.h:16
TBWidget * GetCurrentPageWidget() const
Return the widget that is the current page, or nullptr if none is active.
Definition: tb_tab_container.cpp:102
virtual PreferredSize OnCalculatePreferredContentSize(const SizeConstraints &constraints)
Calculate the preferred content size for this widget.
Definition: tb_tab_container.cpp:23
Specifies size constraints used during size calculations.
Definition: tb_widgets.h:321
void SetCurrentPage(int index)
Set which page should be selected and visible.
Definition: tb_tab_container.h:52
TBTabContainer - A container with tabs for multiple pages.
Definition: tb_tab_container.h:28
virtual void OnInflate(const INFLATE_INFO &info)
Called when this widget is inflated from resources, before any children have been inflated...
Definition: tb_widgets_reader.cpp:585
virtual TBWidget * GetContentRoot()
Get this widget or a child widget that should be root for other children.
Definition: tb_tab_container.h:63
void SetAlignment(TB_ALIGN align)
Set alignment of the tabs.
Definition: tb_tab_container.cpp:107
virtual void OnProcess()
Callback for doing anything that might be needed before paint.
Definition: tb_tab_container.cpp:130
TB_ALIGN
Definition: tb_widgets.h:29
virtual AXIS GetAxis() const
See TBWidget::SetAxis.
Definition: tb_layout.h:106
virtual bool OnEvent(const TBWidgetEvent &ev)
Callback for handling events.
Definition: tb_tab_container.cpp:117
virtual AXIS GetAxis() const
See TBWidget::SetAxis.
Definition: tb_tab_container.h:41
virtual void OnChildAdded(TBWidget *child)
Called when a child widget has been added to this widget (before calling OnAdded on child)...
Definition: tb_tab_container.cpp:13
PreferredSize contains size preferences for a TBWidget.
Definition: tb_widgets.h:277
TBLayout layouts its children along the given axis.
Definition: tb_layout.h:96
virtual long GetValue() const
See TBWidget::SetValue.
Definition: tb_tab_container.h:49