16 template <> LayoutManager* Singleton<LayoutManager>::msInstance =
nullptr;
17 template <>
const char* Singleton<LayoutManager>::mClassTypeName =
"LayoutManager";
21 mXmlLayoutTagName(
"Layout")
50 mIsInitialise =
false;
61 mCurrentLayoutName = _file;
74 MYGUI_LOG(Warning,
"Layout '" << _file <<
"' couldn't be loaded");
76 mCurrentLayoutName =
"";
91 if (result !=
nullptr)
94 if (resource ==
nullptr)
96 MYGUI_ASSERT(!_throw,
"Resource '" << skinName <<
"' is not ResourceLayout type");
101 MYGUI_ASSERT(!_throw,
"ResourceLayout '" << skinName <<
"' not found");
107 return mCurrentLayoutName;
112 return getByName(_name,
false) !=
nullptr;
void unregisterLoadXmlDelegate(const std::string &_key)
VectorWidgetPtr loadLayout(const std::string &_file, const std::string &_prefix="", Widget *_parent=0)
LoadXmlDelegate & registerLoadXmlDelegate(const std::string &_key)
delegates::IDelegate0 * newDelegate(void(*_func)())
static ResourceManager & getInstance()
static const char * getClassTypeName()
bool isExist(const std::string &_name) const
static std::string getSkinRename(const std::string &_skinName)
#define MYGUI_LOG(level, text)
VectorWidgetPtr createLayout(const std::string &_prefix="", Widget *_parent=0)
bool load(const std::string &_file)
std::vector< Widget * > VectorWidgetPtr
#define MYGUI_ASSERT(exp, dest)
void unloadLayout(VectorWidgetPtr &_widgets)
const std::string & getCategoryName() const
Type * castType(bool _throw=true)
void unregisterFactory(const std::string &_category, const std::string &_type)
void registerFactory(const std::string &_category, const std::string &_type, Delegate::IDelegate *_delegate)
ResourceLayout * getByName(const std::string &_name, bool _throw=true) const
void addResource(IResourcePtr _item)
IResource * getByName(const std::string &_name, bool _throw=true) const
const std::string & getCurrentLayout() const