Developer

API Reference

AEECLSID_CursorWidget

Brew Release
Brew MP 1.0.2
See Also
Model Events Widget Events ISHELL_CreateInstance() IWidget_SetBitmap()
Description
The cursor widget is derived from the decorator object and is used to show or hide an element on screen (the cursor). It is typically used in BREW as an overlay to show progress (such as a spinning beach ball) or a period to wait (such as a watch or an hourglass).
Note, however, that the cursor widget could also be used to track user-directed movements of a visual pointer on the display. For example, a user interface could be created that uses the bitmap of an arrow to indicate a pointer on screen, with the user moving the pointer up, down, left, and right by pressing the navigation keys on a keypad.
The bitmap used to represent the default cursor is stored as resource ID 100 in the "widgets.mif" file. The default bitmap could be overridden by retrieving an alternate bitmap and assigning it to the cursor widget by calling IWidget_SetBitmap().
To create a cursor widget, an application would do the following:
       1. Call ISHELL_CreateInstance() with a class ID of AEECLSID_CursorWidget to
          retrieve a reference counted instance of the cursor widget.
       2. If a bitmap other than the default cursor is to be displayed, the application
          should call IWidget_SetBitmap() on the cursor widget, passing in a pointer to
          the desired graphic.

Supported Events: The cursor widget handles events in two passes, first attempting to handle events that will set the widget's small set of properties, then -- if the event has not been handled -- passing it on to the bitmap the widget will display as its cursor.
Event                 Description
-----                 ------------------------------------------------------------
EVT_WDG_SETPROPERTY:  The cursor widget responds to this event by attempting to set the
                      property identified by the 'wParam' parameter.  The cursor widget
                      allows the following properties to be set:
                      
                          PROP_CURSOR_SHOW    --  Setting this property will display
                                                  the cursor.
                      
                          PROP_CURSOR_DISMISS --  Setting this property will remove the
                                                  cursor widget from its container, and
                                                  releases the container object, effect-
                                                  ively removing the cursor from the display.


Properties:
Property              Description
--------              ------------------------------------------------------------
PROP_CURSOR_SHOW:     This property contains a pointer to a CursorShow data structure that  
                      specifies where this cursor widget is to be displayed.  Setting this 
                      property will, in fact, display the cursor widget. 
                              
                      Property Value:  CursorShow * 
 
PROP_CURSOR_DISMISS:  This property is used as a command trigger to remove the cursor widget  
                      from its container, and release the container object.  There is no value 
                      associated with the PROP_CURSOR_DISMISS property. 
                              
                      Property Value:  None 

Required Model: None
Instantiaion
A cursor widget is created by calling ISHELL_CreateInstance() and passing AEECLSID_CursorWidget as the class ID. If successful, a pointer to the cursor widget object will be returned in the ppobj parameter of ISHELL_CreateInstance.
Cleanup
The Cursor Widget is reference-counted. When you are done with your reference to the cursor widget, you should release it. Any specific cleanup will be handled for you when all references are released.
Default Interface Name
Comment
None
  • Follow