OROCHI
 
Loading...
Searching...
No Matches
GxGuiPropertyComboBoxProperty.h
Go to the documentation of this file.
1//===========================================================================
9//===========================================================================
10#pragma once
11
12#if GX_DEVELOP
13
14GX_CORE_NAMESPACE_BEGIN()
15
16//===========================================================================
18//===========================================================================
19class GxGuiPropertyComboBoxProperty : public GxGuiPropertyComboBox
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
26 GX_RTTI_CLASS(GxGuiPropertyComboBoxProperty, GxGuiPropertyComboBox)
27 // ClassBaseReference継承クラス用禁止宣言
28 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiPropertyComboBoxProperty)
29
30
31 typedef void (GxClassBaseRoot::* SELECT_CALLBACK)( GxProperty* pProperty, GxProperty* pChildProperty );
32
33private:
34 class GxComboBoxData;
35
37 //-----------------------------------------------------------
39 //-----------------------------------------------------------
41public:
43 GxGuiPropertyComboBoxProperty( void );
45 GxGuiPropertyComboBoxProperty( const GxProperty& property, GxTypedObject* pOwner, const GxRtti& rtti, const GxRtti& objectRtti, const GxProperty* pSaveChildProperty, const GxProperty::TYPE* pPermissionPropertyTypeArray, u32 permissionPropertyTypeNum, SELECT_CALLBACK selectCallback = nullptr, u32 index = 0, NAME_TYPE nameType = NAME_TYPE::LEFT );
46
48 //-----------------------------------------------------------
50 //-----------------------------------------------------------
52protected:
54 void menuComboBoxCallback( void* pArgument );
55
56private:
58 void initializeData( const GxRtti& rtti, const GxProperty* pSaveChildProperty );
59
61 //-----------------------------------------------------------
63 //-----------------------------------------------------------
65protected:
67 b32 isDefaultValue(void) override;
69 void setDefaultValue( void ) override;
70
72 GX_CSTR getCurrentComboBoxPropertyVirtualName(void) override;
73
74private:
76 b32 isPermissionPropertyType( GxProperty::TYPE targetType );
78 void setProperty( GxComboBoxData* pData );
80 void executeSelectCallback( GxProperty* pProperty, GxProperty* pChildProperty );
81
83 //-----------------------------------------------------------
85 //-----------------------------------------------------------
87protected:
88 GxString _currentDisplayName;
89 u32 _currentListIndex;
90
91 const GxProperty::TYPE* _pPermissionPropertyTypeArray;
92 u32 _permissionPropertyTypeNum;
93
94 SELECT_CALLBACK _pSelectCallback;
95
97};
98
99//===========================================================================
101//===========================================================================
102class GxGuiPropertyComboBoxProperty::GxComboBoxData : public GxClassBase
103{
104 //-----------------------------------------------------------
106 //-----------------------------------------------------------
108public:
109 GX_RTTI_CLASS(GxComboBoxData, GxClassBase)
110 // GxClassBase継承の禁止宣言
111 GX_PROHIBIT_CLASS_BASE(GxComboBoxData)
112 // new, delete定義
113 GX_OPERATOR_NEW_DELETE(GxAllocatorList::ALLOCATOR_TYPE::DEVELOP)
114
115
116 //-----------------------------------------------------------
118 //-----------------------------------------------------------
120public:
122 GxComboBoxData( void )
123 : _index(0)
124 , _pProperty(nullptr)
125 , _pChildProperty(nullptr)
126 {};
128 GxComboBoxData( u32 index, GxProperty* pPropery, GxProperty* pChildProperty )
129 : _index(index)
130 , _pProperty(pPropery)
131 , _pChildProperty(pChildProperty)
132 {};
133
135 //-----------------------------------------------------------
137 //-----------------------------------------------------------
139public:
141 constexpr u32 getIndex( void ) const { return _index; }
143 constexpr GxProperty* getProperty( void ) const { return _pProperty; }
145 constexpr GxProperty* getChildProperty( void ) const { return _pChildProperty; }
146
148 //-----------------------------------------------------------
150 //-----------------------------------------------------------
152protected:
153 u32 _index;
154 GxProperty* _pProperty;
155 GxProperty* _pChildProperty;
156
158};
159
160GX_CORE_NAMESPACE_END()
161
162#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
基底クラス
Definition GxBase.h:51
プロパティクラス
Definition GxProperty.h:48
TYPE
タイプ定義
Definition GxProperty.h:56
実行時型情報クラス
Definition GxRtti.h:154
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173