MyGUI 3.4.1
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
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_
#define MYGUI_EXPORT
std::vector< ISubWidget * > VectorSubWidget
std::vector< ILayerItem * > VectorLayerItem