An MDI client window is created when an XbpCrt window receives as parent another XbpCrt window or the :drawingArea of an XbpDialog window:
Class XbpCrt() Foundation
Class function of the XbpCrt class.
The XbpCrt class offers a straightforward way to transition existing text mode applications to GUI applications. An existing Clipper application can run in an XbpCrt window after being compiled with Xbase++. The program code can be changed to use Xbase Parts that provide graphic dialog elements step by step as time permits.
XbpCrt on Windows platforms
For the configuration of an XbpCrt 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.
The xbeM_Wheel event is generated when the user rotates the mouse wheel and mouse events have been enabled via a call to SetMouse(.T.).
The xbeM_Wheel event is always sent to the Xbase Part that has input focus, no matter whether or not the mouse pointer is located within or outside the area of the Xbase Part. All classes derived from XbpWindow that display data which can be vertically scrolled have a default behavior to process this event. This applies to the following classes:
Class name |
---|
XbpBrowse |
XbpCombobox (XBPCOMBO_DROPDOWNLIST) |
XbpListbox |
XbpMLE |
XbpQuickBrowse |
XbpSpinbutton |
XbpTreeview |
XbpScrollbar *) |
|
The information in the <aWheel> array can be used for computing how far the content of the XbpCrt object needs to be scrolled to reflect the distance and direction in which the user has spun the mouse wheel.
The number of rows to scroll (line-wise scrolling) is reported in the nLines element of the <aWheel> array. Note that this element can be zero if the distance the mouse wheel was turned does not (yet) warrant scrolling a line. In this case, the corresponding xbeM_Wheel event can be ignored. The following code excerpt illustrates this procedure.
A working example showing how the wheel event can be used for supporting scrolling items in a MEMOEDIT() is located in the chapter "Touch input in character mode applications".
The elements in <aWheel> can be also be used for implementing pixel-wise (or high-resolution) scrolling. This topic is covered in full detail in the documentation of XbpWindow:wheel().
When the first element of <aWheel> is not equal to zero, the $ operator can be used to check which additional keys are pressed while the mouse wheel is rotated. For example:
The instance variables in this group configure system resources. If changes are made to the default values, they must be made before the :create() method is executed or :configure() must be called to activate the changes.
The instance variables in this group can be changed after :create()is called without requiring a call to :configure(). The changes are automatically registered.
The second element (nDistance) indicates the distance the wheel is rotated, expressed in multiples or divisions of 120. The value is positive when the wheel is rotated up and negative when it is rotated down. Each multiple of 120 represents one "notch" on the mouse wheel, and typically corresponds to one line to be scrolled in the window. Note that higher resolution pointing devices and trackpads generate a larger number of xbeM_Wheel events with smaller values in the nDistance array element. These values directly correspond to the rotation distance reported by the hardware (driver), and are intended primarily for implementing custom scrolling behavior.
The third array element (nLines) specifies the number of lines to be scrolled. This is a computed value which takes into account previous mouse wheel operations, causing fractional rotations to be accumulated towards the next full line. The nLines element is non-zero only if one or more lines must be scrolled. For example, a mouse wheel being spun upwards so that approximately 1/3 of a line is reported with each xbeM_Wheel event might have the following sequence of values in the third array element: 0, 0, 1, 0, ... The nLines element is intended for implementing line-wise scrolling which may be required when displaying lines of text, for example.
The fourth array element (nOffset) contains the scroll offset in pixels. This is a computed value which takes into account previous mouse wheel operations, causing fractional rotations to be accumulated towards the next pixel. The scroll offset is based on the height of the default GUI font (XBPSYSFNT_GUIDEFAULT, see XbpFont:create()); one "notch" on the mouse wheel is roughly equivalent to two times the height of this font. The nOffset element is intended for implementing pixel-wise scrolling required when displaying images, for example.
The fifth array element (nLinesToScroll) specifies the system's "lines to scroll" setting, which is a setting configurable in Control Panel. This setting specifies a factor which applications should respect when performing scrolling operations. nLinesToScroll either contains a value greater than zero (number of lines to scroll per virtual line), or -1 if the user has configured page-wise scrolling.
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.