29#ifndef _CEGUIAnimationInstance_h_
30#define _CEGUIAnimationInstance_h_
32#include "CEGUI/EventArgs.h"
33#include "CEGUI/Event.h"
39# pragma warning(disable : 4251)
254 void start(
bool skipNextStep =
true);
407 void onAnimationStarted();
409 void onAnimationStopped();
411 void onAnimationPaused();
413 void onAnimationUnpaused();
415 void onAnimationFinished();
418 void onAnimationEnded();
420 void onAnimationLooped();
442 bool d_bounceBackwards;
448 float d_maxStepDeltaSkip;
450 float d_maxStepDeltaClamp;
452 bool d_autoSteppingEnabled;
459 PropertyValueMap d_savedPropertyValues;
464 ConnectionTracker d_autoConnections;
Definition MemoryAllocatedObject.h:110
EventArgs based class that holds information about which animation instnace fired given event.
Definition AnimationInstance.h:52
AnimationInstance * instance
pointer to a AnimationInstance object of relevance to the event.
Definition AnimationInstance.h:56
Defines an 'animation instance' class.
Definition AnimationInstance.h:75
void setEventSender(EventSet *sender)
Sets event sender - this class will send events and can affect this animation instance if there are a...
bool handleStart(const CEGUI::EventArgs &e)
handler that starts the animation instance
bool isAutoSteppingEnabled() const
Checks whether auto stepping is enabled.
void setSpeed(float speed)
Sets playback speed - you can speed up / slow down individual instances of the same animation....
void stop()
Stops this animation instance - sets position to 0.0 and pauses.
void apply()
Applies this animation instance.
void setPosition(float position)
Sets playback position. Has to be higher or equal to 0.0 and lower or equal to Animation definition's...
void setAutoSteppingEnabled(bool enabled)
Controls whether auto stepping is enabled.
float getPosition() const
Retrieves current playback position.
void setTarget(PropertySet *target)
Sets the target property set - this class will get it's properties affected by the Affectors!
EventSet * getEventReceiver() const
Retrieves the event receiver.
bool handleStop(const CEGUI::EventArgs &e)
handler that stops the animation instance
float getMaxStepDeltaSkip() const
Gets the max delta before step skipping occurs.
static const String EventAnimationStopped
fired when animation instance stops
Definition AnimationInstance.h:84
void savePropertyValue(const String &propertyName)
Internal method, saves given property (called before it's affected)
bool handleTogglePause(const CEGUI::EventArgs &e)
handler that toggles pause on this animation instance
void pause()
Pauses this animation instance - stops it from stepping forward.
static const String EventAnimationPaused
fired when animation instance pauses
Definition AnimationInstance.h:86
bool handleFinish(const CEGUI::EventArgs &e)
handler that finishes the animation instance
void togglePause(bool skipNextStep=true)
Pauses the animation if it's running and unpauses it if it isn't.
AnimationInstance(Animation *definition)
internal constructor, please use AnimationManager::instantiateAnimation
static const String EventAnimationStarted
fired when animation instance starts
Definition AnimationInstance.h:82
void setMaxStepDeltaClamp(float maxDelta)
Sets the max delta before step clamping occurs.
static const String EventAnimationUnpaused
fired when animation instance unpauses
Definition AnimationInstance.h:88
bool handlePause(const CEGUI::EventArgs &e)
handler that pauses the animation instance
void step(float delta)
Steps the animation forward by the given delta.
Animation * getDefinition() const
Retrieves the animation definition that is used in this instance.
void finish()
Finishes and stops the animation.
bool handleUnpause(const CEGUI::EventArgs &e)
handler that unpauses the animation instance
const String & getSavedPropertyValue(const String &propertyName)
void unpause(bool skipNextStep=true)
Unpauses this animation instance - allows it to step forward again.
static const String EventAnimationFinished
fired when animation instance finishes
Definition AnimationInstance.h:90
void start(bool skipNextStep=true)
Starts this animation instance - sets position to 0.0 and unpauses.
float getSpeed() const
Retrieves current playback speed.
PropertySet * getTarget() const
Retrieves the target property set.
void setSkipNextStep(bool skip)
Controls whether the next time step is skipped.
void setEventReceiver(EventSet *receiver)
Sets event receiver - this class will receive events when something happens to the playback of this a...
float getMaxStepDeltaClamp() const
Gets the max delta before step clamping occurs.
void setMaxStepDeltaSkip(float maxDelta)
Sets the max delta before step skipping occurs.
void unsubscribeAutoConnections()
Internal method, unsubscribes auto connections.
static const String EventNamespace
Definition AnimationInstance.h:79
static const String EventAnimationLooped
fired when animation instance loops
Definition AnimationInstance.h:94
bool isRunning() const
Returns true if this animation instance is currently unpaused, if it is stepping forward.
EventSet * getEventSender() const
Retrieves the event sender.
void setTargetWindow(Window *target)
Helper method, sets given window as target property set, event receiver and event set.
bool getSkipNextStep() const
Returns true if the next step is going to be skipped.
static const String EventAnimationEnded
fired when animation instance ends
Definition AnimationInstance.h:92
void purgeSavedPropertyValues(void)
void addAutoConnection(Event::Connection conn)
Internal method, adds reference to created auto connection.
Defines an 'animation' class.
Definition Animation.h:65
Base class used as the argument to all subscribers Event object.
Definition EventArgs.h:51
Interface providing event signaling and handling.
Definition EventSet.h:167
Interface providing introspection capabilities.
Definition PropertySet.h:108
String class used within the GUI system.
Definition String.h:64
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition String.h:5580