MyGUI 3.4.3
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"
14#include "MyGUI_Widget.h"
15#include <set>
17
18namespace MyGUI
19{
20 class MYGUI_EXPORT WidgetManager : public MemberObsolete<WidgetManager>
21 {
23
24 public:
26
27 void initialise();
28 void shutdown();
29
30 Widget* createWidget(
31 WidgetStyle _style,
32 std::string_view _type,
33 std::string_view _skin,
34 const IntCoord& _coord,
35 Widget* _parent,
36 ICroppedRectangle* _cropeedParent,
37 std::string_view _name);
38
40 void destroyWidget(Widget* _widget);
42 void destroyWidgets(const VectorWidgetPtr& _widgets);
44 void destroyWidgets(EnumeratorWidgetPtr _widgets);
45
47 void registerUnlinker(IUnlinkWidget* _unlink);
49 void unregisterUnlinker(IUnlinkWidget* _unlink);
51 void unlinkFromUnlinkers(Widget* _widget);
52
54 bool isFactoryExist(std::string_view _type);
55
56 /*internal:*/
57 void _deleteWidget(Widget* _widget);
58 void _deleteDelayWidgets();
59
60 const std::string& getCategoryName() const;
61
62 private:
63 void notifyEventFrameStart(float _time);
64
65 private:
66 bool mIsInitialise{false};
67 std::string mCategoryName;
68
69 // список менеджеров для отписки при удалении
70 VectorIUnlinkWidget mVectorIUnlinkWidget;
71
72 // список виджетов для удаления
73 VectorWidgetPtr mDestroyWidgets;
74 };
75
76} // namespace MyGUI
77
78#endif // MYGUI_WIDGET_MANAGER_H_
#define MYGUI_EXPORT
#define MYGUI_SINGLETON_DECLARATION(ClassName)
widget description should be here.
std::vector< IUnlinkWidget * > VectorIUnlinkWidget
std::vector< Widget * > VectorWidgetPtr