33 mXmlPointerTagName(
"Pointer"),
34 mXmlPropertyTagName(
"Property"),
35 mXmlDefaultPointerValue(
"Default"),
36 mSingletonHolder(
this)
56 mMousePointer =
nullptr;
57 mWidgetOwner =
nullptr;
60 mSkinName =
"ImageBox";
79 _destroyAllChildWidget();
81 mWidgetOwner =
nullptr;
87 mIsInitialise =
false;
92#ifndef MYGUI_DONT_USE_OBSOLETE
99 if (
node->getName() == mXmlPropertyTagName)
101 const std::string& key =
node->findAttribute(
"key");
102 const std::string& value =
node->findAttribute(
"value");
103 if (key ==
"Default")
105 else if (key ==
"Layer")
107 else if (key ==
"Skin")
113 void PointerManager::notifyFrameStart(
float _time)
116 if (mOldPoint != mPoint)
120 if (
nullptr != mMousePointer && mPointer !=
nullptr)
133 if (
nullptr == mMousePointer)
145 mPointer = result->
castType<IPointer>();
149 mWidgetOwner = _owner;
152 void PointerManager::_unlinkWidget(Widget* _widget)
154 if (_widget == mWidgetOwner)
setPointer(mDefaultName,
nullptr);
155 else if (_widget == mMousePointer) mMousePointer =
nullptr;
167 mWidgetChild.push_back(
widget);
178 void PointerManager::_destroyAllChildWidget()
181 while (!mWidgetChild.empty())
184 Widget* widget = mWidgetChild.back();
185 mWidgetChild.pop_back();
188 manager.unlinkFromUnlinkers(widget);
212 void PointerManager::Update()
214 if (mMousePointer ==
nullptr)
221 if (!
_name.empty() &&
_name != mXmlDefaultPointerValue)
233 if (
pointer != mCurrentMousePointer)
235 mCurrentMousePointer =
pointer;
236 if (mCurrentMousePointer.empty())
#define MYGUI_ASSERT(exp, dest)
#define MYGUI_LOG(level, text)
#define MYGUI_SINGLETON_DEFINITION(ClassName)
static FactoryManager & getInstance()
static Gui & getInstance()
Type * castType(bool _throw=true)
virtual void setImage(ImageBox *_image)=0
virtual void setPosition(ImageBox *_image, const IntPoint &_point)=0
widget description should be here.
static const std::string & getClassTypeName()
static LayerManager & getInstance()
void loadOldPointerFormat(xml::ElementPtr _node, const std::string &_file, Version _version, const std::string &_tag)
void resetToDefaultPointer()
delegates::CMultiDelegate1< const std::string & > eventChangeMousePointer
static const char * getClassTypeName()
const std::string & getDefaultPointer() const
void setVisible(bool _visible)
const std::string & getLayerName() const
void setPointer(const std::string &_name)
void setLayerName(const std::string &_value)
IPointer * getByName(const std::string &_name) const
void setDefaultPointer(const std::string &_value)
static ResourceManager & getInstance()
types::TCoord< int > IntCoord
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))