MyGUI 3.4.3
MyGUI_ILayer.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_H_
8#define MYGUI_I_LAYER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
12#include "MyGUI_IRenderTarget.h"
13#include "MyGUI_ILayerNode.h"
14#include "MyGUI_ISerializable.h"
15
16namespace MyGUI
17{
18
19 class ILayerItem;
20
22 {
24
25 public:
26 ILayer() = default;
27
28 const std::string& getName() const
29 {
30 return mName;
31 }
32
33 void setName(std::string_view _name)
34 {
35 mName = _name;
36 }
37
39 virtual void destroyChildItemNode(ILayerNode* _node) = 0;
40
41 // up child item (make it draw and pick above others)
42 virtual void upChildItemNode(ILayerNode* _item) = 0;
43
44 // child items list
46
47 virtual size_t getLayerNodeCount() const = 0;
48
49 virtual ILayerNode* getLayerNodeAt(size_t _index) const = 0;
50
51 // return widget at position
52 virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
53
54 // return position in layer coordinates
55 virtual IntPoint getPosition(int _left, int _top) const = 0;
56
57 // return layer size
58 virtual const IntSize& getSize() const = 0;
59
60 // render layer
61 virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
62
63 virtual void resizeView(const IntSize& _viewSize) = 0;
64
65 protected:
66 std::string mName;
67 };
68
69} // namespace MyGUI
70
71#endif // MYGUI_I_LAYER_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
virtual IntPoint getPosition(int _left, int _top) const =0
virtual void renderToTarget(IRenderTarget *_target, bool _update)=0
virtual void upChildItemNode(ILayerNode *_item)=0
const std::string & getName() const
virtual ILayerItem * getLayerItemByPoint(int _left, int _top) const =0
virtual EnumeratorILayerNode getEnumerator() const =0
virtual ILayerNode * getLayerNodeAt(size_t _index) const =0
virtual ILayerNode * createChildItemNode()=0
ILayer()=default
void setName(std::string_view _name)
virtual size_t getLayerNodeCount() const =0
virtual void destroyChildItemNode(ILayerNode *_node)=0
std::string mName
virtual void resizeView(const IntSize &_viewSize)=0
virtual const IntSize & getSize() const =0
Enumerator< VectorILayerNode > EnumeratorILayerNode
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
types::TSize< int > IntSize
Definition MyGUI_Types.h:30