File: eieio-speedbar.el.html

This provides some classes that can be used as a parent which will automatically provide SPEEDBAR support for any list of objects of that type.

This file requires speedbar version 0.10 or later.

; Creating a new speedbar mode based on a pre-existing object hierarchy

To create a new speedbar mode based on lists of objects is easier than creating a whole new speedbar mode from scratch.

1) Objects that will have lists of items that can be expanded
   should also inherit from the classes:
 * eieio-speedbar(var)/eieio-speedbar(fun) - specify your own button behavior
 * eieio-speedbar-directory-button(var)/eieio-speedbar-directory-button(fun) - objects that behave like directories
 * eieio-speedbar-file-button(var)/eieio-speedbar-file-button(fun) - objects that behave like files

2) Objects that have lists of children should implement the method
   eieio-speedbar-object-children which returns a list of more
   objects, or a list of strings.

3) Objects that return a list of strings should also implement these
   methods:
 * eieio-speedbar-child-make-tag-lines - make tag lines for a child.
 * eieio-speedbar-child-description - describe non-object children

4) Objects which have expanded information should implement the method
   eieio-speedbar-description to produce more information.

5) Objects that are associated with a directory should implement
   the method eieio-speedbar-derive-line-path which returns a
   path.

6) Objects that have a specialized behavior when clicked should
   define the method eieio-speedbar-handle-click.

To initialize a new eieio based speedbar display, do the following.

1) Create a keymap variable foo-speedbar-key-map.
   This keymap variable should be initialized in a function.
   If you have no special needs, use eieio-speedbar-key-map

2) Create a variable containing an easymenu definition compatible
   with speedbar. if you have no special needs, use
   eieio-speedbar-menu.

3) Create a function which returns the top-level list of children
   objects to be displayed in speedbar.

4) Call eieio-speedbar-create as specified in it's documentation
   string. This will automatically handle cases when speedbar is
   not already loaded, and specifying all overload functions.

5) Create an initializer function which looks like this:

(defun my-speedbar-mode-initialize ()
  "documentation"
  (interactive)
  (speedbar-frame-mode 1)
  (speedbar-change-initial-expansion-list mymodename)
  (speedbar-get-focus))

where mymodename is the same value as passed to eieio-speedbar-create as the MODENAME parameter.

@todo - Can we make this ECB friendly?

Defined variables (2)

eieio-speedbar-key-mapA generic object based speedbar display keymap.
eieio-speedbar-menuMenu part in easymenu format used in speedbar while browsing objects.

Defined functions (34)

eieio-speedbar(&rest _)
eieio-speedbar--eieio-childp(OBJ)
eieio-speedbar-buttons(DIR-OR-OBJECT DEPTH FETCHER)
eieio-speedbar-child-description(ARG &rest ARGS)
eieio-speedbar-child-make-tag-lines(ARG &rest ARGS)
eieio-speedbar-child-p(OBJ)
eieio-speedbar-create(MAP-FN MAP-VAR MENU-VAR MODENAME FETCHER)
eieio-speedbar-create-engine(MAP-FN MAP-VAR MENU-VAR MODENAME FETCHER)
eieio-speedbar-customize-line()
eieio-speedbar-derive-line-path(ARG &rest ARGS)
eieio-speedbar-description(ARG &rest ARGS)
eieio-speedbar-directory-button(&rest _)
eieio-speedbar-directory-button--eieio-childp(OBJ)
eieio-speedbar-directory-button-child-p(OBJ)
eieio-speedbar-directory-button-list-p(ARG1)
eieio-speedbar-directory-button-p(OBJ)
eieio-speedbar-expand(ARG &rest ARGS)
eieio-speedbar-file-button(&rest _)
eieio-speedbar-file-button--eieio-childp(OBJ)
eieio-speedbar-file-button-child-p(OBJ)
eieio-speedbar-file-button-list-p(ARG1)
eieio-speedbar-file-button-p(OBJ)
eieio-speedbar-find-nearest-object(&optional DEPTH)
eieio-speedbar-handle-click(OBJECT)
eieio-speedbar-item-info()
eieio-speedbar-line-path(&optional DEPTH)
eieio-speedbar-list-p(ARG1)
eieio-speedbar-make-map()
eieio-speedbar-make-tag-line(ARG &rest ARGS)
eieio-speedbar-object-buttonname(ARG &rest ARGS)
eieio-speedbar-object-children(ARG &rest ARGS)
eieio-speedbar-object-click(TEXT TOKEN INDENT)
eieio-speedbar-object-expand(TEXT TOKEN INDENT)
eieio-speedbar-p(OBJ)

Defined faces (0)