MyGUI 3.2.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
17 namespace MyGUI
18 {
19
20 typedef delegates::CMultiDelegate3<Widget*, const std::string&, const std::string&> EventHandle_AddUserStringDelegate;
21
22 class MYGUI_EXPORT LayoutManager :
23 public Singleton<LayoutManager>,
24 public MemberObsolete<LayoutManager>
25 {
26 public:
27 LayoutManager();
28
29 void initialise();
30 void shutdown();
31
38 VectorWidgetPtr loadLayout(const std::string& _file, const std::string& _prefix = "", Widget* _parent = nullptr);
39
41 void unloadLayout(VectorWidgetPtr& _widgets);
42
44 ResourceLayout* getByName(const std::string& _name, bool _throw = true) const;
45
47 bool isExist(const std::string& _name) const;
48
56 EventHandle_AddUserStringDelegate eventAddUserString;
57
58 const std::string& getCurrentLayout() const;
59
60 private:
61 void _load(xml::ElementPtr _node, const std::string& _file, Version _version);
62
63 private:
64 bool mIsInitialise;
65 std::string mCurrentLayoutName;
66 std::string mXmlLayoutTagName;
67 };
68
69 } // namespace MyGUI
70
71 #endif // MYGUI_LAYOUT_MANAGER_H_
MyGUI::Widget
Widget properties. Widget_skin_childs Skin childs. Widget widget description should be here...
Definition: MyGUI_Widget.h:29
MyGUI::LayoutManager
Definition: MyGUI_LayoutManager.h:22
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI::EventHandle_AddUserStringDelegate
delegates::CMultiDelegate3< Widget *, const std::string &, const std::string & > EventHandle_AddUserStringDelegate
Definition: MyGUI_LayoutManager.h:20
MyGUI_WidgetDefines.h
MyGUI::delegates::CMultiDelegate3< Widget *, const std::string &, const std::string & >
MyGUI_XmlDocument.h
MyGUI::ResourceLayout
Definition: MyGUI_ResourceLayout.h:18
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition: MyGUI_WidgetDefines.h:19
MyGUI_BackwardCompatibility.h
MyGUI::xml::Element
Definition: MyGUI_XmlDocument.h:158
MyGUI::Version
Definition: MyGUI_Version.h:17
MyGUI_ResourceLayout.h
MyGUI::LayoutManager::eventAddUserString
EventHandle_AddUserStringDelegate eventAddUserString
Definition: MyGUI_LayoutManager.h:56
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:13
MyGUI::Singleton
Definition: MyGUI_Singleton.h:20