MyGUI  3.0.1
MyGUI_SubSkin.h
Go to the documentation of this file.
1 
7 /*
8  This file is part of MyGUI.
9 
10  MyGUI is free software: you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  MyGUI is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
22 */
23 #ifndef __MYGUI_SUB_SKIN_H__
24 #define __MYGUI_SUB_SKIN_H__
25 
26 #include "MyGUI_Prerequest.h"
27 #include "MyGUI_Types.h"
28 #include "MyGUI_XmlDocument.h"
29 #include "MyGUI_ISubWidgetRect.h"
30 #include "MyGUI_ResourceSkin.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  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  void _updateView();
61  void _correctView();
62 
63  void _setAlign(const IntSize& _oldsize, bool _update);
64  void _setAlign(const IntCoord& _oldcoord, bool _update);
65 
66  virtual void _setUVSet(const FloatRect& _rect);
67  virtual void _setColour(const Colour& _value);
68 
69  protected:
70  FloatRect mRectTexture;
71  bool mEmptyView;
72 
73  uint32 mCurrentColour;
74 
75  FloatRect mCurrentTexture;
76  IntCoord mCurrentCoord;
77 
78  ILayerNode* mNode;
79  RenderItem* mRenderItem;
80  };
81 
82 } // namespace MyGUI
83 
84 #endif // __MYGUI_SUB_SKIN_H__