MyGUI  3.2.0
MyGUI_ILayerNode.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_I_LAYER_NODE_H__
23 #define __MYGUI_I_LAYER_NODE_H__
24 
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Enumerator.h"
27 #include "MyGUI_IObject.h"
28 #include "MyGUI_IRenderTarget.h"
29 
30 namespace MyGUI
31 {
32 
33  class ILayer;
34  class ILayerItem;
35  class ILayerNode;
36 
37  class RenderItem;
38 
39  typedef std::vector<ILayerNode*> VectorILayerNode;
41 
43  public IObject
44  {
46 
47  public:
48  virtual ~ILayerNode() { }
49 
50  // леер, которому мы принадлежим
51  virtual ILayer* getLayer() const = 0;
52 
53  // возвращает отца или nullptr
54  virtual ILayerNode* getParent() const = 0;
55 
56  // создаем дочерний нод
57  virtual ILayerNode* createChildItemNode() = 0;
58  // удаляем дочерний нод
59  virtual void destroyChildItemNode(ILayerNode* _node) = 0;
60 
61  // поднимаем дочерний нод
62  virtual void upChildItemNode(ILayerNode* _node) = 0;
63 
64  // список детей
65  virtual EnumeratorILayerNode getEnumerator() const = 0;
66 
67  // добавляем айтем к ноду
68  virtual void attachLayerItem(ILayerItem* _item) = 0;
69  // удаляем айтем из нода
70  virtual void detachLayerItem(ILayerItem* _root) = 0;
71 
72  // добавляет саб айтем и возвращает рендер айтем
73  virtual RenderItem* addToRenderItem(ITexture* _texture, bool _firstQueue, bool _separate) = 0;
74  // необходимо обновление нода
75  virtual void outOfDate(RenderItem* _item) = 0;
76 
77  // возвращает виджет по позиции
78  virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
79 
80  // рисует леер
81  virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
82 
83  virtual void resizeView(const IntSize& _viewSize) = 0;
84  };
85 
86 } // namespace MyGUI
87 
88 #endif // __MYGUI_I_LAYER_NODE_H__