MyGUI 3.2.0

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

- File List
- Globals

MyGUI_LayerItem.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_ITEM_H__
23 #define __MYGUI_LAYER_ITEM_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_LayerManager.h"
27 #include "MyGUI_ILayer.h"
28 #include "MyGUI_ILayerNode.h"
29 #include "MyGUI_ILayerItem.h"
30 #include "MyGUI_ISubWidget.h"
31
32 namespace MyGUI
33 {
34
35 class MYGUI_EXPORT LayerItem :
36 public ILayerItem
37 {
38 public:
39 LayerItem();
40 virtual ~LayerItem();
41
42 ILayer* getLayer() const;
43
44 virtual void attachItemToNode(ILayer* _layer, ILayerNode* _node);
45 virtual void detachFromLayer();
46 virtual void upLayerItem();
47
48 void setRenderItemTexture(ITexture* _texture);
49
50 void addChildItem(LayerItem* _item);
51 void removeChildItem(LayerItem* _item);
52
53 void addChildNode(LayerItem* _item);
54 void removeChildNode(LayerItem* _item);
55
56 void addRenderItem(ISubWidget* _item);
57 void removeAllRenderItems();
58
59 void saveLayerItem();
60 void restoreLayerItem();
61
62 protected:
63 void attachToLayerItemNode(ILayerNode* _node, bool _deep);
64 void detachFromLayerItemNode(bool _deep);
65
66 private:
67 // актуально для рутового виджета
68 ILayer* mLayer;
69 // конкретный айтем находящийся в слое
70 ILayerNode* mLayerNode;
71 ILayerNode* mSaveLayerNode;
72
73 typedef std::vector<LayerItem*> VectorLayerItem;
74 // список наших детей айтемов
75 VectorLayerItem mLayerItems;
76 // список наших узлов
77 VectorLayerItem mLayerNodes;
78
79 // вектор всех детей сабскинов
80 VectorSubWidget mDrawItems;
81
82 ITexture* mTexture;
83 };
84
85 } // namespace MyGUI
86
87 #endif // __MYGUI_LAYER_ITEM_H__
MyGUI::LayerItem
Definition: MyGUI_LayerItem.h:35
MyGUI::ILayerNode
Definition: MyGUI_ILayerNode.h:42
MyGUI_Prerequest.h
MyGUI_LayerManager.h
MyGUI_ILayerItem.h
MyGUI_ILayerNode.h
MyGUI::ISubWidget
Definition: MyGUI_ISubWidget.h:39
MyGUI::VectorLayerItem
std::vector< ILayerItem * > VectorLayerItem
Definition: MyGUI_LayerNode.h:35
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition: MyGUI_ISubWidget.h:36
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ILayer
Definition: MyGUI_ILayer.h:36
MyGUI::ITexture
Definition: MyGUI_ITexture.h:41
MyGUI::ILayerItem
Definition: MyGUI_ILayerItem.h:33
MyGUI_ISubWidget.h
MyGUI_ILayer.h