equal
deleted
inserted
replaced
643 |
643 |
644 expanded := item isExpanded. |
644 expanded := item isExpanded. |
645 |
645 |
646 indicatorAction notNil ifTrue:[ |
646 indicatorAction notNil ifTrue:[ |
647 indicatorAction valueWithOptionalArgument:aLnNr and:self. |
647 indicatorAction valueWithOptionalArgument:aLnNr and:self. |
648 ] ifFalse:[ |sensor| |
648 ] ifFalse:[ |
|
649 |sensor| |
|
650 |
649 sensor := self sensor. |
651 sensor := self sensor. |
650 (sensor ctrlDown or:[sensor shiftDown]) ifTrue:[ |
652 (sensor ctrlDown or:[sensor shiftDown]) ifTrue:[ |
651 item recursiveToggleExpand |
653 item recursiveToggleExpand |
652 ] ifFalse:[ |
654 ] ifFalse:[ |
653 item toggleExpand |
655 item toggleExpand |
663 |
665 |
664 "/ numChildren := item numberOfVisibleChildren. |
666 "/ numChildren := item numberOfVisibleChildren. |
665 "/ numChildren == 0 ifTrue:[ |
667 "/ numChildren == 0 ifTrue:[ |
666 "/ ^ self |
668 "/ ^ self |
667 "/ ]. |
669 "/ ]. |
668 ^ self |
|
669 |
670 |
670 "/ idx := aLnNr + numChildren. |
671 "/ idx := aLnNr + numChildren. |
671 "/ vwOrgY := viewOrigin y. |
672 "/ vwOrgY := viewOrigin y. |
672 "/ availY := (self yVisibleOfLine:aLnNr) - (self yVisibleOfLine:1). |
673 "/ availY := (self yVisibleOfLine:aLnNr) - (self yVisibleOfLine:1). |
673 "/ |
674 "/ |
678 "/ vwOrgY := vwOrgY + (usedY min:availY). |
679 "/ vwOrgY := vwOrgY + (usedY min:availY). |
679 "/ ]. |
680 "/ ]. |
680 "/ ]. |
681 "/ ]. |
681 "/ vwOrgX := self computeViewOriginXat:aLnNr. |
682 "/ vwOrgX := self computeViewOriginXat:aLnNr. |
682 "/ self scrollTo:(vwOrgX @ vwOrgY). |
683 "/ self scrollTo:(vwOrgX @ vwOrgY). |
|
684 |
|
685 "Modified: / 19-09-2007 / 08:48:15 / cg" |
683 ! |
686 ! |
684 |
687 |
685 lineChangedAt:aLnNr with:arg |
688 lineChangedAt:aLnNr with:arg |
686 "line changed at position; check whether line height changed |
689 "line changed at position; check whether line height changed |
687 " |
690 " |
1223 |
1226 |
1224 aKey == Character space ifTrue:[ |
1227 aKey == Character space ifTrue:[ |
1225 item toggleExpand. |
1228 item toggleExpand. |
1226 ^ self |
1229 ^ self |
1227 ]. |
1230 ]. |
1228 isCursorLeft := aKey == #CursorLeft. |
1231 isCursorLeft := (aKey == #CursorLeft). |
1229 |
1232 |
1230 item isExpanded == isCursorLeft ifTrue:[ |
1233 item isExpanded == isCursorLeft ifTrue:[ |
1231 item toggleExpand. |
1234 (self sensor ctrlDown or:[self sensor shiftDown]) ifTrue:[ |
|
1235 item recursiveToggleExpand. |
|
1236 ] ifFalse:[ |
|
1237 item toggleExpand. |
|
1238 ]. |
1232 ^ self |
1239 ^ self |
1233 ]. |
1240 ]. |
1234 isCursorLeft ifTrue:[ |
1241 isCursorLeft ifTrue:[ |
1235 (item := item parent) isNil ifTrue:[^ self]. |
1242 (item := item parent) isNil ifTrue:[^ self]. |
1236 lineNr := self identityIndexOf:item. |
1243 lineNr := self identityIndexOf:item. |
1243 item isNil ifTrue:[^ self]. |
1250 item isNil ifTrue:[^ self]. |
1244 |
1251 |
1245 (self canSelectIndex:lineNr forAdd:false) ifTrue:[ |
1252 (self canSelectIndex:lineNr forAdd:false) ifTrue:[ |
1246 self selection:lineNr |
1253 self selection:lineNr |
1247 ]. |
1254 ]. |
|
1255 |
|
1256 "Modified: / 18-09-2007 / 23:02:09 / cg" |
1248 ! ! |
1257 ! ! |
1249 |
1258 |
1250 !HierarchicalListView methodsFor:'fetch resources'! |
1259 !HierarchicalListView methodsFor:'fetch resources'! |
1251 |
1260 |
1252 fetchResources |
1261 fetchResources |
1664 ! ! |
1673 ! ! |
1665 |
1674 |
1666 !HierarchicalListView class methodsFor:'documentation'! |
1675 !HierarchicalListView class methodsFor:'documentation'! |
1667 |
1676 |
1668 version |
1677 version |
1669 ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.107 2007-07-05 15:06:46 ca Exp $' |
1678 ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.108 2007-09-19 10:35:18 cg Exp $' |
1670 ! ! |
1679 ! ! |