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