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_SUB_SKIN_H_ 8 #define MYGUI_SUB_SKIN_H_ 9 10 #include "MyGUI_Prerequest.h" 11 #include "MyGUI_Types.h" 12 #include "MyGUI_XmlDocument.h" 13 #include "MyGUI_ISubWidgetRect.h" 14 #include "MyGUI_ResourceSkin.h" 15 #include "MyGUI_RenderFormat.h" 16 #include "MyGUI_IStateInfo.h" 17 18 namespace MyGUI 19 { 20 21 class RenderItem; 22 23 class MYGUI_EXPORT SubSkin : 24 public ISubWidgetRect 25 { 26 MYGUI_RTTI_DERIVED( SubSkin ) 27 28 public: 29 SubSkin(); 30 31 void setAlpha(float _alpha) override; 32 33 void setVisible(bool _visible) override; 34 35 void setStateData(IStateInfo* _data) override; 36 37 void createDrawItem(ITexture* _texture, ILayerNode* _node) override; 38 void destroyDrawItem() override; 39 40 // метод для отрисовки себя 41 void doRender() override; 42 43 /*internal:*/ 44 void _updateView() override; 45 void _correctView() override; 46 47 void _setAlign(const IntSize& _oldsize) override; 48 49 void _setUVSet(const FloatRect& _rect) override; 50 void _setColour(const Colour& _value) override; 51 52 protected: 53 FloatRect mRectTexture; 54 bool mEmptyView; 55 56 VertexColourType mVertexFormat; 57 uint32 mCurrentColour; 58 59 FloatRect mCurrentTexture; 60 IntCoord mCurrentCoord; 61 62 ILayerNode* mNode; 63 RenderItem* mRenderItem; 64 65 bool mSeparate; 66 }; 67 68 } // namespace MyGUI 69 70 #endif // MYGUI_SUB_SKIN_H_ 71