MyGUI
3.2.0
|
00001 00006 /* 00007 This file is part of MyGUI. 00008 00009 MyGUI is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU Lesser General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 MyGUI is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 along with MyGUI. If not, see <http://www.gnu.org/licenses/>. 00021 */ 00022 #ifndef __MYGUI_SKIN_ITEM_H__ 00023 #define __MYGUI_SKIN_ITEM_H__ 00024 00025 #include "MyGUI_Prerequest.h" 00026 #include "MyGUI_LayerItem.h" 00027 #include "MyGUI_ISubWidgetRect.h" 00028 #include "MyGUI_ISubWidgetText.h" 00029 #include "MyGUI_ResourceSkin.h" 00030 00031 namespace MyGUI 00032 { 00033 00034 class MYGUI_EXPORT SkinItem : 00035 public LayerItem 00036 { 00037 public: 00038 SkinItem(); 00039 00041 ISubWidgetText* getSubWidgetText(); 00043 ISubWidgetRect* getSubWidgetMain(); 00044 00045 void _setTextureName(const std::string& _texture); 00046 const std::string& _getTextureName() const; 00047 00048 protected: 00049 void _createSkinItem(ResourceSkin* _info); 00050 void _deleteSkinItem(); 00051 00052 void _setSkinItemAlign(const IntSize& _size); 00053 void _setSkinItemVisible(bool _value); 00054 void _setSkinItemColour(const Colour& _value); 00055 void _setSkinItemAlpha(float _value); 00056 void _correctSkinItemView(); 00057 void _updateSkinItemView(); 00058 00059 bool _setSkinItemState(const std::string& _state); 00060 void _setSubSkinVisible(bool _visible); 00061 00062 private: 00063 // вектор всех детей сабскинов 00064 VectorSubWidget mSubSkinChild; 00065 // указатель на окно текста 00066 ISubWidgetText* mText; 00067 // указатель на первый не текстовой сабскин 00068 ISubWidgetRect* mMainSkin; 00069 // список всех стейтов 00070 MapWidgetStateInfo mStateInfo; 00071 00072 std::string mTextureName; 00073 ITexture* mTexture; 00074 00075 bool mSubSkinsVisible; 00076 }; 00077 00078 } // namespace MyGUI 00079 00080 #endif // __MYGUI_SKIN_ITEM_H__