MyGUI 3.2.2

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

- File List
- Globals

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