31 const std::string
XML_TYPE(
"Layout");
34 template <> LayoutManager* Singleton<LayoutManager>::msInstance =
nullptr;
35 template <>
const char* Singleton<LayoutManager>::mClassTypeName(
"LayoutManager");
63 mIsInitialise =
false;
74 mCurrentLayoutName = _file;
87 MYGUI_LOG(Warning,
"Layout '" << _file <<
"' couldn't be loaded");
89 mCurrentLayoutName =
"";
104 if (result !=
nullptr)
107 if (resource ==
nullptr)
109 MYGUI_ASSERT(!_throw,
"Resource '" << skinName <<
"' is not ResourceLayout type");
114 MYGUI_ASSERT(!_throw,
"ResourceLayout '" << skinName <<
"' not found");
120 return mCurrentLayoutName;
125 return getByName(_name,
false) !=
nullptr;
void unregisterLoadXmlDelegate(const std::string &_key)
bool isExist(const std::string &_name) const
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()
ResourceLayout * getByName(const std::string &_name, bool _throw=true) const
const std::string XML_TYPE("Font")
static std::string getSkinRename(const std::string &_skinName)
IResource * getByName(const std::string &_name, bool _throw=true) const
#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)
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)
void addResource(IResourcePtr _item)
const std::string & getCurrentLayout() const
const std::string XML_TYPE_RESOURCE("Resource")