MyGUI 3.5.3
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"
14#include "MyGUI_ResourceSkin.h"
15
16namespace MyGUI
17{
18
19 class MYGUI_EXPORT SkinItem : public LayerItem
20 {
21 public:
23 ISubWidgetText* getSubWidgetText() const;
25 ISubWidgetRect* getSubWidgetMain() const;
26
27 void _setTextureName(std::string_view _texture);
28 const std::string& _getTextureName() const;
29
30 protected:
31 void _createSkinItem(ResourceSkin* _info);
32 void _deleteSkinItem();
33
34 void _setSkinItemAlign(const IntSize& _size);
35 void _setSkinItemVisible(bool _value);
36 void _setSkinItemColour(const Colour& _value);
37 void _setSkinItemAlpha(float _value);
38 void _correctSkinItemView();
39 void _updateSkinItemView();
40
41 bool _setSkinItemState(std::string_view _state);
42 void _setSubSkinVisible(bool _visible);
43
44 private:
45 VectorSubWidget mSubSkinChild;
46 ISubWidgetText* mText{nullptr};
47 ISubWidgetRect* mMainSkin{nullptr};
48 MapWidgetStateInfo mStateInfo;
49
50 std::string mTextureName;
51 ITexture* mTexture{nullptr};
52
53 bool mSubSkinsVisible{true};
54 };
55
56} // namespace MyGUI
57
58#endif // MYGUI_SKIN_ITEM_H_
#define MYGUI_EXPORT
std::map< std::string, VectorStateInfo, std::less<> > MapWidgetStateInfo
std::vector< ISubWidget * > VectorSubWidget