Logo Search packages:      
Sourcecode: mozilla-traybiff version File versions  Download package

NS_IMETHOD nsIWidget10::Create ( nsIWidget10 aParent,
const nsRect &  aRect,
EVENT_CALLBACK  aHandleEventFunction,
nsIDeviceContext *  aContext,
nsIAppShell *  aAppShell = nsnull,
nsIToolkit *  aToolkit = nsnull,
nsWidgetInitData *  aInitData = nsnull 
) [pure virtual]

Create and initialize a widget.

The widget represents a window that can be drawn into. It also is the base class for user-interface widgets such as buttons and text boxes.

All the arguments can be NULL in which case a top level window with size 0 is created. The event callback function has to be provided only if the caller wants to deal with the events this widget receives. The event callback is basically a preprocess hook called synchronously. The return value determines whether the event goes to the default window procedure or it is hidden to the os. The assumption is that if the event handler returns false the widget does not see the event. The widget should not automatically clear the window to the background color. The calling code must handle paint messages and clear the background itself.

parent or null if it's a top level window
aRect the widget dimension
aHandleEventFunction the event handler callback function
aAppShell the parent application shell. If nsnull, the parent window's application shell will be used.
aInitData data that is used for widget initialization

Generated by  Doxygen 1.6.0   Back to index