MyGUI  3.2.0
MyGUI_SubSkin.h
Go to the documentation of this file.
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_SUB_SKIN_H__
00023 #define __MYGUI_SUB_SKIN_H__
00024 
00025 #include "MyGUI_Prerequest.h"
00026 #include "MyGUI_Types.h"
00027 #include "MyGUI_XmlDocument.h"
00028 #include "MyGUI_ISubWidgetRect.h"
00029 #include "MyGUI_ResourceSkin.h"
00030 #include "MyGUI_RenderFormat.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         virtual 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         virtual void _updateView();
00061         virtual void _correctView();
00062 
00063         virtual void _setAlign(const IntSize& _oldsize);
00064 
00065         virtual void _setUVSet(const FloatRect& _rect);
00066         virtual void _setColour(const Colour& _value);
00067 
00068     protected:
00069         FloatRect mRectTexture;
00070         bool mEmptyView;
00071 
00072         VertexColourType mVertexFormat;
00073         uint32 mCurrentColour;
00074 
00075         FloatRect mCurrentTexture;
00076         IntCoord mCurrentCoord;
00077 
00078         ILayerNode* mNode;
00079         RenderItem* mRenderItem;
00080 
00081         bool mSeparate;
00082     };
00083 
00084 } // namespace MyGUI
00085 
00086 #endif // __MYGUI_SUB_SKIN_H__