[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Multiple Document Interface

4.1 Selecting Windows  
4.2 Closing Windows  
4.3 Maximized and Iconified Windows  
4.4 Docked Windows  
4.5 Splitting Windows  
4.6 Floating Windows  
4.7 Moving Windows  

All the windows that are part of the GPS environment are under control of what is commonly called a multiple document interface (MDI for short). This is a common paradigm on windowing systems, where related windows are put into a bigger window which is itself under control of the system or the windows manager.

This means that, by default, no matter how many editors, browsers, explorers,... windows you have opened, your system will still see only one window (On Windows systems, the task bar shows only one icon). However, you can organize the GPS windows exactly the way you want, all inside the GPS main window.

For instance, you can choose to iconify some windows which are temporarily useless to you; you can choose to put some windows on top of others; you can resize all the windows to the size you want; and so on.

This section will show the various capacities that GPS provides to help you organize your workspace.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1 Selecting Windows

At any time, there is only one selected window in GPS (the active window). You can select a window either by clicking in its title bar, which will then get a different color, or by selecting its name in the menu Window.

Alternatively, windows can be selected with the keyboard. By default, the selection key is Alt-Tab. When you press it, a temporary dialog is popped-up on the screen, with the name of the window that will be selected when the key is released. If you press the selection key multiple times, this will iterate over all the windows currently open in GPS.

This interactive selection dialog is associated with a filter, displayed below the name of the selected window. If you maintain Alt pressed while pressing other keys than Tab, this will modify the current filter. From then on, pressing Alt-Tab will only iterate through those windows that match the filter.

The filter is matched by any window whose name contains the letter you have typed. For instance, if you are currently editing the files `unit1.adb' and `file.adb', pressing t will only leave `unit1.adb' selectable.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.2 Closing Windows

Wherever the windows are displayed, they are always closed in the same manner. In the right side of the title bar of the window, three small buttons are displayed. The rightmost button is a cross. Clicking on this button will close the window.

When a window is closed, the focus is given to the window of the same part of the MDI (each of the docks or the middle area) that previously had the focus. Therefore, if you simply open an editor as a result of a cross-reference query, you can simply close that editor to go back to where you were before.

mdi-title-bar

Alternatively, you can also select the window by clicking anywhere in its title bar, and then select the menu Window->Close


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.3 Maximized and Iconified Windows

The MDI is initially split into three parts: one window to the left, one to the bottom, and a bigger one that occupies the remaining space.

The first two will be discussed in 4.4 Docked Windows. The third area is the one that provides the most flexibility:

maximized windows
The windows in this area are initially maximized. This means that if you have several windows, a notebook will be created, and only one window will be visible at any given time. You select the window you want to see by clicking on the appropriate tab.

Note that if there are a lot of windows, two small arrows will appear on the right of the tabs. Clicking on these arrows will show the remaining tabs.

mdi-scroll-tabs

You can go back to this maximized state in two ways: either select the menu Window->Maximize All, or click on the middle button on the right of the title bar of any window (this button shows two small squares, and will toggle between maximized and unmaximized states.

You can also double-click on the title bar of any of the window, or in the tabs that appear at the bottom when multiple windows are stored in the central area.

unmaximized windows
Instead of putting all the windows inside a notebook, GPS lets you organize them freely when they are unmaximized. Select the menu Window->Unmaximize All, or click again in the middle button on the right of the title bar.

In this mode, the windows can be resized freely by clicking on the border of any side or in one of their four corners, as usual on windowing systems.

They can also be moved around. As a result, you can choose for instance to display several windows side by side, or one on top of the others.

To make it easier to get to these standard organizations, GPS provides a few shortcuts through menus:

Window->Cascade
All the windows will be resized to the same size, and be moved one on top of the other, so that the top and left sides of all windows are visible. This way, you can easily select any window

Window->Tile Horizontally
All the windows are resized to the same dimensions, and are put side by side, from left to right. No window will overlap any other.

mdi-tile-horizontal

Window->Tile Vertically
All the windows are resized to the same dimensions, and are put side by side, from top to bottom. No window will overlap any other.

mdi-tile-vertical

Iconified windows
When the windows are unmaximized, you can also choose to temporarily iconify some of them. This is done by clicking on the leftmost button in the title bar (the one that shows a single line).

The window will then be resized so that only part of its title bar is visible, and none of its actual contents. Icons can still be moved around as you want, but they cannot be resized. You need to first de-iconify the window, by clicking once again on the same button.

When de-iconified, a window will restore the size and position it had before it was iconified.

mdi-icons


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4 Docked Windows

As mentioned before, the GPS work space is initially split into three windows. The one on the left and the one at the bottom are called docking area.

They have a different behavior from the central area, since windows in these areas are necessarily grouped into a notebook. Thus, only one of them is visible at any given time, and you select the one you want to see by clicking on its name in the tabs area.

GPS includes four such areas, one on each side of the main area. Some visual objects will initially be displayed in one of these docking areas instead of in the central one, like the project explorer, the message window,... Although you cannot control this initial position, it is possible to change it later on (4.7 Moving Windows).

However, you can still choose precisely the dimension you want for this docking area (either its width for the left and right areas, or its height for the top and bottom ones).

Between each docking area and the central one, there is a small handle (on which a series of dots are drawn), that you can move interactively with the mouse, to resize the docking areas). By default, when you move such a handle, a line will appear on top of all other windows in GPS to show you the new position the docking area will have when you release the mouse. You can set up a preference (menu Edit->Preferences) to indicate that you want the resizing to be opaque, that is that you want to see the windows as you resize them.

Note that when a window is docked (i.e. put in a docking area), some of the buttons in its title bar are grayed out and inactive.

A simple way to dock a window is to select it, and then select the menu Window->Docked. We will see in 4.7 Moving Windows that there is a more intuitive way to do the same thing.

In some cases GPS will change the color and size of the title (name) of a window in the notebook tab. This indicates that the window content has been updated, but the window wasn't visible. Typically, this is used to indicate that new messages have been written in the messages or console window.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5 Splitting Windows

The window in the central area of the MDI can be split at will, through any combination of horizontal and vertical splits. This feature requires at least two windows (text editors, browsers,...) to be superimposed in the central area. Selecting either the Window->Split Horizontally or Window->Split Vertically menus will then split the selected window in two. In the left (resp. top) pane, the currently selected window will be left on its own. The rest of the previously superimposed windows will be put in the right (resp. bottom) pane. You can then in turn split these remaining windows to achieve any layout you want.

All split windows can be resized interactively by dragging the handles that separate them, just as is done for docked windows. A preference (menu Edit->Preferences controls whether this resizing is done in opaque mode or border mode. In the latter case, only the new handle position will be displayed while the mouse is dragged.

The current layout is lost when you select one of the menus Window->Cascade, Window->Tile Horizontally, Window->Tile Vertically or Window->Unmaximized. It is also changed if you destroy the last visible window in a pane. For instance, if you have split the central area in two, with one editor only on each side, closing any editor will result in an unsplit central area.

You may want to bind the key shortcuts to the menus Window->Split Horizontally as well as Window->Split Vertically using either the preference Dynamic Key Binding, or the key manager. In addition, if you want to achieve an effect similar to e.g. the standard Emacs behavior (where control-x 2 splits a window horizontally, and control-x 3 splits a window vertically), you can use the key manager (see section 15.3 The Key Manager Dialog).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.6 Floating Windows

Although the MDI, as described so far, is already extremely flexible, it is possible that you prefer to have several top-level windows under direct control of your system or window manager. This would be the case for instance if you want to benefit from some extra possibilities that your system might provide (virtual desktops, different window decoration depending on the window's type, transparent windows,...).

GPS is fully compatible with this behavior, since windows can also be floating windows. Any window that is currently embedded in the MDI can be made floating at any time, simply by selecting the window and then selecting the menu Window->Floating. The window will then be detached, and can be moved anywhere on your screen, even outside of GPS's main window.

There are two ways to put a floating window back under control of GPS. The more general method is to select the window through its title in the menu Window, and then unselect Window->Floating.

The second method assumes that the preference Destroy Floats in the menu Edit->Preferences has been set to false. Then, you can simply close the floating window by clicking in the appropriate title bar button, and the window will be put back in GPS. If you actually want to close it, you need to click once again on the cross button in its title bar.

A special mode is also available in GPS, where all windows are floating. The MDI area in the main window becomes invisible. This can be useful if you rely on windows handling facilities supported by your system or window manager but not available in GPS. This might also be useful if you want to have windows on various virtual desktops, should your window manager support this.

This special mode is activated through a preference (menu Edit->Preferences). This preference is entitled All Floating.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.7 Moving Windows

As we have seen, the windows' state can be changed at any time, from maximized to unmaximized to docked to floating and back, in any order.

In all cases, the changes are done either through the buttons in the title bar or through the Window menu.

A more intuitive method is also provided, based on the drag-and-drop paradigm. The idea is simply to select a window, wherever it is, and then, by clicking on it and moving the mouse while keeping the left button pressed, drop it anywhere else inside GPS.

Selecting an item so that it can be dragged is done simply by clicking with the left mouse button in its title bar, and keep the button pressed while moving the mouse. Although this is the general scheme, this would not work for unmaximized items, since the title bar is then used to move them around. In that case, you need to press the control key in addition to the left mouse button.

A third possibility can be used for maximized or docked windows: click with the left mouse button in the notebook tab that contains their name. This third option is not available under Microsoft Windows systems.

While you keep the mouse button pressed, and move the mouse around, the selected drop area is highlighted with a dashed border. This shows precisely where the window would be put if you were to release the mouse button at that point.

Here are the various places where a window can be dropped:

The central area
If the windows in that area are unmaximized, the window you are dropping (the current window) will acquire the same state. However, if the windows are currently maximized in the central area, or even if the latter was split horizontally, vertically or any combination of these, the location of the current window is indicated by the dashed rectangle: either in the pane where you released the mouse button, or on one of the sides of that pane (splitting as needed).

Docking areas
The window will be immediately added to this area after dropping it and a new notebook will be created as needed.

In some cases, you might want to create a docking area that is not currently visible (for instance, it is often useful to put the location window in the right docking area).

To achieve this, drop the window on the small handle that surrounds the whole GPS window (a black rectangle will appear on the screen when your mouse is over that area). If you then drop the item, a new docking area will be created.

System window
If you drop a window outside of GPS (for instance, on the background of your screen), the window will be floated.

If you maintain the shift key pressed while dropping the window, this might result in a copy operation instead of a simple move. For instance, if you are dropping an editor, a new view of the same editor will be created, resulting in two views present in GPS: the original one is left at its initial location, and a second view is created at the new location.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Mail Server on November, 29 2004 using texi2html