MyGUI 3.2.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ResourceSkin.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_RESOURCE_SKIN_H_
8 #define MYGUI_RESOURCE_SKIN_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_SubWidgetBinding.h"
12 #include "MyGUI_ChildSkinInfo.h"
13 #include "MyGUI_MaskPickInfo.h"
14 #include "MyGUI_IResource.h"
15 #include "MyGUI_SubWidgetInfo.h"
16
17 namespace MyGUI
18 {
19
20 // вспомогательный класс для инициализации одного скина
21 class MYGUI_EXPORT ResourceSkin :
22 public IResource
23 {
24 MYGUI_RTTI_DERIVED( ResourceSkin )
25
26 public:
27 ResourceSkin();
28 virtual ~ResourceSkin();
29
30 virtual void deserialization(xml::ElementPtr _node, Version _version);
31
32 const IntSize& getSize() const;
33 const std::string& getTextureName() const;
34 const VectorSubWidgetInfo& getBasisInfo() const;
35 const MapWidgetStateInfo& getStateInfo() const;
36 const MapString& getProperties() const;
37 const VectorChildSkinInfo& getChild() const;
38 const std::string& getSkinName() const;
39
40 private:
41 void setInfo(const IntSize& _size, const std::string& _texture);
42 void addInfo(const SubWidgetBinding& _bind);
43 void addProperty(const std::string& _key, const std::string& _value);
44 void addChild(const ChildSkinInfo& _child);
45 void clear();
46
47 void checkState(const MapStateInfo& _states);
48 void checkState(const std::string& _name);
49 void checkBasis();
50 void fillState(const MapStateInfo& _states, size_t _index);
51
52 private:
53 IntSize mSize;
54 std::string mTexture;
55 VectorSubWidgetInfo mBasis;
56 MapWidgetStateInfo mStates;
57 // дополнительные параметры скина
58 MapString mProperties;
59 // дети скина
60 VectorChildSkinInfo mChilds;
61 std::string mSkinName;
62 };
63
64 } // namespace MyGUI
65
66 #endif // MYGUI_RESOURCE_SKIN_H_
MyGUI::MapWidgetStateInfo
std::map< std::string, VectorStateInfo > MapWidgetStateInfo
Definition: MyGUI_IStateInfo.h:27
MyGUI::ResourceSkin
Definition: MyGUI_ResourceSkin.h:21
MyGUI_Prerequest.h
MyGUI::types::TSize< int >
MyGUI::xml::ElementPtr
Element * ElementPtr
Definition: MyGUI_XmlDocument.h:104
MyGUI_SubWidgetInfo.h
MyGUI::ChildSkinInfo
Definition: MyGUI_ChildSkinInfo.h:16
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:65
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI_ChildSkinInfo.h
MyGUI_MaskPickInfo.h
MyGUI::MapStateInfo
std::map< std::string, IStateInfo * > MapStateInfo
Definition: MyGUI_IStateInfo.h:26
MyGUI::MapString
std::map< std::string, std::string > MapString
Definition: MyGUI_Types.h:38
MyGUI::VectorSubWidgetInfo
std::vector< SubWidgetInfo > VectorSubWidgetInfo
Definition: MyGUI_SubWidgetInfo.h:32
MyGUI_IResource.h
MyGUI::Version
Definition: MyGUI_Version.h:17
MyGUI_SubWidgetBinding.h
MyGUI::IResource
Definition: MyGUI_IResource.h:23
MyGUI::VectorChildSkinInfo
std::vector< ChildSkinInfo > VectorChildSkinInfo
Definition: MyGUI_ChildSkinInfo.h:32
MyGUI::SubWidgetBinding
Definition: MyGUI_SubWidgetBinding.h:17