7
This file is part of MyGUI.
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.
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.
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/>.
22
#ifndef __MYGUI_I_LAYER_NODE_H__
23
#define __MYGUI_I_LAYER_NODE_H__
25
#include "MyGUI_Prerequest.h"
26
#include "MyGUI_Enumerator.h"
27
#include "MyGUI_IObject.h"
28
#include "MyGUI_IRenderTarget.h"
39
typedef std::vector<ILayerNode*> VectorILayerNode;
40
typedef Enumerator<VectorILayerNode> EnumeratorILayerNode;
42
class MYGUI_EXPORT ILayerNode :
45
MYGUI_RTTI_DERIVED( ILayerNode )
48
virtual ~ILayerNode() { }
50
// леер, которому мы принадлежим
51
virtual ILayer* getLayer() const = 0;
53
// возвращает отца или nullptr
54
virtual ILayerNode* getParent() const = 0;
56
// создаем дочерний нод
57
virtual ILayerNode* createChildItemNode() = 0;
58
// удаляем дочерний нод
59
virtual void destroyChildItemNode(ILayerNode* _node) = 0;
61
// поднимаем дочерний нод
62
virtual void upChildItemNode(ILayerNode* _node) = 0;
65
virtual EnumeratorILayerNode getEnumerator() const = 0;
67
// добавляем айтем к ноду
68
virtual void attachLayerItem(ILayerItem* _item) = 0;
69
// удаляем айтем из нода
70
virtual void detachLayerItem(ILayerItem* _root) = 0;
72
// добавляет саб айтем и возвращает рендер айтем
73
virtual RenderItem* addToRenderItem(ITexture* _texture, bool _firstQueue, bool _separate) = 0;
74
// необходимо обновление нода
75
virtual void outOfDate(RenderItem* _item) = 0;
77
// возвращает виджет по позиции
78
virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
81
virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
83
virtual void resizeView(const IntSize& _viewSize) = 0;
88
#endif // __MYGUI_I_LAYER_NODE_H__
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)
7
#ifndef __MYGUI_I_LAYER_NODE_H__
8
#define __MYGUI_I_LAYER_NODE_H__
10
#include "MyGUI_Prerequest.h"
11
#include "MyGUI_Enumerator.h"
12
#include "MyGUI_IObject.h"
13
#include "MyGUI_IRenderTarget.h"
24
typedef std::vector<ILayerNode*> VectorILayerNode;
25
typedef Enumerator<VectorILayerNode> EnumeratorILayerNode;
27
class MYGUI_EXPORT ILayerNode :
30
MYGUI_RTTI_DERIVED( ILayerNode )
33
virtual ~ILayerNode() { }
35
// леер, которому мы принадлежим
36
virtual ILayer* getLayer() const = 0;
38
// возвращает отца или nullptr
39
virtual ILayerNode* getParent() const = 0;
41
// создаем дочерний нод
42
virtual ILayerNode* createChildItemNode() = 0;
43
// удаляем дочерний нод
44
virtual void destroyChildItemNode(ILayerNode* _node) = 0;
46
// поднимаем дочерний нод
47
virtual void upChildItemNode(ILayerNode* _node) = 0;
50
virtual EnumeratorILayerNode getEnumerator() const = 0;
52
virtual size_t getLayerNodeCount() const = 0;
54
virtual ILayerNode* getLayerNodeAt(size_t _index) const = 0;
56
// добавляем айтем к ноду
57
virtual void attachLayerItem(ILayerItem* _item) = 0;
58
// удаляем айтем из нода
59
virtual void detachLayerItem(ILayerItem* _root) = 0;
61
// добавляет саб айтем и возвращает рендер айтем
62
virtual RenderItem* addToRenderItem(ITexture* _texture, bool _firstQueue, bool _separate) = 0;
63
// необходимо обновление нода
64
virtual void outOfDate(RenderItem* _item) = 0;
66
// возвращает виджет по позиции
67
virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
70
virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
72
virtual void resizeView(const IntSize& _viewSize) = 0;
74
virtual float getNodeDepth() = 0;
79
#endif // __MYGUI_I_LAYER_NODE_H__