Partager via


CAnimationController Class

Implements the animation controller, which provides a central interface for creating and managing animations.

class CAnimationController : public CObject;

Members

Public Constructors

Name

Description

CAnimationController::CAnimationController

Constructs an animation controller.

CAnimationController::~CAnimationController

The destructor. Called when animation controller object is being destroyed.

Public Methods

Name

Description

CAnimationController::AddAnimationObject

Adds an animation object to a group that belongs to the animation controller.

CAnimationController::AddKeyframeToGroup

Adds a keyframe to group.

CAnimationController::AnimateGroup

Prepares a group to run animation and optionally schedules it.

CAnimationController::CleanUpGroup

Overloaded. Called by the framework to clean up the group when animation has been scheduled.

CAnimationController::CreateKeyframe

Overloaded. Creates a keyframe that depends on transition and adds it to the specified group.

CAnimationController::EnableAnimationManagerEvent

Sets or releases a handler to call when animation manager's status changes.

CAnimationController::EnableAnimationTimerEventHandler

Sets or releases a handler for timing events and handler for timing updates.

CAnimationController::EnablePriorityComparisonHandler

Sets or releases the priority comparison handler to call to determine whether a scheduled storyboard can be cancelled, concluded, trimmed or compressed.

CAnimationController::EnableStoryboardEventHandler

Sets or releases a handler for storyboard status and update events.

CAnimationController::FindAnimationGroup

Overloaded. Finds an animation group by its storyboard.

CAnimationController::FindAnimationObject

Finds animation object containing a specified animation variable.

CAnimationController::GetKeyframeStoryboardStart

Returns a keyframe that identifies start of storyboard.

CAnimationController::GetUIAnimationManager

Provides access to encapsulated IUIAnimationManager object.

CAnimationController::GetUIAnimationTimer

Provides access to encapsulated IUIAnimationTimer object.

CAnimationController::GetUITransitionFactory

A pointer to IUIAnimationTransitionFactory interface or NULL, if creation of transition library failed.

CAnimationController::GetUITransitionLibrary

Provides access to encapsulated IUIAnimationTransitionLibrary object.

CAnimationController::IsAnimationInProgress

Tells whether at least one group is playing animation.

CAnimationController::IsValid

Tells whether animation controller is valid.

CAnimationController::OnAnimationIntegerValueChanged

Called by the framework when integer value of animation variable has changed.

CAnimationController::OnAnimationManagerStatusChanged

Called by the framework in response to StatusChanged event from animation manager.

CAnimationController::OnAnimationTimerPostUpdate

Called by the framework after an animation update is finished.

CAnimationController::OnAnimationTimerPreUpdate

Called by the framework before an animation update begins.

CAnimationController::OnAnimationTimerRenderingTooSlow

Called by the framework when the rendering frame rate for an animation falls below a minimum desirable frame rate.

CAnimationController::OnAnimationValueChanged

Called by the framework when value of animation variable has changed.

CAnimationController::OnBeforeAnimationStart

Called by the framework right before the animation is scheduled.

CAnimationController::OnHasPriorityCancel

Called by the framework to resolve scheduling conflicts.

CAnimationController::OnHasPriorityCompress

Called by the framework to resolve scheduling conflicts.

CAnimationController::OnHasPriorityConclude

Called by the framework to resolve scheduling conflicts.

CAnimationController::OnHasPriorityTrim

Called by the framework to resolve scheduling conflicts.

CAnimationController::OnStoryboardStatusChanged

Called by the framework when storyboard status has changed.

CAnimationController::OnStoryboardUpdated

Called by the framework when storyboard has been updated.

CAnimationController::RemoveAllAnimationGroups

Removes all animation groups from animation controller.

CAnimationController::RemoveAnimationGroup

Removes an animation group with specified ID from animation controller.

CAnimationController::RemoveAnimationObject

Remove an animation object from animation controller.

CAnimationController::RemoveTransitions

Removes transitions from animation objects that belong to the specified group.

CAnimationController::ScheduleGroup

Schedules an animation.

CAnimationController::SetRelatedWnd

Establishes a relationship between animation controller and a window.

CAnimationController::UpdateAnimationManager

Directs the animation manager to update the values of all animation variables.

Protected Methods

Name

Description

CAnimationController::CleanUpGroup

Overloaded. A helper that cleans up the group.

CAnimationController::OnAfterSchedule

Called by the framework when an animation for the specified group has just been scheduled.

Protected Data Members

Name

Description

CAnimationController::g_KeyframeStoryboardStart

A keyframe that represents start of storyboard.

CAnimationController::m_bIsValid

Specifies whether an animation controller is valid or not. This member is set to FALSE if current OS does not support Windows Animation API.

CAnimationController::m_lstAnimationGroups

A list of animation groups that belong to this animation controller.

CAnimationController::m_pAnimationManager

Stores a pointer to Animation Manager COM object.

CAnimationController::m_pAnimationTimer

Stores a pointer to Animation Timer COM object.

CAnimationController::m_pRelatedWnd

A pointer to a related CWnd object, which can be automatically redrawn when the status of animation manager has changed, or post update event has occurred. Can be NULL.

CAnimationController::m_pTransitionFactory

Stores a pointer to Transition Factory COM object.

CAnimationController::m_pTransitionLibrary

Stores a pointer to Transition Library COM object.

Remarks

The CAnimationController class is the key class that manages animations. You may create one or more instances of animation controller in an application and, optionally, connect an instance of animation controller to a CWnd object using CAnimationController::SetRelatedWnd. This connection is required to send WM_PAINT messages to the related window automatically when animation manager status has changed or animation timer has been updated. If you do not enable this relation, you must redraw a window that displays an animation manually. For this purpose you can derive a class from CAnimationController and override OnAnimationManagerStatusChanged and/or OnAnimationTimerPostUpdate and invalidate one or more windows when necessary.

Inheritance Hierarchy

CObject

CAnimationController

Requirements

Header: afxanimationcontroller.h

See Also

Other Resources

MFC Classes