32 mDestCoord = _destCoord;
41 mCalcPosition =
false;
48 mDestCoord.
top = _destPoint.
top;
65 mElapsedTime += _time;
67 if (mElapsedTime < mTime)
70 eventFrameAction(mStartCoord, mDestCoord, coord, mElapsedTime / mTime);
73 if (mCalcSize) _widget->
setCoord(coord);
86 eventFrameAction(mStartCoord, mDestCoord, coord, 1.0f);
89 if (mCalcSize) _widget->
setCoord(coord);
106 setTime(utility::parseValue<float>(_value));
107 else if (_key ==
"Coord")
108 setCoord(utility::parseValue<IntCoord>(_value));
109 else if (_key ==
"Size")
110 setSize(utility::parseValue<IntSize>(_value));
111 else if (_key ==
"Position")
112 setPosition(utility::parseValue<IntPoint>(_value));
113 else if (_key ==
"Function")
119 if (_value ==
"Inertional")
121 else if (_value ==
"Accelerated")
123 else if (_value ==
"Slowed")
125 else if (_value ==
"Jump")
136 eventFrameAction = _value;
delegates::IDelegate0 * newDelegate(void(*_func)())
TPoint< T > point() const
virtual void prepareItem(Widget *_widget)
void setCoord(const IntCoord &_value)
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventPreAction
void inertionalMoveFunction(const IntCoord &_startRect, const IntCoord &_destRect, IntCoord &_result, float _current_time)
void setTime(float _value)
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventPostAction
void setSize(const IntSize &_value)
virtual bool addTime(Widget *_widget, float _time)
void setFunction(const std::string &_value)
void setAction(FrameAction::IDelegate *_value)
virtual ~ControllerPosition()
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventUpdateAction
virtual void setProperty(const std::string &_key, const std::string &_value)
#define MYGUI_DEBUG_ASSERT(exp, dest)
void setPosition(const IntPoint &_value)
const IntCoord & getCoord() const