Using Multiple Display Monitors with Views

Multiple display monitors provides a set of features that allow an application to make use of multiple display devices at the same time. Several monitors can be seen as one big monitor, making it possible to move windows from one screen to the other one.

Views has taken into account this feature, and the following API has been added to retrieve the coordinates of a monitor: screenBBox. This method allows an application to retrieve the monitor coordinates in which a specific rectangle is located. For example, it can be used to center a window inside a single monitor. See the Reference Manual for more details.

The impact of this feature on existing applications is restricted to the management of top windows: Each time a top window is displayed, its position must be computed carefully. To avoid problems, top windows should be relative to other top windows and not to the screen. For example, most applications have a main panel and several dialogs, all being top windows. It is better to specify the dialog location relative to the main panel position (using the IlvView::moveToView method) than to center the dialogs into the whole screen (using the IlvView::ensureInScreen method).

Note

The method IlvView::ensureInScreen places a view inside a monitor. It considers the monitor in which the view is located as the working monitor. For example, if a view is located in monitor 2, calling IlvView::ensureInScreen on the view will leave the view in monitor 2.