MyGUI  3.4.1
MyGUI_ILayerNode.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_I_LAYER_NODE_H_
8 #define MYGUI_I_LAYER_NODE_H_
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Enumerator.h"
12 #include "MyGUI_IObject.h"
13 #include "MyGUI_IRenderTarget.h"
14 #include "MyGUI_Types.h"
15 
16 namespace MyGUI
17 {
18 
19  class ILayer;
20  class ILayerItem;
21  class ILayerNode;
22 
23  class RenderItem;
24 
25  typedef std::vector<ILayerNode*> VectorILayerNode;
27 
29  public IObject
30  {
32 
33  public:
34  // леер, которому мы принадлежим
35  virtual ILayer* getLayer() const = 0;
36 
37  // возвращает отца или nullptr
38  virtual ILayerNode* getParent() const = 0;
39 
40  // создаем дочерний нод
42  // удаляем дочерний нод
43  virtual void destroyChildItemNode(ILayerNode* _node) = 0;
44 
45  // поднимаем дочерний нод
46  virtual void upChildItemNode(ILayerNode* _node) = 0;
47 
48  // список детей
49  virtual EnumeratorILayerNode getEnumerator() const = 0;
50 
51  virtual size_t getLayerNodeCount() const = 0;
52 
53  virtual ILayerNode* getLayerNodeAt(size_t _index) const = 0;
54 
55  // добавляем айтем к ноду
56  virtual void attachLayerItem(ILayerItem* _item) = 0;
57  // удаляем айтем из нода
58  virtual void detachLayerItem(ILayerItem* _root) = 0;
59 
60  // добавляет саб айтем и возвращает рендер айтем
61  virtual RenderItem* addToRenderItem(ITexture* _texture, bool _firstQueue, bool _separate) = 0;
62  // необходимо обновление нода
63  virtual void outOfDate(RenderItem* _item) = 0;
64 
65  // возвращает виджет по позиции
66  virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
67 
68  // рисует леер
69  virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
70 
71  virtual void resizeView(const IntSize& _viewSize) = 0;
72 
73  virtual float getNodeDepth() const = 0;
74  };
75 
76 } // namespace MyGUI
77 
78 #endif // MYGUI_I_LAYER_NODE_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
virtual ILayerNode * getParent() const =0
virtual ILayerItem * getLayerItemByPoint(int _left, int _top) const =0
virtual void upChildItemNode(ILayerNode *_node)=0
virtual ILayerNode * getLayerNodeAt(size_t _index) const =0
virtual void destroyChildItemNode(ILayerNode *_node)=0
virtual void resizeView(const IntSize &_viewSize)=0
virtual ILayerNode * createChildItemNode()=0
virtual void detachLayerItem(ILayerItem *_root)=0
virtual size_t getLayerNodeCount() const =0
virtual ILayer * getLayer() const =0
virtual void renderToTarget(IRenderTarget *_target, bool _update)=0
virtual RenderItem * addToRenderItem(ITexture *_texture, bool _firstQueue, bool _separate)=0
virtual void attachLayerItem(ILayerItem *_item)=0
virtual EnumeratorILayerNode getEnumerator() const =0
virtual float getNodeDepth() const =0
virtual void outOfDate(RenderItem *_item)=0
std::vector< ILayerNode * > VectorILayerNode
Enumerator< VectorILayerNode > EnumeratorILayerNode