ColorMenu.st
changeset 854 591cc5592fdf
parent 832 0f3415bebf2b
child 895 d1c9210e796b
equal deleted inserted replaced
853:e7e1c2bbd6f1 854:591cc5592fdf
    87              )
    87              )
    88         )
    88         )
    89 
    89 
    90         #(  red
    90         #(  red
    91             red:
    91             red:
    92             #( lightened 100 80 60 40 )
    92             #( lightened 100 87 67 50 33)
    93          )
    93          )
    94 
    94 
    95         #(  green
    95         #(  green
    96             green:
    96             green:
    97             #( lightened 100 80 60 40 )
    97             #( lightened 100 87 67 50 33)
    98          )
    98          )
    99 
    99 
   100         #(  blue
   100         #(  blue
   101             blue:
   101             blue:
   102             #( lightened 100 80 60 40 )
   102             #( lightened 100 87 67 50 33)
   103          )
   103          )
   104 
   104 
   105         #(  cyan
   105         #(  cyan
   106             #'cyan:magenta:yellow:'
   106             cyan:
   107             #(
   107             #( lightened 100 87 67 50 33)
   108                 lightened
       
   109                 #( 100  0  0 )
       
   110                 #( 100 20 20 )
       
   111                 #( 100 40 40 )
       
   112                 #( 100 60 60 )
       
   113                 #( 100 80 80 )
       
   114              )
       
   115         )
   108         )
   116 
   109 
   117         #(  magenta
   110         #(  magenta
   118             #'cyan:magenta:yellow:'
   111             magenta:
   119             #(
   112             #( lightened 100 87 67 50 33)
   120                 lightened
       
   121                 #(  0 100  0 )
       
   122                 #( 20 100 20 )
       
   123                 #( 40 100 40 )
       
   124                 #( 60 100 60 )
       
   125                 #( 80 100 80 )
       
   126              )
       
   127         )
   113         )
   128 
   114 
   129         #(  yellow
   115         #(  yellow
   130             #'cyan:magenta:yellow:'
   116             yellow:
   131             #(
   117             #( lightened 100 87 67 50 33)
   132                 lightened
       
   133                 #(  0  0 100 )
       
   134                 #( 20 20 100 )
       
   135                 #( 40 40 100 )
       
   136                 #( 60 60 100 )
       
   137                 #( 80 80 100 )
       
   138              )
       
   139         )
   118         )
   140 
   119 
   141         #(  orange
   120         #(  orange
   142             #orange:
   121             #orange:
   143             #( lightened 100 80 60 40 )
   122             #( lightened 100 87 67 50 33)
   144         )
   123         )
   145 
   124 
   146     )
   125     )
   147 !
   126 !
   148 
   127 
   163         colOp   := aSlice at:2.
   142         colOp   := aSlice at:2.
   164 
   143 
   165         (aSlice at:3) do:[:el||sitem label|
   144         (aSlice at:3) do:[:el||sitem label|
   166             el isSymbol ifTrue:[
   145             el isSymbol ifTrue:[
   167                 color := el == #lightened ifTrue:[mainCol perform:el] ifFalse:[Color perform:el].
   146                 color := el == #lightened ifTrue:[mainCol perform:el] ifFalse:[Color perform:el].
   168                 label := el.
   147                 self colorDefinition first ~~ aSlice 
       
   148                     ifTrue: [label := (colOp upTo: $:), ' ', el] 
       
   149                     ifFalse:[label := el].
   169             ] ifFalse:[
   150             ] ifFalse:[
   170                 el isNumber ifTrue:[
   151                 el isNumber ifTrue:[
   171                     color := Color perform:colOp with:el.
   152                     color := Color perform:colOp with:el.
   172                     label := colOp, ' ', el printString.
   153                     label := colOp, ' ', el printString.
   173                 ] ifFalse:[
   154                 ] ifFalse:[
   362 ! !
   343 ! !
   363 
   344 
   364 !ColorMenu class methodsFor:'documentation'!
   345 !ColorMenu class methodsFor:'documentation'!
   365 
   346 
   366 version
   347 version
   367     ^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.12 1998-04-01 13:13:42 tz Exp $'
   348     ^ '$Header: /cvs/stx/stx/libwidg2/ColorMenu.st,v 1.13 1998-04-09 18:30:30 tz Exp $'
   368 ! !
   349 ! !