Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
;;; ecb-layout.el --- layout for ECB ;; Copyright (C) 2000 - 2003 Jesper Nordenberg, ;; Klaus Berndl, ;; Kevin A. Burton, ;; Free Software Foundation, Inc. ;; Author: Jesper Nordenberg ;; Klaus Berndl ;; Kevin A. Burton ;; Maintainer: Klaus Berndl ;; Kevin A. Burton ;; Keywords: browser, code, programming, tools ;; Created: 2000 ;; This program is free software; you can redistribute it and/or modify it under ;; the terms of the GNU General Public License as published by the Free Software ;; Foundation; either version 2, or (at your option) any later version. ;; This program is distributed in the hope that it will be useful, but WITHOUT ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ;; details. ;; You should have received a copy of the GNU General Public License along with ;; GNU Emacs; see the file COPYING. If not, write to the Free Software ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;; $Id: ecb-layout.el,v 1.188 2003/09/15 08:31:05 berndl Exp $ ;;; Commentary: ;; ;; Contains functions for settings the ECB layout. ;; ;; This file is part of the ECB package which can be found at: ;; http://ecb.sourceforge.net ;; This file has been re-implemented by Klaus Berndl . ;; What has been done: ;; Completely rewritten the layout mechanism for better customizing, adding ;; new layouts, better redrawing and more straightforward code. ;; 1. Now all user-layouting is done by customizing the new option ;; `ecb-layout-name' or by the command `ecb-change-layout'. The function ;; `ecb-redraw-layout' (formally known as 'ecb-set-layout) can still be ;; called interactively but without arguments because it does only a redraw ;; of the layout specified in `ecb-layout-name'. All changes to the layout ;; must be made by customizing this new option. Please read the very ;; detailed comment of `ecb-layout-name'! ;; 2. Adding new layouts is now much easier and more straightforward: We have ;; now a main core-layout function (`ecb-redraw-layout-full') which is the ;; "environment" for the specific "layout-functions". The core function ;; does first some layout independent actions, then calls the ;; "layout-function" for the name which has been set in `ecb-layout-name' ;; and after that it does some layout independent actions again (see the ;; comments in this function). See the macro `ecb-layout-define' and the ;; command `ecb-create-new-layout'! ;; ;; Background-info: For each layout-type (ecb-windows left, right, top and ;; left-right) there are two functions: ;; - 'ecb-delete-other-windows-ecb-windows[left|right|top|left-right]' and ;; - 'ecb-delete-window-ecb-windows[left|right|top|left-right]'. ;; These functions follow these guide-lines: ;; - Preconditions for these functions: ;; + the edit window is splitted ;; + The function gets one argument 'split' which can have the values ;; 'horizontal and 'vertical. ;; + These functions are always(!) called with deactivated advice of ;; `delete-window' function. ;; - What must they do: ;; 1. Checking if the point is in one of the two parts of the splitted ;; edit-window. If in another window, do nothing and return nil. ;; 2. Checking in which part of the splitted edit-window the point is. ;; 3. Doing the appropriate action (e.g. ;; `ecb-delete-window-ecb-windows-left' must delete this half-part ;; of the splitted edit-window which contains the point, so the other ;; half-part fills the whole edit-window. If the split has been undone ;; then non nil must be returned! This action must be done appropriate ;; for the current ECB-layout type. ;; 4. These functions can only use `delete-window' of the set of maybe ;; adviced window functions, because of a bug in advice.el only one ;; functionīs advice can be deactivated within a advice itself! ;; - Postcondition of these functions: ;; + The edit-window must not be splitted and the point must reside in ;; the not deleted edit-window. ;; ;; New adviced intelligent window-functions as replacement for these originals: ;; - `other-window' ;; - `delete-window' ;; - `delete-other-windows' ;; - `delete-windows-on' ;; - `split-window-horizontally' ;; - `split-window-vertically' ;; - `split-window' ;; - `display-buffer' ;; - `switch-to-buffer' ;; - `switch-to-buffer-other-window' ;; - `other-window-for-scrolling' ;; The behavior of the adviced functions is: ;; - All these function behaves exactly like their corresponding original ;; functions but they always act as if the edit-window(s) of ECB would be the ;; only window(s) of the ECB-frame. So the edit-window(s) of ECB seems to be ;; a normal Emacs-frame to the user. ;; - If a durable compile-window is used all buffers for which ;; `ecb-compilation-buffer-p' returns not nil are handled in the ;; compile-window! ;; ;; IMPORTANT: A note for programming Elisp for packages which work during ;; activated ECB (for ECB itself too :-): ECB offers three macros for easy ;; temporally (regardless of the settings in `ecb-advice-window-functions'!) ;; using all original-functions, all adviced functions or only some adviced ;; functions: ;; - `ecb-with-original-functions' ;; - `ecb-with-adviced-functions' ;; - `ecb-with-some-adviced-functions' ;; ;;; History ;; ;; For the ChangeLog of this file see the CVS-repository. For a complete ;; history of the ECB-package see the file NEWS. ;;; Code: (eval-when-compile (require 'silentcomp)) (require 'ecb-util) (require 'ecb-speedbar) (require 'ecb-compilation) (require 'ecb-create-layout) ;; XEmacs (silentcomp-defvar scrollbars-visible-p) (silentcomp-defun window-displayed-height) (silentcomp-defvar pre-display-buffer-function) (silentcomp-defvar split-width-threshold) (silentcomp-defvar split-width-threshold) ;; for the display-buffer stuff of XEmacs (silentcomp-defun last-nonminibuf-frame) (silentcomp-defun check-argument-type) (silentcomp-defun buffer-dedicated-frame) (silentcomp-defun display-buffer-1) (silentcomp-defun frame-property) (silentcomp-defun window-leftmost-p) (silentcomp-defun window-rightmost-p) (silentcomp-defun window-parent) (silentcomp-defun window-previous-child) (silentcomp-defun window-next-child) (silentcomp-defun window-pixel-edges) (silentcomp-defun window-pixel-height) (silentcomp-defun record-buffer) (silentcomp-defun push-window-configuration) (silentcomp-defun set-frame-property) (silentcomp-defvar temp-buffer-shrink-to-fit) ;; Emacs (silentcomp-defvar scroll-bar-mode) ;; only Emacs 21 has this (silentcomp-defvar window-size-fixed) (silentcomp-defun fit-window-to-buffer) (silentcomp-defvar temp-buffer-resize-mode) (defvar ecb-layouts-reload-needed t) (defun ecb-load-layouts () "Load all defined layouts" (when ecb-layouts-reload-needed (require 'ecb-layout-defs) (if (file-readable-p ecb-create-layout-file) (load-file ecb-create-layout-file)) (setq ecb-layouts-reload-needed nil))) (defconst ecb-use-dedicated-windows t "Use dedicated windows for the ECB buffers.") (defgroup ecb-layout nil "Settings for the screen-layout of the Emacs code browser." :group 'ecb :prefix "ecb-") (defgroup ecb-compilation nil "Settings for the compile window of ECB." :group 'ecb-layout :prefix "ecb-") (defconst ecb-layout-option-set-function (function (lambda (symbol value) (set symbol value) ;; we must check this because otherwise the layout would be drawn ;; if we have changed the initial value regardless if ECB is ;; activated or not. (when (and (boundp 'ecb-minor-mode) ecb-minor-mode (frame-live-p ecb-frame)) (let ((curr-frame (selected-frame)) (ecb-redraw-layout-quickly nil)) (unwind-protect (progn (select-frame ecb-frame) (ecb-redraw-layout-full)) (select-frame curr-frame))))))) (defcustom ecb-select-edit-window-on-redraw nil "*Select the first edit window on `ecb-redraw-layout'." :group 'ecb-layout :type 'boolean) (defcustom ecb-new-ecb-frame nil "*Create a new frame at activation time of ECB." :group 'ecb-layout :type 'boolean) (defcustom ecb-activate-before-new-frame-created-hook nil "*Hook run before the new ECB-frame is created. This has only an effect if `ecb-new-ecb-frame' is not nil \(otherwise this hook is not evaluated)." :group 'ecb-layout :type 'hook) (defcustom ecb-layout-name "left8" "*Select a window layout of ECB. Value is any arbitrary string. There are four different types of layouts: left, right, top and left-right, which means the location of the ECB-tree-windows in the ECB-frame. Currently there are 20 predefined layouts; names the below. 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 name call `ecb-show-layout-help'. Currently available layouts: + Left layouts: left1 left2 left3 left4 left5 left6 left7 left8 left9 left10 left11 left12 left13 left14 left15 + Right layouts: right1 + Top layouts: top1 top2 + Left-right layouts: leftright1 leftright2 leftright3 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 layout with `ecb-redraw-layout'" :group 'ecb-layout :initialize 'custom-initialize-default :set (function (lambda (symbol value) (ecb-load-layouts) (if (fboundp (intern (format "ecb-layout-function-%s" value))) (funcall ecb-layout-option-set-function symbol value) (ecb-error "There is no layout with name %s available!" value)))) :type 'string) (defcustom ecb-compile-window-height nil "*Height of the durable compilation-window of ECB. If you want a compilation window shown at the bottom of the ECB-layout then set here the height of it \(Default is a height of 5). If you redraw the current layout with `ecb-redraw-layout' then the compilation window (if any) has the height you set here. If the number is less than 1.0 the height is a fraction of the frame height. If you do not set a durable compilation window then doing a compilation or displaying temp-buffers \(e.g. *Help*-buffers) splits temporally the edit window vertically if the edit window is not splitted already or uses the \"other\" edit window temporally for compilation output if the edit window is already splitted. This is the recommended value for this option because this is the standard-behavior of Emacs. Beware: If you set a durable compilation window then ECB displays all buffers for which `ecb-compilation-buffer-p' returns not nil in that durable compilation window. If a buffer which should being displayed there is not displayed there then try to modify the options `ecb-compilation-buffer-names', `ecb-compilation-major-modes' or `ecb-compilation-predicates' \(in this sequence). See also the options `ecb-compile-window-temporally-enlarge' and `ecb-enlarged-compilation-window-max-height' and also the command `ecb-toggle-compile-window-height'! 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 layout with `ecb-redraw-layout'" :group 'ecb-compilation :initialize 'custom-initialize-default :set (function (lambda (symbol value) (ecb-set-window-size-fixed nil) (funcall ecb-layout-option-set-function symbol value))) :type '(radio (const :tag "No compilation window" nil) (number :tag "Window height" :value 6))) (defcustom ecb-compile-window-width 'frame "*Width of the compile-window. Possible values are 'frame and 'edit-window. With 'frame the compile-window looks like: ------------------------------------------------------- | | | | Directories | | | | | |--------------| edit-window(s) | | | | | Methods | | | | | ------------------------------------------------------- | | | Compilation | | | ------------------------------------------------------- With 'edit-window the compile-window looks like: ------------------------------------------------------- | | | | Directories | | | | | |--------------| edit-window(s) | | | | | Methods | | | | | | |--------------------------------------- | | | | | Compilation | | | | ------------------------------------------------------- This option takes only effect if `ecb-compile-window-height' is not nil!" :group 'ecb-compilation :initialize 'custom-initialize-default :set (function (lambda (symbol value) (funcall ecb-layout-option-set-function symbol value))) :type '(radio (const :tag "Width of ECB-frame" :value frame) (const :tag "Width of edit-window" :value edit-window))) (defcustom ecb-compile-window-temporally-enlarge 'after-display "*Let Emacs temporally enlarge the compile-window of the ECB-layout. This option has only an effect if `ecb-compile-window-height' is not nil! The following values are possible: - 'after-display: After displaying a \"compilation-buffer\" \(in the sense of `ecb-compilation-buffer-p'!) in the compile-window of ECB. For the max. height of the enlarged compile-window see the option `ecb-enlarged-compilation-window-max-height'. - 'after-selection: selecting the `ecb-compile-window' auto. enlarges it and de-selecting \(means leaving `ecb-compile-window') auto. shrinks it. Enlarging and shrinking the `ecb-compile-window' is done with `ecb-toggle-compile-window-height'. See also the documentation of this function! - 'both: The combination of 'after-display and 'after-selection. - nil: ECB fixes always the height of the `ecb-compile-window' at the value of `ecb-compile-window-height'. To restore the ECB-layout after such a buffer-enlarge just call `ecb-toggle-compile-window-height' or `ecb-redraw-layout'." :group 'ecb-compilation :initialize 'custom-initialize-default :set ecb-layout-option-set-function :type '(radio (const :tag "After displaying a buffer in the compile-window" :value after-display) (const :tag "After selecting the compile window" :value after-selection) (const :tag "Both of them" :value both) (const :tag "Never" :value nil))) ;; A value of never makes no sense because it is not much effort to prevent ;; all interactive shrinking commands (incl. mouse-commands) from shrinking it ;; below ecb-compile-window-height and it is also not worth. IMHO preventing ;; in non-interactive calls and allowing interactively is the best choice. ;; Allowing always is also possible and easy to implement. (defcustom ecb-compile-window-prevent-shrink-below-height t "*Allow the compile-window to be shrunken below its height. A non nil value means ECB prevents the compile-window from being shrunken below the threshold of `ecb-compile-window-height' by displaying temp-buffers \(e.g. *Help* etc.) or after running compilations or greps. But interactively it is always allowed to shrink it to every height! If nil then ECB does nothing to prevent being shrunken below the value of `ecb-compile-window-height'. Default is t." :group 'ecb-compilation :type 'boolean) (defcustom ecb-enlarged-compilation-window-max-height 'best "*The max height of the compile-window after enlarging it. The max height of the compilation window after enlarged by `ecb-toggle-compile-window-height'. The following values are allowed: 'best: ECB fits the height of the compile-window exactly to the size of its current contents but never shrinks below the value of `ecb-compile-window-height' or enlarges over the half of the frame-height of the ECB-frame. The values of the options `compilation-window-height' and `temp-buffer-max-height' are taken into account dependent of the current `major-mode' of the buffer in the compile-window: If `compilation-mode' then `compilation-window-height' is used otherwise `temp-buffer-max-height'. 'half: 1/2 the frame-height of the ECB-frame Any number: Max height in lines. If the number is less than 1.0 the height is a fraction of the frame height \(e.g. 0.33 results in a max-height of 1/3 the frame-height)." :group 'ecb-compilation :type '(radio (const :tag "Compute best height" :value best) (const :tag "1/2 the frame height)" :value half) (number :tag "Height" :value 0.3))) (defcustom ecb-split-edit-window t "*Sets how and if the edit window should be splitted. But be aware: This option determines only if the edit-window should be splitted at start-time of ECB." :group 'ecb-layout :type '(radio (const :tag "Split as before ECB-start" :value t) (const :tag "Split horizontally" :value horizontal) (const :tag "Split vertically" :value vertical) (const :tag "Do not split" :value nil))) (defcustom ecb-windows-width 0.33 "*The width of the ECB windows in columns for left- and right layouts. If the number is less than 1.0 the width is a fraction of the frame width." :group 'ecb-layout :initialize 'custom-initialize-default :set ecb-layout-option-set-function :type 'number) (defcustom ecb-windows-height 0.33 "*The height of the ECB windows in lines for top layouts. If the number is less than 1.0 the width is a fraction of the frame height." :group 'ecb-layout :initialize 'custom-initialize-default :set ecb-layout-option-set-function :type 'number) (defcustom ecb-fix-window-size nil "*Fix size of the ECB-windows/buffers even after frame-resizing. The fix type \(valid values are nil, t, width and height) can either be set on a layout-basis \(means a different value for each layout) or one value can be set for all layouts. In the latter case there is an additional value 'auto which choose autom. the senseful fix-type depending on the current layout-type: For top-layouts the fix-type 'height and for all other layout-types the fix-type 'width. For a detailed description of the valid values see documentation of `window-size-fixed' which is newly introduced in GNU Emacs 21 and is only available there. Therefore this option takes only effect with GNU Emacs 21. Note1: Manually resizing the ECB-windows via `enlarge-window', `shrink-window', `mouse-drag-vertical-line' and `mouse-drag-mode-line' is still possible even if the window-sizes are fixed for frame-resizing! Note2: The description of `window-size-fixed' in the elisp-info-manual is more detailed than the description offered by \[C-h v]! Note3: With current Emacs 21.2.X there seems to be no distinction between 'width, 'height and t. Therefore this option takes no effect \(means all ecb-windows have always unfixed sizes) if `ecb-compile-window-height' is not nil. Per default no window-size fixing has been done." :group 'ecb-directories :initialize 'custom-initialize-default :set (function (lambda (sym value) (set sym value) (ecb-set-window-size-fixed (ecb-get-window-fix-type ecb-layout-name)))) :type '(radio (choice :tag "Fix type for all layouts" :menu-tag "Fix type for all layouts" (const :tag "Automatic" :value auto) (const :tag "Fix only width" :value width) (const :tag "Fix only height" :value height) (const :tag "Fix both" :value t) (const :tag "No fixing" :value nil)) (repeat :tag "With these layouts" (cons (string :tag "Layout name") (choice :tag "Fix type" :menu-tag "Fix type for all layouts" (const :tag "Fix only width" :value width) (const :tag "Fix only height" :value height) (const :tag "Fix both" :value t) (const :tag "No fixing" :value nil)))))) (defun ecb-get-window-fix-type (layout-name) "Determine which value of `window-size-fixed' we must set in all ecb-buffers of layout LAYOUT-NAME." (if (symbolp ecb-fix-window-size) (if (equal ecb-fix-window-size 'auto) (if (equal (ecb-get-layout-type ecb-layout-name) 'top) 'height 'width) ecb-fix-window-size) (cdr (assoc layout-name ecb-fix-window-size)))) (defun ecb-set-window-size-fixed (fix) "Set the buffer-local value of `window-size-fixed' in each visible ecb-window to FIX. If `ecb-compile-window-height' is not nil then set always nil!" (when ecb-running-emacs-21 (let ((l (ecb-canonical-ecb-windows-list))) (dolist (w l) (save-excursion (set-buffer (window-buffer w)) (setq window-size-fixed (if ecb-compile-window-height nil fix))))))) (defmacro ecb-do-with-unfixed-ecb-buffers (&rest body) "Evaluate BODY with unfixed size of all current-visible ecb-buffers and ensure that at the end \(either after finishing of BODY or after an error occurs during BODY) all now current visible ecb-buffers get the value of their buffer-local `window-size-fixed' from the setting in `ecb-fix-window-size'." `(unwind-protect (progn (ecb-set-window-size-fixed nil) ,@body) (ecb-set-window-size-fixed (ecb-get-window-fix-type ecb-layout-name)))) (defcustom ecb-other-window-jump-behavior 'all "*Which windows of ECB should be accessible by the command `other-window'. This has an effect if `other-window' is adviced by ECB, see `ecb-advice-window-functions'. The following settings are possible: - 'all: ECB will cycle through all windows of ECB, means it behaves like the original `other-window'. - 'only-edit: ECB will only cycle through the \(max. 2) edit-windows of ECB. - 'edit-and-compile: Like 'only-edit plus the compile window if any." :group 'ecb-layout :type '(radio (const :tag "All windows" all) (const :tag "Only edit windows" only-edit) (const :tag "Edit + compile window" edit-and-compile))) (defcustom ecb-advice-window-functions '(other-window delete-window delete-other-windows delete-windows-on split-window-horizontally split-window-vertically split-window switch-to-buffer switch-to-buffer-other-window display-buffer) "*Advice functions to be more intelligent if used with ECB. You can choose the following functions to be adviced by ECB so they behave as if the edit-window\(s) of ECB would be the only windows\(s) of the ECB-frame: - `other-window' For this one see also the option `ecb-other-window-jump-behavior'! - `delete-window' - `delete-other-windows' - `delete-windows-on' - `split-window-horizontally' - `split-window-vertically' - `split-window' If this is enabled then `split-window-vertically' and `split-window-horizontally' are autom. enabled too! - `switch-to-buffer' - `switch-to-buffer-other-window' - `display-buffer' Especially if `ecb-compile-window-height' is not nil it is strongly recommended not to disable this advice! - `other-window-for-scrolling' If this advice is enabled then the following functions scroll always the first edit-window if the edit-window is splitted, point stays in the \"other\" edit-window and there is no durable compilation-window \(see `ecb-compile-window-height'): - `scroll-other-window' - `scroll-other-window-down' - `beginning-of-buffer-other-window' - `end-of-buffer-other-window' This advice is per default not enabled. For working most conveniently with ECB it is the best to advice all these functions, because then all the standard shortcuts of these functions are also usable with ECB without doing anything else. Also other packages can interact best with ECB if these functions are all adviced. If these adviced functions are called in another frame than the ECB-frame they behave all exactly like the not adviced versions! But please read also the following: Normally all packages should work correct with ECB and itīs adviced functions but if there occur problems with a package cause of some of these adviced functions ECB offers the following fall-back solution: 1. Deactivate in `ecb-advice-window-functions' all the adviced-functions which make problems with other packages. 2. For every of the advice-able functions ECB offers a interactively function named \"ecb-\" which does exactly the same as the adviced version of . Use \"ecb-\" instead the original one to get the proper ECB behavior even if the function is not adviced anymore. 3. You can bind in `ecb-activate-hook' the standard-shortcut of to \"ecb-\" and rebind it in `ecb-deactivate-hook' to . 4. Now you have the best of both worlds: The problematic package works and you have the ECB-behavior of as if it would be adviced. Here is an example: Suppose you must deactivating the advice for `switch-to-buffer-other-window'. Then you deactivate this function with this option and you can use `ecb-switch-to-buffer-other-window' instead. Bind the shortcut you normally use for `switch-to-buffer-other-window' to `ecb-switch-to-buffer-other-window' \(use `ecb-activate-hook' for this) and rebind it to the original function in the `ecb-deactivate-hook'." :group 'ecb-layout :initialize 'custom-initialize-set :set (function (lambda (symbol value) (when (member 'split-window value) (add-to-list 'value 'split-window-vertically) (add-to-list 'value 'split-window-horizontally)) (set symbol value) (when (and (boundp 'ecb-minor-mode) ecb-minor-mode) (ecb-activate-adviced-functions value)))) :type '(set (const :tag "other-window" :value other-window) (const :tag "delete-window" :value delete-window) (const :tag "delete-other-windows" :value delete-other-windows) (const :tag "delete-windows-on" :value delete-windows-on) (const :tag "split-window-horizontally" :value split-window-horizontally) (const :tag "split-window-vertically" :value split-window-vertically) (const :tag "split-window" :value split-window) (const :tag "switch-to-buffer" :value switch-to-buffer) (const :tag "switch-to-buffer-other-window" :value switch-to-buffer-other-window) (const :tag "display-buffer" :value display-buffer) (const :tag "other-window-for-scrolling" :value other-window-for-scrolling))) (defcustom ecb-layout-always-operate-in-edit-window '(delete-window delete-other-windows display-buffer switch-to-buffer) "*Adviced window functions work always in the edit-window. If we are in an ECB special buffer (methods, directories, etc), and any of the adviced windowing functions is called \(see `ecb-advice-window-functions'), we will select the `ecb-edit-window' first. This is useful if you have any functions that use such functions and you don't want them to just error with a method complaining that the current buffer can not be split, or something similar. Because this may not be desirable in all situations and all adviced functions this can be enabled separately for every advisable function \(see also `ecb-advice-window-functions'). If the symbol of an adviced function is contained in the value of this option, then the edit-window is first selected otherwise either an error is reported or some other special reaction; see the documentation of the adviced functions for this. For `other-window', `other-window-for-scrolling' and `switch-to-buffer-other-window' this makes no sense, therefore you can not enable this for them. Per default this is enabled for `delete-window', `delete-other-windows', `switch-to-buffer' and `display-buffer'." :group 'ecb-layout :type '(set (const :tag "delete-window" :value delete-window) (const :tag "delete-other-windows" :value delete-other-windows) (const :tag "split-window-horizontally" :value split-window-horizontally) (const :tag "split-window-vertically" :value split-window-vertically) (const :tag "split-window" :value split-window) (const :tag "display-buffer" :value display-buffer) (const :tag "switch-to-buffer" :value switch-to-buffer))) (defun ecb-canonical-ecb-windows-list () "Return a list of all current visible special dedicated ECB-windows \(starting from the left-most top-most window) in the order `other-window' would walk through these windows." (delete nil (mapcar (function (lambda (elem) (if (window-dedicated-p elem) elem))) (ecb-window-list ecb-frame 0 (frame-first-window ecb-frame))))) (defcustom ecb-layout-window-sizes nil "*Specifies the sizes of the ECB windows for each layout. The easiest way \(and also the strongly recommended way) to change this variable is to change the window sizes by dragging the window borders using the mouse and then store the window sizes by calling the command `ecb-store-window-sizes'. Next time the layout is redrawn the values stored in this option will be used. If `ecb-store-window-sizes' is used then the windows sizes are stored per default as fractions of current frame-width and -height of the ecb-frame, so the stored values will \"work\" for other frame sizes too. But if you call `ecb-store-window-sizes' with a prefix-argument then the fixed values of current width and height are stored! If this option is set \"by hand\" \(i.e. not by `ecb-store-window-sizes') then the following is important: - It is recommended to use fractions of frame-width and -height!. - The order of the sequence of the inserted window sizes must be the same as `other-window' \(the not-adviced version!) would walk!" :group 'ecb-layout :initialize 'custom-initialize-default :set ecb-layout-option-set-function :type '(repeat (cons :tag "Window layout" (string :tag "Layout name") (repeat :tag "Window sizes" (cons (choice :tag "Width" :menu-tag "Width" :value 0.0 (const :tag "Default value" :value nil) (number :tag "Custom size")) (choice :tag "Height" :menu-tag "Height" (const :tag "Default value" :value nil) (number :tag "Custom size"))))))) (defcustom ecb-redraw-layout-quickly nil "If non-nil, we will attempt to redraw the layout quickly. Please read also carefully the documentation of `ecb-redraw-layout'." :type 'boolean :group 'ecb-layout) (defcustom ecb-toggle-layout-sequence '("left9" "left14") "*Toggle sequence for layout toggling with `ecb-toggle-layout'. Every element of this list has to be a valid layout-name \"string) i.e. either one of the predefined layouts or one of the user-defined layouts \(see `ecb-create-new-layout'). You can add here as many layouts as you want but to use this option most effective you should not add more than 2 or 3 layouts so every layout can be accessed very fast by toggling with `ecb-toggle-layout'. It is also senseful to add layouts which have the same principal outline, i.e. all their tree-buffers are on the same side of the frame and the tree-buffer-\"column\" \(or -\"row\") has identical size for the layouts. Recommended values are for example: - \(\"left10\" \"left15\"), toggles between methods and directories/history - \(\"left10\" \"left13\"), toggles between methods and directories - \(\"left10\" \"left14\"), toggles between methods and history - \(\"left10\" \"left13\" \"left14\"), toggles between methods, history and directories See also option `ecb-show-sources-in-directories-buffer'. This option makes only sense if the value is a list with more than 1 element!" :group 'ecb-layout :type '(repeat (string :tag "Layout name.")) :initialize 'custom-initialize-default :set (function (lambda (symbol value) (ecb-load-layouts) (dolist (name value) (if (and (boundp 'ecb-minor-mode) ecb-minor-mode (not (fboundp (intern (format "ecb-layout-function-%s" name))))) (ecb-error "There is no layout available with name %s!" name))) (set symbol value)))) (defcustom ecb-hide-ecb-windows-before-hook nil "*Hook run direct before the ECB windows will be hidden. Hiding is done either by `ecb-toggle-ecb-windows' or `ecb-hide-ecb-windows'. This means that at runtime of this hook all the ECB-tree-windows of current layout are visible." :group 'ecb-layout :type 'hook) (defcustom ecb-hide-ecb-windows-after-hook nil "*Hooks run direct after the ECB windows have been hidden. Hiding was done either by `ecb-toggle-ecb-windows' or `ecb-hide-ecb-windows'." :group 'ecb-layout :type 'hook) (defcustom ecb-show-ecb-windows-before-hook nil "*Hooks run direct before the ECB windows will be shown. Showing is done either by `ecb-toggle-ecb-windows' or `ecb-show-ecb-windows'. This means that at runtime of this hook the ECB-windows are still hidden. IMPORTANT: Showing the hidden ECB-windows is internally done by calling `ecb-redraw-layout' and therefore also the hooks `ecb-redraw-layout-before-hook' and `ecb-redraw-layout-after-hook' are evaluated. So there is the following sequence of hooks during the process of showing the hidden ECB-windows: 1. `ecb-show-ecb-windows-before-hook' 2. `ecb-redraw-layout-before-hook' 3.