Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added speedbar-like layout nr. 11
  • Loading branch information
berndl committed Jul 13, 2001
1 parent d6cffe3 commit b94d946
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 10 deletions.
5 changes: 5 additions & 0 deletions HISTORY
@@ -1,6 +1,11 @@
Version 1.40:
-------------

- Added a speedbar-like layout nr. 11. This is very useful (like also layout
nr. 10) either for users with small screens or users which normally do not
need/want the ECB-windows but sometimes browsing/selecting
methods/variables. (Klaus)

- Better extraction of tokens from current buffer. ECB now displays any token
type in any order. (Jesper)

Expand Down
25 changes: 18 additions & 7 deletions ecb-help.el
Expand Up @@ -181,8 +181,9 @@ With `ecb-tree-incremental-search' you can specify if the current
search-pattern must be a real prefix of the node \(default) or if any
substring is matched.
Tip: You can install the package windmove.el for selection of windows in a
frame geometrically. This makes window-selection a child´s play.
Tip: The `ecb-minor-mode' offers you in the `ecb-mode-map' some keys for
selecting every window of the ecb-frame. This makes window-selection a child´s
play. For example you can jump into the method-window by hitting \"C-c . m\".
Working with the edit-window of ECB:
Expand Down Expand Up @@ -376,13 +377,13 @@ Working with small screens:
---------------------------
If your screen is very small so you need every sqare-centimeter for displaying
the buffer which you want to edit, ECB offers you a special layout, where only
the ECB-methods buffer is displayed on top. Here comes what you should/can do
to work best with ECB in such a situation:
the buffer which you want to edit, ECB offers you a special layouts, where
only the ECB-methods buffer is displayed on top or on left-side. Here comes
what you should/can do to work best with ECB in such a situation:
- First customize your ECB:
1. Customize `ecb-layout-nr' to layout nr. 10.
1. Customize `ecb-layout-nr' to layout nr. 10 \(on top) or nr. 11 \(on left-side)
2. Ensure that `ecb-compile-window-height' is nil.
3. Optional: Ajust the `ecb-windows-height'.
3. Optional: Ajust the `ecb-windows-height' resp. `ecb-windows-width'.
4. Save your changes.
- To edit your buffers:
Call `ecb-toggle-ecb-windows' \(also available via the menu \"ECB\" and by
Expand All @@ -399,6 +400,16 @@ The possibility of hiding temporally the ECB windows like described above is
also useful for all the other layouts.
Simulating speedbar without an extra frame:
-------------------------------------------
You can simuate a speedbar-like layout within ONE frame by doing the following:
1. Customize `ecb-layout-nr' to layout nr. 11
2. Optional: Ensure that `ecb-compile-window-height' is nil.
3. Optional: Ajust the `ecb-windows-width'.
4. Save your changes.
==================================
Entry points for elisp programmers
==================================
Expand Down
47 changes: 44 additions & 3 deletions ecb-layout.el
Expand Up @@ -174,8 +174,8 @@

(defcustom ecb-layout-nr 9
"*Define the window layout of ECB. A positive integer which sets the
general layout. Currently there are 11 predefined layouts with index from 0 to
10. You can savely try out any of them by changing this value and saving it
general layout. Currently there are 12 predefined layouts with index from 0 to
11. You can savely try out any of them by changing this value and saving it
only for the current session. If you are sure which layout you want you can
save it for future sessions. To get a picture of the layout for index <index>
call C-h f ecb-layout-function-<index>, e.g. `ecb-layout-function-9'.
Expand All @@ -192,6 +192,7 @@ Currently available layouts \(see the doc-string for a picture ot the layout):
`ecb-layout-function-8'
`ecb-layout-function-9'
`ecb-layout-function-10'
`ecb-layout-function-11'
Regardless of the settings you define here: If you have destroyed or
changed the ECB-screen-layout by any action you can always go back to this
Expand Down Expand Up @@ -377,7 +378,7 @@ rebind it to the original function in the `ecb-deactivate-hook'."
"Use dedicated windows for the ECB buffers.
Attention: You should never change this!")

(defconst ecb-number-of-layouts 11)
(defconst ecb-number-of-layouts 12)
(defcustom ecb-layout-window-sizes (make-vector ecb-number-of-layouts
(make-list 5 nil))
"*Specifies the sizes of the ECB windows for each layout. The easiest way to
Expand Down Expand Up @@ -1122,6 +1123,10 @@ ECB-adviced functions."
'ecb-delete-other-windows-in-editwindow-0)
(defalias 'ecb-delete-window-in-editwindow-9
'ecb-delete-window-in-editwindow-0)
(defalias 'ecb-delete-other-windows-in-editwindow-11
'ecb-delete-other-windows-in-editwindow-0)
(defalias 'ecb-delete-window-in-editwindow-11
'ecb-delete-window-in-editwindow-0)

(defun ecb-delete-other-windows-in-editwindow-5 (split)
(cond ((equal (ecb-point-in-edit-window) 2)
Expand Down Expand Up @@ -1962,6 +1967,42 @@ little more place."
(select-window (next-window)))
(setq ecb-edit-window (selected-window)))

(defun ecb-layout-function-11 ()
"This function creates the following layout:
-------------------------------------------------------
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| Methods | Edit |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
-------------------------------------------------------
| |
| Compilation |
| |
-------------------------------------------------------
If you have not set a compilation-window in `ecb-compile-window-height' then
the layout contains no durable compilation window and the other windows get a
little more place."
(when ecb-compile-window-height
(ecb-split-ver (* -1 ecb-compile-window-height) t)
(setq ecb-compile-window (next-window)))
(ecb-split-hor ecb-windows-width t)
(ecb-set-methods-buffer)
(select-window (next-window))
(setq ecb-edit-window (selected-window)))


(provide 'ecb-layout)

Expand Down

0 comments on commit b94d946

Please sign in to comment.