Share via


CAnimationVariableChangeHandler, classe

Implémente un rappel, qui est appelé par l'API d'animation lorsque la valeur d'une variable de l'animation est modifiée.

Syntaxe

class CAnimationVariableChangeHandler : public CUIAnimationVariableChangeHandlerBase<CAnimationVariableChangeHandler>;

Membres

Constructeurs publics

Nom Description
CAnimationVariableChangeHandler::CAnimationVariableChangeHandler Construit un objet CAnimationVariableChangeHandler.

Méthodes publiques

Nom Description
CAnimationVariableChangeHandler::CreateInstance Crée une instance d’objet CAnimationVariableChangeHandler .
CAnimationVariableChangeHandler ::OnValueChanged Appelé lorsqu’une valeur d’une variable d’animation a changé. (Substitue CUIAnimationVariableChangeHandlerBase::OnValueChanged.)
CAnimationVariableChangeHandler ::SetAnimationController Stocke un pointeur vers le contrôleur d’animation pour router les événements.

Notes

Ce gestionnaire d’événements est créé et passé à IUIAnimationVariable::SetVariableChangeHandler la méthode, lorsque vous appelez CAnimationVariable::EnableValueChangedEvent ou CAnimationBaseObject::EnableValueChangedEvent (ce qui active cet événement pour toutes les variables d’animation encapsulées dans un objet d’animation).

Hiérarchie d'héritage

CUIAnimationCallbackBase

CUIAnimationVariableChangeHandlerBase

CAnimationVariableChangeHandler

Spécifications

En-tête : afxanimationcontroller.h

CAnimationVariableChangeHandler ::OnValueChanged

Appelé lorsqu’une valeur d’une variable d’animation a changé.

IFACEMETHOD(OnValueChanged) (
    __in IUIAnimationStoryboard* storyboard,
    __in IUIAnimationVariable* variable,
    __in DOUBLE newValue,
    __in DOUBLE previousValue);

Paramètres

Storyboard
Table de montage séquentiel qui anime la variable.

variable
Variable d’animation mise à jour.

newValue
Nouvelle valeur.

previousValue
Valeur précédente.

Valeur de retour

Si la méthode réussit, retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

CAnimationVariableChangeHandler ::SetAnimationController

Stocke un pointeur vers le contrôleur d’animation pour router les événements.

void SetAnimationController(CAnimationController* pAnimationController);

Paramètres

pAnimationController
Pointeur vers le contrôleur d’animation, qui recevra des événements.

Voir aussi

Classes