ListView.st
changeset 3151 fc183d8ff88c
parent 3150 518f8fd0429a
child 3179 e4e7d21fd3bb
equal deleted inserted replaced
3150:518f8fd0429a 3151:fc183d8ff88c
  4251 !
  4251 !
  4252 
  4252 
  4253 nextTabAfter:colNr
  4253 nextTabAfter:colNr
  4254     "return the next tab position after col"
  4254     "return the next tab position after col"
  4255 
  4255 
  4256     |nextTab|
  4256     ^ self nextTabAfter:colNr in:tabPositions.
  4257 
       
  4258     nextTab := self nextTabAfter:colNr in:tabPositions.
       
  4259 
       
  4260     "/ fallback to mod-8 tabs if beyond tab-list.
       
  4261     nextTab <= colNr ifTrue:[
       
  4262         nextTab := colNr + 1.
       
  4263         nextTab := nextTab + (8 - (nextTab \\ 8)).
       
  4264     ].
       
  4265 
       
  4266     ^ nextTab
       
  4267 !
  4257 !
  4268 
  4258 
  4269 nextTabAfter:colNr in:tabPositions
  4259 nextTabAfter:colNr in:tabPositions
  4270     "return the next tab position after col.
  4260     "return the next tab position after col.
  4271      The second arg, tabPositions is a collection of tabStops."
  4261      The second arg, tabPositions is a collection of tabStops."
  4278     tabIndex := 1.
  4268     tabIndex := 1.
  4279     col := colNr.
  4269     col := colNr.
  4280     thisTab := tabPositions at:tabIndex.
  4270     thisTab := tabPositions at:tabIndex.
  4281     nTabs := tabPositions size.
  4271     nTabs := tabPositions size.
  4282     [thisTab <= col] whileTrue:[
  4272     [thisTab <= col] whileTrue:[
  4283 	(tabIndex == nTabs) ifTrue:[^ thisTab].
  4273         (tabIndex == nTabs) ifTrue:[
  4284 	tabIndex := tabIndex + 1.
  4274             "/ fallback to mod-8 tabs if beyond tab-list.
  4285 	thisTab := tabPositions at:tabIndex
  4275             thisTab := col + 1.
       
  4276             thisTab := thisTab + (8 - (thisTab \\ 8)).
       
  4277             ^ thisTab
       
  4278         ].
       
  4279         tabIndex := tabIndex + 1.
       
  4280         thisTab := tabPositions at:tabIndex
  4286     ].
  4281     ].
  4287     ^ thisTab
  4282     ^ thisTab
  4288 !
  4283 !
  4289 
  4284 
  4290 prevTabBefore:colNr
  4285 prevTabBefore:colNr
  4427 ! !
  4422 ! !
  4428 
  4423 
  4429 !ListView class methodsFor:'documentation'!
  4424 !ListView class methodsFor:'documentation'!
  4430 
  4425 
  4431 version
  4426 version
  4432     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.300 2005-04-07 18:05:41 cg Exp $'
  4427     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.301 2005-04-07 18:08:40 cg Exp $'
  4433 ! !
  4428 ! !