|
ovi_NewWindow |
|---|
| ovi_NewWindow (left;top;right;bottom;windowLevel;overlayRef) <- errorCode | |||
|---|---|---|---|
| Parameter | Type | Description | |
| -> | left | Numeric | Global left coordinate of the window |
| -> | top | Numeric | Global top coordinate of the window |
| -> | right | Numeric | Global right coordinate of the window |
| -> | bottom | Numeric | Global bottom coordinate of the window |
| -> | windowLevel | Numeric | Level of the overlay window |
| <- | overlayRef | Long integer | Reference of the overlay window |
| <- | errorCode | Long Integer | Error Code (0 = no error) |
The routine creates a new overlay window. Coordinates are expressed in Global Coordinates.
windowLevel is the initial level of the window. This parameter can be changed later using the ovi_GetSetWindowLevel routine. The level is an important parameter. Possible values are:
| Value | Constant |
|---|---|
| 0 | koviLEVEL_Utility |
| 1 | koviLEVEL_Toolbar |
| 2 | koviLEVEL_Overlay |
The koviLEVEL_Utility level is the default level. If you pass an unknow constant value, the plug-in uses koviLEVEL_Utility. Here are the behavior of each level:
The window is initially invisible. You can set its parameters (colors, message) and then make it visible (ovi_GetSetVisible).
If the window could be created, overlayRef contains a reference to this window, else it contains 0. This reference must be used with every other routines of the plug-in. Note that it cant be used with 4Ds commands of the " Windows " theme, but you can get a regular Mac window reference of the overlay by calling ovi_GetWindowRef.
IMPORTANT TECHNICAL NOTE: in order to keep track of the windows and to avoid 4D to close them randomly, OverlayIt uses an external process that is created on startup. This process is immediatly freezed, and then unfreezed when the user quits 4D. So it does not use any CPU time. You can check this by creating several overlay windows, work with 4D for a long time and have a look at the runtime explorer.