10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
12 |
13 |
13 |
14 View subclass:#TabView |
14 View subclass:#TabView |
15 instanceVariableNames:'list listHolder selection enabled action tabStyle useIndex |
15 instanceVariableNames:'list listHolder selection enabled action tabStyle useIndex |
16 maxRawNr direction fitLastRow moveSelectedRow enableChannel |
16 maxRawNr direction fitLastRow moveSelectedRow enableChannel |
17 oldExtent oneTabPerLine' |
17 oldExtent oneTabPerLine' |
18 classVariableNames:'' |
18 classVariableNames:'' |
19 poolDictionaries:'' |
19 poolDictionaries:'' |
20 category:'Views-Interactors' |
20 category:'Views-Interactors' |
21 ! |
21 ! |
22 |
22 |
23 !TabView class methodsFor:'documentation'! |
23 !TabView class methodsFor:'documentation'! |
24 |
24 |
25 copyright |
25 copyright |
638 "redraw raw at a number; all contained tabs are drawn unselected |
638 "redraw raw at a number; all contained tabs are drawn unselected |
639 " |
639 " |
640 list reverseDo:[:aTab|aTab lineNr == aRawNr ifTrue:[aTab redraw:false]]. |
640 list reverseDo:[:aTab|aTab lineNr == aRawNr ifTrue:[aTab redraw:false]]. |
641 ! |
641 ! |
642 |
642 |
|
643 redrawRawAt:aRawNr in:aRectangle |
|
644 "redraw raw at a number; all contained tabs are drawn unselected |
|
645 " |
|
646 |rectangle| |
|
647 |
|
648 list reverseDo:[:aTab| |
|
649 aTab lineNr == aRawNr ifTrue:[ |
|
650 (aTab intersects:aRectangle) ifTrue:[ |
|
651 aTab redraw:false |
|
652 ] |
|
653 ] |
|
654 ]. |
|
655 ! |
|
656 |
643 redrawSelection |
657 redrawSelection |
644 "redraw current selection |
658 "redraw current selection |
645 " |
659 " |
646 |tab idx| |
660 |tab idx| |
647 |
661 |
654 ! |
668 ! |
655 |
669 |
656 redrawX:x y:y width:w height:h |
670 redrawX:x y:y width:w height:h |
657 "a region must be redrawn |
671 "a region must be redrawn |
658 " |
672 " |
659 |oldSelect| |
673 |rectangle oldSelect prevClipArea| |
660 |
674 |
661 self shown ifTrue:[ |
675 self shown ifFalse:[ |
662 self paint:(self viewBackground). |
676 ^ self |
663 self clearRectangleX:x y:y width:w height:h. |
677 ]. |
664 |
678 |
665 list size ~~ 0 ifTrue:[ |
679 self paint:(self viewBackground). |
666 maxRawNr to:1 by:-1 do:[:i| self redrawRawAt:i ]. |
680 self clearRectangleX:x y:y width:w height:h. |
667 |
681 |
668 selection notNil ifTrue:[ |
682 list size == 0 ifTrue:[^ self]. |
669 oldSelect := selection. |
683 |
670 selection := nil. |
684 |
671 self setSelection:oldSelect. |
685 prevClipArea := clipRect. |
672 ] |
686 clipRect := nil. |
673 ] |
687 device setClipX:x y:y width:w height:h in:drawableId gc:gcId. |
674 ] |
688 rectangle := Rectangle left:x top:y width:w height:h. |
|
689 |
|
690 maxRawNr to:1 by:-1 do:[:i| self redrawRawAt:i in:rectangle]. |
|
691 |
|
692 selection notNil ifTrue:[ |
|
693 oldSelect := selection. |
|
694 selection := nil. |
|
695 self setSelection:oldSelect. |
|
696 ]. |
|
697 |
|
698 prevClipArea isNil ifTrue:[device noClipIn:drawableId gc:gcId] |
|
699 ifFalse:[self clippingRectangle:prevClipArea]. |
675 |
700 |
676 ! |
701 ! |
677 |
702 |
678 selectedTab:aTab redrawBlock:aRedrawBlock |
703 selectedTab:aTab redrawBlock:aRedrawBlock |
679 "calculate extent of selection and evaluate the block which will |
704 "calculate extent of selection and evaluate the block which will |