MyGUI: MyGUI_LayerItem.h Source File

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