MyGUI 3.2.2

MyGUI_ISubWidget.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_I_SUB_WIDGET_H_
8 #define MYGUI_I_SUB_WIDGET_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_ICroppedRectangle.h"
12 #include "MyGUI_ILayerNode.h"
13 #include "MyGUI_Types.h"
14 #include "MyGUI_IRenderTarget.h"
15 #include "MyGUI_IStateInfo.h"
16 #include "MyGUI_IObject.h"
17
18 namespace MyGUI
19 {
20
21 class ISubWidget;
22 typedef std::vector<ISubWidget*> VectorSubWidget;
23
24 class MYGUI_EXPORT ISubWidget :
25 public ICroppedRectangle,
26 public IObject
27 {
28 MYGUI_RTTI_DERIVED( ISubWidget )
29
30 public:
31 ISubWidget() : mVisible(true) { }
32 virtual ~ISubWidget() { }
33
34 virtual void createDrawItem(ITexture* _texture, ILayerNode* _node) = 0;
35 virtual void destroyDrawItem() = 0;
36
37 virtual void setAlpha(float _alpha) { }
38
39 virtual void setStateData(IStateInfo* _data) { }
40
41 virtual void doRender() = 0;
42
43 virtual void setAlign(Align _value)
44 {
45 mAlign = _value;
46 }
47 virtual void setVisible(bool _value)
48 {
49 mVisible = _value;
50 }
51
52 virtual void _updateView() { }
53 virtual void _correctView() { }
54
55 virtual void _setAlign(const IntSize& _oldsize) { }
56
57 virtual void doManualRender(IVertexBuffer* _buffer, ITexture* _texture, size_t _count) { }
58
59 protected:
60 Align mAlign;
61 bool mVisible;
62 };
63
64 } // namespace MyGUI
65
66 #endif // MYGUI_I_SUB_WIDGET_H_
MyGUI::ILayerNode
Definition: MyGUI_ILayerNode.h:27
MyGUI_Prerequest.h
MyGUI::ISubWidget::setAlign
virtual void setAlign(Align _value)
Definition: MyGUI_ISubWidget.h:43
MyGUI::ISubWidget::setAlpha
virtual void setAlpha(float _alpha)
Definition: MyGUI_ISubWidget.h:37
MyGUI::ISubWidget::~ISubWidget
virtual ~ISubWidget()
Definition: MyGUI_ISubWidget.h:32
MyGUI::IStateInfo
Definition: MyGUI_IStateInfo.h:16
MyGUI::types::TSize< int >
MyGUI_ILayerNode.h
MyGUI_IRenderTarget.h
MyGUI::IVertexBuffer
Definition: MyGUI_IVertexBuffer.h:16
MyGUI::ISubWidget
Definition: MyGUI_ISubWidget.h:24
MyGUI::ISubWidget::_updateView
virtual void _updateView()
Definition: MyGUI_ISubWidget.h:52
MyGUI::ISubWidget::setStateData
virtual void setStateData(IStateInfo *_data)
Definition: MyGUI_ISubWidget.h:39
MyGUI::ISubWidget::setVisible
virtual void setVisible(bool _value)
Definition: MyGUI_ISubWidget.h:47
MyGUI::ISubWidget::ISubWidget
ISubWidget()
Definition: MyGUI_ISubWidget.h:31
MyGUI_Types.h
MyGUI_IStateInfo.h
MyGUI_ICroppedRectangle.h
MyGUI::ISubWidget::doManualRender
virtual void doManualRender(IVertexBuffer *_buffer, ITexture *_texture, size_t _count)
Definition: MyGUI_ISubWidget.h:57
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition: MyGUI_ISubWidget.h:21
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:65
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::ISubWidget::_correctView
virtual void _correctView()
Definition: MyGUI_ISubWidget.h:53
MyGUI::ISubWidget::mVisible
bool mVisible
Definition: MyGUI_ISubWidget.h:61
MyGUI::ITexture
Definition: MyGUI_ITexture.h:26
MyGUI_IObject.h
MyGUI::ISubWidget::mAlign
Align mAlign
Definition: MyGUI_ISubWidget.h:60
MyGUI::IObject
Definition: MyGUI_IObject.h:16
MyGUI::ICroppedRectangle
Definition: MyGUI_ICroppedRectangle.h:16
MyGUI::ISubWidget::_setAlign
virtual void _setAlign(const IntSize &_oldsize)
Definition: MyGUI_ISubWidget.h:55
MyGUI::Align
Definition: MyGUI_Align.h:19