MyGUI 3.2.0

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

- File List
- Globals

MyGUI_LayerManager.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_LAYER_MANAGER_H__
23 #define __MYGUI_LAYER_MANAGER_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Singleton.h"
27 #include "MyGUI_Enumerator.h"
28 #include "MyGUI_XmlDocument.h"
29 #include "MyGUI_IUnlinkWidget.h"
30 #include "MyGUI_ResourceManager.h"
31 #include "MyGUI_ILayer.h"
32 #include "MyGUI_BackwardCompatibility.h"
33
34 namespace MyGUI
35 {
36
37 class MYGUI_EXPORT LayerManager :
38 public Singleton<LayerManager>,
39 public IUnlinkWidget,
40 public MemberObsolete<LayerManager>
41 {
42 public:
43 typedef std::vector<ILayer*> VectorLayer;
44 typedef Enumerator<VectorLayer> EnumeratorLayer;
45
46 public:
47 LayerManager();
48
49 void initialise();
50 void shutdown();
51
56 void attachToLayerNode(const std::string& _name, Widget* _item);
60 void detachFromLayer(Widget* _item);
61
65 void upLayerItem(Widget* _item);
66
68 bool isExist(const std::string& _name) const;
70 EnumeratorLayer getEnumerator() const;
71
73 ILayer* getByName(const std::string& _name, bool _throw = true) const;
74
76 Widget* getWidgetFromPoint(int _left, int _top);
77
79 void renderToTarget(IRenderTarget* _target, bool _update);
80
81 void resizeView(const IntSize& _viewSize);
82
83 private:
84 void _load(xml::ElementPtr _node, const std::string& _file, Version _version);
85 void _unlinkWidget(Widget* _widget);
86
87 void clear();
88
89 void merge(VectorLayer& _layers);
90 void destroy(ILayer* _layer);
91
92 private:
93 VectorLayer mLayerNodes;
94
95 bool mIsInitialise;
96 };
97
98 } // namespace MyGUI
99
100 #endif // __MYGUI_LAYER_MANAGER_H__
MyGUI::Widget
Definition: MyGUI_Widget.h:41
MyGUI_Enumerator.h
MyGUI_Prerequest.h
MyGUI_Singleton.h
MyGUI::types::TSize< int >
MyGUI::LayerManager
Definition: MyGUI_LayerManager.h:37
MyGUI::LayerManager::VectorLayer
std::vector< ILayer * > VectorLayer
Definition: MyGUI_LayerManager.h:43
MyGUI::Enumerator
Definition: MyGUI_Enumerator.h:63
MyGUI_XmlDocument.h
MyGUI::LayerManager::EnumeratorLayer
Enumerator< VectorLayer > EnumeratorLayer
Definition: MyGUI_LayerManager.h:44
MyGUI::IUnlinkWidget
Definition: MyGUI_IUnlinkWidget.h:31
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ILayer
Definition: MyGUI_ILayer.h:36
MyGUI::IRenderTarget
Definition: MyGUI_IRenderTarget.h:35
MyGUI_BackwardCompatibility.h
MyGUI::xml::Element
Definition: MyGUI_XmlDocument.h:168
MyGUI::Version
Definition: MyGUI_Version.h:32
MyGUI_ResourceManager.h
MyGUI_ILayer.h
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:28
MyGUI::Singleton
Definition: MyGUI_Singleton.h:35
MyGUI_IUnlinkWidget.h