MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ISubWidget.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_I_SUB_WIDGET_H__
23 #define __MYGUI_I_SUB_WIDGET_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_ICroppedRectangle.h"
27 #include "MyGUI_ILayerNode.h"
28 #include "MyGUI_Types.h"
29 #include "MyGUI_IRenderTarget.h"
30 #include "MyGUI_IStateInfo.h"
31 #include "MyGUI_IObject.h"
32
33 namespace MyGUI
34 {
35
36 class ISubWidget;
37 typedef std::vector<ISubWidget*> VectorSubWidget;
38
39 class MYGUI_EXPORT ISubWidget :
40 public ICroppedRectangle,
41 public IObject
42 {
43 MYGUI_RTTI_DERIVED( ISubWidget )
44
45 public:
46 ISubWidget() : mVisible(true) { }
47 virtual ~ISubWidget() { }
48
49 virtual void createDrawItem(ITexture* _texture, ILayerNode* _node) = 0;
50 virtual void destroyDrawItem() = 0;
51
52 virtual void setAlpha(float _alpha) { }
53
54 virtual void setStateData(IStateInfo* _data) { }
55
56 virtual void doRender() = 0;
57
58 virtual void setAlign(Align _value)
59 {
60 mAlign = _value;
61 }
62 virtual void setVisible(bool _value)
63 {
64 mVisible = _value;
65 }
66
67 virtual void _updateView() { }
68 virtual void _correctView() { }
69
70 virtual void _setAlign(const IntSize& _oldsize) { }
71
72 virtual void doManualRender(IVertexBuffer* _buffer, ITexture* _texture, size_t _count) { }
73
74 protected:
75 Align mAlign;
76 bool mVisible;
77 };
78
79 } // namespace MyGUI
80
81 #endif // __MYGUI_I_SUB_WIDGET_H__
MyGUI::ILayerNode
Definition: MyGUI_ILayerNode.h:42
MyGUI_Prerequest.h
MyGUI::ISubWidget::setAlign
virtual void setAlign(Align _value)
Definition: MyGUI_ISubWidget.h:58
MyGUI::ISubWidget::setAlpha
virtual void setAlpha(float _alpha)
Definition: MyGUI_ISubWidget.h:52
MyGUI::ISubWidget::~ISubWidget
virtual ~ISubWidget()
Definition: MyGUI_ISubWidget.h:47
MyGUI::IStateInfo
Definition: MyGUI_IStateInfo.h:31
MyGUI::types::TSize< int >
MyGUI_ILayerNode.h
MyGUI_IRenderTarget.h
MyGUI::IVertexBuffer
Definition: MyGUI_IVertexBuffer.h:31
MyGUI::ISubWidget
Definition: MyGUI_ISubWidget.h:39
MyGUI::ISubWidget::_updateView
virtual void _updateView()
Definition: MyGUI_ISubWidget.h:67
MyGUI::ISubWidget::setStateData
virtual void setStateData(IStateInfo *_data)
Definition: MyGUI_ISubWidget.h:54
MyGUI::ISubWidget::setVisible
virtual void setVisible(bool _value)
Definition: MyGUI_ISubWidget.h:62
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:72
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition: MyGUI_ISubWidget.h:36
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:88
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ISubWidget::_correctView
virtual void _correctView()
Definition: MyGUI_ISubWidget.h:68
MyGUI::ISubWidget::mVisible
bool mVisible
Definition: MyGUI_ISubWidget.h:76
MyGUI::ITexture
Definition: MyGUI_ITexture.h:41
MyGUI_IObject.h
MyGUI::ISubWidget::mAlign
Align mAlign
Definition: MyGUI_ISubWidget.h:75
MyGUI::IObject
Definition: MyGUI_IObject.h:31
MyGUI::ICroppedRectangle
Definition: MyGUI_ICroppedRectangle.h:31
MyGUI::ISubWidget::_setAlign
virtual void _setAlign(const IntSize &_oldsize)
Definition: MyGUI_ISubWidget.h:70
MyGUI::Align
Definition: MyGUI_Align.h:34