7#ifndef MYGUI_LAYER_MANAGER_H_
8#define MYGUI_LAYER_MANAGER_H_
26 using VectorLayer = std::vector<ILayer*>;
38 void attachToLayerNode(std::string_view _name, Widget* _item);
42 void detachFromLayer(Widget* _item);
47 void upLayerItem(Widget* _item);
50 bool isExist(std::string_view _name)
const;
52 const VectorLayer& getLayers()
const;
59 ILayer* createLayerAt(std::string_view _name, std::string_view _type,
size_t _index);
62 void destroyLayer(std::string_view _name);
65 ILayer* getByName(std::string_view _name,
bool _throw =
true)
const;
67 size_t getLayerCount()
const;
69 ILayer* getLayer(
size_t _index)
const;
72 Widget* getWidgetFromPoint(
int _left,
int _top)
const;
75 void renderToTarget(IRenderTarget* _target,
bool _update);
77 void resizeView(
const IntSize& _viewSize);
79 const std::string& getCategoryName()
const;
82 void _load(xml::ElementPtr _node, std::string_view _file, Version _version);
83 void _unlinkWidget(Widget* _widget)
override;
85 ILayer* _createLayerObject(std::string_view _type);
89 void merge(VectorLayer& _layers);
90 void destroy(ILayer* _layer);
93 VectorLayer mLayerNodes;
95 bool mIsInitialise{
false};
96 std::string mCategoryName;
#define MYGUI_SINGLETON_DECLARATION(ClassName)