15GX_CORE_NAMESPACE_BEGIN()
20class GxGuiTab : public GxGuiBase
27 GX_RTTI_CLASS(GxGuiTab, GxGuiBase)
42 static constexpr u32 TAB_HEIGHT = 20;
44 static constexpr u32 TAB_X_MARGIN = 8;
46 static constexpr u32 TAB_Y_MARGIN = 3;
48 static constexpr u32 TAB_BUTTON_SIZE = TAB_HEIGHT - TAB_Y_MARGIN * 2;
50 static constexpr u32 TAB_BUTTON_Y_MARGIN = (TAB_HEIGHT - TAB_BUTTON_SIZE) / 2;
52 static constexpr u32 TAB_MAX_WIDTH = 80;
63 GxGuiTab( TAB_TYPE type );
72 b32 initialize(
void )
override;
75 void cleanup(
void )
override;
78 void update(
void)
override;
81 void onNoClientDraw(
void )
override;
84 GxSize getUseRegionSize(
void)
const override;
87 void addTab(GxGuiBase* pGuiForm, GX_CSTR pTitle, u32 index = U32_MAX,
b32 useCloseButton =
false);
90 void setTab(GxGuiBase* pGuiForm, GX_CSTR pTitle, u32 index = U32_MAX);
93 void eraseTab(GxOneTab* pOneTab);
95 void eraseTabFromIndex(u32 index);
98 void eraseAllTab(
void);
101 void updateTabRect(
void);
105 void onNoClientMouseDown(
const GxPoint2& position, u32 button)
override;
108 void onSize(
const GxSize& size)
override;
111 GxRect calculateClientRect(
const GxRect& clientRect)
const override;
114 void setCurrent(GxOneTab* pOneTab);
117 u32 getHeightTotalTabRect(
void)
const;
126 void setCurrentIndex( u32 index );
129 u32 getCurrentIndex(
void );
132 GxOneTab* getTab(u32 index)
const;
135 s32 getIndex(
const GxGuiBase* pGuiForm)
const;
138 GxGuiBase* getCurrentGui(
void );
142 constexpr void setTabHeight( s32 height ){ _tabHeight = height; }
145 constexpr u32 getTabCount(
void)
const {
return _pListTab->getCount(); }
154 GxOneTab* _pCurrentTab;
175 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
184 GxOneTab( GxGuiTab* pParent, GxGuiBase* pGuiBase, GX_CSTR title,
b32 useCloseButton );
196 void updateTitle(
void);
206 GX_FORCE_INLINE
const GxString& getTitle(
void)
const {
return _title; }
208 GX_FORCE_INLINE
void setTitle(GX_CSTR title) { _title = title; updateTitle(); }
211 GX_FORCE_INLINE
const GxString& getClipTitle(
void)
const {
return _clipTitle; }
215 GX_FORCE_INLINE
const GxRect& getTabRect(
void)
const {
return _tabRect; }
217 void setTabRect(
const GxRect& tabRect);
221 constexpr GxGuiBase* getGui(
void)
const {
return _pGui; }
224 constexpr GxGuiButton* getCloseButton(
void)
const {
return _pCloseButton; }
226 constexpr u32 getTitleRightMargin(
void)
const {
return _pCloseButton ? TAB_BUTTON_SIZE + TAB_X_MARGIN : TAB_X_MARGIN; }
238 GxGuiButton* _pCloseButton;
243GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
参照カウンタ用配列クラス
Definition GxArrayClassBase.h:145
参照オブジェクト基底クラス
Definition GxBase.h:122
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173