MenuItem.st
author Claus Gittinger <cg@exept.de>
Thu, 06 May 1999 20:53:16 +0200
changeset 1165 70fd3edc13b4
parent 1044 5ecf46d0f1b7
child 1196 27897663fc97
permissions -rw-r--r--
care for device-less menuFont
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
Object subclass:#MenuItem
752
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
     2
	instanceVariableNames:'activeHelpKey enabled label value nameKey adornment
798
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
     3
		translateLabel isButton startGroup isVisible'
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
	classVariableNames:''
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
	poolDictionaries:''
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	category:'Views-Support'
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
Object subclass:#MenuItemAdornment
666
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
    10
	instanceVariableNames:'color indication submenu submenuChannel shortcutKey labelText
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
    11
		labelImage accessCharacterPosition argument choice choiceValue'
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
	classVariableNames:''
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
	poolDictionaries:''
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
	privateIn:MenuItem
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
!MenuItem class methodsFor:'documentation'!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
documentation
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
"
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
    not yet finished MenuItem class - this will eventually replace
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
    most of the MenuView and PopUpMenu stuff.
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
    (and hopefully be ST-80 compatible ...)
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    For now, only a subset of the full protocol is implemented.
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
    [author:]
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
        Claus Gittinger
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
    [see also:]
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
        MenuItem
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
        PopUpMenu
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
"
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
! !
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
    37
!MenuItem class methodsFor:'instance creation'!
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
    38
1044
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    39
label:aString
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    40
    "create and return a new menuItem, given a label string"
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    41
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    42
    ^ self new label:aString
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    43
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    44
    "Modified: / 4.8.1998 / 17:33:13 / cg"
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    45
    "Created: / 14.8.1998 / 19:19:14 / cg"
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    46
!
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    47
1030
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    48
label:labelString value:selectorOrValue
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    49
    "create and return a new menuItem, given its label and value"
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    50
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    51
    ^ (self new) label:labelString; value:selectorOrValue; yourself
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    52
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    53
    "Created: / 4.8.1998 / 17:34:18 / cg"
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    54
!
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    55
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
    56
labeled:aString
1030
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    57
    "create and return a new menuItem, given a label string"
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    58
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
    59
    ^ self new label:aString
1030
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    60
3684379a1ac8 added inst-creation #label:value:
Claus Gittinger <cg@exept.de>
parents: 985
diff changeset
    61
    "Modified: / 4.8.1998 / 17:33:13 / cg"
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
    62
! !
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
    63
724
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    64
!MenuItem methodsFor:'ST-80 compatibility'!
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    65
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    66
isEnabled:aBoolean
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    67
    self enabled:aBoolean
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    68
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    69
    "Created: / 27.10.1997 / 16:34:55 / cg"
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    70
! !
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
    71
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
!MenuItem methodsFor:'accessing'!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    74
accessCharacterPosition
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    75
    "get the index of the access character in the label text or string, or nil if none
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    76
    "
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    77
    adornment notNil ifTrue:[
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    78
        ^ adornment accessCharacterPosition
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    79
    ].
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    80
    ^ nil
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    83
accessCharacterPosition:index
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    84
    "set the index of the access character in the label text or string, or nil if none
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    85
    "
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    86
    (index isNil and:[adornment isNil]) ifFalse:[
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    87
        self adornment accessCharacterPosition:index
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
    88
    ]
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
640
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    91
activeHelpKey
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    92
    ^ activeHelpKey
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    93
!
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    94
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    95
activeHelpKey:aKey
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    96
    activeHelpKey := aKey
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    97
!
4e1c0d0a633b add active help for items
ca
parents: 590
diff changeset
    98
684
184dd159d02e support of arguments
ca
parents: 666
diff changeset
    99
