CAnimationVariableIntegerChangeHandler – třída

Poznámka:

Knihovna MFC (Microsoft Foundation Classes) se nadále podporuje. Už ale nepřidáme funkce ani aktualizujeme dokumentaci.

Implementuje zpětné volání, které volá animační rozhraní API, když se změní hodnota proměnné animace.

Syntaxe

class CAnimationVariableIntegerChangeHandler : public CUIAnimationVariableIntegerChangeHandlerBase<CAnimationVariableIntegerChangeHandler>;

Členové

Veřejné konstruktory

Název Popis
CAnimationVariableIntegerChangeHandler::CAnimationVariableIntegerChangeHandler CAnimationVariableIntegerChangeHandler Vytvoří objekt.

Veřejné metody

Název Popis
CAnimationVariableIntegerChangeHandler::CreateInstance Vytvoří instanci zpětného CAnimationVariableIntegerChangeHandler volání.
CAnimationVariableIntegerChangeHandler::OnIntegerValueChanged Volá se, když se změnila hodnota proměnné animace. (Přepsání CUIAnimationVariableIntegerChangeHandlerBase::OnIntegerValueChanged.)
CAnimationVariableIntegerChangeHandler::SetAnimationController Uloží ukazatel na kontroler animace pro směrování událostí.

Poznámky

Tato obslužná rutina události je vytvořena a předána IUIAnimationVariable::SetVariableIntegerChangeHandler metoda, když voláte CAnimationVariable::EnableIntegerValueChangedEvent nebo CAnimationBaseObject::EnableIntegerValueChangedEvent (která tuto událost povolí pro všechny proměnné animace zapouzdřené v objektu animace).

Hierarchie dědičnosti

MFC – třídy

CUIAnimationCallbackBase

CUIAnimationVariableIntegerChangeHandlerBase

CAnimationVariableIntegerChangeHandler

Požadavky

Hlavička: afxanimationcontroller.h

CAnimationVariableIntegerChangeHandler::CAnimationVariableIntegerChangeHandler

Vytvoří CAnimationVariableIntegerChangeHandler objekt.

CAnimationVariableIntegerChangeHandler ();

CAnimationVariableIntegerChangeHandler::CreateInstance

Vytvoří instanci zpětného volání CAnimationVariableIntegerChangeHandler.

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

Parametry

pAnimationController
Ukazatel na ovladač animace, který bude přijímat události.

ppHandler

Návratová hodnota

Pokud je metoda úspěšná, vrátí S_OK. V opačném případě vrátí kód chyby HRESULT.

CAnimationVariableIntegerChangeHandler::OnIntegerValueChanged

Volá se, když se změnila hodnota proměnné animace.

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

Parametry

Scénáře
Scénář, který animuje proměnnou.

proměnná
Proměnná animace, která byla aktualizována.

newValue
Nová zaokrouhlená hodnota.

previousValue
Předchozí zaokrouhlená hodnota.

Návratová hodnota

S_OK, pokud je metoda úspěšná; jinak E_FAIL.

CAnimationVariableIntegerChangeHandler::SetAnimationController

Uloží ukazatel na kontroler animace pro směrování událostí.

void SetAnimationController(CAnimationController* pAnimationController);

Parametry

pAnimationController
Ukazatel na ovladač animace, který bude přijímat události.

Viz také

Třídy