equal
deleted
inserted
replaced
618 ^ anIndex notNil ifTrue:[list at:anIndex ifAbsent:nil] ifFalse:[nil] |
618 ^ anIndex notNil ifTrue:[list at:anIndex ifAbsent:nil] ifFalse:[nil] |
619 ! ! |
619 ! ! |
620 |
620 |
621 !TabView methodsFor:'change & update'! |
621 !TabView methodsFor:'change & update'! |
622 |
622 |
623 sizeChanged:how |
|
624 "size of view changed |
|
625 " |
|
626 |extent delta| |
|
627 |
|
628 list size ~~ 0 ifTrue:[ |
|
629 extent := super extent. |
|
630 delta := oldExtent - extent. |
|
631 |
|
632 (delta x > 1 or:[delta x < -1 or:[delta y > 1 or:[delta y < -1]]]) ifTrue:[ |
|
633 oldExtent := extent. |
|
634 self recomputeList. |
|
635 self changed:#preferredExtent. |
|
636 ] |
|
637 ]. |
|
638 super sizeChanged:how |
|
639 |
|
640 ! |
|
641 |
|
642 update:something with:aParameter from:changedObject |
623 update:something with:aParameter from:changedObject |
643 "one of my models changed its value |
624 "one of my models changed its value |
644 " |
625 " |
645 |idx tab| |
626 |idx tab| |
646 |
627 |
764 self paint:(self viewBackground). |
745 self paint:(self viewBackground). |
765 self clearRectangleX:x y:y width:w height:h. |
746 self clearRectangleX:x y:y width:w height:h. |
766 |
747 |
767 list size == 0 ifTrue:[^ self]. |
748 list size == 0 ifTrue:[^ self]. |
768 |
749 |
769 |
|
770 prevClipArea := clipRect. |
750 prevClipArea := clipRect. |
771 clipRect := nil. |
751 clipRect := nil. |
772 device setClipX:x y:y width:w height:h in:drawableId gc:gcId. |
752 device setClipX:x y:y width:w height:h in:drawableId gc:gcId. |
773 rectangle := Rectangle left:x top:y width:w height:h. |
753 rectangle := Rectangle left:x top:y width:w height:h. |
774 |
754 |
781 ]. |
761 ]. |
782 |
762 |
783 prevClipArea isNil ifTrue:[device noClipIn:drawableId gc:gcId] |
763 prevClipArea isNil ifTrue:[device noClipIn:drawableId gc:gcId] |
784 ifFalse:[self clippingRectangle:prevClipArea]. |
764 ifFalse:[self clippingRectangle:prevClipArea]. |
785 |
765 |
|
766 "Modified: / 18.4.1998 / 16:19:58 / cg" |
786 ! |
767 ! |
787 |
768 |
788 selectedTab:aTab redrawBlock:aRedrawBlock |
769 selectedTab:aTab redrawBlock:aRedrawBlock |
789 "calculate extent of selection and evaluate the block which will |
770 "calculate extent of selection and evaluate the block which will |
790 perform a redraw action |
771 perform a redraw action |
896 ] |
877 ] |
897 ] |
878 ] |
898 ]. |
879 ]. |
899 |
880 |
900 super keyPress:aKey x:x y:y |
881 super keyPress:aKey x:x y:y |
|
882 ! |
|
883 |
|
884 sizeChanged:how |
|
885 "size of view changed |
|
886 " |
|
887 |extent delta dX dY| |
|
888 |
|
889 list size ~~ 0 ifTrue:[ |
|
890 extent := super extent. |
|
891 delta := oldExtent - extent. |
|
892 |
|
893 ((dX := delta x) > 1 or:[dX < -1 |
|
894 or:[(dY := delta y) > 1 or:[dY < -1]]]) ifTrue:[ |
|
895 oldExtent := extent. |
|
896 self recomputeList. |
|
897 self changed:#preferredExtent. |
|
898 ]. |
|
899 shown ifTrue:[ |
|
900 self invalidate |
|
901 ] |
|
902 ]. |
|
903 super sizeChanged:how |
|
904 |
|
905 "Modified: / 18.4.1998 / 16:25:30 / cg" |
901 ! ! |
906 ! ! |
902 |
907 |
903 !TabView methodsFor:'initialization'! |
908 !TabView methodsFor:'initialization'! |
904 |
909 |
905 destroy |
910 destroy |
1351 ! ! |
1356 ! ! |
1352 |
1357 |
1353 !TabView class methodsFor:'documentation'! |
1358 !TabView class methodsFor:'documentation'! |
1354 |
1359 |
1355 version |
1360 version |
1356 ^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.33 1998-02-26 09:57:45 ca Exp $' |
1361 ^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.34 1998-04-18 14:25:56 cg Exp $' |
1357 ! ! |
1362 ! ! |