MyGUI  3.2.1
MyGUI_TileRect.h
Go to the documentation of this file.
1 /*
2  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3  * Distributed under the MIT License
4  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5  */
6 
7 #ifndef __MYGUI_TILE_RECT_H__
8 #define __MYGUI_TILE_RECT_H__
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_XmlDocument.h"
12 #include "MyGUI_Types.h"
13 #include "MyGUI_ISubWidgetRect.h"
14 #include "MyGUI_ResourceSkin.h"
15 #include "MyGUI_RenderFormat.h"
16 
17 namespace MyGUI
18 {
19 
20  class RenderItem;
21 
23  public ISubWidgetRect
24  {
26 
27  public:
28  TileRect();
29  virtual ~TileRect();
30 
31  virtual void setAlpha(float _alpha);
32 
33  virtual void setVisible(bool _visible);
34 
35  virtual void createDrawItem(ITexture* _texture, ILayerNode* _node);
36  virtual void destroyDrawItem();
37 
38  // метод для отрисовки себя
39  virtual void doRender();
40 
41  virtual void setStateData(IStateInfo* _data);
42 
43  /*internal:*/
44  virtual void _updateView();
45  virtual void _correctView();
46 
47  virtual void _setAlign(const IntSize& _oldsize);
48 
49  virtual void _setUVSet(const FloatRect& _rect);
50  virtual void _setColour(const Colour& _value);
51 
52  protected:
53  bool mEmptyView;
54 
55  VertexColourType mVertexFormat;
56  uint32 mCurrentColour;
57 
58  FloatRect mCurrentTexture;
59  IntCoord mCurrentCoord;
60 
61  ILayerNode* mNode;
62  RenderItem* mRenderItem;
63 
64  IntSize mTileSize;
65  size_t mCountVertex;
66 
67  float mRealTileWidth;
68  float mRealTileHeight;
69 
70  float mTextureHeightOne;
71  float mTextureWidthOne;
72 
73  bool mTileH;
74  bool mTileV;
75  };
76 
77 } // namespace MyGUI
78 
79 #endif // __MYGUI_TILE_RECT_H__