MyGUI_SkinItem.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_SKIN_ITEM_H_
#define MYGUI_SKIN_ITEM_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_LayerItem.h"
#include "MyGUI_ISubWidgetRect.h"
#include "MyGUI_ISubWidgetText.h"
#include "MyGUI_ResourceSkin.h"
namespace MyGUI
{
class MYGUI_EXPORT SkinItem : public LayerItem
{
public:
ISubWidgetText* getSubWidgetText() const;
ISubWidgetRect* getSubWidgetMain() const;
void _setTextureName(std::string_view _texture);
const std::string& _getTextureName() const;
protected:
void _createSkinItem(ResourceSkin* _info);
void _deleteSkinItem();
void _setSkinItemAlign(const IntSize& _size);
void _setSkinItemVisible(bool _value);
void _setSkinItemColour(const Colour& _value);
void _setSkinItemAlpha(float _value);
void _correctSkinItemView();
void _updateSkinItemView();
bool _setSkinItemState(std::string_view _state);
void _setSubSkinVisible(bool _visible);
private:
// вектор всех детей сабскинов
VectorSubWidget mSubSkinChild;
// указатель на окно текста
ISubWidgetText* mText{nullptr};
// указатель на первый не текстовой сабскин
ISubWidgetRect* mMainSkin{nullptr};
// список всех стейтов
MapWidgetStateInfo mStateInfo;
std::string mTextureName;
ITexture* mTexture{nullptr};
bool mSubSkinsVisible{true};
};
} // namespace MyGUI
#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