• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

MyGUI_TileRect.h

Go to the documentation of this file.
00001 
00007 /*
00008     This file is part of MyGUI.
00009     
00010     MyGUI is free software: you can redistribute it and/or modify
00011     it under the terms of the GNU Lesser General Public License as published by
00012     the Free Software Foundation, either version 3 of the License, or
00013     (at your option) any later version.
00014     
00015     MyGUI is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU Lesser General Public License for more details.
00019     
00020     You should have received a copy of the GNU Lesser General Public License
00021     along with MyGUI.  If not, see <http://www.gnu.org/licenses/>.
00022 */
00023 #ifndef __MYGUI_TILE_RECT_H__
00024 #define __MYGUI_TILE_RECT_H__
00025 
00026 #include "MyGUI_Prerequest.h"
00027 #include "MyGUI_XmlDocument.h"
00028 #include "MyGUI_Types.h"
00029 #include "MyGUI_ISubWidgetRect.h"
00030 #include "MyGUI_ResourceSkin.h"
00031 
00032 namespace MyGUI
00033 {
00034 
00035     class RenderItem;
00036 
00037     class MYGUI_EXPORT TileRect : public ISubWidgetRect
00038     {
00039         MYGUI_RTTI_DERIVED( TileRect );
00040 
00041     public:
00042         TileRect();
00043         virtual ~TileRect();
00044 
00045         void setAlpha(float _alpha);
00046 
00047         virtual void setVisible(bool _visible);
00048 
00049         virtual void createDrawItem(const std::string& _texture, ILayerNode * _node);
00050         virtual void destroyDrawItem();
00051 
00052         // метод для отрисовки себя
00053         virtual void doRender();
00054 
00055         virtual void setStateData(IStateInfo * _data);
00056 
00057     /*internal:*/
00058         void _updateView();
00059         void _correctView();
00060 
00061         void _setAlign(const IntSize& _oldsize, bool _update);
00062         void _setAlign(const IntCoord& _oldcoord, bool _update);
00063 
00064         void _setUVSet(const FloatRect& _rect);
00065 
00066     protected:
00067         FloatRect mRectTexture;
00068         bool mEmptyView;
00069 
00070         uint32 mCurrentAlpha;
00071 
00072         FloatRect mCurrentTexture;
00073         IntCoord mCurrentCoord;
00074 
00075         ILayerNode* mNode;
00076         RenderItem* mRenderItem;
00077 
00078         IntSize mTileSize;
00079         size_t mCountVertex;
00080 
00081         float mRealTileWidth;
00082         float mRealTileHeight;
00083 
00084         float mTextureHeightOne;
00085         float mTextureWidthOne;
00086 
00087         bool mTileH;
00088         bool mTileV;
00089     };
00090 
00091 } // namespace MyGUI
00092 
00093 #endif // __MYGUI_TILE_RECT_H__

Generated on Sun Jan 30 2011 for MyGUI by  doxygen 1.7.1