MyGUI: MyGUI_SharedLayer.h Source File

MyGUI 3.4.3

MyGUI_SharedLayer.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_SHARED_LAYER_H_
8#define MYGUI_SHARED_LAYER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
12#include "MyGUI_ILayer.h"
13#include "MyGUI_SharedLayerNode.h"
14
15namespace MyGUI
16{
17
18 class MYGUI_EXPORT SharedLayer : public ILayer
19 {
20 MYGUI_RTTI_DERIVED(SharedLayer)
21
22 public:
23 SharedLayer();
24 ~SharedLayer() override;
25
26 void deserialization(xml::ElementPtr _node, Version _version) override;
27
28 void setPick(bool _pick);
29
30 ILayerNode* createChildItemNode() override;
31 void destroyChildItemNode(ILayerNode* _item) override;
32
33 // up child item (make it draw and pick above others)
34 void upChildItemNode(ILayerNode* _item) override;
35
36 // child items list
37 EnumeratorILayerNode getEnumerator() const override;
38
39 size_t getLayerNodeCount() const override;
40
41 ILayerNode* getLayerNodeAt(size_t _index) const override;
42
43 // return widget at position
44 ILayerItem* getLayerItemByPoint(int _left, int _top) const override;
45
46 // return position in layer coordinates
47 IntPoint getPosition(int _left, int _top) const override;
48
49 // return layer size
50 const IntSize& getSize() const override;
51
52 // render layer
53 void renderToTarget(IRenderTarget* _target, bool _update) override;
54
55 void resizeView(const IntSize& _viewSize) override;
56
57 bool isOutOfDate() const;
58
59 protected:
60 bool mIsPick{false};
61 SharedLayerNode* mChildItem{nullptr};
62 bool mOutOfDate{false};
63 IntSize mViewSize;
64 };
65
66} // namespace MyGUI
67
68#endif // MYGUI_SHARED_LAYER_H_
MyGUI_ILayer.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_SharedLayerNode.h
MyGUI_Types.h
MyGUI::ILayer::ILayer
ILayer()=default
MyGUI::ILayerItem
Definition MyGUI_ILayerItem.h:20
MyGUI::ILayerNode
Definition MyGUI_ILayerNode.h:29
MyGUI::IRenderTarget
Definition MyGUI_IRenderTarget.h:21
MyGUI::SharedLayer::destroyChildItemNode
void destroyChildItemNode(ILayerNode *_item) override
Definition MyGUI_SharedLayer.cpp:68
MyGUI::SharedLayer::mViewSize
IntSize mViewSize
Definition MyGUI_SharedLayer.h:63
MyGUI::SharedLayer::mChildItem
SharedLayerNode * mChildItem
Definition MyGUI_SharedLayer.h:61
MyGUI::SharedLayer::getEnumerator
EnumeratorILayerNode getEnumerator() const override
Definition MyGUI_SharedLayer.cpp:132
MyGUI::SharedLayer::deserialization
void deserialization(xml::ElementPtr _node, Version _version) override
Definition MyGUI_SharedLayer.cpp:27
MyGUI::SharedLayer::setPick
void setPick(bool _pick)
Definition MyGUI_SharedLayer.cpp:51
MyGUI::SharedLayer::getLayerNodeAt
ILayerNode * getLayerNodeAt(size_t _index) const override
Definition MyGUI_SharedLayer.cpp:155
MyGUI::SharedLayer::renderToTarget
void renderToTarget(IRenderTarget *_target, bool _update) override
Definition MyGUI_SharedLayer.cpp:116
MyGUI::SharedLayer::isOutOfDate
bool isOutOfDate() const
Definition MyGUI_SharedLayer.cpp:168
MyGUI::SharedLayer::createChildItemNode
ILayerNode * createChildItemNode() override
Definition MyGUI_SharedLayer.cpp:56
MyGUI::SharedLayer::getPosition
IntPoint getPosition(int _left, int _top) const override
Definition MyGUI_SharedLayer.cpp:111
MyGUI::SharedLayer::upChildItemNode
void upChildItemNode(ILayerNode *_item) override
Definition MyGUI_SharedLayer.cpp:87
MyGUI::SharedLayer::getLayerItemByPoint
ILayerItem * getLayerItemByPoint(int _left, int _top) const override
Definition MyGUI_SharedLayer.cpp:97
MyGUI::SharedLayer::mOutOfDate
bool mOutOfDate
Definition MyGUI_SharedLayer.h:62
MyGUI::SharedLayer::mIsPick
bool mIsPick
Definition MyGUI_SharedLayer.h:60
MyGUI::SharedLayer::getLayerNodeCount
size_t getLayerNodeCount() const override
Definition MyGUI_SharedLayer.cpp:150
MyGUI::SharedLayer::getSize
const IntSize & getSize() const override
Definition MyGUI_SharedLayer.cpp:163
MyGUI::SharedLayer::SharedLayer
SharedLayer()
Definition MyGUI_SharedLayer.cpp:16
MyGUI::SharedLayer::resizeView
void resizeView(const IntSize &_viewSize) override
Definition MyGUI_SharedLayer.cpp:124
MyGUI::SharedLayerNode
Definition MyGUI_SharedLayerNode.h:17
MyGUI::Version
Definition MyGUI_Version.h:18
MyGUI::xml::ElementPtr
Element * ElementPtr
Definition MyGUI_XmlDocument.h:112
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