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