OROCHI
 
Loading...
Searching...
No Matches
GxGuiPropertyClass.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 GxGuiPropertyClass : public GxGuiFormProperty
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 GX_RTTI_CLASS(GxGuiPropertyClass, GxGuiFormProperty)
28 // GxClassBaseReference継承クラス用禁止宣言
29 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiPropertyClass)
30
31
32 //-----------------------------------------------------------
34 //-----------------------------------------------------------
36public:
38 GxGuiPropertyClass(void);
40 GxGuiPropertyClass(const GxProperty& property, GxTypedObject* pOwner, u32 index = 0 );
41
43 //-----------------------------------------------------------
45 //-----------------------------------------------------------
47public:
49 b32 initialize( void ) override;
51 void update( void ) override;
52
54 void updateGuiList( const GxString& searchString );
55
56protected:
58 void onExpand(b32 on) override;
59
61 void onKeyDown(GxKeyboard::KEY key) override;
62
64 void setPropertyValueFromChild(void) override;
65
66private:
68 void updateTitle(void);
69
71 void updateGuiList(void);
72
74 static void createPropertyTable(GxRtti* pRtti, GxPropertyTable& propertyTable);
76 static b32 searchProperty( const GxProperty& property, const GxString& searchString, GxTypedObject* pTypedObject, u32 arrayIndex, u32 tableIndex );
77
79 //-----------------------------------------------------------
81 //-----------------------------------------------------------
83public:
85 GX_FORCE_INLINE const GxProperty& getProperty( void ) const { return _property; }
86
88 constexpr GxTypedObject* getOwner( void ){ return _pObjectOwner; }
89
91 constexpr u32 getIndex( void ) const { return _index; }
92
95 template<typename T> void getPropertyValue( T& value ) const
96 {
97 _property.getValue( _pObjectOwner, value, _index );
98 }
99
101 void updatePropertyModifier( void );
103 void setPropertyModifierFunction(GX_GUI_PROPERTY_MODIFIER_FUNCTION pFunction);
104
105protected:
107 GxTypedObject* getTypedObjectPointer( void );
108
110 GX_FORCE_INLINE GxRtti* getRttiPointer( void ) const { return _property.getRttiPointer( _pObjectOwner,_index ); }
111
113 //-----------------------------------------------------------
115 //-----------------------------------------------------------
117protected:
118 GxProperty _property;
119 GxTypedObject* _pObjectOwner;
120 u32 _index;
121
122 GxTypedObject* _pTypedObject;
123 GX_GUI_PROPERTY_MODIFIER_FUNCTION _pModifierFunction;
124
126};
127
128GX_CORE_NAMESPACE_END()
129
130#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
void GxTypedObject
その他
Definition GxDefine.h:213
プロパティクラス
Definition GxProperty.h:48
void getValue(const GxTypedObject *pObject, GX_CHAR &value, u32 index=0) const
値を取得
Definition GxProperty.h:473
プロパティテーブルクラス
Definition GxProperty.h:1641
実行時型情報クラス
Definition GxRtti.h:154
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173