MenuItem.st
changeset 684 184dd159d02e
parent 666 6e614a5d9248
child 724 898519684261
equal deleted inserted replaced
683:f50084bd3925 684:184dd159d02e
     5 	category:'Views-Support'
     5 	category:'Views-Support'
     6 !
     6 !
     7 
     7 
     8 Object subclass:#MenuItemAdornment
     8 Object subclass:#MenuItemAdornment
     9 	instanceVariableNames:'color indication submenu submenuChannel shortcutKey labelText
     9 	instanceVariableNames:'color indication submenu submenuChannel shortcutKey labelText
    10 		labelImage accessCharacterPosition'
    10 		labelImage accessCharacterPosition argument'
    11 	classVariableNames:''
    11 	classVariableNames:''
    12 	poolDictionaries:''
    12 	poolDictionaries:''
    13 	privateIn:MenuItem
    13 	privateIn:MenuItem
    14 !
    14 !
    15 
    15 
    64 
    64 
    65 activeHelpKey:aKey
    65 activeHelpKey:aKey
    66     activeHelpKey := aKey
    66     activeHelpKey := aKey
    67 !
    67 !
    68 
    68 
       
    69 argument
       
    70     "get argument given to the value (selector)
       
    71     "
       
    72     adornment notNil ifTrue:[
       
    73         ^ adornment argument
       
    74     ].
       
    75     ^ nil
       
    76 !
       
    77 
       
    78 argument:something
       
    79     "set argument given to the value (selector)
       
    80     "
       
    81     |arg|
       
    82 
       
    83     (arg := something) notNil ifTrue:[
       
    84         arg isString ifTrue:[
       
    85             (arg size == 0 or:[(arg indexOfNonSeparatorStartingAt:1) == 0]) ifTrue:[
       
    86                 arg := nil
       
    87             ]
       
    88         ]
       
    89     ].
       
    90 
       
    91     (arg isNil and:[adornment isNil]) ifFalse:[
       
    92         self adornment argument:arg
       
    93     ]
       
    94 !
       
    95 
    69 label
    96 label
    70     ^ label
    97     ^ label
    71 
    98 
    72     "Created: 25.2.1997 / 19:48:16 / cg"
    99     "Created: 25.2.1997 / 19:48:16 / cg"
    73 !
   100 !
   297 
   324 
   298         (something := self accessCharacterPosition) notNil ifTrue:[
   325         (something := self accessCharacterPosition) notNil ifTrue:[
   299             coll add:#accessCharacterPosition: ; add:(something literalArrayEncoding)
   326             coll add:#accessCharacterPosition: ; add:(something literalArrayEncoding)
   300         ].
   327         ].
   301 
   328 
       
   329         (something := self argument) notNil ifTrue:[
       
   330             coll add:#argument: ; add:(something literalArrayEncoding)
       
   331         ].
       
   332 
   302         adornment labelImage notNil ifTrue:[
   333         adornment labelImage notNil ifTrue:[
   303             coll add:#labelImage: ; add:(adornment labelImage literalArrayEncoding)
   334             coll add:#labelImage: ; add:(adornment labelImage literalArrayEncoding)
   304         ].
   335         ].
   305         (something := self indication) notNil ifTrue:[
   336         (something := self indication) notNil ifTrue:[
   306             coll add:#indication: ; add:(something literalArrayEncoding)
   337             coll add:#indication: ; add:(something literalArrayEncoding)
   377 accessCharacterPosition:something
   408 accessCharacterPosition:something
   378     "set the value of the instance variable 'accessCharacterPosition' (automatically generated)"
   409     "set the value of the instance variable 'accessCharacterPosition' (automatically generated)"
   379 
   410 
   380     accessCharacterPosition := something.!
   411     accessCharacterPosition := something.!
   381 
   412 
       
   413 argument
       
   414     "return the value of the instance variable 'argument' (automatically generated)"
       
   415 
       
   416     ^ argument
       
   417 
       
   418     "Created: 25.2.1997 / 20:59:28 / cg"
       
   419 !
       
   420 
       
   421 argument:something
       
   422     "set the value of the instance variable 'argument' (automatically generated)"
       
   423 
       
   424     argument := something.
       
   425 
       
   426     "Created: 25.2.1997 / 20:59:28 / cg"
       
   427 !
       
   428 
   382 color
   429 color
   383     "return the value of the instance variable 'color' (automatically generated)"
   430     "return the value of the instance variable 'color' (automatically generated)"
   384 
   431 
   385     ^ color
   432     ^ color
   386 
   433 
   474 ! !
   521 ! !
   475 
   522 
   476 !MenuItem class methodsFor:'documentation'!
   523 !MenuItem class methodsFor:'documentation'!
   477 
   524 
   478 version
   525 version
   479     ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.15 1997-07-17 10:07:02 ca Exp $'
   526     ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.16 1997-08-26 15:44:30 ca Exp $'
   480 ! !
   527 ! !