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