56 template <> WidgetManager* Singleton<WidgetManager>::msInstance =
nullptr;
110 mVectorIUnlinkWidget.clear();
115 mIsInitialise =
false;
121 if (
object !=
nullptr)
124 widget->
_initialise(_style, _coord, _skin, _parent, _cropeedParent, _name);
150 mVectorIUnlinkWidget.push_back(_unlink);
155 VectorIUnlinkWidget::iterator iter = std::remove(mVectorIUnlinkWidget.begin(), mVectorIUnlinkWidget.end(), _unlink);
156 if (iter != mVectorIUnlinkWidget.end())
157 mVectorIUnlinkWidget.erase(iter);
162 for (VectorIUnlinkWidget::iterator iter = mVectorIUnlinkWidget.begin(); iter != mVectorIUnlinkWidget.end(); ++iter)
164 (*iter)->_unlinkWidget(_widget);
178 void WidgetManager::notifyEventFrameStart(
float _time)
187 for (VectorWidgetPtr::iterator entry = mDestroyWidgets.begin(); entry != mDestroyWidgets.end(); ++entry)
191 MYGUI_ASSERT((*entry) != _widget,
"double delete widget");
194 mDestroyWidgets.push_back(_widget);
199 if (!mDestroyWidgets.empty())
201 for (VectorWidgetPtr::iterator entry = mDestroyWidgets.begin(); entry != mDestroyWidgets.end(); ++entry)
203 mDestroyWidgets.clear();
void destroyWidget(Widget *_widget)
EventHandle_FrameEventDelegate eventFrameStart
delegates::IDelegate0 * newDelegate(void(*_func)())
static FactoryManager & getInstance()
static const char * getClassTypeName()
#define MYGUI_LOG(level, text)
#define MYGUI_EXCEPT(dest)
void destroyWidgets(const VectorWidgetPtr &_widgets)
std::vector< Widget * > VectorWidgetPtr
#define MYGUI_ASSERT(exp, dest)
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)
static void registerWidgetTypes()
static const char * mClassTypeName
IObject * createObject(const std::string &_category, const std::string &_type)