CBaseKeyFrame Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CBaseKeyFrame Class.

Implements the basic functionality of a keyframe.

class CBaseKeyFrame : public CObject;  

Public Constructors

NameDescription
CBaseKeyFrame::CBaseKeyFrameConstructs a keyframe object.

Public Methods

NameDescription
CBaseKeyFrame::AddToStoryboardAdds a keyframe to storyboard.
CBaseKeyFrame::GetAnimationKeyframeReturns the underlying keyframe value.
CBaseKeyFrame::IsAddedTells whether a keyframe has been added to storyboard.
CBaseKeyFrame::IsKeyframeAtOffsetSpecifies whether the keyframe should be added to storyboard at offset, or after transition.

Protected Data Members

NameDescription
CBaseKeyFrame::m_bAddedSpecifies whether this keyframe has been added to a storyboard.
CBaseKeyFrame::m_bIsKeyframeAtOffsetSpecifies whether this keyframe should be added to storyboard at an offset from another existing keyframe, or at the end of some transition.
CBaseKeyFrame::m_keyframeRepresents a Windows Animation API keyframe. When a keyframe is not initialized it is set to the predefined value UI_ANIMATION_KEYFRAME_STORYBOARD_START.

Encapsulates UI_ANIMATION_KEYFRAME variable. Serves as a base class for any keyframe implementation. A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. There are two types of keyframes - keyframes added to storyboard at the specified offset (in time), or keyframes added after specified transition. Because durations of some transitions can't be known before animation starts, the actual values of some keyframes are determined at runtime only. Because keyframes may depend on transitions, which in their turn depend on keyframes, it's important to prevent infinite recursions when building keyframe chains.

CObject

CBaseKeyFrame

Header: afxanimationcontroller.h

Adds a keyframe to storyboard.

virtual BOOL AddToStoryboard(
    IUIAnimationStoryboard* pStoryboard,  
    BOOL bDeepAdd);

Parameters

pStoryboard
A pointer to a storyboard.

bDeepAdd
If this parameter is TRUE and the keyframe being added depends on some other keyframe or transition, this method tries to add this keyframe or transition to storyboard first.

Return Value

TRUE if keyframe was added to storyboard successfully; otherwise FALSE.

Remarks

This method is called to add a keyframe to storyboard.

Constructs a keyframe object.

CBaseKeyFrame();

Returns the underlying keyframe value.

UI_ANIMATION_KEYFRAME GetAnimationKeyframe() const;  

Return Value

A current keyframe. The default value is UI_ANIMATION_KEYFRAME_STORYBOARD_START.

Remarks

This is an accessor to the underlying keyframe value.

Tells whether a keyframe has been added to storyboard.

BOOL IsAdded() const;  

Return Value

TRUE if a keyframe is added to a storyboard; otehrwise FALSE.

Remarks

In the base class IsAdded always returns TRUE, but it's overridden in derived classes.

Specifies whether the keyframe should be added to storyboard at offset, or after transition.

BOOL IsKeyframeAtOffset() const;  

Return Value

TRUE if the keyframe should be added to storyboard at some specified offset. FALSE if the keyframe should be added to storyboard after some transition.

Remarks

Specifies whether the keyframe should be added to storyboard at offset. The offset or transition must be specified in a derived class.

Specifies whether this keyframe has been added to a storyboard.

BOOL m_bAdded;  

Specifies whether this keyframe should be added to storyboard at an offset from another existing keyframe, or at the end of some transition.

BOOL m_bIsKeyframeAtOffset;  

Represents a Windows Animation API keyframe. When a keyframe is not initialized it is set to the predefined value UI_ANIMATION_KEYFRAME_STORYBOARD_START.

UI_ANIMATION_KEYFRAME m_keyframe;  

Classes

Show: