MyGUI: MyGUI_WidgetManager.h Source File

MyGUI 3.4.2

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

- File List
- Globals

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
18namespace MyGUI
19{
20 class MYGUI_EXPORT WidgetManager :
21 public MemberObsolete<WidgetManager>
22 {
23 MYGUI_SINGLETON_DECLARATION(WidgetManager);
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_BackwardCompatibility.h
MyGUI_ICroppedRectangle.h
MyGUI_IUnlinkWidget.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:111
MyGUI_Widget.h
MyGUI::Enumerator
Definition MyGUI_Enumerator.h:49
MyGUI::ICroppedRectangle
Definition MyGUI_ICroppedRectangle.h:17
MyGUI::IUnlinkWidget
Definition MyGUI_IUnlinkWidget.h:17
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI::WidgetManager
Definition MyGUI_WidgetManager.h:22
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20
MyGUI::VectorIUnlinkWidget
std::vector< IUnlinkWidget * > VectorIUnlinkWidget
Definition MyGUI_IUnlinkWidget.h:23
MyGUI::WidgetStyle
Definition MyGUI_WidgetStyle.h:19
MyGUI::types::TCoord< int >