MyGUI: MyGUI_WidgetManager.h Source File

MyGUI 3.2.2

MyGUI_WidgetManager.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_WIDGET_MANAGER_H_
8 #define MYGUI_WIDGET_MANAGER_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Singleton.h"
12 #include "MyGUI_IUnlinkWidget.h"
13 #include "MyGUI_ICroppedRectangle.h"
14 #include "MyGUI_Widget.h"
15 #include <set>
16 #include "MyGUI_BackwardCompatibility.h"
17
18 namespace MyGUI
19 {
20 class MYGUI_EXPORT WidgetManager :
21 public Singleton<WidgetManager>,
22 public MemberObsolete<WidgetManager>
23 {
24 public:
25 WidgetManager();
26
27 void initialise();
28 void shutdown();
29
30 Widget* createWidget(WidgetStyle _style, const std::string& _type, const std::string& _skin, const IntCoord& _coord, Widget* _parent, ICroppedRectangle* _cropeedParent, const std::string& _name);
31
33 void destroyWidget(Widget* _widget);
35 void destroyWidgets(const VectorWidgetPtr& _widgets);
37 void destroyWidgets(EnumeratorWidgetPtr _widgets);
38
40 void registerUnlinker(IUnlinkWidget* _unlink);
42 void unregisterUnlinker(IUnlinkWidget* _unlink);
44 void unlinkFromUnlinkers(Widget* _widget);
45
47 bool isFactoryExist(const std::string& _type);
48
49 /*internal:*/
50 void _deleteWidget(Widget* _widget);
51 void _deleteDelayWidgets();
52
53 const std::string& getCategoryName() const;
54
55 private:
56 void notifyEventFrameStart(float _time);
57
58 private:
59 bool mIsInitialise;
60 std::string mCategoryName;
61
62 // список менеджеров для отписки при удалении
63 VectorIUnlinkWidget mVectorIUnlinkWidget;
64
65 // список виджетов для удаления
66 VectorWidgetPtr mDestroyWidgets;
67 };
68
69 } // namespace MyGUI
70
71 #endif // MYGUI_WIDGET_MANAGER_H_
MyGUI::WidgetManager
Definition: MyGUI_WidgetManager.h:20
MyGUI_Widget.h
MyGUI::Widget
Widget properties. Skin childs. Widget widget description should be here.
Definition: MyGUI_Widget.h:29
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition: MyGUI_WidgetDefines.h:19
MyGUI_ICroppedRectangle.h
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI::Enumerator
Definition: MyGUI_Enumerator.h:48
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:13
MyGUI::ICroppedRectangle
Definition: MyGUI_ICroppedRectangle.h:16
MyGUI::WidgetStyle
Definition: MyGUI_WidgetStyle.h:16
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI_IUnlinkWidget.h
MyGUI::types::TCoord< int >
MyGUI::IUnlinkWidget
Definition: MyGUI_IUnlinkWidget.h:16
MyGUI::Singleton
Definition: MyGUI_Singleton.h:20
MyGUI_BackwardCompatibility.h
MyGUI::VectorIUnlinkWidget
std::vector< IUnlinkWidget * > VectorIUnlinkWidget
Definition: MyGUI_IUnlinkWidget.h:23
MyGUI
Definition: MyGUI_ActionController.h:14