OROCHI
 
Loading...
Searching...
No Matches
GxGuiPropertyComboBoxEnum.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17//===========================================================================
19//===========================================================================
20class GxGuiPropertyComboBoxEnum : public GxGuiPropertyComboBox
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 GX_RTTI_CLASS(GxGuiPropertyComboBoxEnum, GxGuiPropertyComboBox)
28 // ClassBaseReference継承クラス用禁止宣言
29 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiPropertyComboBoxEnum)
30
31private:
32 class GxEnumData;
33
35 static constexpr u32 ENUM_TABLE_MAX = GxMath::VALUE_1K;
36
38 //-----------------------------------------------------------
40 //-----------------------------------------------------------
42public:
44 GxGuiPropertyComboBoxEnum(void);
45
47 GxGuiPropertyComboBoxEnum(const GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, u32 index = 0, NAME_TYPE nameType = NAME_TYPE::LEFT);
48
50 GxGuiPropertyComboBoxEnum(const GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, const GX_ENUM* pEnum, u32 count );
51
53 GxGuiPropertyComboBoxEnum(const GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, u32 index, NAME_TYPE nameType, const GX_ENUM* pEnum, u32 count );
54
56 //-----------------------------------------------------------
58 //-----------------------------------------------------------
60public:
62 void addEnumData( const GX_ENUM& enumData );
63
65 void addPageBegin( GX_CSTR name, u32 attribute = 0 );
66
68 void addPageEnd( void );
69
71 GX_FORCE_INLINE void clear( void ){ _propertyTable.clear(); }
72
73protected:
75 void menuComboBoxCallback(void* pArgument);
76
78 GX_CSTR getCurrentComboBoxPropertyVirtualName(void);
79
81 //-----------------------------------------------------------
83 //-----------------------------------------------------------
85protected:
87 GX_FORCE_INLINE b32 isDefaultValue(void) override { return isDefaultValueSub<s32>(); }
89 GX_FORCE_INLINE void setDefaultValue( void ) override { setDefaultValueSub<s32>(); }
90
92};
93
94//===========================================================================
96//===========================================================================
97class GxGuiPropertyComboBoxEnum::GxEnumData : public GxClassBase
98{
99 //-----------------------------------------------------------
101 //-----------------------------------------------------------
103public:
104 GX_RTTI_CLASS(GxEnumData, GxClassBase)
105 // GxClassBase継承の禁止宣言
106 GX_PROHIBIT_CLASS_BASE(GxEnumData)
107 // new, delete定義
108 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
109
110
111 //-----------------------------------------------------------
113 //-----------------------------------------------------------
115public:
117 GxEnumData(void) : _value(0){};
119 GxEnumData( GX_CSTR name, s32 value ) : _name(name), _value(value){};
120
122 //-----------------------------------------------------------
124 //-----------------------------------------------------------
126public:
128 constexpr GX_CSTR getName( void ) const { return _name.getString(); }
129
131 constexpr s32 getValue( void ) const { return _value; }
132
134 //-----------------------------------------------------------
136 //-----------------------------------------------------------
138protected:
139 GxString _name;
140 s32 _value;
141
143};
144
145GX_CORE_NAMESPACE_END()
146
147#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
#define GX_PROHIBIT_CLASS_BASE(__CLASS__)
GxClassBase継承の禁止宣言
Definition GxBase.h:240
void GxTypedObject
その他
Definition GxDefine.h:213
オブジェクト基底クラス
Definition GxBase.h:88
static constexpr u32 VALUE_1K
1K
Definition GxMath.h:129
プロパティクラス
Definition GxProperty.h:48
実行時型情報クラス
Definition GxRtti.h:154
GUI用
Definition GxDefine.h:194
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173