MyGUI  3.2.1
MyGUI_SubSkin.h
Go to the documentation of this file.
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_SUB_SKIN_H__
00008 #define __MYGUI_SUB_SKIN_H__
00009 
00010 #include "MyGUI_Prerequest.h"
00011 #include "MyGUI_Types.h"
00012 #include "MyGUI_XmlDocument.h"
00013 #include "MyGUI_ISubWidgetRect.h"
00014 #include "MyGUI_ResourceSkin.h"
00015 #include "MyGUI_RenderFormat.h"
00016 #include "MyGUI_IStateInfo.h"
00017 
00018 namespace MyGUI
00019 {
00020 
00021     class RenderItem;
00022 
00023     class MYGUI_EXPORT SubSkin :
00024         public ISubWidgetRect
00025     {
00026         MYGUI_RTTI_DERIVED( SubSkin )
00027 
00028     public:
00029         SubSkin();
00030         virtual ~SubSkin();
00031 
00032         virtual void setAlpha(float _alpha);
00033 
00034         virtual void setVisible(bool _visible);
00035 
00036         virtual void setStateData(IStateInfo* _data);
00037 
00038         virtual void createDrawItem(ITexture* _texture, ILayerNode* _node);
00039         virtual void destroyDrawItem();
00040 
00041         // метод для отрисовки себя
00042         virtual void doRender();
00043 
00044         /*internal:*/
00045         virtual void _updateView();
00046         virtual void _correctView();
00047 
00048         virtual void _setAlign(const IntSize& _oldsize);
00049 
00050         virtual void _setUVSet(const FloatRect& _rect);
00051         virtual void _setColour(const Colour& _value);
00052 
00053     protected:
00054         FloatRect mRectTexture;
00055         bool mEmptyView;
00056 
00057         VertexColourType mVertexFormat;
00058         uint32 mCurrentColour;
00059 
00060         FloatRect mCurrentTexture;
00061         IntCoord mCurrentCoord;
00062 
00063         ILayerNode* mNode;
00064         RenderItem* mRenderItem;
00065 
00066         bool mSeparate;
00067     };
00068 
00069 } // namespace MyGUI
00070 
00071 #endif // __MYGUI_SUB_SKIN_H__