4D v13.4Window Types |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
Window Types
|
Constant | Type | Value | Comment |
Plain no zoom box window | Longint | 0 | |
Modal dialog box | Longint | 1 | |
Plain dialog box | Longint | 2 | Can be a floating window |
Alternate dialog box | Longint | 3 | Can be a floating window |
Plain fixed size window | Longint | 4 | |
Movable dialog box | Longint | 5 | Can be a floating window |
Plain window | Longint | 8 | |
Round corner window | Longint | 16 | |
Pop up window | Longint | 32 | |
Sheet window | Longint | 33 | |
Resizable sheet window | Longint | 34 | |
Palette window | Longint | 1984 | Can be a floating window |
Texture appearance | Longint | 2048 | |
Compositing Mode | Longint | 4096 | *** Obsolete constant *** |
Has toolbar button Mac OS | Longint | 8192 |
If you pass one of these constants to Open window, you open a regular windows. To open a floating windows, pass a negative window type value to Open window.
The main characteristic of floating windows is that they remain in the foreground even if the user clicks on another window of the process. Floating windows are generally used to display permanent information or tool bars.
A modal window places the user in a state (or “mode”) where they can only act within this window. As long as the modal window is displayed, the menu commands and other application windows are inaccessible. To close a modal window, the user must either validate it, cancel it, or choose one of the options it offers. Warning dialog boxes are a typical example of modal windows.
In 4D, windows of the types 1 and 5 are modal windows.
Note: A modal window always stays in the foreground. As a consequence, when a modal window calls a non-modal window, this latter window is displayed in the background, even though it was called subsequent to the modal window. You should thus avoid this type of operation.
On the other hand, when a modal window calls another modal window, this latter window will be displayed in the foreground.
Here are the descriptions for each type of window under Windows (left) and Mac OS (right).
When you call Open window, you can add one or several of the following constants to Palette window in order to obtain variations in the behavior of the window:
Constant | Type | Value |
Has grow box | Longint | 4 |
Has highlight | Longint | 1 |
Has window title | Longint | 2 |
Has zoom box | Longint | 8 |
Sheet windows are specific to Mac OS X. These windows “drop down” over the title bar of the main window using animation and are displayed above the main window. They are automatically centered in the main window. Their properties are comparable to those of the modal dialog boxes. They are generally used to perform an action directly relating to the action occurring in the primary window.
This type of window has the same basic characteristics of the Plain dialog box (2) type windows and features the following advanced specifics:
Under Mac OS, it is possible to apply a texture appearance to windows. This type of look is found throughout the Macintosh interface. Under Windows, this property has no effect.
To apply a texture appearance to a window created by the Open window command, you can just add the Texture appearance constant to the window type set in the type parameter. For example:
$win:=Open window(10;80;-1;-1;Plain window+Texture appearance;"")
This look can be associated with the following types of windows:
Plain window |
Plain no zoom box window |
Plain fixed size window |
Movable dialog box |
Round corner window |
The "compositing" mode is an internal mode for handling windows under Mac OS X, required more particularly to enable the "metal" or "textured" look, as well as to display certain dynamic objects such as Web areas.
For technical reasons, this mode is used in 4D windows only when necessary. By default, windows managed via the Open window and Open form window commands do not use it. To activate it, you need to add the Compositing Mode constant (Open window) or the Compositing Mode form window (Open form window) constant to the type of window when calling the command.
Under Windows, this property has no effect.
Note: Certain 4D areas and windows are not compatible with the compositing mode (in particular, windows generated by the DISPLAY SELECTION and MODIFY SELECTION commands, or 4D Chart areas). If you use the compositing mode in these contexts, it generates display malfunctioning.
Under Mac OS, 4D v12 can display the toolbar management button. This standard button can be used to alternately display and hide the toolbar of the window:
To display a toolbar management button in a window created using the Open window command, you just need to add the Has toolbar button Mac OS constant. For example:
$NewWin:=Open window(10;10;1010;810;Plain window+Has toolbar button Mac OS)
When the toolbar of the window is displayed, the On Mac toolbar button form event is generated in the form method when the user clicks on the tool bar management button of the window. Of course, the corresponding property must have been checked in the properties of the form event.
Only the event is generated, 4D does not carry out any other action in the window. It is up to the developer to modify the size of the window and to show or hide its interface elements.
Product: 4D
Theme: Windows
Open external window
Open form window
Open window