The base transition interface is an abstract interface from which specific transition implementations should be based. The transition interface is a wrapper around another object, providing a special visual effect to the object it wraps. For example, a transition implementation could be written that causes a wrapped object to grow or shrink over some period of time. Likewise, a transition could create the effect of an object disappearing as a cloud of smoke, or flying around the screen in accordance to some wild path of vectors. Unfortunately, none of these "for example" transitions exist, so it is left to the imagination of the developer to write these or other cool transition effects. But fear not, two real transitions _do_ actually exist -- the fader transition and the mover transition -- each of which is described below.
Each transition implementation is defined by its effect and duration. For example, the mover transition has the effect of moving a wrapped object from one point to another over a specific period of time. Likewise, the fader transition has the effect of applying a fade out effect to a wrapped object, gradually over some period of time. The interface provides APIs for starting and stopping a transition effect, checking to see if the effect is currently running, and supplying notification at the completion of a transition effect.
This document describes a pair of transition implementations -- the fader and mover.
Fader transitionThe fader transition is a transition that applies a visual fade out effect to the widget it wraps. For example, a popup box could be wrapped by a fader. As it pops up, the fader could be instructed to fade the window in. On closing the window, the fader could be instructed to fade out the wrapped popup over some period of time. As the fade out effect begins, the wrapped popup would be drawn with an initial level of transparency (which could, initially, by filly opaque), and then would gradually lose opacity until it reaches a final level of transparency.
To create a fader transition, an application would do the following:
1. Create the object that will be the target of the fader transition 2. Call ISHELL_CreateInstance() with a class ID of AEECLSID_FADER to retrieve a reference counted instance of the fader transition. 3. Call FADERDESC_Init() to initialize the fader and identify the widget it is to wrap. 4. Call ITRANSITION_StartFader() to begin the fadeout transition on the widget it wraps.
Mover transitionThe mover transition is a transition that animates an object across the display. For example, an application could wrap a mover transition around an image widget, then begin moving that image vertically, horizontally or diagonally across the display, specifying each movement as a series of point-to-point destinations. The mover transition places the target object at a particular location (relative to a container that defines the movement's coordinate plane), then gradually moves the target object in a linear manner to a final destination location.
To create a mover transition, an application would do the following:
1. Create the object that will be the target of the mover transition 2. Call ISHELL_CreateInstance() with a class ID of AEECLSID_MOVER to retrieve a reference counted instance of the mover transition. 3. Call MOVERDESC_Init() to initialize the fader mover identify the widget it is to wrap. 4. Call ITRANSITION_StartMover() to begin the movement transition on the widget it wraps.
Supported Events: None. The transition interface does not process any Brew MP events. It is intended as an interface that applies a visual effect to another object.
Required Model: None
Model Data: None