Udostępnij za pośrednictwem


Klasa CAnimationVariableIntegerChangeHandler

Implementuje wywołanie zwrotne, które jest wywoływane przez interfejs API animacji, gdy wartość zmiennej animacji się zmienia.

Składnia

class CAnimationVariableIntegerChangeHandler : public CUIAnimationVariableIntegerChangeHandlerBase<CAnimationVariableIntegerChangeHandler>;

Członkowie

Konstruktory publiczne

Nazwa/nazwisko opis
CAnimationVariableIntegerChangeHandler::CAnimationVariableIntegerChangeHandler CAnimationVariableIntegerChangeHandler Tworzy obiekt.

Metody publiczne

Nazwa/nazwisko opis
CAnimationVariableIntegerChangeHandler::CreateInstance Tworzy wystąpienie wywołania zwrotnego CAnimationVariableIntegerChangeHandler .
CAnimationVariableIntegerChangeHandler::OnIntegerValueChanged Wywoływana, gdy wartość zmiennej animacji uległa zmianie. (Przesłania CUIAnimationVariableIntegerChangeHandlerBase::OnIntegerValueChanged).
CAnimationVariableIntegerChangeHandler::SetAnimationController Przechowuje wskaźnik do kontrolera animacji w celu kierowania zdarzeń.

Uwagi

Ta procedura obsługi zdarzeń jest tworzona i przekazywana do metody IUIAnimationVariable::SetVariableIntegerChangeHandler podczas wywoływania metody CAnimationVariable::EnableIntegerValueChangedEvent lub CAnimationBaseObject::EnableIntegerValueChangedEvent (która umożliwia to zdarzenie dla wszystkich zmiennych animacji hermetyzowanych w obiekcie animacji).

Hierarchia dziedziczenia

Klasy MFC

CUIAnimationCallbackBase

CUIAnimationVariableIntegerChangeHandlerBase

CAnimationVariableIntegerChangeHandler

Wymagania

Nagłówek: afxanimationcontroller.h

CAnimationVariableIntegerChangeHandler::CAnimationVariableIntegerChangeHandler

Tworzy obiekt CAnimationVariableIntegerChangeHandler.

CAnimationVariableIntegerChangeHandler ();

CAnimationVariableIntegerChangeHandler::CreateInstance

Tworzy wystąpienie wywołania zwrotnego CAnimationVariableIntegerChangeHandler.

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

Parametry

pAnimationController
Wskaźnik do kontrolera animacji, który będzie odbierać zdarzenia.

ppHandler

Wartość zwracana

Jeśli metoda powiedzie się, zwraca S_OK. W przeciwnym razie zwraca kod błędu HRESULT.

CAnimationVariableIntegerChangeHandler::OnIntegerValueChanged

Wywoływana, gdy wartość zmiennej animacji uległa zmianie.

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

Parametry

Serii ujęć
Scenorys animujący zmienną.

Zmiennej
Zaktualizowana zmienna animacji.

Newvalue
Nowa zaokrąglona wartość.

previousValue
Poprzednia zaokrąglona wartość.

Wartość zwracana

S_OK, jeśli metoda powiedzie się; w przeciwnym razie E_FAIL.

CAnimationVariableIntegerChangeHandler::SetAnimationController

Przechowuje wskaźnik do kontrolera animacji w celu kierowania zdarzeń.

void SetAnimationController(CAnimationController* pAnimationController);

Parametry

pAnimationController
Wskaźnik do kontrolera animacji, który będzie odbierać zdarzenia.

Zobacz też

Klasy