MyGUI  3.2.0
MyGUI_TileRect.h
Go to the documentation of this file.
1 
6 /*
7  This file is part of MyGUI.
8 
9  MyGUI is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  MyGUI is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_TILE_RECT_H__
23 #define __MYGUI_TILE_RECT_H__
24 
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_XmlDocument.h"
27 #include "MyGUI_Types.h"
28 #include "MyGUI_ISubWidgetRect.h"
29 #include "MyGUI_ResourceSkin.h"
30 #include "MyGUI_RenderFormat.h"
31 
32 namespace MyGUI
33 {
34 
35  class RenderItem;
36 
38  public ISubWidgetRect
39  {
41 
42  public:
43  TileRect();
44  virtual ~TileRect();
45 
46  virtual void setAlpha(float _alpha);
47 
48  virtual void setVisible(bool _visible);
49 
50  virtual void createDrawItem(ITexture* _texture, ILayerNode* _node);
51  virtual void destroyDrawItem();
52 
53  // метод для отрисовки себя
54  virtual void doRender();
55 
56  virtual void setStateData(IStateInfo* _data);
57 
58  /*internal:*/
59  virtual void _updateView();
60  virtual void _correctView();
61 
62  virtual void _setAlign(const IntSize& _oldsize);
63 
64  virtual void _setUVSet(const FloatRect& _rect);
65  virtual void _setColour(const Colour& _value);
66 
67  protected:
68  bool mEmptyView;
69 
70  VertexColourType mVertexFormat;
71  uint32 mCurrentColour;
72 
73  FloatRect mCurrentTexture;
74  IntCoord mCurrentCoord;
75 
76  ILayerNode* mNode;
77  RenderItem* mRenderItem;
78 
79  IntSize mTileSize;
80  size_t mCountVertex;
81 
82  float mRealTileWidth;
83  float mRealTileHeight;
84 
85  float mTextureHeightOne;
86  float mTextureWidthOne;
87 
88  bool mTileH;
89  bool mTileV;
90  };
91 
92 } // namespace MyGUI
93 
94 #endif // __MYGUI_TILE_RECT_H__
unsigned int uint32
Definition: MyGUI_Types.h:63
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:88
#define MYGUI_EXPORT