MyGUI_LayerItem.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_LAYER_ITEM_H_
#define MYGUI_LAYER_ITEM_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_LayerManager.h"
#include "MyGUI_ILayer.h"
#include "MyGUI_ILayerNode.h"
#include "MyGUI_ILayerItem.h"
#include "MyGUI_ISubWidget.h"
namespace MyGUI
{
class MYGUI_EXPORT LayerItem : public ILayerItem
{
public:
ILayer* getLayer() const;
ILayerNode* getLayerNode() const;
void attachItemToNode(ILayer* _layer, ILayerNode* _node) override;
void detachFromLayer() override;
void upLayerItem() override;
void setRenderItemTexture(ITexture* _texture);
void addChildItem(LayerItem* _item);
void removeChildItem(LayerItem* _item);
void addChildNode(LayerItem* _item);
void removeChildNode(LayerItem* _item);
void addRenderItem(ISubWidget* _item);
void removeAllRenderItems();
void saveLayerItem();
void restoreLayerItem();
protected:
void attachToLayerItemNode(ILayerNode* _item, bool _deep);
void detachFromLayerItemNode(bool _deep);
private:
// актуально для рутового виджета
ILayer* mLayer{nullptr};
// конкретный айтем находящийся в слое
ILayerNode* mLayerNode{nullptr};
ILayerNode* mSaveLayerNode{nullptr};
using VectorLayerItem = std::vector<LayerItem*>;
// список наших детей айтемов
VectorLayerItem mLayerItems;
// список наших узлов
VectorLayerItem mLayerNodes;
// вектор всех детей сабскинов
VectorSubWidget mDrawItems;
ITexture* mTexture{nullptr};
};
} // namespace MyGUI
#endif // MYGUI_LAYER_ITEM_H_
MyGUI_ILayer.h
MyGUI_ILayerItem.h
MyGUI_ILayerNode.h
MyGUI_ISubWidget.h
MyGUI_LayerManager.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI::ILayer
Definition MyGUI_ILayer.h:22
MyGUI::ILayerItem
Definition MyGUI_ILayerItem.h:20
MyGUI::ILayerNode
Definition MyGUI_ILayerNode.h:29
MyGUI::ISubWidget
Definition MyGUI_ISubWidget.h:25
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::LayerItem
Definition MyGUI_LayerItem.h:21
MyGUI::LayerItem::removeChildNode
void removeChildNode(LayerItem *_item)
Definition MyGUI_LayerItem.cpp:41
MyGUI::LayerItem::getLayerNode
ILayerNode * getLayerNode() const
Definition MyGUI_LayerItem.cpp:196
MyGUI::LayerItem::attachToLayerItemNode
void attachToLayerItemNode(ILayerNode *_item, bool _deep)
Definition MyGUI_LayerItem.cpp:130
MyGUI::LayerItem::detachFromLayerItemNode
void detachFromLayerItemNode(bool _deep)
Definition MyGUI_LayerItem.cpp:158
MyGUI::LayerItem::addChildItem
void addChildItem(LayerItem *_item)
Definition MyGUI_LayerItem.cpp:14
MyGUI::LayerItem::addChildNode
void addChildNode(LayerItem *_item)
Definition MyGUI_LayerItem.cpp:30
MyGUI::LayerItem::removeChildItem
void removeChildItem(LayerItem *_item)
Definition MyGUI_LayerItem.cpp:23
MyGUI::LayerItem::removeAllRenderItems
void removeAllRenderItems()
Definition MyGUI_LayerItem.cpp:53
MyGUI::LayerItem::getLayer
ILayer * getLayer() const
Definition MyGUI_LayerItem.cpp:191
MyGUI::LayerItem::addRenderItem
void addRenderItem(ISubWidget *_item)
Definition MyGUI_LayerItem.cpp:48
MyGUI::LayerItem::detachFromLayer
void detachFromLayer() override
Definition MyGUI_LayerItem.cpp:96
MyGUI::LayerItem::restoreLayerItem
void restoreLayerItem()
Definition MyGUI_LayerItem.cpp:79
MyGUI::LayerItem::upLayerItem
void upLayerItem() override
Definition MyGUI_LayerItem.cpp:120
MyGUI::LayerItem::saveLayerItem
void saveLayerItem()
Definition MyGUI_LayerItem.cpp:74
MyGUI::LayerItem::attachItemToNode
void attachItemToNode(ILayer *_layer, ILayerNode *_node) override
Definition MyGUI_LayerItem.cpp:88
MyGUI::LayerItem::setRenderItemTexture
void setRenderItemTexture(ITexture *_texture)
Definition MyGUI_LayerItem.cpp:59
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorSubWidget
std::vector< ISubWidget * > VectorSubWidget
Definition MyGUI_ISubWidget.h:22