XbpDialog windows implicitly set the input focus on the object referenced in their :drawingArea property upon activation.
Class XbpDialog() Foundation
Class function of the XbpDialog class.
The XbpDialog class provides objects that manage dialog windows. XbpDialog windows are the windows used for dialogs in pure GUI applications. XbpDialog windows differ from XbpCrt windows, in that no text oriented output (such as that performed using QOut() or @...SAY) can be performed in an XbpDialog window. A dialog window allows only graphic output and contains other dialog elements (other Xbase Parts). An XbpDialog object is the central element in pure GUI applications programmed using Xbase++.
The drawing area of an XbpDialog window
An XbpDialog object actually consists of only a frame that allows the dialog window to be enlarged or reduced. This frame contains an additional windows: the drawing area. This window is an instance of the XbpIWindow class that provides "implicit windows". An implicit window does not have a border or a title bar, but simply manages a rectangular area on the screen. The implicit window that manages the drawing area of a dialog window has special significance in programming dialogs. All Xbase Parts displayed in a dialog window must have the drawing area as the parent of the Xbase Part and not the dialog window itself. The dialog window is managed by the XbpDialog object and the drawing area is managed by an XbpIWindow object. The drawing area is contained in the instance variable :drawingArea of the XbpDialog object. If an Xbase Part is contained in a dialog window, oXbpDialog:drawingArea must always be specified as its parent.
Changing focus between XbpDialog windows
If multiple dialog windows are displayed, focus changes automatically when windows are clicked with the mouse. During a focus change at least four events are created. Note that the exact order and number of events is platform dependent. However, the last event received is always the xbeP_SetInputFocus event that denotes the change of input focus to the object.
Events sent during a focus change
Event | Description |
---|---|
xbeP_KillInputFocus | Previous focus object lost focus |
xbeP_KillDisplayFocus | Previous focus object deactivated |
xbeP_SetDisplayFocus | Dialog window activated |
xbeP_SetInputFocus | Dialog's :drawingArea got focus |
Events sent during a focus change
Event | Description |
---|---|
xbeP_KillDisplayFocus | Previous focus object deactivated |
xbeP_SetDisplayFocus | Dialog window activated |
xbeP_KillInputFocus | Previous focus object lost focus |
xbeP_SetInputFocus | Dialog got focus |
xbeP_KillInputFocus | Dialog lost focus *) |
xbeP_SetInputFocus | Dialog's :drawingArea got focus *) |
|
If a dialog window is to react to one of these events, callback code blocks must be assigned to the corresponding instance variables :killDisplayFocus:killInputFocus, :setInputFocus or :setDisplayFocus. It is important that a focus change is complete before SetAppFocus() is called again. Interrupting a focus change by calling SetAppFocus() from a callback code block can lead to unpredictable situations. In case the focus must be reset within this sequence of events for any reason, it is recommended that SetAppFocus() only be called after the xbeP_SetDisplayFocus event is retrieved with AppEvent().
XbpDialog on the OS/2 platform
Under OS/2, an XbpDialog window has a second implicit window: the title bar. It is referenced in the instance variable :titleBarArea.
XbpDialog on Windows platforms
Windows does not provide a separate implicit window for managing the title bar of an XbpDialog window. Thus, the instance variable :titleBarArea always contains NIL. For the configuration of an XbpDialog window, the instance variable :taskList plays an important role when the window is displayed on the desktop. See the description of configuration instance variables for details.
When using MDI client windows in an application, there are some particular technical features where Windows differs from OS/2 (Note: an MDI client window is created when an XbpDialog window receives as parent the :drawingArea of another XbpDialog window):
The instance variables in this group configure system resources. If changes are made to these values, they must either be made before the :create() method is executed or the :configure() method must be used to activate the changes.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.