MyGUI
3.0.1
|
00001 00007 /* 00008 This file is part of MyGUI. 00009 00010 MyGUI is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as published by 00012 the Free Software Foundation, either version 3 of the License, or 00013 (at your option) any later version. 00014 00015 MyGUI is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public License 00021 along with MyGUI. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 #ifndef __MYGUI_SUB_SKIN_H__ 00024 #define __MYGUI_SUB_SKIN_H__ 00025 00026 #include "MyGUI_Prerequest.h" 00027 #include "MyGUI_Types.h" 00028 #include "MyGUI_XmlDocument.h" 00029 #include "MyGUI_ISubWidgetRect.h" 00030 #include "MyGUI_ResourceSkin.h" 00031 #include "MyGUI_IStateInfo.h" 00032 00033 namespace MyGUI 00034 { 00035 00036 class RenderItem; 00037 00038 class MYGUI_EXPORT SubSkin : 00039 public ISubWidgetRect 00040 { 00041 MYGUI_RTTI_DERIVED( SubSkin ) 00042 00043 public: 00044 SubSkin(); 00045 virtual ~SubSkin(); 00046 00047 void setAlpha(float _alpha); 00048 00049 virtual void setVisible(bool _visible); 00050 00051 virtual void setStateData(IStateInfo* _data); 00052 00053 virtual void createDrawItem(ITexture* _texture, ILayerNode * _node); 00054 virtual void destroyDrawItem(); 00055 00056 // метод для отрисовки себя 00057 virtual void doRender(); 00058 00059 /*internal:*/ 00060 void _updateView(); 00061 void _correctView(); 00062 00063 void _setAlign(const IntSize& _oldsize, bool _update); 00064 void _setAlign(const IntCoord& _oldcoord, bool _update); 00065 00066 virtual void _setUVSet(const FloatRect& _rect); 00067 virtual void _setColour(const Colour& _value); 00068 00069 protected: 00070 FloatRect mRectTexture; 00071 bool mEmptyView; 00072 00073 uint32 mCurrentColour; 00074 00075 FloatRect mCurrentTexture; 00076 IntCoord mCurrentCoord; 00077 00078 ILayerNode* mNode; 00079 RenderItem* mRenderItem; 00080 }; 00081 00082 } // namespace MyGUI 00083 00084 #endif // __MYGUI_SUB_SKIN_H__