MyGUI 3.5.3
MyGUI_SubSkin.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_SUB_SKIN_H_
8#define MYGUI_SUB_SKIN_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
12#include "MyGUI_XmlDocument.h"
14#include "MyGUI_ResourceSkin.h"
15#include "MyGUI_RenderFormat.h"
16#include "MyGUI_IStateInfo.h"
17
18namespace MyGUI
19{
20
21 class RenderItem;
22
23 class MYGUI_EXPORT SubSkin : public ISubWidgetRect
24 {
25 MYGUI_RTTI_DERIVED(SubSkin)
26
27 public:
28 SubSkin();
29
30 void setAlpha(float _alpha) override;
31
32 void setVisible(bool _visible) override;
33
34 void setStateData(IStateInfo* _data) override;
35
36 void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
37 void destroyDrawItem() override;
38
39 void doRender() override;
40
41 /*internal:*/
42 void _updateView() override;
43 void _correctView() override;
44
45 void _setAlign(const IntSize& _oldsize) override;
46
47 void _setUVSet(const FloatRect& _rect) override;
48 void _setColour(const Colour& _value) override;
49
50 private:
51 void _updateClippedUV();
52
53 protected:
54 FloatRect mRectTexture;
55 bool mEmptyView{false};
56
57 VertexColourType mVertexFormat;
58 uint32 mCurrentColour{0xFFFFFFFF};
59
60 FloatRect mCurrentTexture;
61 IntCoord mCurrentCoord;
62
63 ILayerNode* mNode{nullptr};
64 RenderItem* mRenderItem{nullptr};
65 };
66
67} // namespace MyGUI
68
69#endif // MYGUI_SUB_SKIN_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:67
uint32_t uint32
Definition MyGUI_Types.h:47
types::TRect< float > FloatRect
Definition MyGUI_Types.h:33
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:35