ListView.st
changeset 4639 53ad86d76a7e
parent 4638 99ab02c595bb
child 4641 febbcec12413
equal deleted inserted replaced
4638:99ab02c595bb 4639:53ad86d76a7e
  2701 !
  2701 !
  2702 
  2702 
  2703 listAt:lineNr to:endCol
  2703 listAt:lineNr to:endCol
  2704     "return left substring from start to endCol of a line"
  2704     "return left substring from start to endCol of a line"
  2705 
  2705 
  2706     |line stop lineSize|
  2706     |line lineSize|
  2707 
  2707 
  2708     line := self listAt:lineNr.
  2708     line := self listAt:lineNr.
  2709     line isNil ifTrue:[
  2709     line isNil ifTrue:[
  2710         (stop > 0) ifTrue:[
  2710         (endCol > 0) ifTrue:[
  2711             ^ (String new:stop)
  2711             ^ (String new:endCol)
  2712         ].
  2712         ].
  2713         ^ nil
  2713         ^ nil
  2714     ].
  2714     ].
  2715 
  2715 
  2716     lineSize := line size.
  2716     lineSize := line size.
  2717     stop := endCol.
  2717 
  2718 
  2718     (endCol > lineSize) ifTrue:[
  2719     (stop > lineSize) ifTrue:[
  2719         ^ (line copyTo:lineSize) , (String new:(endCol - lineSize)).
  2720         ^ (line copyTo:lineSize) , (String new:(stop - lineSize)).
  2720     ].
  2721     ].
  2721     ^ line copyTo:endCol
  2722     ^ line copyTo:stop
       
  2723 !
  2722 !
  2724 
  2723 
  2725 listLineIsVisible:listLineNr
  2724 listLineIsVisible:listLineNr
  2726     "return true,  if a particular line is visible"
  2725     "return true,  if a particular line is visible"
  2727 
  2726 
  4916 ! !
  4915 ! !
  4917 
  4916 
  4918 !ListView class methodsFor:'documentation'!
  4917 !ListView class methodsFor:'documentation'!
  4919 
  4918 
  4920 version
  4919 version
  4921     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.370 2013-06-27 20:01:43 cg Exp $'
  4920     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.371 2013-06-28 08:52:25 cg Exp $'
  4922 !
  4921 !
  4923 
  4922 
  4924 version_CVS
  4923 version_CVS
  4925     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.370 2013-06-27 20:01:43 cg Exp $'
  4924     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.371 2013-06-28 08:52:25 cg Exp $'
  4926 ! !
  4925 ! !
  4927 
  4926