API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
ITransition2 Interface Transition2Scroller_Init()
The scroller transition is a transition that sends scroll events to an object over time. For example, a list could start a scroller if the "up" key is pressed long enough, or when the user flick a finger across the screen. An application could also use the scroller to create a slot-machine roulette. The scroller transition will keep 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 will calculate the new offset, based on velocity, acceleration and direction of scroll, and it will send a scroll event calls to the widget that will scroll widget. Please note that for this transition to work, the widget on which scroller transition is running should have a valid refernce. In other words the transition does not addref the widget. For this transition to work properly, the target widget must support EVT_WDG_SCROLL.
To create a scoller transition, an application would do the following: 1) Create the object that will be the target of the scroller transition 2) Call ISHELL_CreateInstance() with a class ID of AEECLSID_TRANSITION2_SCROLLER to retrieve a reference counted instance of the scroller transition. 3) Call Transition2Scroller_Init() to setup and initialize the scroller's custom properties, including the widget it is to wrap, the starting speed, the acceleration, and the direction. 4) Call ITransitionMgr_Add() to add the transition to a manager.
This class will free itself if the reference count reaches zero.
Default Interface Name
Other Interfaces