Developer

API Reference

AEECLSID_DisplayWidget

Brew Release
Brew MP 1.0.2
See Also
Description
DisplayWidget implements standard IWidget interface. DisplayWidget is an easy way to convert Legacy Brew applications (IControl/ IDisplay based) into Window Based applications. Typically these legacy applications implicitly/explicitly call various functions that modify the Display Bitmap and IDisplay_Update() in the end to get the Bitmap drawn on the screen. For such applications, display widget can be used to create a widget that can be used by WindowMgr.
DisplayWidget implements IWidget interface. This is a special widget that wraps an IDisplay of the application with a BitmapWidget. After that, all the display updates actually happen on this BitmapWidget's bitmap and IDisplay_Update() results in the invalidation of this Bitmap. Supported Events: DisplayWidget supports following events:
Event                    Description
-----                   -------------------------------------------
EVT_WDG_CANTAKEFOCUS:   DisplayWidget handles this event and sets 
                        the dwParam boolean* to TRUE. 

EVT_WDG_SETPROPERTY :   Set properties on the widget. DisplayWidget
                        supports all the properties supported by
                        BitmapWidget, and in addition supports
                        extended property - PROPEX_DISPLAY.



Properties:


Property         Description
--------         ------------------------------------------------------------
PROP_EX:         DisplayWidget supports the following extended property.
                   PROPEX_DISPLAY : For the WidgetPropEx structure, 
                   nSize can be ignored and the pUser should be the IDisplay* 
                   for the applications. After creating the widget, applications
                   should set this property with its own IDisplay*.

PROP_VIEWMODEL:  This property contains a pointer to the view model that facilitates notification
                 of DisplayWidget extent changes to listening objects.  As the window gets resized 
                 the view model is used as the notification agent for attached listeners.
                             
                     Property Value:  IModel *

                 Typically, existing legacy applications called ISHELL_GetDeviceInfo() to get the 
                 screen height and width, and layout accordingly. This was possible because
                 these applications always occupied full screen. But in Window Framework, full-screen
                 space is not guaranteed. Hence, applications should listen to the ViewModel of the
                 WindowWidget, which notifies about the extent changes. The extent should be used
                 to determine the layout.
Instantiaion
A cursor widget is created by calling ISHELL_CreateInstance() and passing AEECLSID_DisplayWidget 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 Display Widget is reference counted. When you are done with your reference to the Display widget, you should Release it. Any Display Widget specific cleanup will be handled for you when all references are released.
Default Interface Name
Other Interfaces
None
  • Follow