MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_SKIN_ITEM_H__ 00008 #define __MYGUI_SKIN_ITEM_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 #include "MyGUI_LayerItem.h" 00012 #include "MyGUI_ISubWidgetRect.h" 00013 #include "MyGUI_ISubWidgetText.h" 00014 #include "MyGUI_ResourceSkin.h" 00015 00016 namespace MyGUI 00017 { 00018 00019 class MYGUI_EXPORT SkinItem : 00020 public LayerItem 00021 { 00022 public: 00023 SkinItem(); 00024 00026 ISubWidgetText* getSubWidgetText(); 00028 ISubWidgetRect* getSubWidgetMain(); 00029 00030 void _setTextureName(const std::string& _texture); 00031 const std::string& _getTextureName() const; 00032 00033 protected: 00034 void _createSkinItem(ResourceSkin* _info); 00035 void _deleteSkinItem(); 00036 00037 void _setSkinItemAlign(const IntSize& _size); 00038 void _setSkinItemVisible(bool _value); 00039 void _setSkinItemColour(const Colour& _value); 00040 void _setSkinItemAlpha(float _value); 00041 void _correctSkinItemView(); 00042 void _updateSkinItemView(); 00043 00044 bool _setSkinItemState(const std::string& _state); 00045 void _setSubSkinVisible(bool _visible); 00046 00047 private: 00048 // вектор всех детей сабскинов 00049 VectorSubWidget mSubSkinChild; 00050 // указатель на окно текста 00051 ISubWidgetText* mText; 00052 // указатель на первый не текстовой сабскин 00053 ISubWidgetRect* mMainSkin; 00054 // список всех стейтов 00055 MapWidgetStateInfo mStateInfo; 00056 00057 std::string mTextureName; 00058 ITexture* mTexture; 00059 00060 bool mSubSkinsVisible; 00061 }; 00062 00063 } // namespace MyGUI 00064 00065 #endif // __MYGUI_SKIN_ITEM_H__