Compartir a través de


CAnimationVariableIntegerChangeHandler (clase)

Implementa una devolución de llamada, a la que llama la API de animación cuando cambia el valor de una animación.

Sintaxis

class CAnimationVariableIntegerChangeHandler : public CUIAnimationVariableIntegerChangeHandlerBase<CAnimationVariableIntegerChangeHandler>;

Miembros

Constructores públicos

Nombre Descripción
CAnimationVariableIntegerChangeHandler::CAnimationVariableIntegerChangeHandler Construye un objeto CAnimationVariableIntegerChangeHandler.

Métodos públicos

Nombre Descripción
CAnimationVariableIntegerChangeHandler::CreateInstance Crea una instancia de la devolución de llamada de CAnimationVariableIntegerChangeHandler.
CAnimationVariableIntegerChangeHandler::OnIntegerValueChanged Se llama cuando ha cambiado un valor de una variable de animación. (Invalida CUIAnimationVariableIntegerChangeHandlerBase::OnIntegerValueChanged).
CAnimationVariableIntegerChangeHandler::SetAnimationController Almacena un puntero al controlador de animaciones para enrutar eventos.

Comentarios

Este controlador de eventos se crea y se pasa al método IUIAnimationVariable::SetVariableIntegerChangeHandler cuando se llama a CAnimationVariable::EnableIntegerValueChangedEvent o CAnimationBaseObject::EnableIntegerValueChangedEvent (lo que habilita este evento para todas las variables de animación encapsuladas en un objeto de animación).

Jerarquía de herencia

Clases de MFC

CUIAnimationCallbackBase

CUIAnimationVariableIntegerChangeHandlerBase

CAnimationVariableIntegerChangeHandler

Requisitos

Encabezado: afxanimationcontroller.h

CAnimationVariableIntegerChangeHandler::CAnimationVariableIntegerChangeHandler

Constructs a CAnimationVariableIntegerChangeHandler object.

CAnimationVariableIntegerChangeHandler ();

CAnimationVariableIntegerChangeHandler::CreateInstance

Crea una instancia de la devolución de llamada CAnimationVariableIntegerChangeHandler.

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

Parámetros

pAnimationController
Puntero al controlador de animaciones, que va a recibir eventos.

ppHandler

Valor devuelto

Si el método se realiza correctamente, devuelve S_OK. De lo contrario, devuelve un código de error de HRESULT.

CAnimationVariableIntegerChangeHandler::OnIntegerValueChanged

Se llama cuando ha cambiado un valor de una variable de animación.

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

Parámetros

storyboard
Guion gráfico que anima la variable.

variable
Variable de animación que se ha actualizado.

newValue
Nuevo valor redondeado.

previousValue
Valor redondeado anterior.

Valor devuelto

Es S_OK si el método es correcto; de lo contrario, es E_FAIL.

CAnimationVariableIntegerChangeHandler::SetAnimationController

Almacena un puntero al controlador de animaciones para enrutar eventos.

void SetAnimationController(CAnimationController* pAnimationController);

Parámetros

pAnimationController
Puntero al controlador de animaciones, que va a recibir eventos.

Consulte también

Clases