MyGUI 3.4.3
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_EventPair.h"
13#include "MyGUI_XmlDocument.h"
14#include "MyGUI_WidgetDefines.h"
17
18namespace MyGUI
19{
20
25
26 class MYGUI_EXPORT LayoutManager : public MemberObsolete<LayoutManager>
27 {
29
30 public:
32
33 void initialise();
34 void shutdown();
35
42 VectorWidgetPtr loadLayout(std::string_view _file, std::string_view _prefix = {}, Widget* _parent = nullptr);
43
45 void unloadLayout(VectorWidgetPtr& _widgets);
46
48 ResourceLayout* getByName(std::string_view _name, bool _throw = true) const;
49
51 bool isExist(std::string_view _name) const;
52
61
70
71 const std::string& getCurrentLayout() const;
72
73 private:
74 void _load(xml::ElementPtr _node, std::string_view _file, Version _version);
75
76 private:
77 bool mIsInitialise{false};
78 std::string mCurrentLayoutName;
79 std::string mXmlLayoutTagName;
80 };
81
82} // namespace MyGUI
83
84#endif // MYGUI_LAYOUT_MANAGER_H_
#define MYGUI_EXPORT
#define MYGUI_SINGLETON_DECLARATION(ClassName)
const std::string & getCurrentLayout() const
VectorWidgetPtr loadLayout(std::string_view _file, std::string_view _prefix={}, Widget *_parent=nullptr)
EventHandle_AddUserStringDelegate eventAddUserString
EventHandle_CreateWidgetDelegate eventCreateWidget
LayoutManager(const LayoutManager &)=delete
widget description should be here.
Element * ElementPtr
EventPairConvertStringView< delegates::MultiDelegate< Widget *, const std::string &, const std::string & >, delegates::MultiDelegate< Widget *, std::string_view, std::string_view > > EventHandle_AddUserStringDelegate
delegates::MultiDelegate< Widget *, const WidgetInfo & > EventHandle_CreateWidgetDelegate
std::vector< Widget * > VectorWidgetPtr