| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.1 Selecting Windows 4.2 Closing Windows 4.3 Maximized and Iconified Windows 4.4 Docked Windows 4.5 Floating Windows 4.6 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] | [ ? ] |
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] | [ ? ] |
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.

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] | [ ? ] |
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:
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.

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.
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
Window->Tile Horizontally

Window->Tile Vertically

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 can not 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.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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 can not control this initial position, it is possible to change it later on (4.6 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, which might give more intuitive results.
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.6 Moving Windows that
there is a more intuitive way to do the same thing.
In some cases, GPS will change the color used to draw the title of the 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] | [ ? ] |
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 select 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 your system or window manager provides windows-handling facilities that GPS does and you rely on them. It might also be used if you want to have windows on various virtual desktops, when your window manager has this feature.
This special mode is activated through a preference (menu
Edit->Preferences). This preference is entitled All
Floating.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As we have seen, the windows' state can be changed at any time, from maximized to unmaximized to docked and floating and back, in any order.
In all cases, the changes are done either through the buttons in the
title bar or through the menu Window.
On some systems, 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 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 Windows systems.
It is important to note that some visual objects in GPS have their own drag-and-drop support, and will not react when you drop a window on them. For instance, editors use drag-and-drop for copy-paste operations. Therefore, dropping a window on them will result in a failed operation. In that case, it always works to drop the window in the title bar of another window to adopt the same state.
Here are the various places where a window can be dropped:
In some cases, you might want to create a docking area that is not currently visible (for instance, it is often useful to put an editor in the right docking area, so that two editors can be seen side-by-side, one in this area, and one in the central one).
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.
This is especially useful if you want to put two editor windows side by side. Drag one of them on the drop area on the right side.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |