TabView.st
changeset 1351 1c82a076a23b
parent 1346 c0e475767be6
child 1369 5dc3529ae230
equal deleted inserted replaced
1350:3425b715c379 1351:1c82a076a23b
   758     oldExt := tab extent.
   758     oldExt := tab extent.
   759     expSel := tabStyle at:#expandSelection.
   759     expSel := tabStyle at:#expandSelection.
   760     expDlt := expSel x.
   760     expDlt := expSel x.
   761 
   761 
   762     (self isHorizontalDirection) ifTrue:[
   762     (self isHorizontalDirection) ifTrue:[
   763 	newExt := oldExt + ( expDlt @ 0 ).
   763         newExt := oldExt + ( expDlt @ 0 ).
   764 	newAnc := oldAnc - ((expDlt//2) @ ((expSel y) negated)).
   764         newAnc := oldAnc - ((expDlt//2) @ ((expSel y) negated)).
   765 
   765 
   766 	(x := newAnc x) < 0 ifTrue:[
   766         (x := newAnc x) < 0 ifTrue:[
   767 	    newExt x:(newExt x + x).
   767             newExt x:(newExt x + x).
   768 	    newAnc x:0.
   768             newAnc x:0.
   769 	    x := 0.
   769             x := 0.
   770 	].
   770         ].
   771 	(x + newExt x) > (super extent x) ifTrue:[newExt x:((super extent x) - x)].
   771         (x + newExt x) > width ifTrue:[newExt x:(width - x)].
   772     ] ifFalse:[
   772     ] ifFalse:[
   773 	newExt := oldExt + ( 0 @ expDlt ).
   773         newExt := oldExt + ( 0 @ expDlt ).
   774 	newAnc := oldAnc - (((expSel y) negated) @ (expDlt//2)).
   774         newAnc := oldAnc - (((expSel y) negated) @ (expDlt//2)).
   775 
   775 
   776 	(y := newAnc y) < 0 ifTrue:[
   776         (y := newAnc y) < 0 ifTrue:[
   777 	    newExt y:(newExt y + y).
   777             newExt y:(newExt y + y).
   778 	    newAnc y:0.
   778             newAnc y:0.
   779 	    y := 0.
   779             y := 0.
   780 	].
   780         ].
   781 	(y + newExt y) > (super extent y) ifTrue:[newExt y:((super extent y) - y)].
   781         (y + newExt y) > height ifTrue:[newExt y:(height - y)].
   782     ].
   782     ].
   783 
   783 
   784     tab anchor:newAnc extent:newExt.
   784     tab anchor:newAnc extent:newExt.
   785     aRedrawBlock value.
   785     aRedrawBlock value.
   786     tab anchor:oldAnc extent:oldExt.
   786     tab anchor:oldAnc extent:oldExt.
   787 
   787 
       
   788     "Modified: / 4.5.1999 / 02:01:19 / cg"
   788 ! !
   789 ! !
   789 
   790 
   790 !TabView methodsFor:'event handling'!
   791 !TabView methodsFor:'event handling'!
   791 
   792 
   792 buttonPress:button x:x y:y
   793 buttonPress:button x:x y:y
   921 
   922 
   922     self cursor:Cursor hand.
   923     self cursor:Cursor hand.
   923 
   924 
   924     widget          := TabWidget widgetClass:(self class defaultTabWidget).
   925     widget          := TabWidget widgetClass:(self class defaultTabWidget).
   925     tabStyle        := widget tabStyleOn:self.
   926     tabStyle        := widget tabStyleOn:self.
       
   927 
       
   928     styleSheet name == #win95 ifTrue:[
       
   929 "/        tabStyle at:#unselectedColor put:(tabStyle at:#selectedColor).
       
   930 "/        tabStyle at:#expandSelection put:(4@2).
       
   931 "/        tabStyle at:#lightColorUnselected put:(Color white).
       
   932 "/        tabStyle at:#lightColorSelected   put:(Color white).
       
   933         tabStyle at:#labelTopInset        put:0.
       
   934         tabStyle at:#labelBottomInset     put:0.
       
   935     ].
       
   936 
   926     useIndex        := false.
   937     useIndex        := false.
   927     oneTabPerLine   := false.
   938     oneTabPerLine   := false.
   928     direction       := #top.
   939     direction       := #top.
   929     fitLastRow      := true.
   940     fitLastRow      := true.
   930     moveSelectedRow := true.
   941     moveSelectedRow := true.
   931     enabled         := true.
   942     enabled         := true.
   932     oldExtent       := 0@0.
   943     oldExtent       := 0@0.
   933 
   944 
   934     "Modified: 23.10.1997 / 03:28:02 / cg"
   945     "Modified: / 4.5.1999 / 02:26:28 / cg"
   935 ! !
   946 ! !
   936 
   947 
   937 !TabView methodsFor:'layout'!
   948 !TabView methodsFor:'layout'!
   938 
   949 
   939 changeRaw:aRawA with:aRawB
   950 changeRaw:aRawA with:aRawB
  1350 ! !
  1361 ! !
  1351 
  1362 
  1352 !TabView class methodsFor:'documentation'!
  1363 !TabView class methodsFor:'documentation'!
  1353 
  1364 
  1354 version
  1365 version
  1355     ^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.40 1999-04-28 18:11:11 cg Exp $'
  1366     ^ '$Header: /cvs/stx/stx/libwidg2/TabView.st,v 1.41 1999-05-04 00:44:49 cg Exp $'
  1356 ! !
  1367 ! !