MyGUI: MyGUI_SkinItem.h Source File

MyGUI 3.2.2

MyGUI_SkinItem.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_SKIN_ITEM_H_
8 #define MYGUI_SKIN_ITEM_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_LayerItem.h"
12 #include "MyGUI_ISubWidgetRect.h"
13 #include "MyGUI_ISubWidgetText.h"
14 #include "MyGUI_ResourceSkin.h"
15
16 namespace MyGUI
17 {
18
19 class MYGUI_EXPORT SkinItem :
20 public LayerItem
21 {
22 public:
23 SkinItem();
24
26 ISubWidgetText* getSubWidgetText();
28 ISubWidgetRect* getSubWidgetMain();
29
30 void _setTextureName(const std::string& _texture);
31 const std::string& _getTextureName() const;
32
33 protected:
34 void _createSkinItem(ResourceSkin* _info);
35 void _deleteSkinItem();
36
37 void _setSkinItemAlign(const IntSize& _size);
38 void _setSkinItemVisible(bool _value);
39 void _setSkinItemColour(const Colour& _value);
40 void _setSkinItemAlpha(float _value);
41 void _correctSkinItemView();
42 void _updateSkinItemView();
43
44 bool _setSkinItemState(const std::string& _state);
45 void _setSubSkinVisible(bool _visible);
46
47 private:
48 // вектор всех детей сабскинов
49 VectorSubWidget mSubSkinChild;
50 // указатель на окно текста
51 ISubWidgetText* mText;
52 // указатель на первый не текстовой сабскин
53 ISubWidgetRect* mMainSkin;
54 // список всех стейтов
55 MapWidgetStateInfo mStateInfo;
56
57 std::string mTextureName;
58 ITexture* mTexture;
59
60 bool mSubSkinsVisible;
61 };
62
63 } // namespace MyGUI
64
65 #endif // MYGUI_SKIN_ITEM_H_
MyGUI::ISubWidgetText
Definition: MyGUI_ISubWidgetText.h:18
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition: MyGUI_ISubWidget.h:21
MyGUI::ResourceSkin
Definition: MyGUI_ResourceSkin.h:21
MyGUI::LayerItem
Definition: MyGUI_LayerItem.h:20
MyGUI_ISubWidgetRect.h
MyGUI_LayerItem.h
MyGUI_ISubWidgetText.h
MyGUI_Prerequest.h
MyGUI::types::TSize< int >
MyGUI::ISubWidgetRect
Definition: MyGUI_ISubWidgetRect.h:17
MyGUI::ITexture
Definition: MyGUI_ITexture.h:26
MyGUI::SkinItem
Definition: MyGUI_SkinItem.h:19
MyGUI::Colour
Definition: MyGUI_Colour.h:16
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI
Definition: MyGUI_ActionController.h:14
MyGUI::MapWidgetStateInfo
std::map< std::string, VectorStateInfo > MapWidgetStateInfo
Definition: MyGUI_IStateInfo.h:27
MyGUI_ResourceSkin.h