argument
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   100
    "get argument given to the value (selector)
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   101
    "
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   102
    adornment notNil ifTrue:[
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   103
        ^ adornment argument
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   104
    ].
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   105
    ^ nil
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   106
!
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   107
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   108
argument:something
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   109
    "set argument given to the value (selector)
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   110
    "
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   111
    |arg|
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   112
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   113
    (arg := something) notNil ifTrue:[
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   114
        arg isString ifTrue:[
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   115
            (arg size == 0 or:[(arg indexOfNonSeparatorStartingAt:1) == 0]) ifTrue:[
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   116
                arg := nil
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   117
            ]
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   118
        ]
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   119
    ].
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   120
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   121
    (arg isNil and:[adornment isNil]) ifFalse:[
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   122
        self adornment argument:arg
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   123
    ]
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   124
!
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   125
798
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   126
isVisible
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   127
    ^ isVisible ? true
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   128
!
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   129
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   130
isVisible:something
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   131
    isVisible := something
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   132
!
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   133
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
label
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   135
    ^ self filteredLabel "/ label
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   137
    "Created: / 25.2.1997 / 19:48:16 / cg"
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   138
    "Modified: / 19.6.1998 / 00:02:55 / cg"
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
453
e06bf3866328 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   141
label:aString
e06bf3866328 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   142
    label := aString
e06bf3866328 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   143
e06bf3866328 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   144
    "Created: 25.2.1997 / 19:55:16 / cg"
