MyGUI_OverlappedLayer.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_OVERLAPPED_LAYER_H_
#define MYGUI_OVERLAPPED_LAYER_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Types.h"
#include "MyGUI_ILayer.h"
namespace MyGUI
{
class MYGUI_EXPORT OverlappedLayer : public ILayer
{
MYGUI_RTTI_DERIVED(OverlappedLayer)
public:
OverlappedLayer();
~OverlappedLayer() override;
void deserialization(xml::ElementPtr _node, Version _version) override;
void setPick(bool _pick);
ILayerNode* createChildItemNode() override;
void destroyChildItemNode(ILayerNode* _item) override;
// up child item (make it draw and pick above others)
void upChildItemNode(ILayerNode* _item) override;
// child items list
EnumeratorILayerNode getEnumerator() const override;
size_t getLayerNodeCount() const override;
ILayerNode* getLayerNodeAt(size_t _index) const override;
// return widget at position
ILayerItem* getLayerItemByPoint(int _left, int _top) const override;
// return position in layer coordinates
IntPoint getPosition(int _left, int _top) const override;
// return layer size
const IntSize& getSize() const override;
// render layer
void renderToTarget(IRenderTarget* _target, bool _update) override;
void resizeView(const IntSize& _viewSize) override;
bool isOutOfDate() const;
protected:
bool mIsPick{false};
VectorILayerNode mChildItems;
bool mOutOfDate{false};
IntSize mViewSize;
};
} // namespace MyGUI
#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