MyGUI 3.4.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
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 // вектор всех детей сабскинов
46 VectorSubWidget mSubSkinChild;
47 // указатель на окно текста
48 ISubWidgetText* mText{nullptr};
49 // указатель на первый не текстовой сабскин
50 ISubWidgetRect* mMainSkin{nullptr};
51 // список всех стейтов
52 MapWidgetStateInfo mStateInfo;
53
54 std::string mTextureName;
55 ITexture* mTexture{nullptr};
56
57 bool mSubSkinsVisible{true};
58 };
59
60} // namespace MyGUI
61
62#endif // MYGUI_SKIN_ITEM_H_
#define MYGUI_EXPORT
std::map< std::string, VectorStateInfo, std::less<> > MapWidgetStateInfo
std::vector< ISubWidget * > VectorSubWidget