MyGUI  3.2.2
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"
16 
17 namespace MyGUI
18 {
19 
20  typedef delegates::CMultiDelegate3<Widget*, const std::string&, const std::string&> EventHandle_AddUserStringDelegate;
21 
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 
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_XmlDocument.h
MyGUI::LayoutManager::eventAddUserString
EventHandle_AddUserStringDelegate eventAddUserString
Definition: MyGUI_LayoutManager.h:56
MyGUI::Widget
Widget properties. Skin childs. Widget widget description should be here.
Definition: MyGUI_Widget.h:37
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition: MyGUI_WidgetDefines.h:19
MyGUI::xml::Element
Definition: MyGUI_XmlDocument.h:159
MyGUI::ResourceLayout
Definition: MyGUI_ResourceLayout.h:20
MyGUI::Version
Definition: MyGUI_Version.h:18
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI::LayoutManager
Definition: MyGUI_LayoutManager.h:25
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:14
MyGUI::EventHandle_AddUserStringDelegate
delegates::CMultiDelegate3< Widget *, const std::string &, const std::string & > EventHandle_AddUserStringDelegate
Definition: MyGUI_LayoutManager.h:20
MyGUI_WidgetDefines.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI_ResourceLayout.h
MyGUI::Singleton
Definition: MyGUI_Singleton.h:22
MyGUI_BackwardCompatibility.h
MyGUI
Definition: MyGUI_ActionController.h:15