MyGUI 3.4.1
MyGUI_ResourceLayout.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_RESOURCE_LAYOUT_H_
8#define MYGUI_RESOURCE_LAYOUT_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_IResource.h"
12#include "MyGUI_LayoutData.h"
13
14namespace MyGUI
15{
16
19 public IResource
20 {
22
23 public:
25
26 ResourceLayout(xml::ElementPtr _node, const std::string& _file);
27
28 void deserialization(xml::ElementPtr _node, Version _version) override;
29
30 const VectorWidgetInfo& getLayoutData() const;
31
33 VectorWidgetPtr createLayout(const std::string& _prefix = "", Widget* _parent = nullptr);
34
35 // widget info -> Widget
36 Widget* createWidget(const WidgetInfo& _widgetInfo, const std::string& _prefix = "", Widget* _parent = nullptr, bool _template = false);
37
38 protected:
39 // xml -> widget info
40 WidgetInfo parseWidget(xml::ElementEnumerator& _widget);
41
42 protected:
44 };
45
46} // namespace MyGUI
47
48#endif // MYGUI_RESOURCE_LAYOUT_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
VectorWidgetInfo mLayoutData
widget description should be here.
Definition: MyGUI_Widget.h:37
std::vector< WidgetInfo > VectorWidgetInfo
std::vector< Widget * > VectorWidgetPtr