Next: Using the keyboard, Previous: Usage of ECB, Up: Usage of ECB [Contents][Index]

### 6.1 Working with the mouse in the ECB-windows

Normally you get best usage if you use ECB with a mouse. ECB distinguishes between a primary and a secondary mouse-button.

With the option `ecb-primary-secondary-mouse-buttons` the following combinations of primary and secondary mouse-buttons are possible:

- - primary: mouse-2, secondary: C-mouse-215. This is the default.
- - primary: mouse-1, secondary: C-mouse-1
- - primary: mouse-1, secondary: mouse-2

If you change this during ECB is activated you must deactivate and activate ECB again to take effect.

#### 6.1.1 The primary mouse-button

A click with the primary button causes the main effect in each ECB-buffer:

- - ECB Directories: Expanding/collapsing nodes and displaying files in the ECB-Sources buffer.
- - ECB sources/history: Opening the file in that edit-window specified by the option `ecb-mouse-click-destination`.
- - ECB Methods: Jumping to the method in that edit-window specified by the option `ecb-mouse-click-destination`.

#### 6.1.2 The POWER- or SHIFT-click

A click with the primary mouse-button while the SHIFT-key is pressed is called the POWER-click and does the following (depending on the ECB-buffer where the POWER-click occurs):

- - ECB Directory: Refreshing the directory-contents-cache (see `ecb-cache-directory-contents`).
- - ECB sources/history: Only displaying the source-contents in the method-buffer but not displaying the source-file in an edit-window. This means it opens the clicked source only in the background and shows all its methods/variables in ECB-Methods; the buffer of the edit-window is not changed! This is very useful to get only an overlook for a certain source.
- - ECB Methods: Narrowing to the clicked method/variable/ect... (see `ecb-tag-visit-post-actions`). But this works only for sources parsed by semantic, not by imenu or etags!

Per default the complete node-name of an item in a tree-buffer is displayed in the echo-area if the mouse moves over it, regardless if the related window is the active one or not. You get the same effect always after a POWER-click. In general: For each tree-buffer there is an option `ecb-*-show-node-info` (replace “*” with directories, sources, methods, history or analyse, e.g. `ecb-directories-show-node-info` is the option for the ECB-directories-window.): you can specify in a detailed manner for the named ECB tree-buffer when and which node-info should be displayed in the minibuffer.

#### 6.1.3 The secondary mouse-button

The secondary mouse-button is for opening (jumping to) the file in another edit-window (see the documentation of the option `ecb-mouse-click-destination`).

#### 6.1.4 The right mouse-button

In each ECB-buffer mouse-3 (= right button) opens a special context popup-menu for the clicked item where you can choose several senseful actions.

With the options `ecb-directories-menu-user-extension`, `ecb-sources-menu-user-extension`, `ecb-methods-menu-user-extension` and `ecb-history-menu-user-extension` you can add statically new commands to the popup-menus. See the docstring of `ecb-directories-menu-user-extension` for more details.

With the options `ecb-directories-menu-user-extension-function`, `ecb-sources-menu-user-extension-function`, `ecb-methods-menu-user-extension-function` and `ecb-history-menu-user-extension-function` you can add new commands to the popup-menus in a dynamic manner. See the docstring of `ecb-directories-menu-user-extension-function` for more details.

With the options `ecb-directories-menu-sorter`, `ecb-sources-menu-sorter`, `ecb-methods-menu-sorter` and `ecb-history-menu-sorter` you can even re-arrange all the entries of the popup-menus.

#### 6.1.5 Horizontal scrolling with the mouse

In each tree-buffer of ECB you can easily scroll left and right with the mouse if the option `ecb-tree-easy-hor-scroll` is not `nil`.

The reason for this is: XEmacs has horizontal scroll-bars so invisible parts beyond the right window-border of a tree-buffer can always made visible very easy.

GNU Emacs does not have hor. scroll-bars so especially with the mouse it is quite impossible to scroll smoothly right and left. The functions `scroll-left` and `scroll-right` can be annoying and are also not bound to mouse-buttons.

ECB offers three ways for smoothly hor. scrolling with GNU Emacs if `ecb-tree-easy-hor-scroll` is a positive integer-value S:

- In all ECB-tree-buffers the keys `M-mouse-1` and `M-mouse-3` are bound to scrolling left rsp. right with scroll-step S.
- Clicking with mouse-1 or mouse-2 onto the edge of the modeline has the same effect, i.e. if you click with mouse-1 onto the left \(resp right) edge of the modeline you will scroll left \(resp. right) with scroll-step S.
- Additionally `C-M-mouse-1` and `C-M-mouse-3` are bound to scrolling left rsp. right with scroll-step `window-width` - 2.

This is NOT done for XEmacs cause of its horizontal scrollbars. If you want scrolling left and right with the mouse in XEmacs then activate the horizontal scrollbars.

#### Footnotes

### (15)

means mouse-2 while CTRL-key is pressed.

Next: Using the keyboard, Previous: Usage of ECB, Up: Usage of ECB [Contents][Index]