Developer

API Reference

AEECLSID_ButtonWidget

Brew Release
Brew MP 1.0.2
See Also
AEECLSID_BorderWidget Model Events Border Events Border Support Events Border Decoration Events StepEvent ISHELL_CreateInstance() AEEEvent StepEvent Widget Events
Description

The button widget is derived from the Border Widget class (AEECLSID_BorderWidget) and supports all properties and functions supported by Border Widget Class. The button widget acts as a decorator to decorate a given widget to give it the look and feel of a button.
Supported Events:
The base Button event handler responds to the following events as well as those handled by any widget that supports Border Events:
  Event                                               Description
----------             ----------------------------------------------------------------------------
EVT_KEY                If the button has not been disabled, upon receiving an EVT_KEY with a wParam
                       of AVK_SELECT, the button widget will enter the selected (pressed) state.

EVT_KEY_RELEASE        If the button has not been disabled, upon receiving the EVT_KEY_RELEASE of
                       AVK_SELECT corresponding to the previous EVT_KEY, the button will return to
                       the unselected (not pressed) state and notify the view model that the widget
                       has been clicked.

EVT_WDG_CANTAKEFOCUS   This widget can take focus.
                           IWidget_CanTakeFocus

EVT_WDG_ENABLETOUCH    The button will enable or disable touch as specified in the dwParam.

EVT_POINTER_DOWN
EVT_POINTER_UP
EVT_POINTER_MOVE
EVT_POINTER_STALE_MOVE Assuming that the button is not in the disabled state, the button routes 
                       these events to either its touch controller (should a touch controller be 
                       present) or the button's child. 

EVT_WDG_CANTAKETOUCH   Updates the passed in dwParam to reflect whether or not the Button can take 
                       touch events.  If Touch Transparency is enabled, reports whether or not the 
                       object located at the given x and y coordinates can be touched. 
                           IWidget_CanTakeTouch

EVT_WDG_MOVEFOCUS      Does Nothing. 
                           IWidget_MoveFocus

EVT_WDG_TRAVERSE       Traverses the widget using the TraverseDesc passed in through the dwParam. 
                           IWidget_TraverseContainerTree

EVT_WDG_SETPROPERTY   The base button handler responds to this event by attempting to set the 
                      property identified by the 'wParam' parameter.  The following properties 
                      may be set by the base button event handler... 
                      PROP_EX
                      PROPEX_TOUCH_CONTROLLER 
                      PROPEX_USER_DATA 
                      PROPEX_TOUCH_MODE 
                      PROPEX_WIDGETTC_PRESSED 
                          IWidget_SetProperty 
                          IWidget_SetPropertyEx 

EVT_WDG_GETPROPERTY   The base button handler responds to this event by attempting to retrieve the 
                      property identified by the 'wParam' parameter.  The following properties may 
                      be retrieved by the base button event handler... 
                      PROP_VIEWMODEL 
                      PROP_EX 
                      PROPEX_TOUCH_CONTROLLER 
                      PROPEX_USER_DATA 
                      PROPEX_TOUCH_MODE 
                          IWidget_GetProperty 
                          IWidget_GetPropertyEx 
                          IWidget_GetPropBool 
                          IWidget_GetPropInt 
                          IWidget_GetPropPtr 
                          IWidget_GetPropRGB 

Any event not handled by the Button will be passed on to its child widget.

Properties:


Property                Description
--------                ---------------------------------------------------------------------------
PROP_VIEWMODEL          Property to get the view model associated with the Button.
                            IWidget_GetViewModel
                            IWidget_SetViewModel

PROP_EX                 Property used to specify an extended property
                            IWidget_GetPropertyEx
                            IWidget_SetPropertyEx

PROPEX_TOUCH_CONTROLLER Extended property to set/get the touch controller associated with a Button.

PROPEX_WIDGETTC_PRESSED Extended property to set/cancel "pressed" state on a Button

PROPEX_USER_DATA        Extended property to associate some user data with the widget.
                            IWidget_GetUserData
                            IWidget_SetUserData

PROPEX_TOUCH_MODE       Extended property to set/get the current touch mode.

PROPEX_WIDGETELEMINFO   Extended property to get the information of the widget element that is being clicked/touched.
Required Model: None
Instantiaion
The Button Widget is instantiated by passing AEECLSID_ButtonWidget into ISHELL_CreateInstance.
Cleanup
The Button Widget is reference counted. When you are done with your reference to the button widget, you should Release that reference. Any button specific cleanup will be handled for you when all references are released.
Default Interface Name
Other Interfaces
Comment
None
  • Follow