e06bf3866328 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   145
!
e06bf3866328 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   146
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   147
labelImage
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   148
    "gets the labelImage
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   149
    "
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   150
    adornment notNil ifTrue:[
584
9a4c30f7586f ST-80 compatible features addded
ca
parents: 581
diff changeset
   151
        ^ adornment labelImage value
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   152
    ].
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   153
  ^ nil
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   154
!
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   155
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   156
labelImage:aResourceRetriever
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   157
    "set the labelImage
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   158
    "
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   159
    aResourceRetriever notNil ifTrue:[
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   160
        self adornment labelImage:aResourceRetriever
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   161
    ]
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   162
!
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   163
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   164
nameKey
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   165
    ^ nameKey
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   166
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   167
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   168
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   169
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   170
nameKey:aNameKey
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   171
    nameKey := aNameKey.
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   172
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   173
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   174
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   175
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   176
rawLabel
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   177
    ^ label
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   178
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   179
    "Created: 25.2.1997 / 19:48:16 / cg"
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   180
!
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   181
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   182
rawLabel:aString
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
    label := aString
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
    "Created: 25.2.1997 / 19:11:02 / cg"
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   188
shortcutKeyCharacter
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   189
    "ignored for now"
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   190
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   191
    adornment notNil ifTrue:[
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   192
        ^ adornment shortcutKeyCharacter
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   193
    ].
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   194
    ^ nil
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   195
!
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   196
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   197
shortcutKeyCharacter:aKey
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   198
    "set the  key to press to select the menu item from the keyboard
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   199
    "
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   200
    (aKey isNil and:[adornment isNil]) ifFalse:[
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   201
        self adornment shortcutKeyCharacter:aKey
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   202
    ]
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   203
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   204
794
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   205
startGroup
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   206
    "start group #left #right #center ... or nil
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   207
     at the moment only #right is implemented
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   208
    "
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   209
    ^ startGroup 
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   210
!
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   211
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   212
startGroup:aSymbol
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   213
    "start group #left #right #center ...
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   214
     at the moment only #right is implemented
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   215
    "
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   216
    (startGroup isNil or:[startGroup == #right]) ifTrue:[
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   217
        startGroup := aSymbol
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   218
    ] ifFalse:[
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   219
        self warn:('not supported group: ', aSymbol printString ).
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   220
    ]
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   221
!
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   222
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   223
submenu
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   224
    adornment notNil ifTrue:[
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   225
        ^ adornment submenu
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   226
    ].
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   227
    ^ nil
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   228
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   229
    "Created: 25.2.1997 / 20:57:24 / cg"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   230
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   231
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   232
submenu:aMenu
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   233
    self adornment submenu:aMenu
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   234
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   235
    "Created: 25.2.1997 / 20:56:20 / cg"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   236
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   237
666
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   238
submenuChannel
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   239
    adornment notNil ifTrue:[
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   240
        ^ adornment submenuChannel
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   241
    ].
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   242
    ^ nil
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   243
!
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   244
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   245
submenuChannel:something
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   246
    self adornment submenuChannel:something
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   247
!
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   248
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
value
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
    ^ value
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    "Created: 25.2.1997 / 19:50:14 / cg"
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
value:something
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    value := something
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
    "Created: 25.2.1997 / 19:11:13 / cg"
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
! !
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   261
!MenuItem methodsFor:'accessing behavior'!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   262
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   263
beOff
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   264
    "set indication off
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   265
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   266
    self indication:false
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   267
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   268
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   269
beOn
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   270
    "set indication on
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   271
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   272
    self indication:true
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   273
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   274
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   275
choice
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   276
    "return the menu items choice indicator (RadioButton)
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   277
    "
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   278
    adornment notNil ifTrue:[
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   279
        ^ adornment choice
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   280
    ].
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   281
    ^ nil
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   282
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   283
    "Created: / 14.8.1998 / 14:34:55 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   284
    "Modified: / 14.8.1998 / 15:11:57 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   285
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   286
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   287
choice:aChoice
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   288
    "set the menu items choice indicator (RadioButton)
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   289
    "
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   290
    (aChoice notNil or:[adornment notNil]) ifTrue:[
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   291
        self adornment choice:aChoice.
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   292
    ].
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   293
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   294
    "Created: / 14.8.1998 / 15:11:17 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   295
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   296
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   297
choiceValue
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   298
    "return the menu items choiceValue (RadioButton)
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   299
    "
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   300
    adornment notNil ifTrue:[
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   301
        ^ adornment choiceValue
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   302
    ].
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   303
    ^ nil
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   304
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   305
    "Modified: / 14.8.1998 / 15:11:57 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   306
    "Created: / 14.8.1998 / 15:38:05 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   307
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   308
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   309
choiceValue:something
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   310
    "set the menu items choiceValue (RadioButton)
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   311
    "
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   312
    (something notNil or:[adornment notNil]) ifTrue:[
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   313
        self adornment choiceValue:something.
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   314
    ].
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   315
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   316
    "Created: / 14.8.1998 / 15:39:12 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   317
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   318
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   319
disable
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   320
    enabled := false
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   321
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   322
    "Created: 25.2.1997 / 19:39:09 / cg"
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   323
!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   324
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   325
enable
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   326
    enabled := true
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   327
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   328
    "Created: 25.2.1997 / 19:39:00 / cg"
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   329
!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   330
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   331
enabled
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   332
    "returns a boolean, valueHolder or block
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   333
    "
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   334
    ^ enabled
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   335
!
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   336
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   337
enabled:something
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   338
    "a boolean, valueHolder or block
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   339
    "
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   340
    enabled := something
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   341
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   342
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   343
indication
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   344
    "return the menu items on/off indicator (CheckToggle)
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   345
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   346
    adornment notNil ifTrue:[
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   347
        ^ adornment indication
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   348
    ].
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   349
    ^ nil
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   350
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   351
    "Modified: / 14.8.1998 / 15:11:37 / cg"
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   352
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   353
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   354
indication:anIndication
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   355
    "set the menu items an on/off indicator (CheckToggle)
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   356
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   357
    (anIndication notNil or:[adornment notNil]) ifTrue:[
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   358
        self adornment indication:anIndication.
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   359
    ].
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   360
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   361
    "Modified: / 14.8.1998 / 15:11:25 / cg"
752
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   362
!
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   363
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   364
isButton
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   365
    "returns whether item looks like a Button
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   366
    "
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   367
    ^isButton ? false
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   368
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   369
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   370
!
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   371
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   372
isButton:anBoolean
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   373
    "sets whether item looks like a Button
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   374
    "
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   375
    isButton := anBoolean
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   376
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   377
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   378
!
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   379
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   380
translateLabel
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   381
    "returns whether label is translated
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   382
    "
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   383
    ^translateLabel ? false
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   384
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   385
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   386
!
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   387
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   388
translateLabel:anBoolean
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   389
    "sets whether label is translated
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   390
    "
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   391
    translateLabel := anBoolean
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   392
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   393
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   394
! !
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   395
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   396
!MenuItem methodsFor:'accessing resource'!
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   397
584
9a4c30f7586f ST-80 compatible features addded
ca
parents: 581
diff changeset
   398
findGuiResourcesIn:aResourceContainerOrApplication
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   399
    "setup a resource container
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   400
    "
960
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   401
    |lblImg m|
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   402
752
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   403
    self translateLabel ifTrue:[
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   404
        label := ResourceRetriever findResourceLabel: label in: aResourceContainerOrApplication
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   405
    ].
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   406
584
9a4c30f7586f ST-80 compatible features addded
ca
parents: 581
diff changeset
   407
    adornment notNil ifTrue:[
752
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   408
        (lblImg := adornment labelImage) notNil ifTrue:[   
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   409
            lblImg findGuiResourcesIn:aResourceContainerOrApplication.
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   410
            lblImg labelText notNil ifTrue: [lblImg labelText: label].
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   411
        ].   
960
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   412
        (m := adornment submenu) notNil ifTrue:[
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   413
            m := m value.
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   414
            m notNil ifTrue:[
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   415
                m findGuiResourcesIn:aResourceContainerOrApplication
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   416
            ]
752
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   417
        ].
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   418
    ]
960
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   419
fee5a1a50374 adornments submenu may be a valueHolder.
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   420
    "Modified: / 18.6.1998 / 16:54:25 / cg"
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   421
! !
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   422
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   423
!MenuItem methodsFor:'converting'!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   424
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   425
fromLiteralArrayEncoding:aLiteralEncodedArray
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   426
    "read my contents from a aLiteralEncodedArray"
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   427
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
    2 to:aLiteralEncodedArray size by:2 do:[:i |
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
        |selector value|
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   431
        selector := aLiteralEncodedArray at:i.
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   432
        value    := (aLiteralEncodedArray at:i+1) decodeAsLiteralArray.
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   433
        self perform:selector with:value
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   434
    ].
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   435
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
    "
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   437
     #( #MenuItem #rawLabel: 'left' #nameKey: 'identifier'  #value: #left )
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
         decodeAsLiteralArray
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
    "
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
    "Modified: 25.2.1997 / 19:24:22 / cg"
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   442
!
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   443
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   444
literalArrayEncoding
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   445
    "return myself encoded as a literal array"
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   446
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   447
    |coll something|
490
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   448
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   449
    coll := OrderedCollection new.
ebe88e50b29a *** empty log message ***
ca
parents: 458
diff changeset
   450
    coll add:#MenuItem.
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   451
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   452
    label notNil ifTrue:[
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   453
        coll add:#label: ; add:(label literalArrayEncoding)
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   454
    ].
752
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   455
    self translateLabel ifTrue:[
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   456
        coll add:#translateLabel: ; add:(translateLabel literalArrayEncoding)
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   457
    ].
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   458
    self isButton ifTrue:[
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   459
        coll add:#isButton:; add:(isButton literalArrayEncoding)
93690dcd1b75 button and label translation support added.
tz
parents: 724
diff changeset
   460
    ].
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   461
    nameKey notNil ifTrue:[
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   462
        coll add:#nameKey: ; add:(nameKey literalArrayEncoding)
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   463
    ].
798
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   464
    isVisible notNil ifTrue:[
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   465
        isVisible ~~ true ifTrue:[
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   466
            coll add:#isVisible: ; add:(isVisible literalArrayEncoding)
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   467
        ]
8a27a879ff23 support of visible/invisible items
ca
parents: 794
diff changeset
   468
    ].
794
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   469
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   470
    startGroup notNil ifTrue:[
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   471
        coll add:#startGroup: ; add:(startGroup literalArrayEncoding)
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   472
    ].
432935e754e0 add new feature:
ca
parents: 752
diff changeset
   473
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   474
    value notNil ifTrue:[
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   475
        coll add:#value: ; add:(value literalArrayEncoding).
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   476
    ].
653
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   477
    activeHelpKey notNil ifTrue:[
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   478
        coll add:#activeHelpKey: ; add:(activeHelpKey literalArrayEncoding).
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   479
    ].
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   480
    (something := self enabled) notNil ifTrue:[
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   481
        coll add:#enabled: ; add:(enabled literalArrayEncoding).
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   482
    ].
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   483
653
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   484
    adornment notNil ifTrue:[
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   485
        (something := self shortcutKeyCharacter) notNil ifTrue:[
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   486
            coll add:#shortcutKeyCharacter: ; add:(something literalArrayEncoding)
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   487
        ].
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   488
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   489
        (something := self accessCharacterPosition) notNil ifTrue:[
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   490
            coll add:#accessCharacterPosition: ; add:(something literalArrayEncoding)
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   491
        ].
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   492
684
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   493
        (something := self argument) notNil ifTrue:[
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   494
            coll add:#argument: ; add:(something literalArrayEncoding)
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   495
        ].
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   496
661
c09ac6b9820d literalArrayEncoding
ca
parents: 653
diff changeset
   497
        adornment labelImage notNil ifTrue:[
653
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   498
            coll add:#labelImage: ; add:(adornment labelImage literalArrayEncoding)
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   499
        ].
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   500
        (something := self indication) notNil ifTrue:[
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   501
            coll add:#indication: ; add:(something literalArrayEncoding)
666
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   502
        ].
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   503
        (something := self choice) notNil ifTrue:[
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   504
            coll add:#choice: ; add:(something literalArrayEncoding)
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   505
        ].
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   506
        (something := self choiceValue) notNil ifTrue:[
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   507
            coll add:#choiceValue: ; add:(something literalArrayEncoding)
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   508
        ].
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   509
666
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   510
        (something := self submenuChannel) notNil ifTrue:[
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   511
            coll add:#submenuChannel: ; add:(something literalArrayEncoding)
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   512
        ].
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   513
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   514
        self hasSubmenu ifTrue:[
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   515
            coll add:#submenu:; add:(self submenu literalArrayEncoding)
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   516
        ].
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   517
    ].
653
1e7c30f9ca6c literalArrayEncoding updated
ca
parents: 640
diff changeset
   518
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   519
  ^ coll asArray
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   520
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   521
    "Modified: / 14.8.1998 / 15:44:53 / cg"
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
! !
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   524
!MenuItem methodsFor:'private - accessing'!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   525
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   526
adornment
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   527
    adornment isNil ifTrue:[
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   528
        adornment := MenuItemAdornment new
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   529
    ].
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   530
    ^ adornment
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   531
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   532
    "Created: 25.2.1997 / 20:57:05 / cg"
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   533
!
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   534
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   535
filteredLabel
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   536
    "return the label without any &-chars"
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   537
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   538
    |rawLabel l in out c pos emp e|
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   539
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   540
    rawLabel := self rawLabel.
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   541
    rawLabel isString ifFalse:[^ rawLabel].
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   542
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   543
    "/ be careful to preserve any emphasis ...
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   544
    "/ bad kludge ...
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   545
    rawLabel isText ifTrue:[
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   546
        emp := RunArray new.
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   547
    ].
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   548
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   549
    out := WriteStream on:''.
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   550
    in := rawLabel readStream.
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   551
    [in atEnd] whileFalse:[
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   552
        emp notNil ifTrue:[
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   553
            e := rawLabel emphasisAt:(in position).
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   554
        ].
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   555
        c := in next.
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   556
        c == $& ifTrue:[
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   557
            in peek == $& ifTrue:[
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   558
                out nextPut:c.
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   559
                emp notNil ifTrue:[
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   560
                    emp add:e
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   561
                ]
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   562
            ]
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   563
        ] ifFalse:[
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   564
            out nextPut:c.
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   565
            emp notNil ifTrue:[
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   566
                emp add:e
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   567
            ]
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   568
        ]
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   569
    ].
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   570
    l := out contents.
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   571
    emp notNil ifTrue:[
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   572
        ^ Text string:l emphasisCollection:emp
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   573
    ].
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   574
    ^ l.
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   575
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   576
    "Created: / 19.6.1998 / 00:02:10 / cg"
985
5a5b476cfd6b care for Text & images in rawLabel, when filtering.
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   577
    "Modified: / 20.6.1998 / 17:15:18 / cg"
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   578
! !
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   579
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   580
!MenuItem methodsFor:'queries'!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   581
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   582
hasChoice
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   583
    "test whether choice exists
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   584
    "
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   585
  ^ self choice notNil
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   586
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   587
    "Created: / 14.8.1998 / 14:34:29 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   588
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   589
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   590
hasIndication
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   591
    "test whether indication on/off exists
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   592
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   593
  ^ self indication notNil
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   594
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   595
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   596
hasSubmenu
584
9a4c30f7586f ST-80 compatible features addded
ca
parents: 581
diff changeset
   597
    ^ self submenu notNil
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   598
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   599
    "Created: 25.2.1997 / 20:56:20 / cg"
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   600
!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   601
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   602
isEnabled
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   603
    ^ enabled value ? true
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   604
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   605
    "Created: 25.2.1997 / 19:39:17 / cg"
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   606
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   607
724
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   608
isHidden
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   609
    "not yet supported"
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   610
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   611
    ^ false
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   612
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   613
    "Created: / 27.10.1997 / 15:13:43 / cg"
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   614
!
898519684261 more VW comaptibility
Claus Gittinger <cg@exept.de>
parents: 684
diff changeset
   615
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   616
isOff
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   617
    "test whether indication on/off exists and is off
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   618
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   619
    |indication|
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   620
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   621
    indication := self indication.
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   622
  ^ indication value == false
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   623
!
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   624
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   625
isOn
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   626
    "test whether indication on/off exists and is on
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   627
    "
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   628
    |indication|
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   629
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   630
    indication := self indication.
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   631
  ^ indication value == true
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   632
! !
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   633
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   634
!MenuItem::MenuItemAdornment methodsFor:'accessing'!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   635
579
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   636
accessCharacterPosition
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   637
    "return the value of the instance variable 'accessCharacterPosition' (automatically generated)"
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   638
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   639
    ^ accessCharacterPosition!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   640
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   641
accessCharacterPosition:something
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   642
    "set the value of the instance variable 'accessCharacterPosition' (automatically generated)"
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   643
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   644
    accessCharacterPosition := something.!
77f6d490f1ac so far, so good
ca
parents: 578
diff changeset
   645
684
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   646
argument
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   647
    "return the value of the instance variable 'argument' (automatically generated)"
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   648
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   649
    ^ argument
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   650
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   651
    "Created: 25.2.1997 / 20:59:28 / cg"
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   652
!
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   653
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   654
argument:something
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   655
    "set the value of the instance variable 'argument' (automatically generated)"
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   656
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   657
    argument := something.
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   658
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   659
    "Created: 25.2.1997 / 20:59:28 / cg"
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   660
!
184dd159d02e support of arguments
ca
parents: 666
diff changeset
   661
1041
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   662
choice
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   663
    "return the value of the instance variable 'choice' (automatically generated)"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   664
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   665
    ^ choice
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   666
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   667
    "Created: / 14.8.1998 / 14:32:06 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   668
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   669
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   670
choice:something
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   671
    "set the value of the instance variable 'choice' (automatically generated)"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   672
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   673
    choice := something.
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   674
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   675
    "Created: / 14.8.1998 / 14:32:06 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   676
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   677
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   678
choiceValue
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   679
    "return the value of the instance variable 'choiceValue' (automatically generated)"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   680
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   681
    ^ choiceValue
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   682
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   683
    "Created: / 14.8.1998 / 15:39:26 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   684
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   685
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   686
choiceValue:something
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   687
    "set the value of the instance variable 'choiceValue' (automatically generated)"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   688
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   689
    choiceValue := something.
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   690
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   691
    "Created: / 14.8.1998 / 15:39:26 / cg"
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   692
!
d28f0375cd26 added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
   693
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   694
color
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   695
    "return the value of the instance variable 'color' (automatically generated)"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   696
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   697
    ^ color
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   698
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   699
    "Created: 25.2.1997 / 20:59:28 / cg"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   700
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   701
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   702
color:something
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   703
    "set the value of the instance variable 'color' (automatically generated)"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   704
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   705
    color := something.
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   706
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   707
    "Created: 25.2.1997 / 20:59:28 / cg"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   708
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   709
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   710
indication
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   711
    "test whether the menu item has an on/off indicator (CheckToggle)
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   712
    "
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   713
    ^ indication
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   714
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   715
    "Created: 25.2.1997 / 20:59:28 / cg"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   716
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   717
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   718
indication:something
590
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   719
    "test whether the menu item has an on/off indicator (CheckToggle)
fb2c55428c52 ST-80 compatibility
ca
parents: 584
diff changeset
   720
    "
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   721
    indication := something.
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   722
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   723
    "Created: 25.2.1997 / 20:59:28 / cg"
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   724
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   725
581
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   726
labelImage
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   727
    "return the value of the instance variable 'labelImage' (automatically generated)"
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   728
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   729
    ^ labelImage!
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   730
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   731
labelImage:something
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   732
    "set the value of the instance variable 'labelImage' (automatically generated)"
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   733
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   734
    labelImage := something.!
0080d12b5758 enabled can be something not only a boolean
ca
parents: 580
diff changeset
   735
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   736
labelText
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   737
    "get the text appear as the menu label
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   738
    "
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   739
    ^ labelText
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   740
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   741
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   742
labelText:something
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   743
    "set the text appear as the menu label
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   744
    "
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   745
    labelText := something.
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   746
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   747
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   748
shortcutKeyCharacter
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   749
    "get the  key to press to select the menu item from the keyboard
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   750
    "
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   751
    ^ shortcutKey
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   752
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   753
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   754
shortcutKeyCharacter:something
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   755
    "set the  key to press to select the menu item from the keyboard
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   756
    "
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   757
    shortcutKey := something.
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   758
!
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   759
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   760
submenu
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   761
    "get the submenu or nil
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   762
    "
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   763
    ^ submenu value
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   764
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   765
    "Created: / 25.2.1997 / 20:59:28 / cg"
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   766
    "Modified: / 19.6.1998 / 00:33:58 / cg"
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   767
!
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   768
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   769
submenu:something
578
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   770
    "set the submenu or nil
7e0f62d9bc47 access methods ...
ca
parents: 490
diff changeset
   771
    "
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   772
    submenu := something.
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   773
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   774
    "Created: 25.2.1997 / 20:59:28 / cg"
666
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   775
!
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   776
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   777
submenuChannel
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   778
    "get the submenuChannel or nil
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   779
    "
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   780
    ^ submenuChannel
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   781
!
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   782
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   783
submenuChannel:something
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   784
    "set the submenuChannel or nil
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   785
    "
6e614a5d9248 add submenuChannel
ca
parents: 661
diff changeset
   786
    submenuChannel := something.
973
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   787
!
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   788
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   789
submenuHolder
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   790
    "get the submenuHolder or nil
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   791
    "
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   792
    ^ submenu
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   793
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   794
    "Modified: / 19.6.1998 / 00:33:58 / cg"
cd6b8d08c9c9 submenu item send #value.
Claus Gittinger <cg@exept.de>
parents: 960
diff changeset
   795
    "Created: / 19.6.1998 / 00:34:32 / cg"
458
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   796
! !
729ffdbd2b13 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 455
diff changeset
   797
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   798
!MenuItem class methodsFor:'documentation'!
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
version
1044
5ecf46d0f1b7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
   801
    ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.26 1998-08-14 17:19:24 cg Exp $'
451
95064b26ded1 intitial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
! !