MyGUI_ILayer.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_I_LAYER_H_
#define MYGUI_I_LAYER_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Types.h"
#include "MyGUI_IRenderTarget.h"
#include "MyGUI_ILayerNode.h"
#include "MyGUI_ISerializable.h"
namespace MyGUI
{
class ILayerItem;
class MYGUI_EXPORT ILayer : public ISerializable
{
MYGUI_RTTI_DERIVED(ILayer)
public:
ILayer() = default;
const std::string& getName() const
{
return mName;
}
void setName(std::string_view _name)
{
mName = _name;
}
virtual ILayerNode* createChildItemNode() = 0;
virtual void destroyChildItemNode(ILayerNode* _node) = 0;
// up child item (make it draw and pick above others)
virtual void upChildItemNode(ILayerNode* _item) = 0;
// child items list
virtual EnumeratorILayerNode getEnumerator() const = 0;
virtual size_t getLayerNodeCount() const = 0;
virtual ILayerNode* getLayerNodeAt(size_t _index) const = 0;
// return widget at position
virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
// return position in layer coordinates
virtual IntPoint getPosition(int _left, int _top) const = 0;
// return layer size
virtual const IntSize& getSize() const = 0;
// render layer
virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
virtual void resizeView(const IntSize& _viewSize) = 0;
protected:
std::string mName;
};
} // namespace MyGUI
#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