MyGUI: MyGUI_OverlappedLayer.h Source File

MyGUI 3.4.3

MyGUI_OverlappedLayer.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_OVERLAPPED_LAYER_H_
8#define MYGUI_OVERLAPPED_LAYER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
12#include "MyGUI_ILayer.h"
13
14namespace MyGUI
15{
16
17 class MYGUI_EXPORT OverlappedLayer : public ILayer
18 {
19 MYGUI_RTTI_DERIVED(OverlappedLayer)
20
21 public:
22 OverlappedLayer();
23 ~OverlappedLayer() override;
24
25 void deserialization(xml::ElementPtr _node, Version _version) override;
26
27 void setPick(bool _pick);
28
29 ILayerNode* createChildItemNode() override;
30 void destroyChildItemNode(ILayerNode* _item) override;
31
32 // up child item (make it draw and pick above others)
33 void upChildItemNode(ILayerNode* _item) override;
34
35 // child items list
36 EnumeratorILayerNode getEnumerator() const override;
37
38 size_t getLayerNodeCount() const override;
39
40 ILayerNode* getLayerNodeAt(size_t _index) const override;
41
42 // return widget at position
43 ILayerItem* getLayerItemByPoint(int _left, int _top) const override;
44
45 // return position in layer coordinates
46 IntPoint getPosition(int _left, int _top) const override;
47
48 // return layer size
49 const IntSize& getSize() const override;
50
51 // render layer
52 void renderToTarget(IRenderTarget* _target, bool _update) override;
53
54 void resizeView(const IntSize& _viewSize) override;
55
56 bool isOutOfDate() const;
57
58 protected:
59 bool mIsPick{false};
60 VectorILayerNode mChildItems;
61 bool mOutOfDate{false};
62 IntSize mViewSize;
63 };
64
65} // namespace MyGUI
66
67#endif // MYGUI_OVERLAPPED_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_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::OverlappedLayer::getSize
const IntSize & getSize() const override
Definition MyGUI_OverlappedLayer.cpp:183
MyGUI::OverlappedLayer::deserialization
void deserialization(xml::ElementPtr _node, Version _version) override
Definition MyGUI_OverlappedLayer.cpp:27
MyGUI::OverlappedLayer::getEnumerator
EnumeratorILayerNode getEnumerator() const override
Definition MyGUI_OverlappedLayer.cpp:166
MyGUI::OverlappedLayer::setPick
void setPick(bool _pick)
Definition MyGUI_OverlappedLayer.cpp:51
MyGUI::OverlappedLayer::getLayerNodeAt
ILayerNode * getLayerNodeAt(size_t _index) const override
Definition MyGUI_OverlappedLayer.cpp:176
MyGUI::OverlappedLayer::mIsPick
bool mIsPick
Definition MyGUI_OverlappedLayer.h:59
MyGUI::OverlappedLayer::mChildItems
VectorILayerNode mChildItems
Definition MyGUI_OverlappedLayer.h:60
MyGUI::OverlappedLayer::resizeView
void resizeView(const IntSize &_viewSize) override
Definition MyGUI_OverlappedLayer.cpp:158
MyGUI::OverlappedLayer::getPosition
IntPoint getPosition(int _left, int _top) const override
Definition MyGUI_OverlappedLayer.cpp:145
MyGUI::OverlappedLayer::getLayerItemByPoint
ILayerItem * getLayerItemByPoint(int _left, int _top) const override
Definition MyGUI_OverlappedLayer.cpp:129
MyGUI::OverlappedLayer::OverlappedLayer
OverlappedLayer()
Definition MyGUI_OverlappedLayer.cpp:16
MyGUI::OverlappedLayer::destroyChildItemNode
void destroyChildItemNode(ILayerNode *_item) override
Definition MyGUI_OverlappedLayer.cpp:67
MyGUI::OverlappedLayer::mOutOfDate
bool mOutOfDate
Definition MyGUI_OverlappedLayer.h:61
MyGUI::OverlappedLayer::createChildItemNode
ILayerNode * createChildItemNode() override
Definition MyGUI_OverlappedLayer.cpp:56
MyGUI::OverlappedLayer::renderToTarget
void renderToTarget(IRenderTarget *_target, bool _update) override
Definition MyGUI_OverlappedLayer.cpp:150
MyGUI::OverlappedLayer::upChildItemNode
void upChildItemNode(ILayerNode *_item) override
Definition MyGUI_OverlappedLayer.cpp:97
MyGUI::OverlappedLayer::getLayerNodeCount
size_t getLayerNodeCount() const override
Definition MyGUI_OverlappedLayer.cpp:171
MyGUI::OverlappedLayer::mViewSize
IntSize mViewSize
Definition MyGUI_OverlappedLayer.h:62
MyGUI::OverlappedLayer::isOutOfDate
bool isOutOfDate() const
Definition MyGUI_OverlappedLayer.cpp:188
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::VectorILayerNode
std::vector< ILayerNode * > VectorILayerNode
Definition MyGUI_ILayerNode.h:25
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30