29 #ifndef _CEGUIAnimationInstance_h_
30 #define _CEGUIAnimationInstance_h_
32 #include "CEGUI/EventArgs.h"
33 #include "CEGUI/Event.h"
38 # pragma warning(push)
39 # pragma warning(disable : 4251)
51 class CEGUIEXPORT AnimationEventArgs :
public EventArgs
54 AnimationEventArgs(AnimationInstance* inst) : instance(inst) {}
56 AnimationInstance* instance;
73 class CEGUIEXPORT AnimationInstance :
74 public AllocatedObject<AnimationInstance>
79 static const String EventNamespace;
82 static const String EventAnimationStarted;
84 static const String EventAnimationStopped;
86 static const String EventAnimationPaused;
88 static const String EventAnimationUnpaused;
90 static const String EventAnimationEnded;
92 static const String EventAnimationLooped;
95 AnimationInstance(Animation* definition);
100 ~AnimationInstance(
void);
106 Animation* getDefinition()
const;
113 void setTarget(PropertySet* target);
127 void setEventReceiver(
EventSet* receiver);
141 void setEventSender(
EventSet* sender);
154 void setTargetWindow(
Window* target);
161 void setPosition(
float position);
167 float getPosition()
const;
174 void setSpeed(
float speed);
180 float getSpeed()
const;
186 void setSkipNextStep(
bool skip);
196 bool getSkipNextStep()
const;
213 void setMaxStepDeltaSkip(
float maxDelta);
219 float getMaxStepDeltaSkip()
const;
234 void setMaxStepDeltaClamp(
float maxDelta);
240 float getMaxStepDeltaClamp()
const;
252 void start(
bool skipNextStep =
true);
273 void unpause(
bool skipNextStep =
true);
283 void togglePause(
bool skipNextStep =
true);
290 bool isRunning()
const;
300 void setAutoSteppingEnabled(
bool enabled);
306 bool isAutoSteppingEnabled()
const;
315 void step(
float delta);
351 void savePropertyValue(
const String& propertyName);
356 void purgeSavedPropertyValues(
void);
361 const String& getSavedPropertyValue(
const String& propertyName);
379 void unsubscribeAutoConnections();
393 void onAnimationStarted();
395 void onAnimationStopped();
397 void onAnimationPaused();
399 void onAnimationUnpaused();
402 void onAnimationEnded();
404 void onAnimationLooped();
426 bool d_bounceBackwards;
432 float d_maxStepDeltaSkip;
434 float d_maxStepDeltaClamp;
436 bool d_autoSteppingEnabled;
438 typedef std::map<String, String, std::less<String>
443 PropertyValueMap d_savedPropertyValues;
448 ConnectionTracker d_autoConnections;
453 #if defined(_MSC_VER)
454 # pragma warning(pop)
457 #endif // end of guard _CEGUIAnimationInstance_h_