OROCHI
 
Loading...
Searching...
No Matches
GxGuiDesktop.h
Go to the documentation of this file.
1//===========================================================================
10//===========================================================================
11#pragma once
12
13#if GX_DEVELOP
14
15GX_CORE_NAMESPACE_BEGIN()
16
17class GxGuiMenu;
18class GxGuiHover;
19class GxGuiTabPrevious;
20//===========================================================================
22//===========================================================================
23class GxGuiDesktop : public GxGuiBase
24{
25 //-----------------------------------------------------------
27 //-----------------------------------------------------------
29public:
30 GX_RTTI_CLASS(GxGuiDesktop, GxGuiBase)
31 // ClassBaseReference継承クラス用禁止宣言
33
34
35 static constexpr s32 MOUSE_RIGHT_DOWN_POSITION_MARGIN = 5;
37 static constexpr u32 MOUSE_RIGHT_DOWN_COUNT_MAX = 60;
38
40 //-----------------------------------------------------------
42 //-----------------------------------------------------------
44public:
46 GxGuiDesktop(void);
47
49 //-----------------------------------------------------------
51 //-----------------------------------------------------------
53public:
55 void setPopupMenu(GxGuiMenu* pGuiMenu);
57 void setPopupHover(GxGuiHover* pGuiHover);
59 GxGuiHover* setPopupHover(const GxPoint2& position, GX_CSTR pMessage, const GxGuiBase* pOwner, b32 useAdjust = true );
61 void createTabPreview( void );
62
64 void onMouseDown(const GxPoint2& position, u32 button) override;
65
67 void onMouseUp(const GxPoint2& position, u32 button) override;
68
70 void onKeyDown(GxKeyboard::KEY key) override;
71
73 void closeHover(void);
74
75private:
77 GX_FORCE_INLINE b32 canCreateMenu(void)const { return _canCreateMenu; }
79 void createMenu(const GxPoint2& position);
81 void closeMenu(void);
82
84 //-----------------------------------------------------------
86 //-----------------------------------------------------------
88public:
91 GX_FORCE_INLINE void setMenuPropertyTable(const GxPropertyTable& propertyTable){ _menuTable = propertyTable; }
92
94 b32 isOpenMenu( void );
95
97 b32 isOpenTabPreview( void );
98
100 GX_FORCE_INLINE void setCanCreateMenu( b32 can ){ _canCreateMenu = can; }
101
103 void setInScreenWindow( void );
104
106 GX_FORCE_INLINE void setCallBackCreateMenuTable( const GxCallback::GxHandlerBase& handle ){ _handleCreateMenuTable = handle; }
107
109 //-----------------------------------------------------------
111 //-----------------------------------------------------------
113protected:
114 GxPropertyTable _menuTable;
115
116 b32 _canCreateMenu;
117 // マウス右ボタン関連
118 b32 _mouseRightDown;
119 u32 _mouseRightDownCount;
120 GxPoint2 _mouseRightDownPosition;
121
122 GxCallback::GxHandlerBase _handleCreateMenuTable;
123
125};
126
127//===========================================================================
129//===========================================================================
130class GxGuiTabPreview : public GxGuiBase
131{
132 //-----------------------------------------------------------
134 //-----------------------------------------------------------
136public:
137 GX_RTTI_CLASS(GxGuiTabPreview, GxGuiBase)
138 // ClassBaseReference継承クラス用禁止宣言
139 GX_PROHIBIT_CLASS_BASE_REFERENCE(GxGuiTabPreview)
140
141
142 static constexpr u32 MARGIN_LEFT = 6;
144 static constexpr u32 MARGIN_RIGHT = 6;
146 static constexpr u32 MARGIN_TOP = 6;
148 static constexpr u32 MARGIN_BOTTOM = 6;
150 static constexpr u32 MARGIN_NAME_WIDTH = 20;
152 static constexpr u32 NAME_HEIGHT = 24;
153
155 //-----------------------------------------------------------
157 //-----------------------------------------------------------
159public:
161 GxGuiTabPreview(void);
162
164 b32 initialize(void) override;
165
167 //-----------------------------------------------------------
169 //-----------------------------------------------------------
171public:
173 void postDraw( void ) override;
175 void onNoClientDraw( void ) override;
176private:
178 void goNext(void);
180 void goPrevious(void);
181 // ウインド選択
182 void selectWindow(GxGuiBase* pGui);
183
184public:
186 void onKeyDown( GxKeyboard::KEY key ) override;
187
189 void onKeyUp( GxKeyboard::KEY key ) override;
190
192 void onSize( const GxSize& /*size*/ ) override;
193
195 GxRect calculateClientRect( const GxRect& clientRect ) const override;
196
198 GxSize getUseRegionSize( void ) const override;
199
201};
202
203GX_CORE_NAMESPACE_END()
204
205#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
ハンドラ基本クラス
Definition GxCallback.h:27
プロパティテーブルクラス
Definition GxProperty.h:1641
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
32bitブーリアン
Definition GxDefine.h:173