description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CBaseTransition Class |
CBaseTransition Class |
03/27/2019 |
|
|
dfe84007-bbc5-43b7-b5b8-fae9145573bf |
Represents a basic transition.
class CBaseTransition : public CObject;
Name | Description |
---|---|
CBaseTransition::TRANSITION_TYPE Enumeration | Defines the transition types currently supported by the MFC implementation of Windows Animation API. |
Name | Description |
---|---|
CBaseTransition::CBaseTransition | Constructs a base transition object. |
CBaseTransition::~CBaseTransition | The destructor. Called when a transition object is being destroyed. |
Name | Description |
---|---|
CBaseTransition::AddToStoryboard | Adds a transition to a storyboard. |
CBaseTransition::AddToStoryboardAtKeyframes | Adds a transition to a storyboard. |
CBaseTransition::Clear | Releases encapsulated IUIAnimationTransition COM object. |
CBaseTransition::Create | Creates a COM transition. |
CBaseTransition::GetEndKeyframe | Returns start keyframe. |
CBaseTransition::GetRelatedVariable | Returns a pointer to related variable. |
CBaseTransition::GetStartKeyframe | Returns start keyframe. |
CBaseTransition::GetTransition | Overloaded. Returns a pointer to underlying COM transition object. |
CBaseTransition::GetType | Returns transition type. |
CBaseTransition::IsAdded | Tells whether a transition has been added to a storyboard. |
CBaseTransition::SetKeyframes | Sets keyframes for a transition. |
CBaseTransition::SetRelatedVariable | Establishes a relationship between animation variable and transition. |
Name | Description |
---|---|
CBaseTransition::m_bAdded | Specifies whether a transition has been added to a storyboard. |
CBaseTransition::m_pEndKeyframe | Stores a pointer to the keyframe that specifies the end of the transition. |
CBaseTransition::m_pRelatedVariable | A pointer to an animation variable, which is animated with the transition stored in m_transition. |
CBaseTransition::m_pStartKeyframe | Stores a pointer to the keyframe that specifies the beginning of the transition. |
CBaseTransition::m_transition | Stores a pointer to IUIAnimationTransition. NULL if a COM transition object has not been created. |
CBaseTransition::m_type | Stores the transition type. |
This class encapsulates IUIAnimationTransition interface and serves as a base class for all transitions.
CBaseTransition
Header: afxanimationcontroller.h
The destructor. Called when a transition object is being destroyed.
virtual ~CBaseTransition();
Adds a transition to a storyboard.
BOOL AddToStoryboard(IUIAnimationStoryboard* pStoryboard);
pStoryboard
A pointer to storyboard, which will animate the related variable.
TRUE, if transition was successfully added to a storyboard.
Applies the transition to the related variable in the storyboard. If this is the first transition applied to this variable in this storyboard, the transition begins at the start of the storyboard. Otherwise, the transition is appended to the transition added most recently to the variable.
Adds a transition to a storyboard.
BOOL AddToStoryboardAtKeyframes(IUIAnimationStoryboard* pStoryboard);
pStoryboard
A pointer to storyboard, which will animate the related variable.
TRUE, if transition was successfully added to a storyboard.
Applies the transition to the related variable in the storyboard. If the start keyframe was specified, the transition begins at that keyframe. If the end keyframe was specified, the transition begins at the start keyframe and stops at the end keyframe. If the transition was created with a duration parameter specified, that duration is overwritten with the duration of time between the start and end keyframes. If no keyframe was specified, the transition is appended to the transition added most recently to the variable.
Constructs a base transition object.
CBaseTransition();
Releases encapsulated IUIAnimationTransition COM object.
void Clear();
This method should be called from a derived class's Create method in order to prevent IUITransition interface leak.
Creates a COM transition.
virtual BOOL Create(
IUIAnimationTransitionLibrary* pLibrary,
IUIAnimationTransitionFactory* pFactory) = 0;
pLibrary
A pointer to transition library, which creates standard transitions. It can be NULL for custom transitions.
pFactory
A pointer to transition factory, which creates custom transitions. It can be NULL for standard transitions.
TRUE if a transition COM object was created successfully; otherwise FALSE.
This is a pure virtual function that must be overridden in a derived class. It's called by the framework to instantiate the underlying COM transition object.
Returns start keyframe.
CBaseKeyFrame* GetEndKeyframe();
A valid pointer to a keyframe, or NULL if a transition should not be inserted between keyframes.
This method can be used to access a keyframe object that was previously set by SetKeyframes. It's called by top-level code when transitions are being added to storyboard.
Returns a pointer to related variable.
CAnimationVariable* GetRelatedVariable();
A valid pointer to animation variable, or NULL if an animation variable has not been set by SetRelatedVariable.
This is an accessor to related animation variable.
Returns start keyframe.
CBaseKeyFrame* GetStartKeyframe();
A valid pointer to a keyframe, or NULL if a transition should not start after a keyframe.
This method can be used to access a keyframe object that was previously set by SetKeyframes. It's called by top-level code when transitions are being added to storyboard.
Returns a pointer to underlying COM transition object.
IUIAnimationTransition* GetTransition(
IUIAnimationTransitionLibrary* pLibrary,
IUIAnimationTransitionFactory* pFactory);
IUIAnimationTransition* GetTransition();
pLibrary
A pointer to transition library, which creates standard transitions. It can be NULL for custom transitions.
pFactory
A pointer to transition factory, which creates custom transitions. It can be NULL for standard transitions.
A valid pointer to IUIAnimationTransition or NULL if underlying transition can't be created.
This method returns a pointer to underlying COM transition object and creates it if necessary.
Returns transition type.
TRANSITION_TYPE GetType() const;
One of TRANSITION_TYPE enumerated values.
This method can be used to identify a transition object by its type. The type is set in a constructor in a derived class.
Tells whether a transition has been added to a storyboard.
BOOL IsAdded();
Returns TRUE if a transition has been added to a storyboard, otherwise FALSE.
This flag is set internally when the top-level code adds transitions to storyboard.
Specifies whether a transition has been added to a storyboard.
BOOL m_bAdded;
Stores a pointer to the keyframe that specifies the end of the transition.
CBaseKeyFrame* m_pEndKeyframe;
A pointer to an animation variable, which is animated with the transition stored in m_transition.
CAnimationVariable* m_pRelatedVariable;
Stores a pointer to the keyframe that specifies the beginning of the transition.
CBaseKeyFrame* m_pStartKeyframe;
Stores a pointer to IUIAnimationTransition. NULL if a COM transition object has not been created.
ATL::CComPtr<IUIAnimationTransition> m_transition;
Stores the transition type.
TRANSITION_TYPE m_type;
Sets keyframes for a transition.
void SetKeyframes(
CBaseKeyFrame* pStart = NULL,
CBaseKeyFrame* pEnd = NULL);
pStart
A keyframe that specifies the beginning of the transition.
pEnd
A keyframe that specifies the end of the transition.
This method tells the transition to start after specified keyframe and, optionally, if pEnd is not NULL, end before the specified keyframe. If the transition was created with a duration parameter specified, that duration is overwritten with the duration of time between the start and end keyframes.
Establishes a relationship between animation variable and transition.
void SetRelatedVariable(CAnimationVariable* pVariable);
pVariable
A pointer to related animation variable.
Establishes a relationship between animation variable and transition. A transition can be applied only to one variable.
Defines the transition types currently supported by the MFC implementation of Windows Animation API.
enum TRANSITION_TYPE;
A transition type is set in the constructor of specific transition. For example, CSinusoidalTransitionFromRange sets its type to SINUSOIDAL_FROM_RANGE.