MyGUI: MyGUI_ResourceSkin.h Source File

MyGUI 3.4.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
17namespace MyGUI
18{
19
20 // вспомогательный класс для инициализации одного скина
21 class MYGUI_EXPORT ResourceSkin :
22 public IResource
23 {
24 MYGUI_RTTI_DERIVED( ResourceSkin )
25
26 public:
27 ResourceSkin();
28 ~ResourceSkin() override;
29
30 void deserialization(xml::ElementPtr _node, Version _version) override;
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_ChildSkinInfo.h
MyGUI_IResource.h
MyGUI_MaskPickInfo.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:48
MyGUI_SubWidgetBinding.h
MyGUI_SubWidgetInfo.h
MyGUI::IResource
Definition MyGUI_IResource.h:25
MyGUI::ResourceSkin
Definition MyGUI_ResourceSkin.h:23
MyGUI::SubWidgetBinding
Definition MyGUI_SubWidgetBinding.h:18
MyGUI::Version
Definition MyGUI_Version.h:18
MyGUI::xml::Element
Definition MyGUI_XmlDocument.h:159
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::MapWidgetStateInfo
std::map< std::string, VectorStateInfo > MapWidgetStateInfo
Definition MyGUI_IStateInfo.h:24
MyGUI::MapString
std::map< std::string, std::string > MapString
Definition MyGUI_Types.h:40
MyGUI::VectorSubWidgetInfo
std::vector< SubWidgetInfo > VectorSubWidgetInfo
Definition MyGUI_SubWidgetInfo.h:32
MyGUI::VectorChildSkinInfo
std::vector< ChildSkinInfo > VectorChildSkinInfo
Definition MyGUI_ChildSkinInfo.h:33
MyGUI::MapStateInfo
std::map< std::string, IStateInfo * > MapStateInfo
Definition MyGUI_IStateInfo.h:23
MyGUI::ChildSkinInfo
Definition MyGUI_ChildSkinInfo.h:18
MyGUI::types::TSize< int >