MyGUI: MyGUI_LayoutManager.h Source File

MyGUI 3.4.2

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

- File List
- Globals

MyGUI_LayoutManager.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_LAYOUT_MANAGER_H_
8#define MYGUI_LAYOUT_MANAGER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Singleton.h"
12#include "MyGUI_XmlDocument.h"
13#include "MyGUI_WidgetDefines.h"
14#include "MyGUI_ResourceLayout.h"
15#include "MyGUI_BackwardCompatibility.h"
16
17namespace MyGUI
18{
19
20 typedef delegates::CMultiDelegate2<Widget*, const WidgetInfo&> EventHandle_CreateWidgetDelegate;
21 typedef delegates::CMultiDelegate3<Widget*, const std::string&, const std::string&> EventHandle_AddUserStringDelegate;
22
23 class MYGUI_EXPORT LayoutManager :
24 public MemberObsolete<LayoutManager>
25 {
26 MYGUI_SINGLETON_DECLARATION(LayoutManager);
27 public:
28 LayoutManager();
29
30 void initialise();
31 void shutdown();
32
39 VectorWidgetPtr loadLayout(const std::string& _file, const std::string& _prefix = "", Widget* _parent = nullptr);
40
42 void unloadLayout(VectorWidgetPtr& _widgets);
43
45 ResourceLayout* getByName(const std::string& _name, bool _throw = true) const;
46
48 bool isExist(const std::string& _name) const;
49
57 EventHandle_CreateWidgetDelegate eventCreateWidget;
58
66 EventHandle_AddUserStringDelegate eventAddUserString;
67
68 const std::string& getCurrentLayout() const;
69
70 private:
71 void _load(xml::ElementPtr _node, const std::string& _file, Version _version);
72
73 private:
74 bool mIsInitialise;
75 std::string mCurrentLayoutName;
76 std::string mXmlLayoutTagName;
77 };
78
79} // namespace MyGUI
80
81#endif // MYGUI_LAYOUT_MANAGER_H_
MyGUI_BackwardCompatibility.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_ResourceLayout.h
MyGUI_Singleton.h
MYGUI_SINGLETON_DECLARATION
#define MYGUI_SINGLETON_DECLARATION(ClassName)
Definition MyGUI_Singleton.h:111
MyGUI_WidgetDefines.h
MyGUI_XmlDocument.h
MyGUI::LayoutManager
Definition MyGUI_LayoutManager.h:25
MyGUI::LayoutManager::eventAddUserString
EventHandle_AddUserStringDelegate eventAddUserString
Definition MyGUI_LayoutManager.h:66
MyGUI::LayoutManager::eventCreateWidget
EventHandle_CreateWidgetDelegate eventCreateWidget
Definition MyGUI_LayoutManager.h:57
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::ResourceLayout
Definition MyGUI_ResourceLayout.h:20
MyGUI::Version
Definition MyGUI_Version.h:18
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI::delegates::MultiDelegate
Definition MyGUI_Delegate.h:200
MyGUI::xml::Element
Definition MyGUI_XmlDocument.h:159
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::EventHandle_AddUserStringDelegate
delegates::CMultiDelegate3< Widget *, const std::string &, const std::string & > EventHandle_AddUserStringDelegate
Definition MyGUI_LayoutManager.h:21
MyGUI::EventHandle_CreateWidgetDelegate
delegates::CMultiDelegate2< Widget *, const WidgetInfo & > EventHandle_CreateWidgetDelegate
Definition MyGUI_LayoutManager.h:20
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20