1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
|
<html lang="en">
<head>
<title>ECB - the Emacs Code Browser</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name=description content="ECB - the Emacs Code Browser">
<meta name=generator content="makeinfo 4.2">
<link href="http://www.gnu.org/software/texinfo/" rel=generator-home>
</head>
<body>
<p>
Node:<a name="A%20new%20tree-buffer">A new tree-buffer</a>,
Next:<a rel=next accesskey=n href="A-new-tree-node.html#A%20new%20tree-node">A new tree-node</a>,
Previous:<a rel=previous accesskey=p href="Introduction.html#Introduction">Introduction</a>,
Up:<a rel=up accesskey=u href="tree-buffer.html#tree-buffer">tree-buffer</a>
<hr><br>
<h4>How to create a new tree-buffer</h4>
<p>The creator-function for a new tree-buffer depends on the fact if the
new tree-buffer should be used as an ECB-interactor or not. For a new
ECB-interactor the macro <code>defecb-tree-buffer-creator</code> has to be
used, otherwise the function <code>tree-buffer-create</code>. In the end
both methods use <code>tree-buffer-create</code> because the BODY-argument
of <code>defecb-tree-buffer-creator</code> must contain a call to this
function!.
<p>This section describes all arguments of <code>tree-buffer-create</code>.
<p>Except the first argument <var>NAME</var> all arguments are key-arguments
of the form :arg-name arg-value, so for example a call looks like
<br><pre>(tree-buffer-create <buffer-name> :frame <frame-object> ...).
</pre>
<p>These key-arguments (all except the first argument <code>NAME</code>) can be
arranged in any arbitrary order but all of them are not-optional! The
key-arg-name is always a : followed by the lowercase version of the
mentioned argument below (e.g. <code>FRAME</code> -> :frame,
<code>MOUSE-ACTION-TRIGGER</code> -> :mouse-action-trigger).
<p>Here is a description of the arguments of <code>tree-buffer-create</code> -
also available as docstring for this function (via <kbd>C-h f</kbd>). The
description below contains also some examples for complex-arguments!
<dl>
<br><dt><code><code>NAME</code></code>
<dd>Buffername of the new tree-buffer.
<br><dt><code><var>FRAME</var></code>
<dd>Frame in which the tree-buffer is displayed and valid. All
key-bindings and interactive functions of the tree-buffer work only if
called in <var>FRAME</var> otherwise nothing is done!
<br><dt><code><var>MOUSE-ACTION-TRIGGER</var></code>
<dd>When a mouse-action is triggered. Allowed values:
<code>button-release</code> and <code>button-press</code>.
<br><dt><code><var>IS-CLICK-VALID-FN</var></code>
<dd><code>tree-buffer-create</code> rebinds <kbd>mouse-1</kbd>, <kbd>mouse-2</kbd>,
<kbd>RET</kbd> (and <kbd>TAB</kbd>) and also in combination with shift and
control (not with <kbd>TAB</kbd>). <var>IS-CLICK-VALID-FN</var> is called first
if a node or an expand-symbol is clicked. This function is called with
five arguments:
<ul>
<li>mouse-button:
The clicked mouse-button or RET or TAB (0 = RET or TAB, 1 = mouse-1, 2
= mouse 2)
<li>shift-pressed:
Non nil if the SHIFT-key was pressed during mouse-click or RET.
<li>control-pressed:
Non nil if the CONTROL-key was pressed during mouse-click or RET.
<li>meta-pressed:
Non nil if the META-key was pressed during mouse-click or RET.
<li>tree-buffer-name:
The buffer-name of the tree-buffer where the node has been clicked.
</ul>
<p>The function must return not nil iff exactly this click/hit is
accepted. If the function returns nil then really nothing is done by
the tree-buffer after this click/hit!
<p>Here is an example (call <kbd>C-h f</kbd> to see what it does) for this
callback-function:
<br><pre>(defun ecb-interpret-mouse-click (mouse-button
shift-pressed
control-pressed
meta-pressed
tree-buffer-name)
(if (eq mouse-button 0)
(list (if control-pressed 2 1) shift-pressed meta-pressed
'keyboard)
(if (and (not (eq mouse-button 1)) (not (eq mouse-button 2)))
nil
(case ecb-primary-secondary-mouse-buttons
(mouse-1--mouse-2
(if control-pressed
nil
(list mouse-button shift-pressed meta-pressed 'mouse)))
(mouse-1--C-mouse-1
(if (not (eq mouse-button 1))
nil
(list (if control-pressed 2 1) shift-pressed meta-pressed
'mouse)))
(mouse-2--C-mouse-2
(if (not (eq mouse-button 2))
nil
(list (if control-pressed 2 1) shift-pressed meta-pressed
'mouse)))
(otherwise nil)))))
</pre>
<p>This example would be passed as parameter as follows:
<br><pre>(tree-buffer-create "myname"
:is-click-valid-fn 'ecb-interpret-mouse-click
...)
</pre>
<br><dt><code><var>NODE-SELECTED-FN</var></code>
<dd>Function to call if a node has been selected. This function
is called with the following parameters:
<ul>
<li>node: The selected node
<li>mouse-button (0 = RET, 1 = mouse-1, 2 = mouse 2)
<li>shift-pressed
<li>control-pressed
<li>meta-pressed
<li>tree-buffer-name
</ul>
<p>For the last four arguments see the description above. This function
has to ensure that the expandable- and expanded-state of the selected
node is correct after returning.
<p>Here is an example (call <kbd>C-h f</kbd> to see what it does) for this
callback-function:
<br><pre>(defun ecb-tree-buffer-node-select-callback (node
mouse-button
shift-pressed
control-pressed
meta-pressed
tree-buffer-name)
(let* ((ecb-button-list (ecb-interpret-mouse-click mouse-button
shift-pressed
control-pressed
meta-pressed
tree-buffer-name))
(ecb-button (nth 0 ecb-button-list))
(shift-mode (nth 1 ecb-button-list))
(meta-mode (nth 2 ecb-button-list))
(keyboard-p (equal (nth 3 ecb-button-list) 'keyboard))
(maximized-p (ecb-buffer-is-maximized-p tree-buffer-name)))
;; now we dispatch to the right action
(when ecb-button-list
(cond ((ecb-string= tree-buffer-name ecb-directories-buffer-name)
(ecb-directory-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-sources-buffer-name)
(ecb-source-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-history-buffer-name)
(ecb-history-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-methods-buffer-name)
(ecb-method-clicked node ecb-button nil shift-mode
meta-mode))
((ecb-string= tree-buffer-name ecb-analyse-buffer-name)
(ecb-analyse-node-clicked node ecb-button nil shift-mode
meta-mode))
(t nil)))))
</pre>
<p>This example would be passed as parameter as follows:
<br><pre>(tree-buffer-create "myname"
:node-selected-fn 'ecb-tree-buffer-node-select-callback
...)
</pre>
<p><strong>IMPORTANT</strong>: This callback must not modify the slot
<var>EXPANDED</var> of the passed node because this is done automatically
by the tree-buffer-library!
<br><dt><code><var>NODE-EXPANDED-FN</var></code>
<dd>Function to call if a node is expandable, point stays onto the
expand-symbol and node is not already expanded. This function is
called with the following parameters:
<ul>
<li>node: The selected node
<li>mouse-button (0 = TAB, 1 = mouse-1, 2 = mouse 2)
<li>shift-pressed
<li>control-pressed
<li>meta-pressed
<li>tree-buffer-name
</ul>
<p>This function should add all children nodes to this node if not
already done (if possible). This function has to ensure that the
expandable- and expanded state of the selected node is correct after
returning!
<p><strong>IMPORTANT</strong>: This callback must not modify the slot
<var>EXPANDED</var> of the passed node because this is done automatically
by the tree-buffer-library!
<br><dt><code><var>NODE-COLLAPSED-FN</var></code>
<dd>Function to call if a node is expandable, point stays onto the
expand-symbol and node is already expanded. This function is called
with the following parameters:
<ul>
<li>node: The selected node
<li>mouse-button (0 = TAB, 1 = mouse-1, 2 = mouse 2)
<li>shift-pressed
<li>control-pressed
<li>meta-pressed
<li>tree-buffer-name
</ul>
<p>This function is only a callback to inform the owner/user of this
tree-buffer that this node has been collapsed. This function must not
modify the expandable- or expanded state of the selected node!
<p>Often a sensefull value for this parameter is the function
<code>ignore</code>.
<p><strong>IMPORTANT</strong>: This callback must not modify the slot
<var>EXPANDED</var> of the passed node because this is done automatically
by the tree-buffer-library!
<br><dt><code><var>NODE-MOUSE-OVER-FN</var></code>
<dd>Function to call when the mouse is moved over a node. This function is
called with three arguments: NODE, WINDOW, NO-PRINT, each of them
related to the current tree-buffer. If NO-PRINT is nil then the
function must print the text itself in any manner. This function must
always return the text which either is printed by the function itself
or by the caller (if NO-PRINT is not nil). The current buffer for this
function is the tree-buffer itself. With XEmacs this function is only
called if the tree-buffer track-mouse mechanism is activated (see the
function <code>tree-buffer-activate-follow-mouse</code>). With GNU Emacs >=
21 this function is called by the <code>help-echo</code> property added to
each node.
<p>Here is an example (call <kbd>C-h f</kbd> to see what it does) for this
callback-function:
<br><pre>(defun ecb-mouse-over-analyse-node (node &optional window no-message
click-force)
(let ((str (when (or click-force
(ecb-show-minibuffer-info
node window
(car ecb-analyse-show-node-info)))
(if (equal (cdr ecb-analyse-show-node-info)
'full-info)
(ecb-analyse-gen-tag-info
(car (tree-node->data node)))
(tree-node->name node)))))
(prog1 str
(unless no-message
(ecb-nolog-message str)))))
</pre>
<br><dt><code><var>MOUSE-HIGHLIGHT-FN</var></code>
<dd>If nil then in this tree-buffer no node is highlighted when the mouse
moves over it. If t then each node is highlighted when the mouse moves
over it. If a function then it is called with the node as argument and
if it returns not nil then the node will be highlighted when the mouse
moves over it - otherwise no highlighting takes place.
<br><dt><code><var>NODE-DATA-EQUAL-FN</var></code>
<dd>Function used by the tree-buffer to test if the data of two tree-nodes
are equal. The function is called with two args: The DATA-slots of the
two tree-nodes (see <a href="A-new-tree-node.html#A%20new%20tree-node">A new tree-node</a> for details about the
data-slots).
<p>Here is an example (call <kbd>C-h f</kbd> to see what it does) for this
callback-function:
<br><pre>(defun ecb-analyse-compare-node-data (left right)
"Return not nil when LEFT and RIGHT are identical node-datas."
(and (equal (nth 2 left) (nth 2 right))
(ecb-compare-methods-buffer-node-data (car left)
(car right))))
</pre>
<p>Often a suitable value for this parameter is <code>equal</code>.
<br><dt><code><var>MAYBE-EMPTY-NODE-TYPES</var></code>
<dd>Nil or a list of node-types (a node-type is an integer which must be
set with <code>tree-node-new</code>). Nodes with one of these types are
treated as empty if they are not expandable (i.e. they have no
children) and will be displayed with the empty-symbol ([x]); for other
nodes see next argument.
<br><dt><code><var>LEAF-NODE-TYPES</var></code>
<dd>Nil or a list of node-types (see above). Nodes with one of these types
are treated as leafs and will be displayed with the leaf-symbol (*).
<p>Summary for <var>MAYBE-EMPTY-NODE-TYPES</var> and <var>LEAF-NODE-TYPES</var>:
<ul>
<li>Expandable nodes will always be displayed either with the open- or
with the close-symbol.
<li>Not-expandable nodes with a node-type contained in
<var>MAYBE-EMPTY-NODE-TYPES</var> will be displayed with the empty-symbol.
<li>Not-expandable nodes with a node-type contained in
<var>LEAF-NODE-TYPES</var> will be displayed with the leaf-symbol.
<li>All other nodes will be displayed with no symbol just with correct
indentation.
</ul>
<br><dt><code><var>MENU-CREATOR</var></code>
<dd>Nil or function which has to return nil or a list of conses, each cons
for a known node-type of this tree-buffer (the node-type of a node is
an integer). Example: ((0 . menu-for-type-0) (1 . menu-for-type-1)).
The cdr of a cons must be a menu in the same format
<code>tree-buffer-create-menu</code> expects as argument - see the
documentation of this function for details. This function gets two
arguments: The name of the tree-buffer and the node for which a
popup-menu should be opened.
<p>Here is an example for such a menu-creator-callback:
<br><pre>(defconst ecb-analyse-nodedata-tag-with-pos 0)
(defconst ecb-analyse-nodedata-tag-without-pos 1)
(defconst ecb-analyse-nodedata-no-tag 2)
(defconst ecb-analyse-nodetype-bucket 0)
(defconst ecb-analyse-nodetype-context 1)
(defconst ecb-analyse-nodetype-arguments 2)
(defconst ecb-analyse-nodetype-completions 3)
(defconst ecb-analyse-nodetype-localvars 4)
(defconst ecb-analyse-nodetype-prefix 5)
(defconst ecb-analyse-nodetype-assignee 6)
(defconst ecb-analyse-nodetype-function 7)
(defconst ecb-analyse-nodetype-function-arg 8)
(defun ecb-analyse-create-menu (node)
"Return a popup-menu suitable for NODE."
(let* ((data (tree-node->data node))
(tag-p (not (equal (nth 1 data) ecb-analyse-nodedata-no-tag)))
(tag-with-pos-p (equal (nth 1 data)
ecb-analyse-nodedata-tag-with-pos))
(nodetype (nth 2 data)))
(delq nil (list (if (equal nodetype ecb-analyse-nodetype-completions)
'(ecb-analyse-complete "Complete"))
(if tag-p
'(ecb-analyse-show-tag-info "Show tag info"))
(if tag-with-pos-p
'(ecb-analyse-jump-to-tag "Jump to tag"))))))
(defun ecb-analyse-menu-creator (tree-buffer-name node)
"Creates the popup-menus for the analyse-buffer."
(let ((nodetype (tree-node->type node)))
(unless (equal nodetype ecb-analyse-nodetype-bucket)
(mapcar (function (lambda (type)
(cons type (ecb-analyse-create-menu node))))
`(,ecb-analyse-nodetype-context
,ecb-analyse-nodetype-arguments
,ecb-analyse-nodetype-completions
,ecb-analyse-nodetype-localvars
,ecb-analyse-nodetype-prefix
,ecb-analyse-nodetype-assignee
,ecb-analyse-nodetype-function
,ecb-analyse-nodetype-function-arg)))))
</pre>
<p>This example would be passed as parameter as follows:
<br><pre>(tree-buffer-create "myname"
:menu-creator 'ecb-analyse-menu-creator
...)
</pre>
<br><dt><code><var>MENU-TITLES</var></code>
<dd>Nil or a list conses, each cons for a node-type. See
<var>MENU-CREATOR</var>. The cdr of a cons must be either a string or a
function which will be called with current node under point and must
return a string which is displayed as the menu-title.
<br><dt><code><var>MODELINE-MENU-CREATOR</var></code>
<dd>Nil or a function which has to return nil or a menu in the same format
<code>tree-buffer-create-menu</code> expects as argument - see the
documentation of this function for details. This function gets one
argument: The name of the tree-buffer. If the function returns a menu
then this menu will be displayed when the user clicks with
mouse-button 3 at the modeline of the tree-buffer. The menu-title will
be "Tree-buffer modeline-menu".
<br><dt><code><var>TRUNC-LINES</var></code>
<dd>Should lines in this tree buffer be truncated (not nil).
<br><dt><code><var>READ-ONLY</var></code>
<dd>Should the treebuffer be read-only (not nil).
<br><dt><code><var>TREE-INDENT</var></code>
<dd>Spaces subnodes should be indented. Ignored if <var>TREE-STYLE</var> is
<code>image</code> (see below).
<br><dt><code><var>INCR-SEARCH-P</var></code>
<dd>Should the incremental search be enabled in the tree-buffer. Three
choices: <code>prefix</code>, <code>substring</code>, <code>nil</code>. See the command
<code>tree-buffer-incremental-node-search</code>.
<br><dt><code><var>INCR-SEARCH-ADDITIONAL-PATTERN</var></code>
<dd>Every search-pattern is prefixed with a regexp to jump over not
important stuff of a displayed node-name at incr. search.. This is per
default: beginning spaces and guide characters (|`-) and all
expand/collapse-buttons [+], [x], rsp. [-]!
<p>If this argument is not nil then it must be a cons-cell where car is a
string which should be a regexp-pattern which is added to the
basic-prefix pattern (see above) and both of them prefix the
incr-search-pattern. The cdr is the number of subexpressions in this
additoonal pattern.
<br><dt><code><var>ARROW-NAVIGATION</var></code>
<dd>If not nil then a smart navigation with arrow keys is offered:
<ul>
<li>Left-arrow:
If node is expanded then it will be collapsed otherwise point
jumps to the next "higher" node in the hierarchical tree (higher means
the next higher tree-level or - if no higher level available - the next
higher node on the same level).
<li>Right-arrow:
If node is not expanded then it will be expanded.
<p>Onto a not expandable node the horizontal arrow-keys go one character in the
senseful correct direction.
</p><li>Up- and down-key:
Point jumps to the first character of the previous (up) rsp. next node
(down). "First" character means either the first character of the
expand-symbol (in case <var>EXPAND-SYMBOL-BEFORE-P</var> is not nil) or of
the displayed node-name. Or with other words: The first
non-indentation and non-guide-line (see <var>TREE-STYLE</var>) character of
a node.
</ul>
<br><dt><code><var>HOR-SCROLL-STEP</var></code>
<dd>Number of columns a hor. scroll in the tree-buffer should scroll. If
not nil then <kbd>M-mouse-1</kbd> and <kbd>M-mouse-2</kbd> scroll left and right
and also <kbd>M-<left-arrow></kbd> and <kbd>M-<right-arrow></kbd>. Ignored with
XEmacs.
<br><dt><code><var>DEFAULT-IMAGES-DIR</var></code>
<dd>Full path where the default images for the tree-buffer can be found.
It should contain an image for every name of
<code>tree-buffer-tree-image-names</code>.
<br><dt><code><var>ADDITIONAL-IMAGES-DIR</var></code>
<dd>Additional image-dir which should be searched first for images needed
for current tree-buffer. If the image can not be found in this
directory then <var>DEFAULT-IMAGES-DIR</var> is searched. If the image can't even
found here the related ascii-symbol is used.
<br><dt><code><var>IMAGE-FILE-PREFIX</var></code>
<dd>Common prefix for all image-files for this tree-buffer, e.g. "ecb-".
<br><dt><code><var>TREE-STYLE</var></code>
<dd>There are three different styles available: Image-style (value
<code>image</code>): Very nice and modern because image-icons are used to display
the tree-buffer. For this style the arguments <var>TREE-INDENT</var> and
<var>EXPAND-SYMBOL-BEFORE-P</var> have no effect.
<p>Ascii-style with guide-lines (value <code>ascii-guides</code>) and
ascii-style without guidelines (value <code>ascii-no-guides</code>. See
<a href="Tree-buffer-styles.html#Tree-buffer%20styles">Tree-buffer styles</a> for details about the tree-styles.
<p>Both ascii-styles are affected by the args <var>TREE-INDENT</var> and
<var>EXPAND-SYMBOL-BEFORE-P</var>.
<br><dt><code><var>ASCII-GUIDE-FACE</var></code>
<dd>If <var>TREE-STYLE</var> is <code>ascii-guides</code> then this defines the face
the guides should be displayed with.
<br><dt><code><var>TYPE-FACER</var>:</code>
<dd>Nil or a list of one or more conses, each cons for a node-type (a
node-type is an integer which must be set with <code>tree-node-new</code>).
The cdr of a cons can be:
<ul>
<li>a face-symbol
<li>a function-symbol which gets two arguments (see
<code>tree-buffer-insert-text</code>). This function can do anything, but
normally it should face a tree-node.
<li>the symbol t. Then the tree-buffer assumes that the node-text is
already faced and therefore it does not face the node, means it does
nothing then inserting the node-text, if the tree-buffer is updated.
</ul>
<br><dt><code><var>EXPAND-SYMBOL-BEFORE-P</var></code>
<dd>If not nil then the expand-symbol is displayed before the node-text.
Ignored when <var>TREE-STYLE</var> is <code>image</code> and Emacs can display
images.
<br><dt><code><var>HIGHLIGHT-NODE-FACE</var></code>
<dd>Face used for highlighting current selected node in this
tree-buffer.
<br><dt><code><var>GENERAL-FACE</var></code>
<dd>General face in which the whole tree-buffer should be displayed.
<br><dt><code><var>AFTER-CREATE-HOOK</var>:</code>
<dd>A function or a list of functions (with no arguments) called directly
after creating the tree-buffer and defining it's local keymap. For
example such a function can add additional key-bindings for this
tree-buffer local keymap (use <code>local-set-key</code> for this).
<p>Here is an example for such a hook:
<br><pre>(defun ecb-common-after-tree-buffer-create-actions ()
"Things which should be performed after creating a tree-buffer.
The tree-buffer is the current buffer."
(local-set-key (kbd "C-t")
'ecb-toggle-do-not-leave-window-after-select)
(if ecb-running-xemacs
(define-key modeline-map
'(button2up)
'ecb-toggle-maximize-ecb-window-with-mouse)
(local-set-key [mode-line mouse-2]
'ecb-toggle-maximize-ecb-window-with-mouse)))
</pre>
<br><dt><code><var>AFTER-UPDATE-HOOK</var>:</code>
<dd>A function or a list of functions (with no arguments) called each time
after the tree-buffer has been updated via <code>tree-buffer-update</code>.
</dl>
<p>Here is an example how to create a tree-buffer (if you want a
tree-buffer not for ECB then just strip off the
<code>defecb-tree-buffer-creator</code> and just call
<code>tree-buffer-create</code>):
<br><pre>(defecb-tree-buffer-creator ecb-create-analyse-tree-buffer
ecb-analyse-buffer-name
"Create the tree-buffer for analyse-display."
(tree-buffer-create
ecb-analyse-buffer-name
:frame ecb-frame
:mouse-action-trigger ecb-tree-mouse-action-trigger
:is-click-valid-fn 'ecb-interpret-mouse-click
:node-selected-fn 'ecb-tree-buffer-node-select-callback
:node-expanded-fn 'ecb-tree-buffer-node-expand-callback
:node-collapsed-fn 'ecb-tree-buffer-node-collapsed-callback
:node-mouse-over-fn 'ecb-mouse-over-analyse-node
:mouse-highlight-fn 'ecb-analyse-node-mouse-highlighted-p
:node-data-equal-fn 'ecb-analyse-compare-node-data
:maybe-empty-node-types nil
:leaf-node-types nil
:menu-creator 'ecb-analyse-menu-creator
:menu-titles (ecb-analyse-gen-menu-title-creator)
:modeline-menu-creator 'ecb-common-tree-buffer-modeline-menu-creator
:trunc-lines (ecb-member-of-symbol/value-list
ecb-analyse-buffer-name
ecb-tree-truncate-lines)
:read-only t
:tree-indent ecb-tree-indent
:incr-search-p t
:incr-search-additional-pattern nil
:arrow-navigation ecb-tree-navigation-by-arrow
:hor-scroll-step ecb-tree-easy-hor-scroll
:default-images-dir (car ecb-tree-image-icons-directories)
:additional-images-dir (ecb-member-of-symbol/value-list
ecb-analyse-buffer-name
(cdr ecb-tree-image-icons-directories)
'car 'cdr)
:image-file-prefix "ecb-"
:tree-style ecb-tree-buffer-style
:ascii-guide-face ecb-tree-guide-line-face
:type-facer nil
:expand-symbol-before-p ecb-tree-expand-symbol-before
:highlight-node-face ecb-analyse-face
:general-face ecb-analyse-general-face
:after-create-hook (append
(list (lambda ()
(ecb-common-after-create-actions)))
ecb-common-tree-buffer-after-create-hook
ecb-analyse-buffer-after-create-hook)
:after-update-hook nil))
</pre>
</body></html>
|