MyGUI  3.2.0
MyGUI_SubSkin.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_SUB_SKIN_H__
23 #define __MYGUI_SUB_SKIN_H__
24 
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Types.h"
27 #include "MyGUI_XmlDocument.h"
28 #include "MyGUI_ISubWidgetRect.h"
29 #include "MyGUI_ResourceSkin.h"
30 #include "MyGUI_RenderFormat.h"
31 #include "MyGUI_IStateInfo.h"
32 
33 namespace MyGUI
34 {
35 
36  class RenderItem;
37 
39  public ISubWidgetRect
40  {
42 
43  public:
44  SubSkin();
45  virtual ~SubSkin();
46 
47  virtual void setAlpha(float _alpha);
48 
49  virtual void setVisible(bool _visible);
50 
51  virtual void setStateData(IStateInfo* _data);
52 
53  virtual void createDrawItem(ITexture* _texture, ILayerNode* _node);
54  virtual void destroyDrawItem();
55 
56  // метод для отрисовки себя
57  virtual void doRender();
58 
59  /*internal:*/
60  virtual void _updateView();
61  virtual void _correctView();
62 
63  virtual void _setAlign(const IntSize& _oldsize);
64 
65  virtual void _setUVSet(const FloatRect& _rect);
66  virtual void _setColour(const Colour& _value);
67 
68  protected:
69  FloatRect mRectTexture;
70  bool mEmptyView;
71 
72  VertexColourType mVertexFormat;
73  uint32 mCurrentColour;
74 
75  FloatRect mCurrentTexture;
76  IntCoord mCurrentCoord;
77 
78  ILayerNode* mNode;
79  RenderItem* mRenderItem;
80 
81  bool mSeparate;
82  };
83 
84 } // namespace MyGUI
85 
86 #endif // __MYGUI_SUB_SKIN_H__