MyGUI 3.5.3
MyGUI_CommonStateInfo.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_COMMON_STATE_INFO_H_
8#define MYGUI_COMMON_STATE_INFO_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_IStateInfo.h"
15
16namespace MyGUI
17{
18
19 class MYGUI_EXPORT SubSkinStateInfo : public IStateInfo
20 {
21 MYGUI_RTTI_DERIVED(SubSkinStateInfo)
22
23 public:
24 const FloatRect& getRect() const
25 {
26 return mRect;
27 }
28
29 private:
30 void deserialization(xml::ElementPtr _node, Version _version) override;
31
32 private:
33 FloatRect mRect;
34 };
35
36 class MYGUI_EXPORT TileRectStateInfo : public IStateInfo
37 {
38 MYGUI_RTTI_DERIVED(TileRectStateInfo)
39
40 public:
41 const FloatRect& getRect() const
42 {
43 return mRect;
44 }
45
46 const IntSize& getTileSize() const
47 {
48 return mTileSize;
49 }
50
51 bool getTileH() const
52 {
53 return mTileH;
54 }
55
56 bool getTileV() const
57 {
58 return mTileV;
59 }
60
61 private:
62 void deserialization(xml::ElementPtr _node, Version _version) override;
63
64 private:
65 FloatRect mRect;
66 IntSize mTileSize;
67 bool mTileH{true};
68 bool mTileV{true};
69 };
70
71#ifndef MYGUI_DONT_USE_OBSOLETE
72 class MYGUI_EXPORT RotatingSkinStateInfo : public IStateInfo
73 {
74 MYGUI_RTTI_DERIVED(RotatingSkinStateInfo)
75
76 public:
77 float getAngle() const
78 {
79 return mAngle;
80 }
81
82 const IntPoint& getCenter() const
83 {
84 return mCenter;
85 }
86
87 const FloatRect& getRect() const
88 {
89 return mRect;
90 }
91
92 private:
93 void deserialization(xml::ElementPtr _node, Version _version) override;
94
95 private:
96 FloatRect mRect;
97 IntPoint mCenter;
98 float mAngle{0}; // Angle in radians
99 };
100#endif // MYGUI_DONT_USE_OBSOLETE
101
102
103 class MYGUI_EXPORT EditTextStateInfo : public IStateInfo
104 {
105 MYGUI_RTTI_DERIVED(EditTextStateInfo)
106
107 public:
108 const Colour& getColour() const
109 {
110 return mColour;
111 }
112
113 bool getShift() const
114 {
115 return mShift;
116 }
117
118 private:
119 void deserialization(xml::ElementPtr _node, Version _version) override;
120
121 private:
122 Colour mColour{Colour::White};
123 bool mShift{false};
124 };
125
126} // namespace MyGUI
127
128#endif // MYGUI_COMMON_STATE_INFO_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:67
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:26
types::TRect< float > FloatRect
Definition MyGUI_Types.h:33
types::TSize< int > IntSize
Definition MyGUI_Types.h:29