Next: , Previous: Ascii-based styles, Up: Tree-buffer styles Which images are used for the tree

Depending on the value of ecb-tree-buffer-style and the image-support of (X)Emacs, the tree-buffer try to use images instead of strings to draw a nice-looking tree.

If images can and should be used then the option ecb-tree-image-icons-directories tells ECB where to search for suitable image-icons for each of the nine image-names (see above). An image is used for displaying a control with name “XXX” if one of the directories of ecb-tree-image-icons-directories contains an image-file with basename “ecb-XXX” and an extension which is supported by (X)Emacs. Currently supported extensions are “.xpm”, “.png”, “.gif”, “.jpeg”, .”jpg” and “.xbm”.

Example: To display the control with name “open” with a suitable image then one of the directories of ecb-tree-image-icons-directories must contain a file with name “ecb-open.xpm” or “ecb-open.png” etc. See the description of this option to get all important details how and in which sequence ECB searches the directories of ecb-tree-image-icons-directories.

ECB comes with predefined default-images usable for every tree-buffer and special images for the Directories- and the Methods-tree-buffer. They are defined in several different heights - so for the most senseful font-heights of a tree-buffer a fitting image-size should be available. The shipped images reside either in the subdirectory "ecb-images" of the ECB-installation or - if ECB is installed as regular XEmacs-package - in the ECB-etc data-directory (the directory returned by evaluating (locate-data-directory "ecb"). If you do not want to change the images then you normally have nothing to do because the default value of ecb-tree-image-icons-directories points already to the correct image-directories.

A special remark for XEmacs:

At least XEmacs 21.14 (but probably previous versions too) has a bug in its display-engine which prevents adjacent images to be displayed correctly. The effect is, that in a row of two or more adjacent images (e.g. end-guide+handle+open - see the tree-example above) always all images are masked by the last one, means only the last one is visible. If at least one normal character (e.g. a space) is placed between two images then the images are displayed correctly. Therefore ECB has implemented the following work-around to get best possible results with XEmacs: open-, close-, empty-, leaf-, guide-, end-guide- and no-guide-images are displayed with images and the handle- and the no-handle-images are displayed with the corresponding ascii-symbols (which is “-” rsp. “ ”). The face (the color) of the handle-symbol is customizable via the option ecb-tree-guide-line-face.

This bug is already reported to the XEmacs-team. If your XEmacs has fixed this bug then add the following to your .emacs-file (or whereever your emacs-setup is located):

   (setq tree-buffer-enable-xemacs-image-bug-hack nil)

Then ECB uses images without any special work-around with XEmacs too. Just try it - if the tree-buffers look ugly then the XEmacs-bug is probably not fixed correctly.