341 drawVLinesFromLevel := lv. |
341 drawVLinesFromLevel := lv. |
342 self invalidate |
342 self invalidate |
343 ] |
343 ] |
344 ! |
344 ! |
345 |
345 |
346 showDirectoryIndicator |
|
347 "returns true if directories has an open/closed indicator |
|
348 " |
|
349 ^ showDirectoryIndicator |
|
350 ! |
|
351 |
|
352 showDirectoryIndicator:aState |
|
353 "set or clear open/closed indicator for directories |
|
354 " |
|
355 "show or hide lines |
|
356 " |
|
357 aState ~~ showDirectoryIndicator ifTrue:[ |
|
358 showDirectoryIndicator := aState. |
|
359 self recomputeDirectoryIndicator. |
|
360 self invalidate |
|
361 ]. |
|
362 ! |
|
363 |
|
364 showDirectoryIndicatorForRoot |
|
365 "returns true if root directory has an open/closed indicator if |
|
366 the common showDirectoryIndicator is enabled |
|
367 " |
|
368 ^ showDirectoryIndicatorForRoot |
|
369 ! |
|
370 |
|
371 showDirectoryIndicatorForRoot:aState |
|
372 "true if root directory has an open/closed indicator if |
|
373 the common showDirectoryIndicator is enabled |
|
374 " |
|
375 aState ~~ showDirectoryIndicator ifTrue:[ |
|
376 showDirectoryIndicatorForRoot := aState. |
|
377 self recomputeDirectoryIndicator. |
|
378 self invalidate |
|
379 ]. |
|
380 ! |
|
381 |
|
382 showLines |
|
383 "returns true if lines are shown |
|
384 " |
|
385 ^ showLines |
|
386 ! |
|
387 |
|
388 showLines:aState |
|
389 "show or hide lines |
|
390 " |
|
391 aState ~~ showLines ifTrue:[ |
|
392 showLines := aState. |
|
393 self invalidate |
|
394 ]. |
|
395 ! |
|
396 |
|
397 showRoot |
|
398 "list with or without root |
|
399 " |
|
400 ^ showRoot |
|
401 ! |
|
402 |
|
403 showRoot:aState |
|
404 "list with or without root |
|
405 " |
|
406 showRoot ~~ aState ifTrue:[ |
|
407 model showRoot:(showRoot := aState). |
|
408 ]. |
|
409 ! |
|
410 |
|
411 supportsExpandAll |
346 supportsExpandAll |
412 ^ supportsExpandAll |
347 ^ supportsExpandAll |
413 ! |
348 ! |
414 |
349 |
415 supportsExpandAll:aBool |
350 supportsExpandAll:aBool |
540 "return the value of the instance variable 'imageOpened' (automatically generated)" |
475 "return the value of the instance variable 'imageOpened' (automatically generated)" |
541 |
476 |
542 ^ imageOpened |
477 ^ imageOpened |
543 |
478 |
544 "Created: 3.7.1997 / 12:34:28 / cg" |
479 "Created: 3.7.1997 / 12:34:28 / cg" |
|
480 ! ! |
|
481 |
|
482 !SelectionInTreeView methodsFor:'accessing-look'! |
|
483 |
|
484 showDirectoryIndicator |
|
485 "returns true if directories has an open/closed indicator |
|
486 " |
|
487 ^ showDirectoryIndicator |
|
488 ! |
|
489 |
|
490 showDirectoryIndicator:aState |
|
491 "set or clear open/closed indicator for directories |
|
492 " |
|
493 "show or hide lines |
|
494 " |
|
495 aState ~~ showDirectoryIndicator ifTrue:[ |
|
496 showDirectoryIndicator := aState. |
|
497 self recomputeDirectoryIndicator. |
|
498 self invalidate |
|
499 ]. |
|
500 ! |
|
501 |
|
502 showDirectoryIndicatorForRoot |
|
503 "returns true if root directory has an open/closed indicator if |
|
504 the common showDirectoryIndicator is enabled |
|
505 " |
|
506 ^ showDirectoryIndicatorForRoot |
|
507 ! |
|
508 |
|
509 showDirectoryIndicatorForRoot:aState |
|
510 "true if root directory has an open/closed indicator if |
|
511 the common showDirectoryIndicator is enabled |
|
512 " |
|
513 aState ~~ showDirectoryIndicatorForRoot ifTrue:[ |
|
514 showDirectoryIndicatorForRoot := aState. |
|
515 self recomputeDirectoryIndicator. |
|
516 self invalidate |
|
517 ]. |
|
518 ! |
|
519 |
|
520 showLines |
|
521 "returns true if lines are shown |
|
522 " |
|
523 ^ showLines |
|
524 ! |
|
525 |
|
526 showLines:aState |
|
527 "show or hide lines |
|
528 " |
|
529 aState ~~ showLines ifTrue:[ |
|
530 showLines := aState. |
|
531 self invalidate |
|
532 ]. |
|
533 ! |
|
534 |
|
535 showRoot |
|
536 "list with or without root |
|
537 " |
|
538 ^ showRoot |
|
539 ! |
|
540 |
|
541 showRoot:aState |
|
542 "list with or without root |
|
543 " |
|
544 showRoot ~~ aState ifTrue:[ |
|
545 model showRoot:(showRoot := aState). |
|
546 ]. |
545 ! ! |
547 ! ! |
546 |
548 |
547 !SelectionInTreeView methodsFor:'change & update'! |
549 !SelectionInTreeView methodsFor:'change & update'! |
548 |
550 |
549 modelChanged:what with:aPara |
551 modelChanged:what with:aPara |
1574 |
1576 |
1575 supportsExpandAll := true. |
1577 supportsExpandAll := true. |
1576 self bitGravity:#NorthWest. |
1578 self bitGravity:#NorthWest. |
1577 showRoot := showDirectoryIndicatorForRoot := showLines := computeResources := true. |
1579 showRoot := showDirectoryIndicatorForRoot := showLines := computeResources := true. |
1578 showDirectoryIndicator := discardMotionEvents := false. |
1580 showDirectoryIndicator := discardMotionEvents := false. |
1579 lineMask := Form width:2 height:2 fromArray:#[16rAA 16r55]. |
1581 leftMargin := 2. |
|
1582 lineMask := Form width:2 height:2 fromArray:#[16rAA 16r55]. |
1580 registeredImages := IdentityDictionary new. |
1583 registeredImages := IdentityDictionary new. |
1581 drawVLinesFromLevel := 1. |
1584 drawVLinesFromLevel := 1. |
1582 textInset := 4. |
1585 textInset := 4. |
1583 imageInset := 0. "/ set during indication enabled |
1586 imageInset := 0. "/ set during indication enabled |
1584 imageWidth := 8. "/ default: will change during startup |
1587 imageWidth := 8. "/ default: will change during startup |