MyGUI 3.2.0

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

- File List
- Globals

MyGUI_WidgetManager.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_WIDGET_MANAGER_H__
23 #define __MYGUI_WIDGET_MANAGER_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Singleton.h"
27 #include "MyGUI_IUnlinkWidget.h"
28 #include "MyGUI_ICroppedRectangle.h"
29 #include "MyGUI_Widget.h"
30 #include <set>
31 #include "MyGUI_BackwardCompatibility.h"
32
33 namespace MyGUI
34 {
35 class MYGUI_EXPORT WidgetManager :
36 public Singleton<WidgetManager>,
37 public MemberObsolete<WidgetManager>
38 {
39 public:
40 WidgetManager();
41
42 void initialise();
43 void shutdown();
44
45 Widget* createWidget(WidgetStyle _style, const std::string& _type, const std::string& _skin, const IntCoord& _coord, Widget* _parent, ICroppedRectangle* _cropeedParent, const std::string& _name);
46
48 void destroyWidget(Widget* _widget);
50 void destroyWidgets(const VectorWidgetPtr& _widgets);
52 void destroyWidgets(EnumeratorWidgetPtr _widgets);
53
55 void registerUnlinker(IUnlinkWidget* _unlink);
57 void unregisterUnlinker(IUnlinkWidget* _unlink);
59 void unlinkFromUnlinkers(Widget* _widget);
60
62 bool isFactoryExist(const std::string& _type);
63
64 /*internal:*/
65 void _deleteWidget(Widget* _widget);
66 void _deleteDelayWidgets();
67
68 private:
69 void notifyEventFrameStart(float _time);
70
71 private:
72 bool mIsInitialise;
73
74 // список менеджеров для отписки при удалении
75 VectorIUnlinkWidget mVectorIUnlinkWidget;
76
77 // список виджетов для удаления
78 VectorWidgetPtr mDestroyWidgets;
79 };
80
81 } // namespace MyGUI
82
83 #endif // __MYGUI_WIDGET_MANAGER_H__
MyGUI::types::TCoord< int >
MyGUI::Widget
Definition: MyGUI_Widget.h:41
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI::WidgetManager
Definition: MyGUI_WidgetManager.h:35
MyGUI::Enumerator
Definition: MyGUI_Enumerator.h:63
MyGUI_ICroppedRectangle.h
MyGUI::IUnlinkWidget
Definition: MyGUI_IUnlinkWidget.h:31
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition: MyGUI_WidgetDefines.h:33
MyGUI_BackwardCompatibility.h
MyGUI::VectorIUnlinkWidget
std::vector< IUnlinkWidget * > VectorIUnlinkWidget
Definition: MyGUI_IUnlinkWidget.h:38
MyGUI::WidgetStyle
Definition: MyGUI_WidgetStyle.h:31
MyGUI::ICroppedRectangle
Definition: MyGUI_ICroppedRectangle.h:31
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:28
MyGUI::Singleton
Definition: MyGUI_Singleton.h:35
MyGUI_IUnlinkWidget.h