OROCHI
 
Loading...
Searching...
No Matches
GxGuiMessageBox.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 GxGuiButton;
18
19//===========================================================================
21//===========================================================================
22class GxGuiMessageBox : public GxGuiWindow
23{
24 //-----------------------------------------------------------
26 //-----------------------------------------------------------
28public:
29 GX_RTTI_CLASS(GxGuiMessageBox, GxGuiWindow)
30 // 基底継承クラス用禁止宣言
32
33
34 enum class MODE
35 {
36 OK,
37 OK_CANCEL,
38 YES_NO,
39 YES_NO_CANCEL,
40 UNDEFINED,
41 };
42
43private:
45 static constexpr u32 MESSAGE_INTERVAL_TOP = 20;
47 static constexpr u32 MESSAGE_INTERVAL_BOTTOM = 20;
49 static constexpr u32 MESSAGE_INTERVAL_SIDE = 20;
51 static constexpr u32 BUTTON_HEIGHT = 30;
53 static constexpr u32 BUTTON_WIDTH = 60;
55 static constexpr u32 BUTTON_INTERVAL_SIDE = 20;
57 static constexpr u32 BUTTON_INTERVAL_TOP = 20;
59 static constexpr u32 BUTTON_INTERVAL_BOTTOM = 20;
60
62 //-----------------------------------------------------------
64 //-----------------------------------------------------------
66public:
68 GxGuiMessageBox(void);
70 GxGuiMessageBox(GxProperty okYes);
72 GxGuiMessageBox(GxProperty okYes, GxProperty noCancel, MODE mode);
74 GxGuiMessageBox(GxProperty yes, GxProperty no, GxProperty cancel);
75
77 //-----------------------------------------------------------
79 //-----------------------------------------------------------
81public:
83 b32 initialize( void ) override;
85 void cleanup( void ) override;
87 void onDraw( void ) override;
89 void onSize( const GxSize& size ) override;
90
91public:
93 GxSize getUseRegionSize(void) const override;
94
95protected:
97 void onRemoveGui(GxGuiBase* pGui) override;
98
100 GxSize getClampedRegionSize(const GxSize& size) const override;
101
103 void onKeyDown(GxKeyboard::KEY key) override;
104
106 void onYes(void);
107
109 void onNo(void);
110
112 void onCancel(void);
113
115 //-----------------------------------------------------------
117 //-----------------------------------------------------------
119public:
121 GX_FORCE_INLINE void setMessage( const GxString& message ){ _message = message; }
122
124 //-----------------------------------------------------------
126 //-----------------------------------------------------------
128protected:
129 GxGuiButton* _pYesButton;
130 GxGuiButton* _pNoButton;
131 GxGuiButton* _pCancelButton;
132
133 GxString _message;
134 MODE _mode;
135
136 GxRect _messageRect;
137
138 GxProperty _eventYes;
139 GxProperty _eventNo;
140 GxProperty _eventCancel;
141
143};
144GX_CORE_NAMESPACE_END()
145
146#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
プロパティクラス
Definition GxProperty.h:48
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173