17 mSaveLayerNode(nullptr),
24 mLayerItems.push_back(_item);
25 if (mLayerNode !=
nullptr)
33 VectorLayerItem::iterator item = std::remove(mLayerItems.begin(), mLayerItems.end(), _item);
34 MYGUI_ASSERT(item != mLayerItems.end(),
"item not found");
35 mLayerItems.erase(item);
40 mLayerNodes.push_back(_item);
41 if (mLayerNode !=
nullptr)
51 VectorLayerItem::iterator item = std::remove(mLayerNodes.begin(), mLayerNodes.end(), _item);
52 MYGUI_ASSERT(item != mLayerNodes.end(),
"item not found");
53 mLayerNodes.erase(item);
58 mDrawItems.push_back(_item);
69 if (mTexture == _texture)
84 mSaveLayerNode = mLayerNode;
89 mLayerNode = mSaveLayerNode;
107 if (
nullptr == mLayer)
124 mLayerNode =
nullptr;
145 for (VectorSubWidget::iterator skin = mDrawItems.begin(); skin != mDrawItems.end(); ++skin)
147 (*skin)->createDrawItem(mTexture, _item);
150 for (VectorLayerItem::iterator item = mLayerItems.begin(); item != mLayerItems.end(); ++item)
152 (*item)->attachToLayerItemNode(_item, _deep);
155 for (VectorLayerItem::iterator item = mLayerNodes.begin(); item != mLayerNodes.end(); ++item)
161 (*item)->attachToLayerItemNode(child_node, _deep);
168 for (VectorLayerItem::iterator item = mLayerItems.begin(); item != mLayerItems.end(); ++item)
170 (*item)->detachFromLayerItemNode(_deep);
173 for (VectorLayerItem::iterator item = mLayerNodes.begin(); item != mLayerNodes.end(); ++item)
178 (*item)->detachFromLayerItemNode(_deep);
191 for (VectorSubWidget::iterator skin = mDrawItems.begin(); skin != mDrawItems.end(); ++skin)
193 (*skin)->destroyDrawItem();
202 mLayerNode =
nullptr;
#define MYGUI_ASSERT(exp, dest)
#define MYGUI_DEBUG_ASSERT(exp, dest)
virtual void upChildItemNode(ILayerNode *_node)=0
virtual void destroyChildItemNode(ILayerNode *_node)=0
virtual ILayerNode * getParent() const =0
virtual void detachLayerItem(ILayerItem *_root)=0
virtual ILayer * getLayer() const =0
virtual ILayerNode * createChildItemNode()=0
void removeChildNode(LayerItem *_item)
ILayerNode * getLayerNode() const
void detachFromLayerItemNode(bool _deep)
void addChildItem(LayerItem *_item)
void addChildNode(LayerItem *_item)
void removeChildItem(LayerItem *_item)
void removeAllRenderItems()
ILayer * getLayer() const
void addRenderItem(ISubWidget *_item)
void detachFromLayer() override
void upLayerItem() override
void attachItemToNode(ILayer *_layer, ILayerNode *_node) override
void setRenderItemTexture(ITexture *_texture)
void attachToLayerItemNode(ILayerNode *_node, bool _deep)