OROCHI
 
Loading...
Searching...
No Matches
GxGuiFormGuiTree.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 GxGuiFormGuiTree : public GxGuiFormTreeBase
20{
21 //-----------------------------------------------------------
23 //-----------------------------------------------------------
25public:
26 GX_RTTI_CLASS(GxGuiFormGuiTree, GxGuiFormTreeBase)
27 // 基底継承クラス用禁止宣言
28 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiFormGuiTree)
29
30
31 //-----------------------------------------------------------
33 //-----------------------------------------------------------
35public:
37 GxGuiFormGuiTree( void );
39 GxGuiFormGuiTree( GxToolBase* pTool );
40
42 //-----------------------------------------------------------
44 //-----------------------------------------------------------
46protected:
48 GxGuiFormTreeBodyBase* createTreeBody( void ) override;
49
51};
52
53//===========================================================================
55//===========================================================================
56class GxGuiFormGuiTreeBody : public GxGuiFormTreeBodyBase
57{
58 //-----------------------------------------------------------
60 //-----------------------------------------------------------
62public:
63 GX_RTTI_CLASS(GxGuiFormGuiTreeBody, GxGuiFormTreeBodyBase)
64 // 基底継承クラス用禁止宣言
65 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiFormGuiTreeBody)
66
67private:
69 static constexpr u32 INITIAL_ALLOCATE_DRAW_NODE_COUNT = GxMath::VALUE_512;
70
72 //-----------------------------------------------------------
74 //-----------------------------------------------------------
76public:
78 GxGuiFormGuiTreeBody( void );
79
81 b32 initialize( void ) override;
82
84 //-----------------------------------------------------------
86 //-----------------------------------------------------------
88protected:
90 void update( void ) override;
91
93 void onDraw( void ) override;
94
96 void onDoubleClick( const GxPoint2& position, u32 button ) override;
98 void onMouseDown( const GxPoint2& position, u32 button ) override;
99
101 void onMouseWheel( const GxPoint2& position, s32 rotate ) override;
102
103private:
105 void setControlIconRect( s32 clickIndex, GxRect* pRect );
107 void setMarkIconRect( GxGuiBase* pGui, s32 clickIndex, GxRect* pRect );
108
110 void addSelectNode( GxGuiBase* pGui, b32 isExistsCheck = true );
112 void removeSelectNode( GxGuiBase* pGui, b32 isExistsCheck = true );
114 void eraseAllSelectNode( void );
116 void updateSelectNodeArray( GxGuiBase* pGui );
117
119 void addClickNode( GxGuiBase* pGui, b32 isExistsCheck = true );
121 void removeClickNode( GxGuiBase* pGui, b32 isExistsCheck = true );
123 void updateClickNodeArray( GxGuiBase* pGui );
124
126 void addSearchOnClickNode( GxGuiBase* pGui );
128 void removeAllSearchClickNode( void );
130 b32 isOpenChildren( GxGuiBase* pGui ) const;
131
133 void createToolGuiProperty( void );
134
136 static b32 findSearchString( GxGuiBase* pGui, GX_CSTR searchString );
138 static b32 findSearchStringChildren( GxGuiBase* pGui, GX_CSTR searchString );
140 static b32 findSearchStringChildrenInner( GxGuiBase* pGui, GX_CSTR searchString, GxGuiBase* pFindRoot );
141
143 b32 isDrawControlIcon( GxGuiBase* pGui ) const;
144
146 void drawTree( GxGuiBase* pGui, const u32 depth, GxRect& rect );
148 void drawNode( GxGuiBase* pGui, const u32 depth, const GxRect& rect );
149
151 //-----------------------------------------------------------
153 //-----------------------------------------------------------
155private:
156 GxClassBaseRoot* _pLastSelectNode;
157
158 GxArrayClassBase _selectNodeArray;
159
161};
162
163GX_CORE_NAMESPACE_END()
164
165#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
配列クラス
Definition GxArrayClassBase.h:18
基底クラス
Definition GxBase.h:51
static constexpr u32 VALUE_512
512
Definition GxMath.h:128
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
32bitブーリアン
Definition GxDefine.h:173