OROCHI
 
Loading...
Searching...
No Matches
GxGuiHover.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 GxGuiHover : public GxGuiBase
21{
22 //-----------------------------------------------------------
24 //-----------------------------------------------------------
26public:
27 GX_RTTI_CLASS(GxGuiHover, GxGuiBase)
28 // ClassBaseReference継承クラス用禁止宣言
30
31
32 static const u32 MARGIN_LEFT;
34 static const u32 MARGIN_RIGHT;
36 static const u32 MARGIN_TOP;
38 static const u32 MARGIN_BOTTOM;
39
41 //-----------------------------------------------------------
43 //-----------------------------------------------------------
45public:
47 GxGuiHover(void);
49 GxGuiHover(const GxPoint2& rect, const GxGuiBase* pTargetGui);
50
52 //-----------------------------------------------------------
54 //-----------------------------------------------------------
56public:
58 void update(void) override;
59
61 void setMessage( GX_CSTR message );
62
65 GX_FORCE_INLINE void setMessage( const GxString& message ){ setMessage( message.getString() ); }
66
69 GX_FORCE_INLINE void setBackColor( const GxColor& color ){ _backColor = color; }
70
73 GX_FORCE_INLINE void setMessageColor( const GxColor& color ){ _messageColor = color; }
74protected:
76 void updateSizeFromMessage(void);
77
78public:
80 GxRect calculateClientRect(const GxRect& clientRect) const override;
81
83 void onDraw(void) override;
84
86 void onNoClientDraw(void) override;
87
89 GX_FORCE_INLINE GxGuiBase* getGui(const GxPoint2& /*position*/, const GxRect& /*clipRect*/) override { return nullptr; }
90
92 //-----------------------------------------------------------
94 //-----------------------------------------------------------
96public:
98 static GxSize calcUseSize( GX_CSTR message );
99
101 //-----------------------------------------------------------
103 //-----------------------------------------------------------
105protected:
106 const GxGuiBase* _pTargetGui;
107 GxString _message;
108 GxColor _backColor;
109 GxColor _messageColor;
110
112};
113
114GX_CORE_NAMESPACE_END()
115
116#endif // GX_DEVELOP
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
Definition GxColor.h:21
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
GX_FORCE_INLINE GX_STR getString(void)
文字列取得
Definition GxString.h:165