Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Transition types

This topic provides information on the mover, fader, resizer, scaler, and scroller transition types.

It is recommended that noncritical transitions be inserted in the root container's transition manager to maintain performance. Applications can query the root container to get the transition manager instance by calling IWidget_GetTransitionMgr(). Applications can use this transition manager instead of creating one.

Mover

The mover transition (AEECLSID_CTransition2_Mover) moves a widget across a specified path, or animates an object across the display. For example, an application could wrap a mover transition around an image widget, then begin moving the 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.

For this transition to work properly, the target widget must be the direct child of XY Container.

Fader

The fader transition (AEECLSID_CTransition2_Fader) applies a visual fade in/out effect to the widget it wraps. For example, a popup menu could be wrapped by a fader. Once dismissed, 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, be fully opaque), and then would gradually lose opacity until it reached a final level of transparency.

Resizer

The resizer transition (AEECLSID_CTransition2_Resizer) modifies the size of an object over time by modifying the widget's extent. For example, an application could wrap a resizer transition around a menu item, and have the selection grow when the user selects it. The resizer transition gradually modifies the size of the target in a linear manner to reach the final desired size.

For this transition to work properly, the target widget must support SetExtent. For example, a widget using proportional extents in a prop container would not be able to use this effect because the extent is controlled by the container.

Scaler

The scaler transition (AEECLSID_CTransition2_Scaler) modifies the scale of an object over time. Unlike the resizer transition which modifies the extent of a widget, the scaler modifies the size of the target. For example, an application could wrap a scaler transition around a menu item, and have the selection grow when the user selects it. The scaler transition gradually modifies the scale of the target in a linear manner to reach the final desired size.

For this transition to work properly, the target widget must support PROPEX_SCALE, which is usually supported by images.

Scroller

The scroller transition (AEECLSID_CTransition2_Scroller) sends scroll events to an object over time. For example, a list could start a scroller if the up key is held down, or when the user flicks a finger across the screen. An application could also use the scroller to create a slot-machine roulette. The scroller transition keeps sending scroll events with the scroll distance decreasing or increasing based upon the provided acceleration factor until it reaches zero.

This transition is initialized by specifying initial velocity, acceleration, and scroll direction. While the transition is running, it calculates the new offset, based on velocity, acceleration and direction of scroll, and it sends scroll events to the target widget.

For this transition to work properly, the widget on which scroller transition is running should have a valid reference for the duration of the transition (the transition does not addref the widget), and the target widget must support EVT_WDG_SCROLL.