Maximizing the ECB windows - ECB - the Emacs Code Browser
Description: ECB - the Emacs Code Browser

Next: Back/forward navigation, Previous: Hiding the ECB windows, Up: Usage of ECB

### 6.10 Maximizing the ECB windows

#### 6.10.1 How to maximize and minimize special ecb-tree-windows

To get a better overlook about the contents of a certain ECB-window every ECB-window can be “maximized”, means all other ECB-windows are deleted so only the edit-window(s) and this maximized ECB-window are visible (and maybe a compile-window if active). There are several ways to do this:

- Via the node-popup-menus of the ECB-windows
- Via the main “ECB”-menu and here “Display window maximized”
- Via calling the adviced version of `delete-other-windows`1 (bound to `C-x 1`) in one of the ECB windows.
- Via one of the commands `ecb-maximize-window-directories`, `ecb-maximize-window-sources`, `ecb-maximize-window-methods`, `ecb-maximize-window-history` or `ecb-maximize-window-speedbar` or the bound short-cuts for those commands.
- Via the new command `ecb-cycle-maximized-ecb-buffers` which cycles through all ecb-buffers of current layout by maximizing exactly one of the ecb-windows after every cycle-step.
- Via the option `ecb-maximize-ecb-window-after-selection` and then just by selecting an ECB-window. “Deselecting” an ECB-window brings back all ECB-windows of current layout.
- Via the default modeline-mechanisms for deleting other windows. GNU Emacs binds `mouse-2` in its modeline to `delete-other-window`. XEmacs binds a popup-menu with some window commands to `button-3` in its modeline.

  ECB combines the best of both worlds by supporting both of these mechanisms for both Xemacs and Emacs: ECB binds a toggle-command to `mouse-2` in the modeline of each tree-buffer which maximizes the current tree-window if all ECB-windows are visible and displays all ECB-windows if current tree-window is maximized. In addition ECB binds a popup-menu to `mouse-3` which offers exactly 2 commands: Maximizing current tree-window and displaying all ECB-windows.

“Minimizing” such a maximized ECB-window, i.e. bringing back to its original size and displays all ecb-windows of current layout, can simply be done by redrawing the layout via the command `ecb-redraw-layout` (bound to `C-c . lr`).

#### 6.10.2 Selecting a node in a maximized ecb-tree-window

When you select a node (either via mouse or RET) in a maximized tree-window the default behavior of ECB is the following:

Maximized directories-window: When selecting a directory then first automatically the maximized directories-window will be “minimized” (i.e. all ecb-windows of current layout are displayed) if the current layout contains a sources-buffer and no sources are shown in the directories-window - see `ecb-show-sources-in-directories-buffer`. So the source-files can be displayed in the sources-window.

Maximized sources- or history-window: When selecting a source-file in one of these buffers then first automatically the maximized window will be “minimized” (i.e. all ecb-windows of current layout are displayed) if the current layout contains a methods-buffer. So the tag-contents of the selected source-file can be displayed in the methods-window.

For a even smarter behavior ECB offers the option `ecb-maximize-next-after-maximized-select` which automatically maximizes the next logical tree-window after a node selection. The definition of “next logical is”: Directories –> sources, sources/history –> methods. But if the current maximized tree-buffer is also contained in the option `ecb-tree-do-not-leave-window-after-select` (see also the tree-buffer-command `ecb-toggle-do-not-leave-window-after-select` which is bound to <C-t> in each tree-buffer) then ECB does *not* maximize the next logical tree-window but point stays in the currently maximized tree-buffer so for example the user can select more than one source-file from the sources-buffer.

#### Footnotes

[1] This command is adviced per default, see The edit-area.