MenuView.st
changeset 97 cbf495fe3b64
parent 95 7535cfca9509
child 105 3d064ba4a0cc
equal deleted inserted replaced
96:5996b2afa4fb 97:cbf495fe3b64
    30 
    30 
    31 MenuView comment:'
    31 MenuView comment:'
    32 COPYRIGHT (c) 1989 by Claus Gittinger
    32 COPYRIGHT (c) 1989 by Claus Gittinger
    33 	      All Rights Reserved
    33 	      All Rights Reserved
    34 
    34 
    35 $Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.18 1995-02-27 10:39:33 claus Exp $
    35 $Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.19 1995-03-06 19:29:00 claus Exp $
    36 '!
    36 '!
    37 
    37 
    38 !MenuView class methodsFor:'documentation'!
    38 !MenuView class methodsFor:'documentation'!
    39 
    39 
    40 copyright
    40 copyright
    51 "
    51 "
    52 !
    52 !
    53 
    53 
    54 version
    54 version
    55 "
    55 "
    56 $Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.18 1995-02-27 10:39:33 claus Exp $
    56 $Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.19 1995-03-06 19:29:00 claus Exp $
    57 "
    57 "
    58 !
    58 !
    59 
    59 
    60 documentation
    60 documentation
    61 "
    61 "
   428 	self list:text
   428 	self list:text
   429     ].
   429     ].
   430     enableFlags := Array new:(list size) withAll:true.
   430     enableFlags := Array new:(list size) withAll:true.
   431     onOffFlags := Array new:(list size).
   431     onOffFlags := Array new:(list size).
   432     text keysAndValuesDo:[:index :line |
   432     text keysAndValuesDo:[:index :line |
   433 	(line includes:$\) ifTrue:[
   433 	(line notNil and:[line includes:$\ ]) ifTrue:[
   434 	    onOffFlags at:index put:false
   434 	    onOffFlags at:index put:false
   435 	].
   435 	].
   436     ].
   436     ].
   437     self recomputeSize
   437     self recomputeSize
   438 !
   438 !
  1002 drawVisibleLine:visLineNr with:fg and:bg
  1002 drawVisibleLine:visLineNr with:fg and:bg
  1003     |line isSpecial|
  1003     |line isSpecial|
  1004 
  1004 
  1005     line := self visibleAt:visLineNr.
  1005     line := self visibleAt:visLineNr.
  1006 
  1006 
  1007     isSpecial := line includes:$\.
  1007     isSpecial := line notNil and:[line includes:$\].
  1008     isSpecial ifFalse:[
  1008     isSpecial ifFalse:[
  1009 	"
  1009 	"
  1010 	 a normal entry
  1010 	 a normal entry
  1011 	"
  1011 	"
  1012 	super drawVisibleLine:visLineNr with:fg and:bg
  1012 	super drawVisibleLine:visLineNr with:fg and:bg
  1217     index := self visibleLineToListLine:start.
  1217     index := self visibleLineToListLine:start.
  1218     index notNil ifTrue:[
  1218     index notNil ifTrue:[
  1219 	[current <= stop] whileTrue:[
  1219 	[current <= stop] whileTrue:[
  1220 	    line := self visibleAt:current.
  1220 	    line := self visibleAt:current.
  1221 
  1221 
  1222 	    special := (line = '-') 
  1222 	    special := line notNil and:[
  1223 		       or:[(line = '') 
  1223 			  (line = '-') 
  1224 		       or:[(line at:1) == $\
  1224 			   or:[(line = '') 
  1225 		       or:[(line = '=')]]].
  1225 			   or:[(line at:1) == $\
       
  1226 			   or:[(line = '=')]]]].
       
  1227 
  1226 	    (special 
  1228 	    (special 
  1227 	    or:[(enableFlags at:index) not]) ifTrue:[
  1229 	    or:[(enableFlags at:index) not]) ifTrue:[
  1228 		"a special case"
  1230 		"a special case"
  1229 		(first < current) ifTrue:[
  1231 		(first < current) ifTrue:[
  1230 		    super redrawFromVisibleLine:first to:(current - 1)
  1232 		    super redrawFromVisibleLine:first to:(current - 1)