MyGUI: MyGUI_ILayer.h Source File

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
21 class MYGUI_EXPORT ILayer : public ISerializable
22 {
23 MYGUI_RTTI_DERIVED(ILayer)
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
38 virtual ILayerNode* createChildItemNode() = 0;
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
45 virtual EnumeratorILayerNode getEnumerator() const = 0;
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_
MyGUI_ILayerNode.h
MyGUI_IRenderTarget.h
MyGUI_ISerializable.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
MyGUI_Types.h
MyGUI::ILayer::getPosition
virtual IntPoint getPosition(int _left, int _top) const =0
MyGUI::ILayer::renderToTarget
virtual void renderToTarget(IRenderTarget *_target, bool _update)=0
MyGUI::ILayer::upChildItemNode
virtual void upChildItemNode(ILayerNode *_item)=0
MyGUI::ILayer::getName
const std::string & getName() const
Definition MyGUI_ILayer.h:28
MyGUI::ILayer::getLayerItemByPoint
virtual ILayerItem * getLayerItemByPoint(int _left, int _top) const =0
MyGUI::ILayer::getEnumerator
virtual EnumeratorILayerNode getEnumerator() const =0
MyGUI::ILayer::getLayerNodeAt
virtual ILayerNode * getLayerNodeAt(size_t _index) const =0
MyGUI::ILayer::createChildItemNode
virtual ILayerNode * createChildItemNode()=0
MyGUI::ILayer::ILayer
ILayer()=default
MyGUI::ILayer::setName
void setName(std::string_view _name)
Definition MyGUI_ILayer.h:33
MyGUI::ILayer::getLayerNodeCount
virtual size_t getLayerNodeCount() const =0
MyGUI::ILayer::destroyChildItemNode
virtual void destroyChildItemNode(ILayerNode *_node)=0
MyGUI::ILayer::mName
std::string mName
Definition MyGUI_ILayer.h:66
MyGUI::ILayer::resizeView
virtual void resizeView(const IntSize &_viewSize)=0
MyGUI::ILayer::getSize
virtual const IntSize & getSize() const =0
MyGUI::ILayerItem
Definition MyGUI_ILayerItem.h:20
MyGUI::ILayerNode
Definition MyGUI_ILayerNode.h:29
MyGUI::IRenderTarget
Definition MyGUI_IRenderTarget.h:21
MyGUI::ISerializable
Definition MyGUI_ISerializable.h:19
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::EnumeratorILayerNode
Enumerator< VectorILayerNode > EnumeratorILayerNode
Definition MyGUI_ILayerNode.h:26
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30