MyGUI: MyGUI_SkinItem.h Source File

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"
12#include "MyGUI_ISubWidgetRect.h"
13#include "MyGUI_ISubWidgetText.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 // вектор всех детей сабскинов
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_
MyGUI_ISubWidgetRect.h
MyGUI_ISubWidgetText.h
MyGUI_LayerItem.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_ResourceSkin.h
MyGUI::ISubWidgetRect
Definition MyGUI_ISubWidgetRect.h:18
MyGUI::ISubWidgetText
Definition MyGUI_ISubWidgetText.h:19
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::LayerItem
Definition MyGUI_LayerItem.h:21
MyGUI::ResourceSkin
Definition MyGUI_ResourceSkin.h:22
MyGUI::SkinItem
Definition MyGUI_SkinItem.h:20
MyGUI::SkinItem::getSubWidgetMain
ISubWidgetRect * getSubWidgetMain() const
Definition MyGUI_SkinItem.cpp:153
MyGUI::SkinItem::_correctSkinItemView
void _correctSkinItemView()
Definition MyGUI_SkinItem.cpp:45
MyGUI::SkinItem::getSubWidgetText
ISubWidgetText * getSubWidgetText() const
Definition MyGUI_SkinItem.cpp:148
MyGUI::SkinItem::_setSkinItemAlpha
void _setSkinItemAlpha(float _value)
Definition MyGUI_SkinItem.cpp:39
MyGUI::SkinItem::_createSkinItem
void _createSkinItem(ResourceSkin *_info)
Definition MyGUI_SkinItem.cpp:73
MyGUI::SkinItem::_setTextureName
void _setTextureName(std::string_view _texture)
Definition MyGUI_SkinItem.cpp:126
MyGUI::SkinItem::_setSkinItemColour
void _setSkinItemColour(const Colour &_value)
Definition MyGUI_SkinItem.cpp:29
MyGUI::SkinItem::_setSkinItemState
bool _setSkinItemState(std::string_view _state)
Definition MyGUI_SkinItem.cpp:57
MyGUI::SkinItem::_getTextureName
const std::string & _getTextureName() const
Definition MyGUI_SkinItem.cpp:134
MyGUI::SkinItem::_deleteSkinItem
void _deleteSkinItem()
Definition MyGUI_SkinItem.cpp:110
MyGUI::SkinItem::_updateSkinItemView
void _updateSkinItemView()
Definition MyGUI_SkinItem.cpp:51
MyGUI::SkinItem::_setSubSkinVisible
void _setSubSkinVisible(bool _visible)
Definition MyGUI_SkinItem.cpp:139
MyGUI::SkinItem::_setSkinItemAlign
void _setSkinItemAlign(const IntSize &_size)
Definition MyGUI_SkinItem.cpp:17
MyGUI::SkinItem::_setSkinItemVisible
void _setSkinItemVisible(bool _value)
Definition MyGUI_SkinItem.cpp:23
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::MapWidgetStateInfo
std::map< std::string, VectorStateInfo, std::less<> > MapWidgetStateInfo
Definition MyGUI_IStateInfo.h:23
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition MyGUI_ISubWidget.h:22
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::Colour
Definition MyGUI_Colour.h:17