Share via


CAnimationVariableIntegerChangeHandler, 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 CAnimationVariableIntegerChangeHandler : public CUIAnimationVariableIntegerChangeHandlerBase<CAnimationVariableIntegerChangeHandler>;

Membres

Constructeurs publics

Nom Description
CAnimationVariableIntegerChangeHandler ::CAnimationVariableIntegerChangeHandler Construit un objet CAnimationVariableIntegerChangeHandler.

Méthodes publiques

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

Notes

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

Hiérarchie d'héritage

Classes MFC

CUIAnimationCallbackBase

CUIAnimationVariableIntegerChangeHandlerBase

CAnimationVariableIntegerChangeHandler

Spécifications

En-tête : afxanimationcontroller.h

CAnimationVariableIntegerChangeHandler ::CAnimationVariableIntegerChangeHandler

Construit un objet CAnimationVariableIntegerChangeHandler.

CAnimationVariableIntegerChangeHandler ();

CAnimationVariableIntegerChangeHandler ::CreateInstance

Crée une instance de rappel CAnimationVariableIntegerChangeHandler.

static COM_DECLSPEC_NOTHROW HRESULT CreateInstance(
    CAnimationController* pAnimationController,
    IUIAnimationVariableIntegerChangeHandler** ppHandler);

Paramètres

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

ppHandler

Valeur de retour

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

CAnimationVariableIntegerChangeHandler ::OnIntegerValueChanged

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

IFACEMETHOD(OnIntegerValueChanged) (
    __in IUIAnimationStoryboard* storyboard,
    __in IUIAnimationVariable* variable,
    __in INT32 newValue,
    __in INT32 previousValue);

Paramètres

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

variable
Variable d’animation mise à jour.

newValue
Nouvelle valeur arrondie.

previousValue
Valeur arrondie précédente.

Valeur de retour

S_OK si la méthode réussit ; sinon, E_FAIL.

CAnimationVariableIntegerChangeHandler ::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