author | Claus Gittinger <cg@exept.de> |
Mon, 24 Aug 1998 21:54:38 +0200 | |
changeset 971 | f3b1476f5006 |
parent 970 | 23d20044894f |
child 981 | 5b3b9588e57d |
permissions | -rw-r--r-- |
199 | 1 |
" |
738 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
199 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
738 | 7 |
inclusion of the above copyright notice. This software may not |
199 | 8 |
be provided or otherwise made available to, or used by, any |
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
738 | 15 |
ResourceSpecEditor subclass:#MenuEditor |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
16 |
instanceVariableNames:'specCanvas helpCanvas slices' |
220 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-UIPainter' |
|
199 | 20 |
! |
21 |
||
22 |
Object subclass:#Item |
|
220 | 23 |
instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey |
407 | 24 |
accessCharacterPos retriever icon iconAndLabel submenuChannel |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
25 |
startGroup argument translateLabel isButton isVisible choice |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
26 |
choiceValue' |
220 | 27 |
classVariableNames:'' |
28 |
poolDictionaries:'' |
|
29 |
privateIn:MenuEditor |
|
199 | 30 |
! |
31 |
||
407 | 32 |
SelectionInTreeView subclass:#TreeView |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
33 |
instanceVariableNames:'' |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
34 |
classVariableNames:'' |
220 | 35 |
poolDictionaries:'' |
36 |
privateIn:MenuEditor |
|
199 | 37 |
! |
38 |
||
39 |
!MenuEditor class methodsFor:'documentation'! |
|
40 |
||
41 |
copyright |
|
42 |
" |
|
738 | 43 |
COPYRIGHT (c) 1997 by eXept Software AG |
199 | 44 |
All Rights Reserved |
45 |
||
46 |
This software is furnished under a license and may be used |
|
47 |
only in accordance with the terms of that license and with the |
|
738 | 48 |
inclusion of the above copyright notice. This software may not |
199 | 49 |
be provided or otherwise made available to, or used by, any |
50 |
other person. No title to or ownership of the software is |
|
51 |
hereby transferred. |
|
52 |
" |
|
53 |
||
54 |
||
55 |
! |
|
56 |
||
57 |
documentation |
|
58 |
" |
|
728 | 59 |
The MenuEditor allows you to create, modify or just inspect |
60 |
hierarchical menus of menu bars, popup menu, or tool bar menus. |
|
199 | 61 |
|
62 |
[start with:] |
|
63 |
MenuEditor open |
|
728 | 64 |
MenuEditor openOnClass:MenuEditor andSelector:#menu |
199 | 65 |
|
66 |
[see also:] |
|
67 |
UIPainter |
|
68 |
||
69 |
[author:] |
|
541 | 70 |
Claus Atzkern, eXept Software AG |
71 |
Thomas Zwick, eXept Software AG |
|
199 | 72 |
" |
73 |
||
74 |
! ! |
|
75 |
||
508 | 76 |
!MenuEditor class methodsFor:'instance creation'! |
77 |
||
728 | 78 |
openModalOnMenu: aMenu |
79 |
"Open a MenuEditor modal on aMenu" |
|
80 |
"self openModalOnMenu: (self perform: #menu) decodeAsLiteralArray" |
|
81 |
||
82 |
^self new openModalOnMenu: aMenu |
|
508 | 83 |
! ! |
84 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
85 |
!MenuEditor class methodsFor:'accessing'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
86 |
|
734 | 87 |
iconUnknown |
88 |
"returns an image used for picked items containing an image |
|
89 |
" |
|
90 |
||
91 |
<resource: #fileImage> |
|
92 |
||
804 | 93 |
"/ ^ Image fromFile:'brokenImage.xpm' |
94 |
^ Icon constantNamed:'brokenImage.xpm' |
|
95 |
||
96 |
"Modified: / 22.4.1998 / 22:15:11 / ca" |
|
734 | 97 |
! |
98 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
99 |
resourceType |
728 | 100 |
"get the type of resource of the method generated by the MenuEditor" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
101 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
102 |
^#menu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
103 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
104 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
105 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
106 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
107 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
108 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
109 |
!MenuEditor class methodsFor:'aspects'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
110 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
111 |
aspects |
728 | 112 |
"get the aspects for the attributes of the menu components" |
113 |
||
114 |
^#( |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
115 |
label |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
116 |
accessCharacterPos |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
117 |
argument |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
118 |
submenuChannel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
119 |
enabled |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
120 |
value |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
121 |
nameKey |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
122 |
indication |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
123 |
choice |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
124 |
choiceValue |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
125 |
translateLabel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
126 |
isButton |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
127 |
shortcutKey |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
128 |
startGroup |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
129 |
retriever |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
130 |
iconAndLabel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
131 |
icon |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
132 |
isVisible |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
133 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
134 |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
135 |
"Modified: / 14.8.1998 / 14:46:36 / cg" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
136 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
137 |
|
371 | 138 |
!MenuEditor class methodsFor:'help specs'! |
139 |
||
140 |
helpSpec |
|
738 | 141 |
"This resource specification was automatically generated |
142 |
by the UIHelpTool of ST/X." |
|
143 |
||
144 |
"Do not manually edit this!! If it is corrupted, |
|
145 |
the UIHelpTool may not be able to read the specification." |
|
371 | 146 |
|
147 |
" |
|
738 | 148 |
UIHelpTool openOnClass:MenuEditor |
371 | 149 |
" |
150 |
||
738 | 151 |
<resource: #help> |
152 |
||
153 |
^super helpSpec addPairsFrom:#( |
|
371 | 154 |
|
548 | 155 |
#addMenuItem |
156 |
'Adds a new menu item.' |
|
157 |
||
158 |
#addMenuSeparator |
|
159 |
'Adds a new menu separator.' |
|
160 |
||
161 |
#addSubMenu |
|
613 | 162 |
'Adds a new sub menu.' |
548 | 163 |
|
164 |
#addSubMenuLink |
|
613 | 165 |
'Adds a new linked sub menu.' |
371 | 166 |
|
577 | 167 |
#basicsAction |
627 | 168 |
'An action selector with 0, 1 (the argument field), or 2 (the selected item) arguments.' |
577 | 169 |
|
170 |
#basicsArgument |
|
613 | 171 |
'An argument passed to above selector, if it is a 1 or a 2 argument selector.' |
577 | 172 |
|
173 |
#basicsIndication |
|
959 | 174 |
'A boolean holder, a boolean block, or a boolean method, specifying the indication state.' |
175 |
||
176 |
#basicsChoice |
|
177 |
'A boolean holder, a boolean block, or a boolean method, specifying the choices state.' |
|
178 |
||
179 |
#basicsChoiceValue |
|
180 |
'That choices value (typically number or symbol).' |
|
577 | 181 |
|
182 |
#basicsIsButton |
|
603 | 183 |
'Turns on/off a button behavior.' |
577 | 184 |
|
185 |
#basicsLabel |
|
186 |
'Label of the item.' |
|
187 |
||
959 | 188 |
#basicsKey |
189 |
'Internal key of the item (optional, for programmed accesses).' |
|
190 |
||
577 | 191 |
#basicsMenu |
613 | 192 |
'A value holder providing the sub menu to be opened if item is selected.' |
577 | 193 |
|
194 |
#basicsMenuArgument |
|
943 | 195 |
'An argument passed with the menu selector.' |
577 | 196 |
|
197 |
#basicsNameKey |
|
198 |
'Unique identifier of the item (optional).' |
|
199 |
||
200 |
#basicsSelector |
|
613 | 201 |
'Selector under which the generated menu spec is saved.' |
577 | 202 |
|
203 |
#basicsSeparatorType |
|
204 |
'List of valid separators.' |
|
205 |
||
206 |
#basicsTranslateLabel |
|
943 | 207 |
'Translate the label via the classes resource file (internationalization).' |
577 | 208 |
|
209 |
#detailsAccelerator |
|
210 |
'Key to be pressed to select the menu item from the keyboard (accelerator key).' |
|
211 |
||
212 |
#detailsAccessCharaterPosition |
|
213 |
'Index of the access character position of the textual label (optional).' |
|
214 |
||
215 |
#detailsEnabled |
|
943 | 216 |
'Aspect or binding providing a boolean value holder for the enable-state of the menu item.' |
577 | 217 |
|
959 | 218 |
#detailsStartGroup |
219 |
'Specify start of a right-aligned item group.' |
|
220 |
||
577 | 221 |
#detailsVisibility |
943 | 222 |
'Aspect or binding providing a boolean value holder for the visibility-state of the menu item.' |
577 | 223 |
|
548 | 224 |
#fileLoad |
943 | 225 |
'Opens a dialog to select and load a menu spec from a class.' |
548 | 226 |
|
227 |
#fileNew |
|
228 |
'Creates a new menu spec.' |
|
229 |
||
577 | 230 |
#filePickAMenu |
836 | 231 |
'Select a menu from an open view and read its specification' |
577 | 232 |
|
548 | 233 |
#fileSave |
943 | 234 |
'Saves the menu spec (and the help spec, if modified).' |
455 | 235 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
236 |
#fileSaveAs |
943 | 237 |
'Opens a dialog to save the menu spec (and the help spec, if modified).' |
238 |
||
239 |
#historyMenuItem |
|
240 |
'Edit this menu specification.' |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
241 |
|
577 | 242 |
#imageImageAndLabel |
943 | 243 |
'Toggles display of both image and textual label.' |
577 | 244 |
|
245 |
#imageImageEditor |
|
943 | 246 |
'Opens an Image Editor on the resource method defined by retriever and selector.' |
577 | 247 |
|
248 |
#imageRetriever |
|
249 |
'Class implementing the image resource method. If no class is given, the current application class will be taken.' |
|
250 |
||
251 |
#imageSelector |
|
959 | 252 |
'Selector returning an image (sent to above or the application).' |
253 |
||
254 |
#imageImageList |
|
255 |
'Currently existing image resources.' |
|
371 | 256 |
|
943 | 257 |
#test |
258 |
'Displays the current menu (layout test).' |
|
371 | 259 |
) |
836 | 260 |
|
959 | 261 |
"Modified: / 18.8.1998 / 16:19:13 / cg" |
371 | 262 |
! ! |
263 |
||
734 | 264 |
!MenuEditor class methodsFor:'image specs'! |
265 |
||
266 |
linkSubmenuImage |
|
738 | 267 |
"This resource specification was automatically generated |
268 |
by the ImageEditor of ST/X." |
|
269 |
||
270 |
"Do not manually edit this!!!! If it is corrupted, |
|
271 |
the ImageEditor may not be able to read the specification." |
|
272 |
||
734 | 273 |
" |
738 | 274 |
ImageEditor openOnClass:self andSelector:#linkSubmenuImage |
734 | 275 |
" |
276 |
||
277 |
<resource: #image> |
|
278 |
||
279 |
^Icon |
|
280 |
constantNamed:#'MenuEditor linkSubmenuImage' |
|
281 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@ADQDQDQDQDQDQH@D"H"H"H"H"H"K0@RH"H"H"H"H"H/@A????????????<@D@@@@@@@@@@@C0@PL3L0DQDQDQD_@A@3L3LBH"H"H"<@DCL3L3@"H"H"K0@PL3L3L0??????@A@@@@L3L@@@@@<@DQDQDCL3@PLAG0@RH"H"@3L0@3@/@AH"H"H L3L3L0<@G?????<CL3L3L@@P@@@@@@@3L3LO@ADQDQDQDP@CLA<@D"H"H"H"H LBK0@RH"H"H"H"@BH/@B????????????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! |
|
282 |
||
283 |
menuItemImage |
|
738 | 284 |
"This resource specification was automatically generated |
285 |
by the ImageEditor of ST/X." |
|
286 |
||
287 |
"Do not manually edit this!!!! If it is corrupted, |
|
288 |
the ImageEditor may not be able to read the specification." |
|
289 |
||
734 | 290 |
" |
738 | 291 |
ImageEditor openOnClass:self andSelector:#menuItemImage |
734 | 292 |
" |
293 |
||
294 |
<resource: #image> |
|
295 |
||
296 |
^Icon |
|
297 |
constantNamed:#'MenuEditor menuItemImage' |
|
298 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUQUUUUUUUPUUUUUUU_UUUUUUUPUUUUUUUP@@@@@@@@EUUUUUVAF*****+HF:?+::;@F:.+*?;@F:.+::;@F:.+*:;@F:.+::;@F*****+DK??????A@@@@@@@@UUUUUUUPUUUUUUUXUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUX') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! |
|
299 |
||
300 |
menuSeparatorImage |
|
738 | 301 |
"This resource specification was automatically generated |
302 |
by the ImageEditor of ST/X." |
|
303 |
||
304 |
"Do not manually edit this!!!! If it is corrupted, |
|
305 |
the ImageEditor may not be able to read the specification." |
|
306 |
||
734 | 307 |
" |
738 | 308 |
ImageEditor openOnClass:self andSelector:#menuSeparatorImage |
734 | 309 |
" |
310 |
||
311 |
<resource: #image> |
|
312 |
||
313 |
^Icon |
|
314 |
constantNamed:#'MenuEditor menuSeparatorImage' |
|
315 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUURUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP@@@@@@@@EUUUUUV@F*****+DF*****+CF?????+@F0@@@@[@F%UUUU[HF*****+@F*****+@K??????N@@@@@@@HUUUUUUUPUUUUUUUPUUUUUUUWUUUUUUUXUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! |
|
316 |
||
317 |
submenuImage |
|
738 | 318 |
"This resource specification was automatically generated |
319 |
by the ImageEditor of ST/X." |
|
320 |
||
321 |
"Do not manually edit this!!!! If it is corrupted, |
|
322 |
the ImageEditor may not be able to read the specification." |
|
323 |
||
734 | 324 |
" |
738 | 325 |
ImageEditor openOnClass:self andSelector:#submenuImage |
734 | 326 |
" |
327 |
||
328 |
<resource: #image> |
|
329 |
||
330 |
^Icon |
|
331 |
constantNamed:#'MenuEditor submenuImage' |
|
332 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@EUUUUUV@F*****+@F*****+@G??????GD@@@@@C@EUUUUUWLF*****+@F*****+@G??????HD@@@@@C@EUUUUUW@F*****+@F*****+OG??????@D@@@@@C@EUUUUUW@F*****+@F*****+@K??????@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! ! |
|
333 |
||
199 | 334 |
!MenuEditor class methodsFor:'interface specs'! |
335 |
||
336 |
basicsItemSpec |
|
738 | 337 |
"This resource specification was automatically generated |
338 |
by the UIPainter of ST/X." |
|
339 |
||
340 |
"Do not manually edit this!! If it is corrupted, |
|
341 |
the UIPainter may not be able to read the specification." |
|
199 | 342 |
|
343 |
" |
|
344 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec |
|
345 |
MenuEditor new openInterface:#basicsItemSpec |
|
346 |
" |
|
347 |
||
348 |
<resource: #canvas> |
|
349 |
||
350 |
^ |
|
351 |
||
352 |
#(#FullSpec |
|
703 | 353 |
#window: |
199 | 354 |
#(#WindowSpec |
728 | 355 |
#name: 'Basics Item' |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
356 |
#layout: #(#LayoutFrame 216 0 173 0 482 0 491 0) |
728 | 357 |
#label: 'Basics Item' |
703 | 358 |
#min: #(#Point 10 10) |
359 |
#max: #(#Point 1160 870) |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
360 |
#bounds: #(#Rectangle 216 173 483 492) |
703 | 361 |
#usePreferredExtent: false |
199 | 362 |
) |
703 | 363 |
#component: |
199 | 364 |
#(#SpecCollection |
703 | 365 |
#collection: |
199 | 366 |
#( |
367 |
#(#LabelSpec |
|
703 | 368 |
#name: 'nameKeyLabel' |
369 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
959 | 370 |
#activeHelpKey: #basicsKey |
703 | 371 |
#label: 'Name Key:' |
372 |
#adjust: #right |
|
373 |
#resizeForLabel: true |
|
199 | 374 |
) |
375 |
#(#InputFieldSpec |
|
703 | 376 |
#name: 'nameKeyField' |
377 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
959 | 378 |
#activeHelpKey: #basicsKey |
703 | 379 |
#tabable: true |
380 |
#model: #nameKey |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
381 |
#group: #inputGroup |
703 | 382 |
#type: #symbolOrNil |
383 |
#acceptOnReturn: false |
|
384 |
#acceptOnTab: false |
|
199 | 385 |
) |
386 |
#(#LabelSpec |
|
703 | 387 |
#name: 'labelLabel' |
388 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
959 | 389 |
#activeHelpKey: #basicsLabel |
703 | 390 |
#label: 'Label:' |
391 |
#adjust: #right |
|
392 |
#resizeForLabel: true |
|
199 | 393 |
) |
394 |
#(#InputFieldSpec |
|
703 | 395 |
#name: 'labelField' |
396 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
397 |
#activeHelpKey: #basicsLabel |
|
398 |
#tabable: true |
|
399 |
#model: #label |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
400 |
#group: #inputGroup |
703 | 401 |
#acceptOnReturn: false |
402 |
#acceptOnTab: false |
|
199 | 403 |
) |
404 |
#(#LabelSpec |
|
703 | 405 |
#name: 'valueLabel' |
959 | 406 |
#activeHelpKey: #basicsAction |
703 | 407 |
#layout: #(#AlignmentOrigin 107 0 90 0 1 0.5) |
408 |
#label: 'Action:' |
|
409 |
#adjust: #right |
|
410 |
#resizeForLabel: true |
|
199 | 411 |
) |
412 |
#(#InputFieldSpec |
|
703 | 413 |
#name: 'valueField' |
414 |
#layout: #(#LayoutFrame 110 0 79 0 -5 1.0 101 0) |
|
415 |
#activeHelpKey: #basicsAction |
|
416 |
#tabable: true |
|
417 |
#model: #value |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
418 |
#group: #inputGroup |
703 | 419 |
#type: #symbolOrNil |
420 |
#acceptOnReturn: false |
|
421 |
#acceptOnTab: false |
|
199 | 422 |
) |
423 |
#(#LabelSpec |
|
703 | 424 |
#name: 'argumentLabel' |
425 |
#layout: #(#AlignmentOrigin 107 0 115 0 1 0.5) |
|
959 | 426 |
#activeHelpKey: #basicsArgument |
703 | 427 |
#label: 'Argument:' |
428 |
#adjust: #right |
|
429 |
#resizeForLabel: true |
|
290 | 430 |
) |
431 |
#(#InputFieldSpec |
|
703 | 432 |
#name: 'argumentField' |
433 |
#layout: #(#LayoutFrame 110 0 104 0 -5 1.0 126 0) |
|
434 |
#activeHelpKey: #basicsArgument |
|
435 |
#tabable: true |
|
436 |
#model: #argument |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
437 |
#group: #inputGroup |
703 | 438 |
#type: #string |
439 |
#acceptOnReturn: false |
|
440 |
#acceptOnTab: false |
|
290 | 441 |
) |
371 | 442 |
#(#LabelSpec |
703 | 443 |
#name: 'indicationLabel' |
444 |
#layout: #(#AlignmentOrigin 107 0 155 0 1 0.5) |
|
959 | 445 |
#activeHelpKey: #basicsIndication |
703 | 446 |
#label: 'Indication:' |
447 |
#adjust: #right |
|
448 |
#resizeForLabel: true |
|
371 | 449 |
) |
450 |
#(#InputFieldSpec |
|
703 | 451 |
#name: 'indicationField' |
452 |
#layout: #(#LayoutFrame 110 0 144 0 -5 1.0 166 0) |
|
453 |
#activeHelpKey: #basicsIndication |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
454 |
#enableChannel: #indicationEnabled |
703 | 455 |
#tabable: true |
456 |
#model: #indication |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
457 |
#group: #inputGroup |
703 | 458 |
#type: #symbolOrNil |
459 |
#acceptOnReturn: false |
|
460 |
#acceptOnTab: false |
|
371 | 461 |
) |
398 | 462 |
#(#CheckBoxSpec |
703 | 463 |
#name: 'translateLabelCheckBox' |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
464 |
#layout: #(#Point 20 230) |
703 | 465 |
#activeHelpKey: #basicsTranslateLabel |
466 |
#tabable: true |
|
467 |
#model: #translateLabel |
|
468 |
#label: 'Translate Label' |
|
398 | 469 |
) |
470 |
#(#CheckBoxSpec |
|
703 | 471 |
#name: 'isButtonCheckBox' |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
472 |
#layout: #(#Point 20 259) |
703 | 473 |
#activeHelpKey: #basicsIsButton |
474 |
#tabable: true |
|
475 |
#model: #isButton |
|
476 |
#label: 'Is Button' |
|
398 | 477 |
) |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
478 |
#(#LabelSpec |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
479 |
#name: 'choiceLabel' |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
480 |
#layout: #(#AlignmentOrigin 107 0 180 0 1 0.5) |
959 | 481 |
#activeHelpKey: #basicsChoice |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
482 |
#label: 'Choice:' |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
483 |
#translateLabel: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
484 |
#adjust: #right |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
485 |
#resizeForLabel: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
486 |
) |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
487 |
#(#InputFieldSpec |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
488 |
#name: 'choiceField' |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
489 |
#layout: #(#LayoutFrame 110 0 169 0 -5 1.0 191 0) |
959 | 490 |
#activeHelpKey: #basicsChoice |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
491 |
#enableChannel: #choiceEnabled |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
492 |
#tabable: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
493 |
#model: #choice |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
494 |
#group: #inputGroup |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
495 |
#type: #symbolOrNil |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
496 |
#acceptOnReturn: false |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
497 |
#acceptOnTab: false |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
498 |
) |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
499 |
#(#LabelSpec |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
500 |
#name: 'choiceValueLabel' |
959 | 501 |
#activeHelpKey: #basicsChoiceValue |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
502 |
#layout: #(#AlignmentOrigin 107 0 205 0 1 0.5) |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
503 |
#label: 'Value:' |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
504 |
#translateLabel: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
505 |
#adjust: #right |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
506 |
#resizeForLabel: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
507 |
) |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
508 |
#(#InputFieldSpec |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
509 |
#name: 'choiceValueField' |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
510 |
#layout: #(#LayoutFrame 110 0 194 0 -5 1.0 216 0) |
959 | 511 |
#activeHelpKey: #basicsChoiceValue |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
512 |
#enableChannel: #choiceValueEnabled |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
513 |
#tabable: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
514 |
#model: #choiceValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
515 |
#group: #inputGroup |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
516 |
#type: #smalltalkObject |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
517 |
#acceptOnReturn: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
518 |
#acceptOnTab: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
519 |
#acceptOnLeave: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
520 |
#acceptOnLostFocus: true |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
521 |
#immediateAccept: false |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
522 |
) |
199 | 523 |
) |
524 |
) |
|
525 |
) |
|
931 | 526 |
|
959 | 527 |
"Modified: / 18.8.1998 / 16:20:26 / cg" |
199 | 528 |
! |
529 |
||
218 | 530 |
basicsLinkSpec |
738 | 531 |
"This resource specification was automatically generated |
532 |
by the UIPainter of ST/X." |
|
533 |
||
534 |
"Do not manually edit this!! If it is corrupted, |
|
535 |
the UIPainter may not be able to read the specification." |
|
218 | 536 |
|
537 |
" |
|
538 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec |
|
539 |
MenuEditor new openInterface:#basicsLinkSpec |
|
540 |
" |
|
541 |
||
542 |
<resource: #canvas> |
|
543 |
||
544 |
^ |
|
545 |
||
546 |
#(#FullSpec |
|
703 | 547 |
#window: |
218 | 548 |
#(#WindowSpec |
728 | 549 |
#name: 'Basics Link' |
738 | 550 |
#layout: #(#LayoutFrame 473 0 301 0 739 0 619 0) |
728 | 551 |
#label: 'Basics Link' |
703 | 552 |
#min: #(#Point 10 10) |
553 |
#max: #(#Point 1280 1024) |
|
738 | 554 |
#bounds: #(#Rectangle 473 301 740 620) |
703 | 555 |
#usePreferredExtent: false |
218 | 556 |
) |
703 | 557 |
#component: |
218 | 558 |
#(#SpecCollection |
703 | 559 |
#collection: |
218 | 560 |
#( |
561 |
#(#LabelSpec |
|
703 | 562 |
#name: 'nameKeyLabel' |
563 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
564 |
#activeHelpKey: #nameKey |
|
565 |
#label: 'Name Key:' |
|
566 |
#adjust: #right |
|
567 |
#resizeForLabel: true |
|
218 | 568 |
) |
569 |
#(#InputFieldSpec |
|
703 | 570 |
#name: 'nameKeyField' |
571 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
572 |
#activeHelpKey: #basicsNameKey |
|
573 |
#tabable: true |
|
574 |
#model: #nameKey |
|
575 |
#type: #symbolOrNil |
|
576 |
#acceptOnReturn: false |
|
577 |
#acceptOnTab: false |
|
931 | 578 |
#group: #inputGroup |
218 | 579 |
) |
580 |
#(#LabelSpec |
|
703 | 581 |
#name: 'labelLabel' |
582 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
583 |
#label: 'Label:' |
|
584 |
#resizeForLabel: true |
|
218 | 585 |
) |
586 |
#(#InputFieldSpec |
|
703 | 587 |
#name: 'labelField' |
588 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
589 |
#activeHelpKey: #basicsLabel |
|
590 |
#tabable: true |
|
591 |
#model: #label |
|
592 |
#acceptOnReturn: false |
|
593 |
#acceptOnTab: false |
|
931 | 594 |
#group: #inputGroup |
218 | 595 |
) |
469 | 596 |
#(#LabelSpec |
703 | 597 |
#name: 'menuLabel' |
598 |
#layout: #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
599 |
#label: 'Menu:' |
|
600 |
#resizeForLabel: true |
|
469 | 601 |
) |
218 | 602 |
#(#InputFieldSpec |
703 | 603 |
#name: 'menuField' |
604 |
#layout: #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
|
605 |
#activeHelpKey: #basicsMenu |
|
606 |
#tabable: true |
|
607 |
#model: #submenuChannel |
|
608 |
#type: #symbolOrNil |
|
609 |
#acceptOnReturn: false |
|
610 |
#acceptOnTab: false |
|
931 | 611 |
#group: #inputGroup |
218 | 612 |
) |
613 |
#(#LabelSpec |
|
703 | 614 |
#name: 'ArgumentLabel' |
615 |
#layout: #(#AlignmentOrigin 107 0 100 0 1 0.5) |
|
616 |
#label: 'Argument:' |
|
617 |
#resizeForLabel: true |
|
218 | 618 |
) |
411 | 619 |
#(#InputFieldSpec |
703 | 620 |
#name: 'argumentField' |
621 |
#layout: #(#LayoutFrame 110 0 90 0 -5 1.0 112 0) |
|
622 |
#activeHelpKey: #basicsMenuArgument |
|
623 |
#tabable: true |
|
624 |
#model: #argument |
|
625 |
#acceptOnReturn: false |
|
626 |
#acceptOnTab: false |
|
931 | 627 |
#group: #inputGroup |
411 | 628 |
) |
469 | 629 |
#(#CheckBoxSpec |
703 | 630 |
#name: 'translateLabelCheckBox' |
728 | 631 |
#layout: #(#Point 20 190) |
703 | 632 |
#activeHelpKey: #basicsTranslateLabel |
633 |
#tabable: true |
|
634 |
#model: #translateLabel |
|
635 |
#label: 'Translate Label' |
|
411 | 636 |
) |
218 | 637 |
) |
638 |
) |
|
639 |
) |
|
931 | 640 |
|
641 |
"Modified: / 31.7.1998 / 01:18:16 / cg" |
|
218 | 642 |
! |
643 |
||
199 | 644 |
basicsMenuSpec |
738 | 645 |
"This resource specification was automatically generated |
646 |
by the UIPainter of ST/X." |
|
647 |
||
648 |
"Do not manually edit this!! If it is corrupted, |
|
649 |
the UIPainter may not be able to read the specification." |
|
199 | 650 |
|
651 |
" |
|
652 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec |
|
653 |
MenuEditor new openInterface:#basicsMenuSpec |
|
654 |
" |
|
655 |
||
656 |
<resource: #canvas> |
|
657 |
||
658 |
^ |
|
659 |
||
660 |
#(#FullSpec |
|
703 | 661 |
#window: |
199 | 662 |
#(#WindowSpec |
728 | 663 |
#name: 'Basics Menu' |
738 | 664 |
#layout: #(#LayoutFrame 473 0 301 0 739 0 619 0) |
728 | 665 |
#label: 'Basics Menu' |
703 | 666 |
#min: #(#Point 10 10) |
667 |
#max: #(#Point 1280 1024) |
|
738 | 668 |
#bounds: #(#Rectangle 473 301 740 620) |
703 | 669 |
#usePreferredExtent: false |
199 | 670 |
) |
703 | 671 |
#component: |
199 | 672 |
#(#SpecCollection |
703 | 673 |
#collection: |
199 | 674 |
#( |
675 |
#(#LabelSpec |
|
703 | 676 |
#name: 'nameKeyLabel' |
677 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
678 |
#label: 'Name Key:' |
|
679 |
#adjust: #right |
|
680 |
#resizeForLabel: true |
|
199 | 681 |
) |
682 |
#(#InputFieldSpec |
|
703 | 683 |
#name: 'nameKeyField' |
684 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
685 |
#activeHelpKey: #basicsNameKey |
|
686 |
#tabable: true |
|
687 |
#model: #nameKey |
|
688 |
#type: #symbolOrNil |
|
689 |
#acceptOnReturn: false |
|
690 |
#acceptOnTab: false |
|
931 | 691 |
#group: #inputGroup |
199 | 692 |
) |
693 |
#(#LabelSpec |
|
703 | 694 |
#name: 'labelLabel' |
695 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
696 |
#label: 'Label:' |
|
697 |
#adjust: #right |
|
698 |
#resizeForLabel: true |
|
199 | 699 |
) |
700 |
#(#InputFieldSpec |
|
703 | 701 |
#name: 'labelField' |
702 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
703 |
#activeHelpKey: #basicsLabel |
|
704 |
#tabable: true |
|
705 |
#model: #label |
|
706 |
#acceptOnReturn: false |
|
707 |
#acceptOnTab: false |
|
931 | 708 |
#group: #inputGroup |
199 | 709 |
) |
398 | 710 |
#(#CheckBoxSpec |
703 | 711 |
#name: 'translateLabelCheckBox' |
728 | 712 |
#layout: #(#Point 20 190) |
703 | 713 |
#activeHelpKey: #basicsTranslateLabel |
714 |
#tabable: true |
|
715 |
#model: #translateLabel |
|
716 |
#label: 'Translate Label' |
|
398 | 717 |
) |
199 | 718 |
) |
719 |
) |
|
720 |
) |
|
931 | 721 |
|
722 |
"Modified: / 31.7.1998 / 01:18:23 / cg" |
|
199 | 723 |
! |
724 |
||
725 |
basicsRootSpec |
|
738 | 726 |
"This resource specification was automatically generated |
727 |
by the UIPainter of ST/X." |
|
728 |
||
729 |
"Do not manually edit this!! If it is corrupted, |
|
730 |
the UIPainter may not be able to read the specification." |
|
199 | 731 |
|
732 |
" |
|
733 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec |
|
734 |
MenuEditor new openInterface:#basicsRootSpec |
|
735 |
" |
|
736 |
||
737 |
<resource: #canvas> |
|
738 |
||
739 |
^ |
|
740 |
||
741 |
#(#FullSpec |
|
703 | 742 |
#window: |
199 | 743 |
#(#WindowSpec |
728 | 744 |
#name: 'Basics Root' |
738 | 745 |
#layout: #(#LayoutFrame 473 0 301 0 739 0 619 0) |
728 | 746 |
#label: 'Basics Root' |
703 | 747 |
#min: #(#Point 10 10) |
748 |
#max: #(#Point 1280 1024) |
|
738 | 749 |
#bounds: #(#Rectangle 473 301 740 620) |
703 | 750 |
#usePreferredExtent: false |
199 | 751 |
) |
703 | 752 |
#component: |
199 | 753 |
#(#SpecCollection |
703 | 754 |
#collection: |
199 | 755 |
#( |
756 |
#(#LabelSpec |
|
703 | 757 |
#name: 'selectorLabel' |
758 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
759 |
#label: 'Selector:' |
|
760 |
#adjust: #right |
|
761 |
#resizeForLabel: true |
|
199 | 762 |
) |
763 |
#(#InputFieldSpec |
|
703 | 764 |
#name: 'selectorField' |
765 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
766 |
#activeHelpKey: #basicsSelector |
|
767 |
#tabable: true |
|
768 |
#model: #label |
|
769 |
#acceptOnReturn: false |
|
770 |
#acceptOnTab: false |
|
931 | 771 |
#group: #inputGroup |
199 | 772 |
) |
773 |
) |
|
774 |
) |
|
775 |
) |
|
931 | 776 |
|
777 |
"Modified: / 31.7.1998 / 01:18:28 / cg" |
|
199 | 778 |
! |
779 |
||
218 | 780 |
basicsSeparatorSpec |
738 | 781 |
"This resource specification was automatically generated |
782 |
by the UIPainter of ST/X." |
|
783 |
||
784 |
"Do not manually edit this!! If it is corrupted, |
|
785 |
the UIPainter may not be able to read the specification." |
|
199 | 786 |
|
787 |
" |
|
218 | 788 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec |
789 |
MenuEditor new openInterface:#basicsSeparatorSpec |
|
199 | 790 |
" |
791 |
||
792 |
<resource: #canvas> |
|
793 |
||
794 |
^ |
|
795 |
||
796 |
#(#FullSpec |
|
703 | 797 |
#window: |
199 | 798 |
#(#WindowSpec |
728 | 799 |
#name: 'Basics Separator' |
738 | 800 |
#layout: #(#LayoutFrame 473 0 301 0 739 0 619 0) |
728 | 801 |
#label: 'Basics Separator' |
703 | 802 |
#min: #(#Point 10 10) |
803 |
#max: #(#Point 1160 870) |
|
738 | 804 |
#bounds: #(#Rectangle 473 301 740 620) |
703 | 805 |
#usePreferredExtent: false |
199 | 806 |
) |
703 | 807 |
#component: |
199 | 808 |
#(#SpecCollection |
703 | 809 |
#collection: |
199 | 810 |
#( |
218 | 811 |
#(#LabelSpec |
703 | 812 |
#name: 'separatorLabel' |
813 |
#layout: #(#AlignmentOrigin 127 0 26 0 1 0.5) |
|
814 |
#label: 'Separator Type:' |
|
815 |
#adjust: #right |
|
816 |
#resizeForLabel: true |
|
218 | 817 |
) |
818 |
#(#ComboListSpec |
|
703 | 819 |
#name: 'seperatorList' |
820 |
#layout: #(#LayoutFrame 132 0 15 0 -5 1.0 37 0) |
|
821 |
#activeHelpKey: #basicsSeparatorType |
|
822 |
#tabable: true |
|
823 |
#model: #seperatorSelection |
|
824 |
#useIndex: true |
|
199 | 825 |
) |
606 | 826 |
#(#LabelSpec |
703 | 827 |
#name: 'visibilityLabel' |
828 |
#layout: #(#AlignmentOrigin 127 0 76 0 1 0.5) |
|
829 |
#label: 'Visibility:' |
|
830 |
#adjust: #right |
|
831 |
#resizeForLabel: true |
|
606 | 832 |
) |
833 |
#(#InputFieldSpec |
|
728 | 834 |
#name: 'visibilityInputField' |
703 | 835 |
#layout: #(#LayoutFrame 132 0 65 0 -5 1.0 87 0) |
836 |
#activeHelpKey: #detailsVisibility |
|
837 |
#tabable: true |
|
838 |
#model: #isVisible |
|
839 |
#type: #symbolOrNil |
|
840 |
#acceptOnReturn: false |
|
841 |
#acceptOnTab: false |
|
931 | 842 |
#group: #inputGroup |
606 | 843 |
) |
199 | 844 |
) |
845 |
) |
|
846 |
) |
|
931 | 847 |
|
848 |
"Modified: / 31.7.1998 / 01:18:32 / cg" |
|
199 | 849 |
! |
850 |
||
851 |
detailsEditSpec |
|
738 | 852 |
"This resource specification was automatically generated |
853 |
by the UIPainter of ST/X." |
|
854 |
||
855 |
"Do not manually edit this!! If it is corrupted, |
|
856 |
the UIPainter may not be able to read the specification." |
|
199 | 857 |
|
858 |
" |
|
859 |
UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec |
|
860 |
MenuEditor new openInterface:#detailsEditSpec |
|
861 |
" |
|
862 |
||
863 |
<resource: #canvas> |
|
864 |
||
865 |
^ |
|
866 |
||
867 |
#(#FullSpec |
|
703 | 868 |
#window: |
199 | 869 |
#(#WindowSpec |
728 | 870 |
#name: 'Details Edit' |
738 | 871 |
#layout: #(#LayoutFrame 332 0 374 0 590 0 661 0) |
728 | 872 |
#label: 'Details Edit' |
703 | 873 |
#min: #(#Point 10 10) |
874 |
#max: #(#Point 1280 1024) |
|
738 | 875 |
#bounds: #(#Rectangle 332 374 591 662) |
703 | 876 |
#usePreferredExtent: false |
199 | 877 |
) |
703 | 878 |
#component: |
199 | 879 |
#(#SpecCollection |
703 | 880 |
#collection: |
199 | 881 |
#( |
882 |
#(#LabelSpec |
|
703 | 883 |
#name: 'shortcutKeyLabel' |
884 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
959 | 885 |
#activeHelpKey: #detailsAccelerator |
703 | 886 |
#label: 'Accelerator:' |
887 |
#adjust: #right |
|
888 |
#resizeForLabel: true |
|
371 | 889 |
) |
890 |
#(#InputFieldSpec |
|
703 | 891 |
#name: 'shortcutKeyField' |
892 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
893 |
#activeHelpKey: #detailsAccelerator |
|
894 |
#tabable: true |
|
895 |
#model: #shortcutKey |
|
896 |
#type: #symbolOrNil |
|
897 |
#acceptOnReturn: false |
|
898 |
#acceptOnTab: false |
|
931 | 899 |
#group: #inputGroup |
371 | 900 |
) |
901 |
#(#LabelSpec |
|
703 | 902 |
#name: 'enabledLabel' |
903 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
959 | 904 |
#activeHelpKey: #detailsEnabled |
703 | 905 |
#label: 'Enabled:' |
906 |
#adjust: #right |
|
907 |
#resizeForLabel: true |
|
199 | 908 |
) |
909 |
#(#InputFieldSpec |
|
703 | 910 |
#name: 'enabledField' |
911 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
912 |
#activeHelpKey: #detailsEnabled |
|
913 |
#tabable: true |
|
914 |
#model: #enabled |
|
915 |
#type: #symbolOrNil |
|
916 |
#acceptOnReturn: false |
|
917 |
#acceptOnTab: false |
|
931 | 918 |
#group: #inputGroup |
199 | 919 |
) |
920 |
#(#LabelSpec |
|
703 | 921 |
#name: 'visibilityLabel' |
922 |
#layout: #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
959 | 923 |
#activeHelpKey: #detailsVisibility |
703 | 924 |
#label: 'Visibility:' |
925 |
#adjust: #right |
|
926 |
#resizeForLabel: true |
|
199 | 927 |
) |
928 |
#(#InputFieldSpec |
|
703 | 929 |
#name: 'isVisibleInputField' |
930 |
#layout: #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
|
931 |
#activeHelpKey: #detailsVisibility |
|
932 |
#tabable: true |
|
933 |
#model: #isVisible |
|
934 |
#type: #symbolOrNil |
|
935 |
#acceptOnReturn: false |
|
936 |
#acceptOnTab: false |
|
931 | 937 |
#group: #inputGroup |
199 | 938 |
) |
532 | 939 |
#(#LabelSpec |
703 | 940 |
#name: 'StartGroupLabel' |
941 |
#layout: #(#AlignmentOrigin 107 0 111 0 1 0.5) |
|
959 | 942 |
#activeHelpKey: #detailsStartGroup |
703 | 943 |
#label: 'Start Group:' |
944 |
#adjust: #right |
|
945 |
#resizeForLabel: true |
|
532 | 946 |
) |
947 |
#(#PopUpListSpec |
|
703 | 948 |
#name: 'StartGroupPopUp' |
959 | 949 |
#activeHelpKey: #detailsStartGroup |
703 | 950 |
#layout: #(#LayoutFrame 110 0 100 0 -5 1.0 122 0) |
951 |
#label: 'PopUpList' |
|
738 | 952 |
#tabable: true |
703 | 953 |
#model: #startGroup |
954 |
#menu: |
|
532 | 955 |
#(nil |
956 |
#right |
|
957 |
) |
|
703 | 958 |
#useIndex: false |
532 | 959 |
) |
539 | 960 |
#(#LabelSpec |
703 | 961 |
#name: 'accessCharLabel' |
962 |
#layout: #(#AlignmentOrigin 217 0 142 0 1 0.5) |
|
959 | 963 |
#activeHelpKey: #detailsAccessCharaterPosition |
703 | 964 |
#label: 'Access Character Position:' |
965 |
#adjust: #right |
|
966 |
#resizeForLabel: true |
|
539 | 967 |
) |
968 |
#(#InputFieldSpec |
|
703 | 969 |
#name: 'accessCharField' |
970 |
#layout: #(#LayoutFrame 220 0 131 0 -5 1.0 153 0) |
|
971 |
#activeHelpKey: #detailsAccessCharaterPosition |
|
972 |
#tabable: true |
|
973 |
#model: #accessCharacterPos |
|
974 |
#type: #numberOrNil |
|
975 |
#acceptOnReturn: false |
|
976 |
#acceptOnTab: false |
|
931 | 977 |
#group: #inputGroup |
539 | 978 |
) |
199 | 979 |
) |
980 |
) |
|
981 |
) |
|
931 | 982 |
|
959 | 983 |
"Modified: / 18.8.1998 / 16:16:46 / cg" |
199 | 984 |
! |
985 |
||
398 | 986 |
imageEditSpec |
738 | 987 |
"This resource specification was automatically generated |
988 |
by the UIPainter of ST/X." |
|
989 |
||
990 |
"Do not manually edit this!! If it is corrupted, |
|
991 |
the UIPainter may not be able to read the specification." |
|
199 | 992 |
|
993 |
" |
|
398 | 994 |
UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec |
995 |
MenuEditor new openInterface:#imageEditSpec |
|
199 | 996 |
" |
997 |
||
998 |
<resource: #canvas> |
|
999 |
||
1000 |
^ |
|
703 | 1001 |
|
199 | 1002 |
#(#FullSpec |
703 | 1003 |
#window: |
199 | 1004 |
#(#WindowSpec |
728 | 1005 |
#name: 'Image Item' |
888 | 1006 |
#layout: #(#LayoutFrame 182 0 348 0 577 0 624 0) |
728 | 1007 |
#label: 'Image Item' |
703 | 1008 |
#min: #(#Point 10 10) |
1009 |
#max: #(#Point 1280 1024) |
|
888 | 1010 |
#bounds: #(#Rectangle 182 348 578 625) |
703 | 1011 |
#usePreferredExtent: false |
199 | 1012 |
) |
703 | 1013 |
#component: |
199 | 1014 |
#(#SpecCollection |
703 | 1015 |
#collection: |
199 | 1016 |
#( |
879 | 1017 |
#(#CheckBoxSpec |
1018 |
#name: 'iconAndLabelCheckBox' |
|
1019 |
#layout: #(#LayoutOrigin 20 0 215 0) |
|
1020 |
#activeHelpKey: #imageImageAndLabel |
|
1021 |
#tabable: true |
|
1022 |
#model: #iconAndLabel |
|
1023 |
#label: 'Image & Label' |
|
1024 |
) |
|
199 | 1025 |
#(#LabelSpec |
703 | 1026 |
#name: 'retrieverLabel' |
1027 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
959 | 1028 |
#activeHelpKey: #imageRetriever |
703 | 1029 |
#label: 'Retriever:' |
1030 |
#adjust: #right |
|
1031 |
#resizeForLabel: true |
|
199 | 1032 |
) |
1033 |
#(#InputFieldSpec |
|
703 | 1034 |
#name: 'retrieverField' |
1035 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
1036 |
#activeHelpKey: #imageRetriever |
|
1037 |
#tabable: true |
|
1038 |
#model: #retriever |
|
1039 |
#type: #symbolOrNil |
|
1040 |
#acceptOnReturn: false |
|
1041 |
#acceptOnTab: false |
|
931 | 1042 |
#group: #inputGroup |
199 | 1043 |
) |
1044 |
#(#LabelSpec |
|
703 | 1045 |
#name: 'iconLabel' |
1046 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
959 | 1047 |
#activeHelpKey: #imageSelector |
703 | 1048 |
#label: 'Selector:' |
1049 |
#adjust: #right |
|
1050 |
#resizeForLabel: true |
|
199 | 1051 |
) |
1052 |
#(#InputFieldSpec |
|
703 | 1053 |
#name: 'iconField' |
1054 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
1055 |
#activeHelpKey: #imageSelector |
|
1056 |
#tabable: true |
|
1057 |
#model: #icon |
|
1058 |
#type: #symbolOrNil |
|
1059 |
#acceptOnReturn: false |
|
1060 |
#acceptOnTab: false |
|
931 | 1061 |
#group: #inputGroup |
199 | 1062 |
) |
469 | 1063 |
#(#ActionButtonSpec |
703 | 1064 |
#name: 'imageEditorButton' |
879 | 1065 |
#layout: #(#LayoutFrame 5 0.6 67 0 -5 1 91 0) |
703 | 1066 |
#activeHelpKey: #imageImageEditor |
1067 |
#label: 'Image Editor' |
|
1068 |
#tabable: true |
|
1069 |
#model: #doEditImage |
|
469 | 1070 |
) |
879 | 1071 |
#(#SequenceViewSpec |
1072 |
#name: 'systemOrUserImagesList' |
|
959 | 1073 |
#activeHelpKey: #imageImageList |
888 | 1074 |
#layout: #(#LayoutFrame 110 0 67 0 0 0.6 200 0) |
879 | 1075 |
#model: #selectionOfImage |
888 | 1076 |
#menu: #menuEditImage |
879 | 1077 |
#hasHorizontalScrollBar: true |
1078 |
#hasVerticalScrollBar: true |
|
1079 |
#miniScrollerHorizontal: true |
|
885 | 1080 |
#doubleClickSelector: #doEditImage |
879 | 1081 |
#valueChangeSelector: #imageSelected |
1082 |
#useIndex: false |
|
1083 |
#sequenceList: #listOfImages |
|
199 | 1084 |
) |
1085 |
) |
|
1086 |
) |
|
1087 |
) |
|
931 | 1088 |
|
959 | 1089 |
"Modified: / 18.8.1998 / 16:17:59 / cg" |
525 | 1090 |
! |
1091 |
||
1092 |
windowSpec |
|
738 | 1093 |
"This resource specification was automatically generated |
1094 |
by the UIPainter of ST/X." |
|
1095 |
||
1096 |
"Do not manually edit this!! If it is corrupted, |
|
1097 |
the UIPainter may not be able to read the specification." |
|
525 | 1098 |
|
1099 |
" |
|
1100 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
1101 |
MenuEditor new openInterface:#windowSpec |
|
738 | 1102 |
MenuEditor open |
525 | 1103 |
" |
1104 |
||
1105 |
<resource: #canvas> |
|
1106 |
||
1107 |
^ |
|
1108 |
||
1109 |
#(#FullSpec |
|
703 | 1110 |
#window: |
525 | 1111 |
#(#WindowSpec |
734 | 1112 |
#name: 'Menu Editor' |
955 | 1113 |
#layout: #(#LayoutFrame 53 0 403 0 609 0 810 0) |
734 | 1114 |
#label: 'Menu Editor' |
748 | 1115 |
#min: #(#Point 510 390) |
703 | 1116 |
#max: #(#Point 1152 900) |
955 | 1117 |
#bounds: #(#Rectangle 53 403 610 811) |
703 | 1118 |
#menu: #menu |
1119 |
#usePreferredExtent: false |
|
525 | 1120 |
) |
703 | 1121 |
#component: |
525 | 1122 |
#(#SpecCollection |
703 | 1123 |
#collection: |
525 | 1124 |
#( |
1125 |
#(#MenuPanelSpec |
|
703 | 1126 |
#name: 'menuToolbarView' |
1127 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1128 |
#menu: #menuToolbar |
|
1129 |
#showSeparatingLines: true |
|
525 | 1130 |
) |
1131 |
#(#VariableHorizontalPanelSpec |
|
734 | 1132 |
#name: 'VariableHorizontalPanel' |
703 | 1133 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
1134 |
#component: |
|
525 | 1135 |
#(#SpecCollection |
703 | 1136 |
#collection: |
525 | 1137 |
#( |
1138 |
#(#ArbitraryComponentSpec |
|
734 | 1139 |
#name: 'TreeView' |
703 | 1140 |
#menu: #menuEdit |
1141 |
#hasHorizontalScrollBar: true |
|
1142 |
#hasVerticalScrollBar: true |
|
1143 |
#component: #treeView |
|
1144 |
#hasBorder: false |
|
525 | 1145 |
) |
1146 |
#(#ViewSpec |
|
734 | 1147 |
#name: 'Box' |
703 | 1148 |
#component: |
525 | 1149 |
#(#SpecCollection |
703 | 1150 |
#collection: |
525 | 1151 |
#( |
1152 |
#(#NoteBookViewSpec |
|
734 | 1153 |
#name: 'NoteBook' |
748 | 1154 |
#layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
703 | 1155 |
#tabable: true |
1156 |
#model: #tabModel |
|
1157 |
#menu: #tabList |
|
1158 |
#useIndex: true |
|
1159 |
#canvas: #noteBookView |
|
525 | 1160 |
) |
1161 |
#(#UISubSpecification |
|
703 | 1162 |
#name: 'SubSpecification' |
1163 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1164 |
#majorKey: #ToolApplicationModel |
|
1165 |
#minorKey: #windowSpecForCommit |
|
525 | 1166 |
) |
1167 |
) |
|
1168 |
) |
|
703 | 1169 |
#level: -1 |
525 | 1170 |
) |
1171 |
) |
|
1172 |
) |
|
836 | 1173 |
#handles: #(#Any 0.30117 1.0) |
525 | 1174 |
) |
1175 |
#(#UISubSpecification |
|
734 | 1176 |
#name: 'InfoBarSubSpec' |
703 | 1177 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
1178 |
#majorKey: #ToolApplicationModel |
|
1179 |
#minorKey: #windowSpecForInfoBar |
|
525 | 1180 |
) |
1181 |
) |
|
1182 |
) |
|
1183 |
) |
|
1184 |
! ! |
|
1185 |
||
1186 |
!MenuEditor class methodsFor:'menu specs'! |
|
1187 |
||
1188 |
menu |
|
738 | 1189 |
"This resource specification was automatically generated |
1190 |
by the MenuEditor of ST/X." |
|
1191 |
||
1192 |
"Do not manually edit this!! If it is corrupted, |
|
1193 |
the MenuEditor may not be able to read the specification." |
|
525 | 1194 |
|
1195 |
" |
|
1196 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
1197 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
1198 |
" |
|
1199 |
||
1200 |
<resource: #menu> |
|
1201 |
||
1202 |
^ |
|
1203 |
||
1204 |
#(#Menu |
|
1205 |
||
1206 |
#( |
|
1207 |
#(#MenuItem |
|
686 | 1208 |
#label: 'About' |
836 | 1209 |
#translateLabel: true |
686 | 1210 |
#accessCharacterPosition: 1 |
1211 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
|
1212 |
#submenuChannel: #menuAbout |
|
525 | 1213 |
) |
1214 |
#(#MenuItem |
|
686 | 1215 |
#label: 'File' |
1216 |
#activeHelpKey: #file |
|
836 | 1217 |
#translateLabel: true |
686 | 1218 |
#submenu: |
525 | 1219 |
#(#Menu |
1220 |
||
1221 |
#( |
|
1222 |
#(#MenuItem |
|
686 | 1223 |
#label: 'New' |
1224 |
#value: #doNew |
|
836 | 1225 |
#translateLabel: true |
686 | 1226 |
#activeHelpKey: #fileNew |
525 | 1227 |
) |
1228 |
#(#MenuItem |
|
686 | 1229 |
#label: '-' |
525 | 1230 |
) |
1231 |
#(#MenuItem |
|
686 | 1232 |
#label: 'Load...' |
1233 |
#translateLabel: true |
|
1234 |
#value: #doLoad |
|
1235 |
#activeHelpKey: #fileLoad |
|
525 | 1236 |
) |
1237 |
#(#MenuItem |
|
686 | 1238 |
#label: '-' |
525 | 1239 |
) |
1240 |
#(#MenuItem |
|
686 | 1241 |
#label: 'Save' |
836 | 1242 |
#translateLabel: true |
686 | 1243 |
#value: #doSave |
1244 |
#activeHelpKey: #fileSave |
|
525 | 1245 |
) |
1246 |
#(#MenuItem |
|
686 | 1247 |
#label: 'Save As...' |
836 | 1248 |
#translateLabel: true |
686 | 1249 |
#value: #doSaveAs |
1250 |
#activeHelpKey: #fileSaveAs |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1251 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1252 |
#(#MenuItem |
686 | 1253 |
#label: '-' |
525 | 1254 |
) |
1255 |
#(#MenuItem |
|
686 | 1256 |
#label: 'Pick A Menu...' |
836 | 1257 |
#translateLabel: true |
686 | 1258 |
#value: #doPickAMenu |
1259 |
#activeHelpKey: #filePickAMenu |
|
525 | 1260 |
) |
1261 |
#(#MenuItem |
|
686 | 1262 |
#label: '-' |
525 | 1263 |
) |
1264 |
#(#MenuItem |
|
686 | 1265 |
#label: 'Browse Class' |
836 | 1266 |
#translateLabel: true |
686 | 1267 |
#value: #doBrowseClass |
1268 |
#activeHelpKey: #fileBrowseClass |
|
525 | 1269 |
) |
1270 |
#(#MenuItem |
|
686 | 1271 |
#label: '-' |
525 | 1272 |
) |
1273 |
#(#MenuItem |
|
686 | 1274 |
#label: 'Exit' |
1275 |
#translateLabel: true |
|
1276 |
#value: #closeRequest |
|
1277 |
#activeHelpKey: #fileExit |
|
525 | 1278 |
) |
1279 |
) nil |
|
1280 |
nil |
|
1281 |
) |
|
1282 |
) |
|
1283 |
#(#MenuItem |
|
686 | 1284 |
#label: 'Edit' |
1285 |
#activeHelpKey: #edit |
|
836 | 1286 |
#translateLabel: true |
686 | 1287 |
#submenuChannel: #menuEdit |
525 | 1288 |
) |
1289 |
#(#MenuItem |
|
686 | 1290 |
#label: 'Add' |
1291 |
#activeHelpKey: #add |
|
836 | 1292 |
#translateLabel: true |
686 | 1293 |
#submenuChannel: #menuAdd |
525 | 1294 |
) |
1295 |
#(#MenuItem |
|
686 | 1296 |
#label: 'Test' |
1297 |
#activeHelpKey: #test |
|
836 | 1298 |
#translateLabel: true |
686 | 1299 |
#submenuChannel: #submenuTest |
525 | 1300 |
) |
1301 |
#(#MenuItem |
|
738 | 1302 |
#label: 'Settings' |
1303 |
#submenu: |
|
1304 |
#(#Menu |
|
1305 |
||
1306 |
#( |
|
1307 |
#(#MenuItem |
|
1308 |
#label: 'Fonts' |
|
836 | 1309 |
#translateLabel: true |
738 | 1310 |
#submenuChannel: #menuFont |
1311 |
) |
|
1312 |
) nil |
|
1313 |
nil |
|
1314 |
) |
|
1315 |
) |
|
1316 |
#(#MenuItem |
|
748 | 1317 |
#label: 'History' |
1318 |
#activeHelpKey: #history |
|
836 | 1319 |
#translateLabel: true |
748 | 1320 |
#submenuChannel: #menuHistory |
1321 |
) |
|
1322 |
#(#MenuItem |
|
686 | 1323 |
#label: 'Help' |
836 | 1324 |
#translateLabel: true |
686 | 1325 |
#startGroup: #right |
748 | 1326 |
#submenu: |
1327 |
#(#Menu |
|
1328 |
||
1329 |
#( |
|
1330 |
#(#MenuItem |
|
1331 |
#label: 'Documentation' |
|
1332 |
#value: #openHTMLDocument: |
|
836 | 1333 |
#translateLabel: true |
748 | 1334 |
#activeHelpKey: #helpTutorial |
764 | 1335 |
#argument: 'tools/uipainter/MenuEditor.html' |
748 | 1336 |
) |
1337 |
#(#MenuItem |
|
1338 |
#label: '-' |
|
1339 |
) |
|
1340 |
#(#MenuItem |
|
1341 |
#label: 'Help Tool' |
|
1342 |
#value: #openHTMLDocument: |
|
836 | 1343 |
#translateLabel: true |
748 | 1344 |
#activeHelpKey: #helpHelpTool |
1345 |
#argument: 'tools/uipainter/HelpTool.html' |
|
1346 |
) |
|
1347 |
#(#MenuItem |
|
1348 |
#label: '-' |
|
1349 |
) |
|
1350 |
#(#MenuItem |
|
1351 |
#label: 'Show Help Texts' |
|
836 | 1352 |
#translateLabel: true |
748 | 1353 |
#activeHelpKey: #helpShowHelp |
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1354 |
#indication: #showingHelp: |
748 | 1355 |
) |
1356 |
) nil |
|
1357 |
nil |
|
1358 |
) |
|
525 | 1359 |
) |
1360 |
) nil |
|
1361 |
nil |
|
1362 |
) |
|
836 | 1363 |
|
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1364 |
"Modified: / 31.7.1998 / 18:19:47 / cg" |
525 | 1365 |
! |
1366 |
||
1367 |
menuAdd |
|
738 | 1368 |
"This resource specification was automatically generated |
1369 |
by the MenuEditor of ST/X." |
|
1370 |
||
1371 |
"Do not manually edit this!! If it is corrupted, |
|
1372 |
the MenuEditor may not be able to read the specification." |
|
525 | 1373 |
|
1374 |
" |
|
1375 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd |
|
1376 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp |
|
1377 |
" |
|
1378 |
||
1379 |
<resource: #menu> |
|
1380 |
||
1381 |
^ |
|
1382 |
||
1383 |
#(#Menu |
|
1384 |
||
1385 |
#( |
|
1386 |
#(#MenuItem |
|
703 | 1387 |
#label: 'Menu Item' |
836 | 1388 |
#translateLabel: true |
703 | 1389 |
#value: #doCreateItem |
1390 |
#activeHelpKey: #addMenuItem |
|
1391 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') |
|
525 | 1392 |
) |
1393 |
#(#MenuItem |
|
703 | 1394 |
#label: 'Menu Separator' |
836 | 1395 |
#translateLabel: true |
703 | 1396 |
#value: #doCreateSep |
1397 |
#activeHelpKey: #addMenuSeparator |
|
1398 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') |
|
525 | 1399 |
) |
1400 |
#(#MenuItem |
|
703 | 1401 |
#label: '-' |
525 | 1402 |
) |
1403 |
#(#MenuItem |
|
703 | 1404 |
#label: 'Submenu' |
836 | 1405 |
#translateLabel: true |
703 | 1406 |
#value: #doCreateMenu |
1407 |
#activeHelpKey: #addSubMenu |
|
1408 |
#labelImage: #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') |
|
525 | 1409 |
) |
1410 |
#(#MenuItem |
|
703 | 1411 |
#label: 'Submenu Link' |
836 | 1412 |
#translateLabel: true |
703 | 1413 |
#value: #doCreateLink |
1414 |
#activeHelpKey: #addSubMenuLink |
|
1415 |
#labelImage: #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Submenu Link') |
|
525 | 1416 |
) |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1417 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1418 |
#label: '-' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1419 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1420 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1421 |
#label: 'Standard Submenu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1422 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1423 |
#submenu: |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1424 |
#(#Menu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1425 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1426 |
#( |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1427 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1428 |
#label: 'Standard File Menu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1429 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1430 |
#value: #doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1431 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1432 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1433 |
#label: 'Standard Edit Menu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1434 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1435 |
#value: #doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1436 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1437 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1438 |
#label: 'Standard Help Menu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1439 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1440 |
#value: #doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1441 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1442 |
) nil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1443 |
nil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1444 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1445 |
) |
525 | 1446 |
) nil |
1447 |
nil |
|
1448 |
) |
|
836 | 1449 |
|
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1450 |
"Modified: / 23.8.1998 / 15:48:21 / cg" |
525 | 1451 |
! |
1452 |
||
1453 |
menuDefaultLink |
|
738 | 1454 |
"This resource specification was automatically generated |
1455 |
by the MenuEditor of ST/X." |
|
1456 |
||
1457 |
"Do not manually edit this!! If it is corrupted, |
|
1458 |
the MenuEditor may not be able to read the specification." |
|
525 | 1459 |
|
1460 |
" |
|
1461 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
1462 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
1463 |
" |
|
1464 |
||
1465 |
<resource: #menu> |
|
1466 |
||
1467 |
^ |
|
738 | 1468 |
|
525 | 1469 |
#(#Menu |
738 | 1470 |
|
525 | 1471 |
#( |
1472 |
#(#MenuItem |
|
738 | 1473 |
#'label:' '!!!! derives from application !!!!' |
525 | 1474 |
) |
1475 |
) nil |
|
1476 |
nil |
|
1477 |
) |
|
1478 |
! |
|
1479 |
||
1480 |
menuEdit |
|
738 | 1481 |
"This resource specification was automatically generated |
1482 |
by the MenuEditor of ST/X." |
|
1483 |
||
1484 |
"Do not manually edit this!! If it is corrupted, |
|
1485 |
the MenuEditor may not be able to read the specification." |
|
525 | 1486 |
|
1487 |
" |
|
1488 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit |
|
1489 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp |
|
1490 |
" |
|
1491 |
||
1492 |
<resource: #menu> |
|
1493 |
||
1494 |
^ |
|
1495 |
||
1496 |
#(#Menu |
|
1497 |
||
1498 |
#( |
|
1499 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1500 |
#label: 'Cut' |
882 | 1501 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1502 |
#value: #doCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1503 |
#activeHelpKey: #editCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1504 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1505 |
#shortcutKeyCharacter: #Cut |
525 | 1506 |
) |
1507 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1508 |
#label: 'Copy' |
882 | 1509 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1510 |
#value: #doCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1511 |
#activeHelpKey: #editCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1512 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1513 |
#shortcutKeyCharacter: #Copy |
525 | 1514 |
) |
1515 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1516 |
#label: 'Paste' |
882 | 1517 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1518 |
#value: #doPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1519 |
#activeHelpKey: #editPaste |
738 | 1520 |
#enabled: #valueOfCanPaste |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1521 |
#shortcutKeyCharacter: #Paste |
525 | 1522 |
) |
1523 |
#(#MenuItem |
|
686 | 1524 |
#label: 'Delete' |
882 | 1525 |
#translateLabel: true |
686 | 1526 |
#value: #doDelete |
1527 |
#activeHelpKey: #editDelete |
|
1528 |
#enabled: #hasValidSelection |
|
1529 |
#shortcutKeyCharacter: #Delete |
|
1530 |
) |
|
1531 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1532 |
#label: '-' |
525 | 1533 |
) |
1534 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1535 |
#label: 'Move Up' |
882 | 1536 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1537 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1538 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1539 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1540 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up') |
525 | 1541 |
) |
1542 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1543 |
#label: 'Move Down' |
882 | 1544 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1545 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1546 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1547 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1548 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down') |
525 | 1549 |
) |
1550 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1551 |
#label: 'Move In' |
882 | 1552 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1553 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1554 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1555 |
#enabled: #valueOfEnableMovingIn |
882 | 1556 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In') |
525 | 1557 |
) |
1558 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1559 |
#label: 'Move Out' |
882 | 1560 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1561 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1562 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1563 |
#enabled: #valueOfEnableMovingOut |
882 | 1564 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out') |
525 | 1565 |
) |
1566 |
) nil |
|
1567 |
nil |
|
1568 |
) |
|
1569 |
! |
|
1570 |
||
888 | 1571 |
menuEditImage |
1572 |
"This resource specification was automatically generated |
|
1573 |
by the MenuEditor of ST/X." |
|
1574 |
||
1575 |
"Do not manually edit this!! If it is corrupted, |
|
1576 |
the MenuEditor may not be able to read the specification." |
|
1577 |
||
1578 |
" |
|
1579 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEditImage |
|
1580 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEditImage)) startUp |
|
1581 |
" |
|
1582 |
||
1583 |
<resource: #menu> |
|
1584 |
||
1585 |
^ |
|
1586 |
||
1587 |
#(#Menu |
|
1588 |
||
1589 |
#( |
|
1590 |
#(#MenuItem |
|
1591 |
#label: 'Edit' |
|
1592 |
#translateLabel: true |
|
1593 |
#value: #doEditImage |
|
1594 |
#activeHelpKey: #editCut |
|
1595 |
#enabled: #hasValidSelection |
|
1596 |
#shortcutKeyCharacter: #Cut |
|
1597 |
) |
|
1598 |
#(#MenuItem |
|
1599 |
#label: 'Remove' |
|
1600 |
#translateLabel: true |
|
1601 |
#value: #doRemoveImage |
|
1602 |
#activeHelpKey: #editCopy |
|
1603 |
#enabled: #hasValidSelection |
|
1604 |
#shortcutKeyCharacter: #Copy |
|
1605 |
) |
|
1606 |
) nil |
|
1607 |
nil |
|
1608 |
) |
|
1609 |
! |
|
1610 |
||
525 | 1611 |
menuToolbar |
738 | 1612 |
"This resource specification was automatically generated |
1613 |
by the MenuEditor of ST/X." |
|
1614 |
||
1615 |
"Do not manually edit this!! If it is corrupted, |
|
1616 |
the MenuEditor may not be able to read the specification." |
|
525 | 1617 |
|
1618 |
" |
|
1619 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar |
|
1620 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp |
|
1621 |
" |
|
1622 |
||
1623 |
<resource: #menu> |
|
1624 |
||
1625 |
^ |
|
1626 |
||
1627 |
#(#Menu |
|
1628 |
||
1629 |
#( |
|
1630 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1631 |
#label: 'New' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1632 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1633 |
#value: #doNew |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1634 |
#activeHelpKey: #fileNew |
879 | 1635 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
525 | 1636 |
) |
1637 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1638 |
#label: 'Load' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1639 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1640 |
#value: #doLoad |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1641 |
#activeHelpKey: #fileLoad |
879 | 1642 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
525 | 1643 |
) |
1644 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1645 |
#label: 'Save' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1646 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1647 |
#value: #doSave |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1648 |
#activeHelpKey: #fileSave |
879 | 1649 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
525 | 1650 |
) |
1651 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1652 |
#label: '' |
525 | 1653 |
) |
1654 |
#(#MenuItem |
|
686 | 1655 |
#label: 'Cut' |
1656 |
#isButton: true |
|
1657 |
#value: #doCut |
|
1658 |
#activeHelpKey: #editCut |
|
1659 |
#enabled: #hasValidSelection |
|
879 | 1660 |
#labelImage: #(#ResourceRetriever #Icon #cutIcon) |
686 | 1661 |
) |
1662 |
#(#MenuItem |
|
1663 |
#label: 'Copy' |
|
1664 |
#isButton: true |
|
1665 |
#value: #doCopy |
|
1666 |
#activeHelpKey: #editCopy |
|
1667 |
#enabled: #hasValidSelection |
|
879 | 1668 |
#labelImage: #(#ResourceRetriever #Icon #copyIcon) |
686 | 1669 |
) |
1670 |
#(#MenuItem |
|
1671 |
#label: 'Paste' |
|
1672 |
#isButton: true |
|
1673 |
#value: #doPaste |
|
1674 |
#activeHelpKey: #editPaste |
|
738 | 1675 |
#enabled: #valueOfCanPaste |
879 | 1676 |
#labelImage: #(#ResourceRetriever #Icon #pasteIcon) |
686 | 1677 |
) |
1678 |
#(#MenuItem |
|
1679 |
#label: 'Delete' |
|
1680 |
#isButton: true |
|
1681 |
#value: #doDelete |
|
1682 |
#activeHelpKey: #editDelete |
|
1683 |
#enabled: #hasValidSelection |
|
879 | 1684 |
#labelImage: #(#ResourceRetriever #Icon #deleteIcon) |
686 | 1685 |
) |
1686 |
#(#MenuItem |
|
1687 |
#label: '' |
|
1688 |
) |
|
1689 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1690 |
#label: 'Add Item' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1691 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1692 |
#value: #doCreateItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1693 |
#activeHelpKey: #addMenuItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1694 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1695 |
#labelImage: #(#ResourceRetriever nil #menuItemImage) |
525 | 1696 |
) |
1697 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1698 |
#label: 'Add Separator' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1699 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1700 |
#value: #doCreateSep |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1701 |
#activeHelpKey: #addMenuSeparator |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1702 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1703 |
#labelImage: #(#ResourceRetriever nil #menuSeparatorImage) |
525 | 1704 |
) |
1705 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1706 |
#label: 'Add Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1707 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1708 |
#value: #doCreateMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1709 |
#activeHelpKey: #addSubMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1710 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1711 |
#labelImage: #(#ResourceRetriever nil #submenuImage) |
525 | 1712 |
) |
1713 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1714 |
#label: 'Add Linked Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1715 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1716 |
#value: #doCreateLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1717 |
#activeHelpKey: #addSubMenuLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1718 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1719 |
#labelImage: #(#ResourceRetriever nil #linkSubmenuImage) |
525 | 1720 |
) |
1721 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1722 |
#label: '' |
525 | 1723 |
) |
1724 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1725 |
#label: 'Move Up' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1726 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1727 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1728 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1729 |
#enabled: #valueOfEnableMovingUpOrDown |
879 | 1730 |
#labelImage: #(#ResourceRetriever #Icon #upIcon) |
525 | 1731 |
) |
1732 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1733 |
#label: 'Move Down' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1734 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1735 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1736 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1737 |
#enabled: #valueOfEnableMovingUpOrDown |
879 | 1738 |
#labelImage: #(#ResourceRetriever #Icon #downIcon) |
525 | 1739 |
) |
1740 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1741 |
#label: 'Move In' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1742 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1743 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1744 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1745 |
#enabled: #valueOfEnableMovingIn |
879 | 1746 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon) |
525 | 1747 |
) |
1748 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1749 |
#label: 'Move Out' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1750 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1751 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1752 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1753 |
#enabled: #valueOfEnableMovingOut |
879 | 1754 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon) |
525 | 1755 |
) |
1756 |
) nil |
|
1757 |
nil |
|
1758 |
) |
|
1759 |
! ! |
|
1760 |
||
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1761 |
!MenuEditor class methodsFor:'queries'! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1762 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1763 |
getAllImageSelectorsFrom: aClass |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1764 |
"returns all image selectors implementing an image spec in class aClass" |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1765 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1766 |
|iconClass imageMethodSelectors r| |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1767 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1768 |
aClass isNil ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1769 |
^ #() |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1770 |
]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1771 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1772 |
aClass isSymbol |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1773 |
ifTrue: [iconClass := Smalltalk at: aClass] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1774 |
ifFalse: [iconClass := aClass]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1775 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1776 |
imageMethodSelectors := OrderedCollection new. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1777 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1778 |
iconClass withAllSuperclasses do:[:cls | |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1779 |
cls class methodDictionary keysAndValuesDo: [:sel :m | |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1780 |
(r := m resourceType == #image |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1781 |
or:[r == #programImage]) ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1782 |
imageMethodSelectors add:sel |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1783 |
] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1784 |
] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1785 |
]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1786 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1787 |
^ imageMethodSelectors asSortedCollection asOrderedCollection |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1788 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1789 |
"Modified: / 24.8.1998 / 21:42:34 / cg" |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1790 |
"Created: / 24.8.1998 / 21:53:20 / cg" |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1791 |
! ! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1792 |
|
525 | 1793 |
!MenuEditor class methodsFor:'slices'! |
1794 |
||
1795 |
slicesItem |
|
1796 |
^#( |
|
1797 |
(Basics basicsItemSpec) |
|
1798 |
(Details detailsEditSpec) |
|
1799 |
(Image imageEditSpec) |
|
1800 |
) |
|
1801 |
||
1802 |
! |
|
1803 |
||
1804 |
slicesLink |
|
1805 |
^#( |
|
1806 |
(Basics basicsLinkSpec) |
|
1807 |
(Details detailsEditSpec) |
|
1808 |
(Image imageEditSpec) |
|
1809 |
) |
|
1810 |
||
1811 |
! |
|
1812 |
||
1813 |
slicesMenu |
|
1814 |
^#( |
|
1815 |
(Basics basicsMenuSpec) |
|
1816 |
(Details detailsEditSpec) |
|
1817 |
(Image imageEditSpec) |
|
1818 |
) |
|
1819 |
||
1820 |
! |
|
1821 |
||
1822 |
slicesRootMenu |
|
1823 |
^#( |
|
1824 |
(Basics basicsRootSpec) |
|
1825 |
) |
|
1826 |
||
1827 |
! |
|
1828 |
||
1829 |
slicesSeparatorMenu |
|
1830 |
^#( |
|
1831 |
(Basics basicsSeparatorSpec) |
|
1832 |
) |
|
1833 |
||
199 | 1834 |
! ! |
1835 |
||
1836 |
!MenuEditor methodsFor:'accessing'! |
|
1837 |
||
218 | 1838 |
submenuTest |
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1839 |
"return the submenu assigned to item test; |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1840 |
this is dynamically constructed, to reflect the current |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1841 |
edited menu." |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1842 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1843 |
|menu cls| |
218 | 1844 |
|
407 | 1845 |
(menu := self treeView asMenu) allItemsDo: |
1846 |
[:anItem| |
|
218 | 1847 |
anItem value:nil. |
1848 |
anItem enabled:true. |
|
1849 |
]. |
|
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1850 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1851 |
cls := self resolveName:specClass. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1852 |
menu findGuiResourcesIn:cls. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1853 |
^ menu |
287 | 1854 |
! |
1855 |
||
716 | 1856 |
useHelpTool: aHelpTool |
728 | 1857 |
"take the help dictionaries from aHelpTool into my helpTool" |
407 | 1858 |
|
287 | 1859 |
self noteBookView. |
716 | 1860 |
|
748 | 1861 |
self helpTool buildFromClass: aHelpTool specClass. |
1862 |
self helpTool dictionaries: aHelpTool dictionaries. |
|
1863 |
self helpTool dictionary: aHelpTool dictionary |
|
199 | 1864 |
! ! |
1865 |
||
1866 |
!MenuEditor methodsFor:'aspects'! |
|
1867 |
||
220 | 1868 |
hasAnySingleSelection |
407 | 1869 |
|
1870 |
^builder booleanValueAspectFor: #hasAnySingleSelection |
|
220 | 1871 |
! |
1872 |
||
1873 |
hasValidSelection |
|
407 | 1874 |
|
1875 |
^builder booleanValueAspectFor: #hasValidSelection |
|
220 | 1876 |
! |
1877 |
||
1878 |
hasValidSingleSelection |
|
407 | 1879 |
|
1880 |
^builder booleanValueAspectFor: #hasValidSingleSelection |
|
220 | 1881 |
! |
1882 |
||
879 | 1883 |
listOfImages |
1884 |
"get a list of the images" |
|
1885 |
||
1886 |
|holder| |
|
1887 |
(holder := builder bindingAt:#listOfImages) isNil ifTrue:[ |
|
1888 |
builder aspectAt:#listOfImages put: (holder := List new). |
|
1889 |
self updateListOfImages |
|
1890 |
]. |
|
1891 |
^ holder |
|
1892 |
||
1893 |
||
1894 |
! |
|
1895 |
||
287 | 1896 |
noteBookView |
728 | 1897 |
"create the note book view containing the attibute sections and the help tool" |
199 | 1898 |
|
287 | 1899 |
|noteBook helpTool| |
1900 |
||
1901 |
(noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[ |
|
1902 |
noteBook := View new. |
|
1903 |
helpTool := UIHelpTool new. |
|
1904 |
||
1905 |
helpTool masterApplication:self. |
|
1906 |
helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1907 |
specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1908 |
||
1909 |
helpCanvas client:helpTool. |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1910 |
helpTool masterApplication:self. |
422 | 1911 |
helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
287 | 1912 |
|
1913 |
builder aspectAt:#noteBookView put:noteBook. |
|
199 | 1914 |
]. |
287 | 1915 |
^ noteBook |
199 | 1916 |
! |
1917 |
||
879 | 1918 |
selectionOfImage |
1919 |
"get selection of list of the images as value" |
|
1920 |
||
1921 |
|holder| |
|
1922 |
(holder := builder bindingAt:#selectionOfImage) isNil ifTrue:[ |
|
1923 |
builder aspectAt:#selectionOfImage put: (holder := nil asValue). |
|
1924 |
]. |
|
1925 |
^ holder |
|
1926 |
||
1927 |
||
1928 |
! |
|
1929 |
||
199 | 1930 |
tabList |
728 | 1931 |
"get a value holder with the list of the attribute sections (slices)" |
199 | 1932 |
|
298 | 1933 |
|holder| |
1934 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
|
734 | 1935 |
builder aspectAt:#tabList put:(holder := #(Basics Details Image Help) asValue). |
298 | 1936 |
]. |
1937 |
^ holder |
|
1938 |
||
1939 |
||
199 | 1940 |
! |
1941 |
||
407 | 1942 |
treeView |
728 | 1943 |
"get a tree view representing hierarchically the menu items" |
407 | 1944 |
|
1945 |
|treeView| |
|
1946 |
(treeView := builder bindingAt:#treeView) isNil ifTrue:[ |
|
1947 |
treeView := TreeView new. |
|
1948 |
treeView action:[:dummy|self menuChanged]. |
|
1949 |
builder aspectAt: #treeView put: treeView |
|
1950 |
]. |
|
1951 |
^treeView |
|
199 | 1952 |
! ! |
1953 |
||
728 | 1954 |
!MenuEditor methodsFor:'building'! |
1955 |
||
734 | 1956 |
buildFromClass:aClass andSelector:aSelector |
1957 |
||
1958 |
self isStandAlone ifTrue:[ |
|
748 | 1959 |
self helpTool buildFromClass:specClass |
734 | 1960 |
]. |
1961 |
self treeView buildFromClass: aClass andSelector: aSelector. |
|
1962 |
||
1963 |
self updateHistory. |
|
1964 |
self updateInfoLabel. |
|
1965 |
self treeView selection: 2. |
|
1966 |
self menuChanged |
|
1967 |
||
1968 |
! |
|
1969 |
||
738 | 1970 |
buildFromResourceSpec: aResourceSpec |
728 | 1971 |
|
734 | 1972 |
self buildFromMenu: |
738 | 1973 |
(aResourceSpec class == Menu ifTrue: [aResourceSpec] ifFalse: [aResourceSpec decodeAsLiteralArray]) |
728 | 1974 |
! ! |
1975 |
||
199 | 1976 |
!MenuEditor methodsFor:'change & update'! |
1977 |
||
970 | 1978 |
update:something with:aParameter from:changedObject |
1979 |
super update:something with:aParameter from:changedObject. |
|
1980 |
||
1981 |
changedObject == (aspects at:#retriever) ifTrue:[ |
|
1982 |
self updateListOfImages |
|
1983 |
]. |
|
1984 |
||
1985 |
"Modified: / 24.8.1998 / 21:47:48 / cg" |
|
1986 |
! |
|
1987 |
||
748 | 1988 |
updateChannels |
1989 |
"update channels" |
|
407 | 1990 |
|
1991 |
|node parent next state| |
|
1992 |
||
412 | 1993 |
state := false. |
879 | 1994 |
self updateSelectionOfImage. |
407 | 1995 |
|
1996 |
(node := self treeView selectedNode) notNil |
|
1997 |
ifTrue: |
|
1998 |
[ |
|
220 | 1999 |
self hasAnySingleSelection value:true. |
407 | 2000 |
(parent := node parent) notNil |
2001 |
ifTrue: |
|
2002 |
[ |
|
220 | 2003 |
next := parent childAt:((parent indexOfChild:node) + 1). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2004 |
self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2005 |
self valueOfEnableMovingUpOrDown value:(parent children size > 1). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2006 |
self valueOfEnableMovingOut value:parent parent notNil. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2007 |
self hasValidSingleSelection value:true. |
748 | 2008 |
self hasValidSelection value:true. |
2009 |
self valueOfCanPaste value:true & self valueOfCanPaste value. |
|
738 | 2010 |
^self |
220 | 2011 |
] |
407 | 2012 |
] |
2013 |
ifFalse: |
|
2014 |
[ |
|
220 | 2015 |
self hasAnySingleSelection value:false. |
407 | 2016 |
self treeView numberOfSelections ~~ 0 ifTrue:[ |
2017 |
state := (self treeView isInSelection:1) not |
|
220 | 2018 |
] |
407 | 2019 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2020 |
self valueOfEnableMovingUpOrDown value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2021 |
self valueOfEnableMovingIn value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2022 |
self valueOfEnableMovingOut value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2023 |
self hasValidSingleSelection value:false. |
748 | 2024 |
self hasValidSelection value:state. |
2025 |
self valueOfCanPaste value:(self hasValidSingleSelection value or: [node == self treeView root]) & self valueOfCanPaste value. |
|
879 | 2026 |
|
2027 |
! |
|
2028 |
||
2029 |
updateListAndSelectionOfImage |
|
2030 |
"updates the list and selection of image" |
|
2031 |
||
2032 |
self updateListOfImages. |
|
2033 |
self updateSelectionOfImage |
|
2034 |
! |
|
2035 |
||
2036 |
updateListOfImages |
|
2037 |
"updates the list of images" |
|
2038 |
||
902 | 2039 |
|iconClass| |
2040 |
||
2041 |
(iconClass := (aspects at: #retriever) value ? specClass) notNil ifTrue: |
|
2042 |
[ |
|
2043 |
iconClass := Smalltalk at: iconClass |
|
2044 |
]. |
|
2045 |
||
879 | 2046 |
self listOfImages contents: |
2047 |
((self class getAllImageSelectorsFrom: iconClass) |
|
2048 |
collect: [:sel| |image| image := iconClass perform: sel. LabelAndIcon icon:(image magnifiedBy: 22/image extent y ) string: sel]). |
|
2049 |
||
970 | 2050 |
"Modified: / 24.8.1998 / 21:29:24 / cg" |
879 | 2051 |
! |
2052 |
||
2053 |
updateSelectionOfImage |
|
2054 |
"updates the selection of image" |
|
2055 |
||
2056 |
self selectionOfImage value: nil. |
|
2057 |
self updateListOfImages. |
|
2058 |
self selectionOfImage value: (self listOfImages detect: [:im| im string == (aspects at: #icon) value] ifNone: nil). |
|
2059 |
||
220 | 2060 |
! ! |
2061 |
||
916 | 2062 |
!MenuEditor methodsFor:'defaults'! |
2063 |
||
2064 |
aboutImage |
|
2065 |
"the image to be displayed in my about-box; |
|
2066 |
If nil is returned, thhe ST/X default image is used." |
|
2067 |
||
2068 |
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_menus.xpm' |
|
2069 |
||
2070 |
"Created: / 25.7.1998 / 20:48:12 / cg" |
|
2071 |
"Modified: / 27.7.1998 / 10:21:55 / cg" |
|
2072 |
! ! |
|
2073 |
||
220 | 2074 |
!MenuEditor methodsFor:'event handling'! |
2075 |
||
407 | 2076 |
doesNotUnderstand: aMessage |
2077 |
"detour incoming messages to the tree view" |
|
2078 |
||
2079 |
(self treeView respondsTo: aMessage selector) |
|
2080 |
ifTrue: |
|
2081 |
[ |
|
2082 |
^aMessage sendTo: self treeView |
|
2083 |
]. |
|
2084 |
super doesNotUnderstand:aMessage |
|
220 | 2085 |
|
2086 |
||
199 | 2087 |
! ! |
2088 |
||
287 | 2089 |
!MenuEditor methodsFor:'private'! |
2090 |
||
2091 |
helpKey |
|
728 | 2092 |
"get the help key of the selected menu item" |
407 | 2093 |
|
287 | 2094 |
|node| |
407 | 2095 |
(node := self treeView selectedNode) notNil ifTrue:[ |
287 | 2096 |
^ node contents activeHelpKey |
2097 |
]. |
|
2098 |
^ nil |
|
2099 |
! |
|
2100 |
||
2101 |
helpTool |
|
728 | 2102 |
"get the help tool" |
407 | 2103 |
|
2104 |
^helpCanvas application |
|
287 | 2105 |
! ! |
2106 |
||
199 | 2107 |
!MenuEditor methodsFor:'queries'! |
2108 |
||
2109 |
isHelpToolSelected |
|
728 | 2110 |
"return true if current selection is help tool" |
407 | 2111 |
|
290 | 2112 |
(tabSelection ~~ 0 and:[slices notNil]) ifTrue:[ |
407 | 2113 |
^(slices at:tabSelection) first = UIHelpTool label |
199 | 2114 |
]. |
407 | 2115 |
^false |
287 | 2116 |
! |
2117 |
||
535 | 2118 |
preferredExtent |
2119 |
||
2120 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//2.5) |
|
2121 |
||
2122 |
||
199 | 2123 |
! ! |
2124 |
||
2125 |
!MenuEditor methodsFor:'selection'! |
|
2126 |
||
879 | 2127 |
imageSelected |
2128 |
||
2129 |
(aspects at: #icon) value: self selectionOfImage value string |
|
2130 |
||
2131 |
! |
|
2132 |
||
199 | 2133 |
menuChanged |
407 | 2134 |
|
728 | 2135 |
|node item slc sel old| |
199 | 2136 |
|
407 | 2137 |
aspects do: [:holder| holder removeDependent:self]. |
2138 |
(node := self treeView selectedNode) notNil ifTrue:[ |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2139 |
aspects do:[:anAspect| |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2140 |
anAspect isBlock ifFalse:[anAspect value:nil] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2141 |
]. |
199 | 2142 |
item := node contents. |
2143 |
item toAspects:aspects. |
|
2144 |
||
218 | 2145 |
item isSeparator ifFalse:[ |
199 | 2146 |
node parent isNil ifFalse:[ |
218 | 2147 |
node hasChildren ifTrue:[ |
2148 |
slc := #slicesMenu |
|
2149 |
] ifFalse:[ |
|
2150 |
item submenuChannel isNil ifTrue:[slc := #slicesItem] |
|
2151 |
ifFalse:[slc := #slicesLink] |
|
2152 |
]. |
|
287 | 2153 |
slc := (self class perform:slc) copyWith:#( 'Help' #dummy ). |
199 | 2154 |
] ifTrue:[ |
287 | 2155 |
slc := self class perform:#slicesRootMenu |
2156 |
]. |
|
199 | 2157 |
] ifTrue:[ |
287 | 2158 |
slc := self class perform:#slicesSeparatorMenu. |
2159 |
] |
|
199 | 2160 |
]. |
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2161 |
|
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2162 |
self helpTool helpKey: self helpKey. |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2163 |
"Next line helps me to preserve myself against unnecessary settings of |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2164 |
valueOfEnablingCommitButtons to true in the help tool." |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2165 |
self valueOfEnablingCommitButtons value: false. |
199 | 2166 |
|
2167 |
slc ~= slices ifTrue:[ |
|
290 | 2168 |
tabSelection ~~ 0 ifTrue:[ |
287 | 2169 |
old := (slices at:tabSelection) first |
2170 |
]. |
|
2171 |
||
199 | 2172 |
(slices := slc) notNil ifTrue:[ |
287 | 2173 |
sel := slices collect:[:s| s first]. |
728 | 2174 |
tabSelection := 0. |
287 | 2175 |
self tabList value:sel. |
2176 |
||
2177 |
(old notNil and:[(sel := sel findFirst:[:n|n = old]) ~~ 0]) ifFalse:[ |
|
2178 |
sel := 1 |
|
2179 |
]. |
|
2180 |
self tabModel value:sel |
|
199 | 2181 |
] ifFalse:[ |
2182 |
self tabList value:nil. |
|
290 | 2183 |
self tabSelection:0. |
199 | 2184 |
] |
2185 |
]. |
|
748 | 2186 |
self updateChannels. |
407 | 2187 |
aspects do: [:holder| holder addDependent:self]. |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2188 |
|
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2189 |
"Modified: / 14.8.1998 / 14:52:32 / cg" |
199 | 2190 |
! |
2191 |
||
407 | 2192 |
tabSelection: aSelection |
728 | 2193 |
"put the section aSelection into the note book" |
2194 |
||
287 | 2195 |
tabSelection = aSelection ifTrue:[ |
199 | 2196 |
^ self |
2197 |
]. |
|
298 | 2198 |
(aSelection ~~ 0 and:[slices isNil]) ifTrue:[ |
2199 |
^ self |
|
2200 |
]. |
|
290 | 2201 |
(tabSelection := aSelection) == 0 ifTrue:[ |
287 | 2202 |
slices isNil ifTrue:[ |
2203 |
specCanvas client:nil. |
|
2204 |
^ specCanvas raise. |
|
2205 |
]. |
|
2206 |
tabSelection == 1 ifTrue:[^ self]. |
|
2207 |
tabSelection := 1 |
|
199 | 2208 |
]. |
287 | 2209 |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2210 |
self isHelpToolSelected ifTrue:[ |
287 | 2211 |
self helpTool helpKey:(self helpKey). |
2212 |
helpCanvas raise. |
|
728 | 2213 |
] ifFalse:[ |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2214 |
aspects do: [:holder| holder removeDependent:self]. |
728 | 2215 |
specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder. |
407 | 2216 |
aspects do: [:holder| holder addDependent:self]. |
738 | 2217 |
self updateFonts. |
728 | 2218 |
specCanvas raise. |
879 | 2219 |
] |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2220 |
|
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2221 |
"Modified: / 14.8.1998 / 15:07:06 / cg" |
199 | 2222 |
! ! |
2223 |
||
2224 |
!MenuEditor methodsFor:'startup / release'! |
|
2225 |
||
738 | 2226 |
initialize |
2227 |
"initialize value holders for the attributes of the menu components" |
|
2228 |
||
2229 |
|holder| |
|
2230 |
||
2231 |
super initialize. |
|
2232 |
||
2233 |
aspects at:#seperatorSelection put:(holder := SelectionInList new). |
|
2234 |
holder list: Item separatorList. |
|
872
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2235 |
holder addDependent:self. |
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2236 |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2237 |
aspects at:#indicationEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2238 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2239 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2240 |
aspects at:#choiceEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2241 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2242 |
argument:(aspects at:#indication)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2243 |
aspects at:#choiceValueEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2244 |
with:[:a | a size > 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2245 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2246 |
|
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2247 |
"Modified: / 14.8.1998 / 15:07:58 / cg" |
738 | 2248 |
! |
2249 |
||
728 | 2250 |
openModalOnMenu: aMenu |
734 | 2251 |
"build a tree from aMenu and open it modal" |
728 | 2252 |
|
738 | 2253 |
super openModalOnResourceSpec: aMenu |
728 | 2254 |
! |
2255 |
||
412 | 2256 |
postOpenWith:aBuilder |
2257 |
||
537 | 2258 |
super postOpenWith:aBuilder. |
2259 |
||
412 | 2260 |
self isHelpToolSelected |
2261 |
ifTrue: [helpCanvas raise] |
|
748 | 2262 |
ifFalse: [specCanvas raise] |
2263 |
||
199 | 2264 |
! ! |
2265 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2266 |
!MenuEditor methodsFor:'user actions'! |
199 | 2267 |
|
407 | 2268 |
accept |
2269 |
"invoked by button 'OK' and by save requests of menu item changes" |
|
2270 |
||
2271 |
|node| |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2272 |
|
637 | 2273 |
super accept. |
2274 |
||
642 | 2275 |
(node := self treeView selectedNode) notNil |
407 | 2276 |
ifTrue: |
2277 |
[ |
|
2278 |
self isHelpToolSelected |
|
2279 |
ifTrue: |
|
2280 |
[ |
|
2281 |
self helpTool accept. |
|
686 | 2282 |
node contents activeHelpKey: self helpTool helpKey. |
2283 |
self valueOfEnablingCommitButtons value: false. |
|
407 | 2284 |
] |
2285 |
ifFalse: |
|
2286 |
[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2287 |
node contents buildFromAspects: aspects. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2288 |
node changed. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2289 |
specSelector := self treeView selectorName. |
407 | 2290 |
] |
734 | 2291 |
]. |
879 | 2292 |
self updateInfoLabel. |
2293 |
self updateListAndSelectionOfImage |
|
407 | 2294 |
! |
2295 |
||
2296 |
cancel |
|
2297 |
"invoked by button 'Cancel'" |
|
2298 |
||
2299 |
|node| |
|
2300 |
(node := self treeView selectedNode) notNil |
|
2301 |
ifTrue: |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2302 |
[ |
407 | 2303 |
self helpTool helpKey:(self helpKey). |
2304 |
aspects do:[:anAspect| anAspect value:nil]. |
|
2305 |
node contents toAspects:aspects |
|
2306 |
]. |
|
422 | 2307 |
self valueOfEnablingCommitButtons value: false. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2308 |
modified := false |
407 | 2309 |
! |
2310 |
||
879 | 2311 |
doEditImage |
888 | 2312 |
"opens a Image Editor on the resource retriever and the icon selector; |
2313 |
then updates the list of images and select the line of the image" |
|
879 | 2314 |
|
2315 |
super doEditImage. |
|
2316 |
||
2317 |
self updateListAndSelectionOfImage |
|
2318 |
! |
|
2319 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2320 |
doNew |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2321 |
|
748 | 2322 |
super doNew ifTrue: [self helpTool doNew] |
199 | 2323 |
! |
2324 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2325 |
doPickAMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2326 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2327 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2328 |
|
642 | 2329 |
((view := Screen current viewFromUser) isNil or: |
2330 |
[view == Screen current rootView]) ifTrue:[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2331 |
^ self |
398 | 2332 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2333 |
view specClass == MenuPanelSpec ifTrue:[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2334 |
^ self treeView buildFromMenu: view asMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2335 |
]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2336 |
^ nil |
381 | 2337 |
! |
2338 |
||
888 | 2339 |
doRemoveImage |
2340 |
"removes the image of the selected line" |
|
2341 |
||
2342 |
self selectionOfImage value notNil |
|
2343 |
ifTrue: |
|
2344 |
[ |
|
2345 |
(Smalltalk at: (aspects at: #retriever) value ? specClass) class removeSelector: |
|
2346 |
self selectionOfImage value string. |
|
2347 |
||
2348 |
self updateListAndSelectionOfImage. |
|
2349 |
(aspects at:#icon) value: nil |
|
2350 |
] |
|
2351 |
! |
|
2352 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2353 |
doSave |
764 | 2354 |
|cls treeView menu spec mthd category code excla| |
199 | 2355 |
|
642 | 2356 |
super doSave ifFalse: [^nil]. |
637 | 2357 |
|
2358 |
cls := self resolveName: specClass. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2359 |
treeView := self treeView. |
407 | 2360 |
menu := treeView asMenu. |
199 | 2361 |
menu := menu literalArrayEncoding. |
2362 |
spec := WriteStream on:String new. |
|
2363 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
2364 |
spec := spec contents. |
|
2365 |
||
2366 |
"/ if that method already exists, do not overwrite the category |
|
2367 |
||
576 | 2368 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2369 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 2370 |
category := mthd category. |
2371 |
]. |
|
2372 |
||
764 | 2373 |
excla := Character excla asString. |
2374 |
||
2375 |
code := excla |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2376 |
, (cls name , ' class methodsFor:' , category storeString) |
764 | 2377 |
, excla , '\\' |
199 | 2378 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2379 |
, specSelector , '\' |
738 | 2380 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
2381 |
, '\\ "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2382 |
, (' MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\') |
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2383 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 2384 |
, ' "\'. |
2385 |
||
2386 |
code := code |
|
2387 |
, '\' |
|
2388 |
, ' <resource: #menu>\\' |
|
2389 |
, ' ^\' |
|
2390 |
, ' ', spec |
|
2391 |
, '\' |
|
764 | 2392 |
, (excla , ' ' , excla) |
199 | 2393 |
, '\\'. |
2394 |
||
2395 |
code := code withCRs. |
|
2396 |
(ReadStream on:code) fileIn. |
|
2397 |
||
764 | 2398 |
self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. |
699 | 2399 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2400 |
self updateHistory. |
748 | 2401 |
self updateInfoLabel. |
2402 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2403 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2404 |
modified := false. |
218 | 2405 |
|
199 | 2406 |
! |
2407 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2408 |
doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2409 |
|
637 | 2410 |
super doSaveAs ifTrue: [self treeView selectorName: specSelector] |
218 | 2411 |
! |
199 | 2412 |
|
218 | 2413 |
doStepDown |
407 | 2414 |
"shift selected menu item one step down" |
2415 |
||
2416 |
self treeView selectedNodeChangeSequenceOrder:1. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2417 |
modified := true. |
398 | 2418 |
|
2419 |
||
2420 |
||
2421 |
||
218 | 2422 |
! |
2423 |
||
2424 |
doStepIn |
|
407 | 2425 |
"move selected menu item into next submenu" |
2426 |
||
2427 |
self treeView selectedNodeBecomeChildOfNext. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2428 |
modified := true. |
398 | 2429 |
|
2430 |
||
2431 |
||
2432 |
||
199 | 2433 |
|
218 | 2434 |
! |
199 | 2435 |
|
218 | 2436 |
doStepOut |
407 | 2437 |
"move selected menu item out from parent submenu" |
2438 |
||
2439 |
self treeView selectedNodeBecomeSisterOfParent. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2440 |
modified := true. |
218 | 2441 |
! |
2442 |
||
2443 |
doStepUp |
|
407 | 2444 |
"shift selected menu item one step up" |
2445 |
||
2446 |
self treeView selectedNodeChangeSequenceOrder:-1. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2447 |
modified := true. |
199 | 2448 |
! ! |
2449 |
||
218 | 2450 |
!MenuEditor::Item class methodsFor:'constants'! |
2451 |
||
2452 |
separatorList |
|
734 | 2453 |
"get the list of available separator types" |
407 | 2454 |
|
2455 |
^#('blank' 'single line' 'double line') |
|
218 | 2456 |
! |
2457 |
||
2458 |
separatorSlices |
|
734 | 2459 |
"get the list of menu spec values of the corresponding separator types" |
2460 |
||
218 | 2461 |
^ #( |
2462 |
( #blank '' ) |
|
2463 |
( #single '-' ) |
|
2464 |
( #double '=' ) |
|
2465 |
) |
|
2466 |
! ! |
|
2467 |
||
199 | 2468 |
!MenuEditor::Item class methodsFor:'documentation'! |
2469 |
||
2470 |
documentation |
|
2471 |
" |
|
213 | 2472 |
implements the contents assigned to a TreeItem. An instance |
199 | 2473 |
is associated with one item and keeps all its information |
2474 |
||
2475 |
[see also:] |
|
213 | 2476 |
TreeItem |
199 | 2477 |
MenuEditor |
2478 |
||
2479 |
[author:] |
|
2480 |
Claus Atzkern |
|
2481 |
" |
|
2482 |
||
2483 |
||
2484 |
! ! |
|
2485 |
||
2486 |
!MenuEditor::Item methodsFor:'accessing'! |
|
2487 |
||
287 | 2488 |
activeHelpKey |
734 | 2489 |
"get the help key of the menu item" |
407 | 2490 |
|
2491 |
^activeHelpKey |
|
287 | 2492 |
! |
2493 |
||
2494 |
activeHelpKey:aKey |
|
734 | 2495 |
"set the help key of the menu item" |
407 | 2496 |
|
287 | 2497 |
activeHelpKey := aKey |
2498 |
! |
|
2499 |
||
199 | 2500 |
label |
734 | 2501 |
"get the value of the menu item" |
199 | 2502 |
|
407 | 2503 |
^label |
2504 |
! |
|
199 | 2505 |
|
2506 |
label:something |
|
734 | 2507 |
"set the value of the menu item" |
199 | 2508 |
|
407 | 2509 |
label := something ? '-' |
218 | 2510 |
! |
2511 |
||
2512 |
separatorType |
|
734 | 2513 |
"get the separator type assigned to item or nil" |
407 | 2514 |
|
2515 |
label size > 1 |
|
2516 |
ifFalse: |
|
2517 |
[ |
|
2518 |
label size == 0 ifTrue:[^#blank]. |
|
2519 |
label first == $- ifTrue:[^#single]. |
|
2520 |
label first == $= ifTrue:[^#double]. |
|
218 | 2521 |
]. |
407 | 2522 |
^nil |
218 | 2523 |
|
2524 |
! |
|
2525 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2526 |
startGroup:aSymbolOrNil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2527 |
"set the startGroup attribute" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2528 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2529 |
startGroup := aSymbolOrNil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2530 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2531 |
"Created: / 23.8.1998 / 15:56:03 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2532 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2533 |
|
218 | 2534 |
submenuChannel |
2535 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2536 |
||
407 | 2537 |
^submenuChannel |
218 | 2538 |
! |
2539 |
||
2540 |
submenuChannel:aChannel |
|
734 | 2541 |
"get the submenuChannel" |
218 | 2542 |
|
2543 |
submenuChannel := aChannel |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2544 |
! |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2545 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2546 |
translateLabel:aBoolean |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2547 |
"set/clear the translate to national-language flag" |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2548 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2549 |
translateLabel := aBoolean |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2550 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2551 |
"Created: / 6.6.1998 / 17:23:33 / cg" |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2552 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2553 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2554 |
value:aSymbol |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2555 |
"set the value attribute" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2556 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2557 |
value := aSymbol |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2558 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
2559 |
"Created: / 23.8.1998 / 16:02:10 / cg" |
218 | 2560 |
! ! |
199 | 2561 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2562 |
!MenuEditor::Item methodsFor:'building'! |
199 | 2563 |
|
2564 |
buildFromAspects:aspects |
|
734 | 2565 |
"read the values of the aspects into my values" |
407 | 2566 |
|
249 | 2567 |
|name| |
407 | 2568 |
self isSeparator |
2569 |
ifFalse: |
|
2570 |
[ |
|
199 | 2571 |
name := label. |
2572 |
label := (aspects at:#label) value. |
|
2573 |
||
218 | 2574 |
(label isNil or:[self isSeparator]) ifTrue:[ |
199 | 2575 |
(aspects at:#label) value:(label := name) |
2576 |
]. |
|
2577 |
||
407 | 2578 |
enabled := (aspects at:#enabled) value. |
2579 |
value := (aspects at:#value) value. |
|
2580 |
nameKey := (aspects at:#nameKey) value. |
|
2581 |
indication := (aspects at:#indication) value. |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2582 |
choice := (aspects at:#choice) value. |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2583 |
choiceValue := (aspects at:#choiceValue) value. |
407 | 2584 |
shortcutKey := (aspects at:#shortcutKey) value. |
532 | 2585 |
startGroup := (aspects at:#startGroup) value. |
407 | 2586 |
accessCharacterPos := (aspects at:#accessCharacterPos) value. |
2587 |
argument := (aspects at:#argument) value. |
|
2588 |
translateLabel := (aspects at:#translateLabel) value. |
|
2589 |
isButton := (aspects at:#isButton) value. |
|
298 | 2590 |
|
2591 |
argument isString ifTrue:[ |
|
2592 |
argument size > 1 ifTrue:[ |
|
2593 |
(argument at:1) == $# ifTrue:[ |
|
2594 |
argument := (argument copyFrom:2) asSymbol |
|
2595 |
] |
|
2596 |
] |
|
2597 |
]. |
|
407 | 2598 |
submenuChannel := (aspects at:#submenuChannel) value. |
2599 |
retriever := (aspects at:#retriever) value. |
|
2600 |
icon := (aspects at:#icon) value. |
|
2601 |
iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2602 |
] |
|
2603 |
ifTrue: |
|
2604 |
[ |
|
218 | 2605 |
name := (aspects at:#seperatorSelection) selectionIndex. |
2606 |
label := (self class separatorSlices at:name) last. |
|
606 | 2607 |
]. |
2608 |
isVisible := (aspects at:#isVisible) value. |
|
2609 |
||
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2610 |
"Modified: / 14.8.1998 / 15:36:38 / cg" |
199 | 2611 |
! |
2612 |
||
2613 |
buildFromMenuItem:anItem |
|
734 | 2614 |
"read the attributes of anItem into my values" |
407 | 2615 |
|
199 | 2616 |
|rtv| |
2617 |
||
218 | 2618 |
self label:(anItem label). |
2619 |
activeHelpKey := anItem activeHelpKey. |
|
199 | 2620 |
|
2621 |
(enabled := anItem enabled) isSymbol ifFalse:[ |
|
2622 |
enabled := nil |
|
2623 |
]. |
|
2624 |
(value := anItem value) isSymbol ifFalse:[ |
|
2625 |
value := nil. |
|
2626 |
]. |
|
2627 |
(indication := anItem indication) isSymbol ifFalse:[ |
|
2628 |
indication := nil |
|
2629 |
]. |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2630 |
(choice := anItem choice) isSymbol ifFalse:[ |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2631 |
choice := nil |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2632 |
]. |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2633 |
choiceValue := anItem choiceValue. |
199 | 2634 |
|
407 | 2635 |
nameKey := anItem nameKey. |
2636 |
shortcutKey := anItem shortcutKeyCharacter. |
|
532 | 2637 |
startGroup := anItem startGroup. |
407 | 2638 |
accessCharacterPos := anItem accessCharacterPosition. |
2639 |
argument := anItem argument. |
|
537 | 2640 |
|
407 | 2641 |
submenuChannel := anItem submenuChannel. |
2642 |
translateLabel := anItem translateLabel. |
|
2643 |
isButton := anItem isButton. |
|
539 | 2644 |
isVisible := anItem isVisible. |
407 | 2645 |
|
2646 |
(((rtv := anItem adornment) notNil) |
|
2647 |
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2648 |
ifTrue: |
|
2649 |
[ |
|
199 | 2650 |
retriever := rtv className. |
2651 |
icon := rtv selector. |
|
2652 |
(iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2653 |
label := rtv labelText. |
|
2654 |
] |
|
2655 |
] |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2656 |
|
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2657 |
"Modified: / 14.8.1998 / 15:37:20 / cg" |
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2658 |
! ! |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2659 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2660 |
!MenuEditor::Item methodsFor:'conversion'! |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2661 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2662 |
asMenuItem |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2663 |
"converts self to a menu item" |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2664 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2665 |
|item rcv| |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2666 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2667 |
item := MenuItem labeled:label. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2668 |
item isVisible:isVisible. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2669 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2670 |
self isSeparator ifFalse:[ |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2671 |
item activeHelpKey:activeHelpKey. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2672 |
item enabled:enabled. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2673 |
item accessCharacterPosition:accessCharacterPos. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2674 |
item argument:argument. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2675 |
item submenuChannel:submenuChannel. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2676 |
item nameKey:nameKey. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2677 |
item shortcutKeyCharacter:shortcutKey. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2678 |
item startGroup:startGroup. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2679 |
item value:value. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2680 |
item indication:indication. |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2681 |
item choice:choice. |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2682 |
item choiceValue:choiceValue. |
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2683 |
item translateLabel: translateLabel. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2684 |
item isButton: isButton. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2685 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2686 |
icon notNil ifTrue:[ |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2687 |
rcv := ResourceRetriever new. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2688 |
rcv className:retriever. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2689 |
rcv selector:icon. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2690 |
iconAndLabel == true ifTrue:[ |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2691 |
rcv labelText:label |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2692 |
]. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2693 |
item labelImage:rcv |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2694 |
] |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2695 |
]. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2696 |
^item |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2697 |
|
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2698 |
"Modified: / 14.8.1998 / 15:36:35 / cg" |
199 | 2699 |
! |
2700 |
||
2701 |
toAspects:aspects |
|
734 | 2702 |
"put my values into the values of aspects" |
407 | 2703 |
|
249 | 2704 |
|type| |
407 | 2705 |
(type := self separatorType) notNil |
2706 |
ifTrue: |
|
2707 |
[ |
|
218 | 2708 |
type := self class separatorSlices findFirst:[:el| el first == type ]. |
2709 |
(aspects at:#seperatorSelection) selectionIndex:type. |
|
407 | 2710 |
] |
2711 |
ifFalse: |
|
2712 |
[ |
|
2713 |
(aspects at:#label) value:label. |
|
2714 |
(aspects at:#enabled) value:enabled. |
|
2715 |
(aspects at:#value) value:value. |
|
2716 |
(aspects at:#nameKey) value:nameKey. |
|
2717 |
(aspects at:#indication) value:indication. |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2718 |
(aspects at:#choice) value:choice. |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2719 |
(aspects at:#choiceValue) value:choiceValue. |
407 | 2720 |
(aspects at:#shortcutKey) value:shortcutKey. |
532 | 2721 |
(aspects at:#startGroup) value:startGroup. |
407 | 2722 |
(aspects at:#accessCharacterPos) value:accessCharacterPos. |
2723 |
(aspects at:#translateLabel) value:translateLabel. |
|
2724 |
(aspects at:#submenuChannel) value:submenuChannel. |
|
2725 |
(aspects at:#retriever) value:retriever. |
|
2726 |
(aspects at:#icon) value:icon. |
|
2727 |
(aspects at:#iconAndLabel) value:iconAndLabel. |
|
539 | 2728 |
(aspects at:#isButton) value:isButton. |
537 | 2729 |
|
407 | 2730 |
argument isSymbol |
2731 |
ifTrue: [(aspects at:#argument)value:'#', argument] |
|
2732 |
ifFalse:[(aspects at:#argument)value:argument]. |
|
606 | 2733 |
]. |
2734 |
(aspects at:#isVisible) value:isVisible. |
|
2735 |
||
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2736 |
"Modified: / 14.8.1998 / 15:37:29 / cg" |
199 | 2737 |
! ! |
2738 |
||
2739 |
!MenuEditor::Item methodsFor:'queries'! |
|
2740 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2741 |
iconFor: aNode |
734 | 2742 |
"get the icon of the menu item for the tree view" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2743 |
|
686 | 2744 |
(aNode hasChildren or: [aNode parent isNil]) |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2745 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2746 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2747 |
^MenuEditor submenuImage |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2748 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2749 |
ifFalse: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2750 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2751 |
submenuChannel notNil |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2752 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2753 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2754 |
^MenuEditor linkSubmenuImage |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2755 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2756 |
ifFalse: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2757 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2758 |
self isSeparator |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2759 |
ifTrue: [^MenuEditor menuSeparatorImage] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2760 |
ifFalse: [^MenuEditor menuItemImage] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2761 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2762 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2763 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2764 |
|
218 | 2765 |
isSeparator |
734 | 2766 |
"return true if item is a seperator" |
407 | 2767 |
|
2768 |
^self separatorType notNil |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2769 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2770 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2771 |
treeViewLabel |
734 | 2772 |
"get the label of the menu item for the tree view" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2773 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2774 |
^label asBoldText, |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2775 |
(value notNil ifTrue: [': [', |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2776 |
value , |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2777 |
(argument notNil ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']), |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2778 |
']'] ifFalse: ['']) |
199 | 2779 |
! ! |
2780 |
||
407 | 2781 |
!MenuEditor::TreeView class methodsFor:'documentation'! |
199 | 2782 |
|
2783 |
documentation |
|
2784 |
" |
|
734 | 2785 |
This tree view class provides a hierarchical representation |
2786 |
of the components of a menu. |
|
199 | 2787 |
|
2788 |
[see also:] |
|
2789 |
SelectionInTreeView |
|
213 | 2790 |
SelectionInTree |
2791 |
TreeItem |
|
199 | 2792 |
|
2793 |
[author:] |
|
2794 |
Claus Atzkern |
|
2795 |
" |
|
2796 |
! ! |
|
2797 |
||
407 | 2798 |
!MenuEditor::TreeView methodsFor:'accessing'! |
199 | 2799 |
|
2800 |
selectorName |
|
734 | 2801 |
"get the selector of the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2802 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2803 |
^(listOfNodes first contents label) asSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2804 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2805 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2806 |
selectorName: aSymbol |
734 | 2807 |
"set the selector for the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2808 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2809 |
listOfNodes first contents label: aSymbol |
199 | 2810 |
! ! |
2811 |
||
407 | 2812 |
!MenuEditor::TreeView methodsFor:'building'! |
199 | 2813 |
|
637 | 2814 |
buildFromClass:aClass andSelector:aSelector |
734 | 2815 |
"read a menu spec from aClass and aSelector and put |
2816 |
the encoded menu into the tree view" |
|
407 | 2817 |
|
728 | 2818 |
|spec cls menu firstNode firstNodeLabel| |
2819 |
||
2820 |
"if opened on a menu" |
|
2821 |
(aClass isNil and: [aSelector isNil and: [listOfNodes size > 0]]) ifTrue: [^nil]. |
|
199 | 2822 |
|
2823 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
|
340 | 2824 |
cls := self application resolveName:aClass. |
199 | 2825 |
|
2826 |
(cls respondsTo:aSelector) ifTrue:[ |
|
2827 |
spec := cls perform:aSelector |
|
2828 |
] |
|
2829 |
]. |
|
331 | 2830 |
|
199 | 2831 |
spec isNil ifFalse:[ |
298 | 2832 |
(spec isMemberOf:Menu) ifFalse:[ |
2833 |
menu := Menu new fromLiteralArrayEncoding:spec. |
|
2834 |
] ifTrue:[ |
|
2835 |
menu := spec. |
|
2836 |
]. |
|
728 | 2837 |
firstNode := self nodeLabel:(aSelector asString). |
2838 |
self subMenu:menu parent:firstNode. |
|
199 | 2839 |
] ifTrue:[ |
728 | 2840 |
(aClass notNil and: [aSelector isNil and: [listOfNodes size > 0]]) |
2841 |
ifTrue: |
|
2842 |
[ |
|
2843 |
firstNode := listOfNodes first |
|
2844 |
] |
|
2845 |
ifFalse: |
|
2846 |
[ |
|
2847 |
aSelector notNil ifTrue:[firstNodeLabel := aSelector asString] |
|
2848 |
ifFalse:[firstNodeLabel := 'menu']. |
|
2849 |
firstNode := self nodeLabel:firstNodeLabel. |
|
2850 |
] |
|
199 | 2851 |
]. |
734 | 2852 |
|
728 | 2853 |
firstNode expand. |
2854 |
model root: firstNode. |
|
2855 |
||
2856 |
firstNode hasChildren ifFalse:[ |
|
775 | 2857 |
model add:(self nodeLabel:'Item 1') below:firstNode |
199 | 2858 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2859 |
|
199 | 2860 |
|
2861 |
! |
|
2862 |
||
2863 |
buildFromMenu:aMenu |
|
734 | 2864 |
"put aMenu into the tree view" |
199 | 2865 |
|
249 | 2866 |
|node| |
199 | 2867 |
|
213 | 2868 |
node := self nodeLabel:'menu'. |
199 | 2869 |
self subMenu:aMenu parent:node. |
2870 |
||
2871 |
node hasChildren ifFalse:[ |
|
728 | 2872 |
node add:(self nodeLabel:'Item 1') |
199 | 2873 |
]. |
213 | 2874 |
node expand. |
199 | 2875 |
model root:node. |
2876 |
! |
|
2877 |
||
213 | 2878 |
menuItem:anItem |
199 | 2879 |
|
249 | 2880 |
|node| |
199 | 2881 |
|
407 | 2882 |
node := self nodeLabel: anItem label. |
199 | 2883 |
node contents buildFromMenuItem:anItem. |
407 | 2884 |
self subMenu: anItem submenu parent:node. |
2885 |
^node. |
|
199 | 2886 |
|
2887 |
||
2888 |
! |
|
2889 |
||
2890 |
subMenu:aMenu parent:aParent |
|
407 | 2891 |
|
213 | 2892 |
|idx grp| |
199 | 2893 |
|
2894 |
aMenu isNil ifFalse:[ |
|
2895 |
grp := aMenu groupSizes. |
|
213 | 2896 |
aMenu itemsDo:[:i| aParent add:(self menuItem:i)]. |
199 | 2897 |
|
2898 |
grp notNil ifTrue:[ |
|
213 | 2899 |
idx := 0. |
199 | 2900 |
|
2901 |
grp do:[:i| |
|
213 | 2902 |
idx := idx + i + 1. |
2903 |
aParent add:(self nodeLabel:nil) beforeIndex:idx. |
|
199 | 2904 |
] |
2905 |
] |
|
2906 |
] |
|
2907 |
! ! |
|
2908 |
||
407 | 2909 |
!MenuEditor::TreeView methodsFor:'conversion'! |
199 | 2910 |
|
2911 |
asMenu |
|
2912 |
|menu root| |
|
2913 |
||
2914 |
root := self root. |
|
2915 |
||
2916 |
root hasChildren ifTrue:[ |
|
2917 |
menu := Menu new. |
|
2918 |
root children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
2919 |
]. |
|
2920 |
^ menu |
|
2921 |
! |
|
2922 |
||
2923 |
asMenuItem:aNode |
|
2924 |
||
2925 |
|menu item| |
|
2926 |
||
2927 |
item := aNode contents asMenuItem. |
|
2928 |
||
2929 |
aNode hasChildren ifTrue:[ |
|
2930 |
menu := Menu new. |
|
2931 |
aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
2932 |
item submenu:menu |
|
2933 |
]. |
|
2934 |
^ item |
|
2935 |
||
2936 |
! ! |
|
2937 |
||
407 | 2938 |
!MenuEditor::TreeView methodsFor:'drawing basics'! |
199 | 2939 |
|
853 | 2940 |
redrawLabelAt:x y:yTop index:anIndex |
407 | 2941 |
"draw text label assigned to a node at x y( center)" |
2942 |
||
853 | 2943 |
|isSelected y0 x0 x1 maxX w label type item| |
199 | 2944 |
|
2945 |
item := (listOfNodes at:anIndex) contents. |
|
218 | 2946 |
type := item separatorType. |
199 | 2947 |
|
218 | 2948 |
type isNil ifTrue:[ |
853 | 2949 |
^ super redrawLabelAt:x y:yTop index:anIndex |
2950 |
]. |
|
2951 |
isSelected := self isInSelection:anIndex. |
|
854 | 2952 |
x0 := x. |
853 | 2953 |
|
2954 |
highlightMode == #label ifTrue:[ |
|
2955 |
x0 := x + 4. |
|
2956 |
||
2957 |
isSelected ifTrue:[ |
|
2958 |
w := 80 + 8. |
|
2959 |
self paint:hilightBgColor. |
|
2960 |
self fillRectangleX:x y:yTop width:w height:fontHeight. |
|
2961 |
] |
|
218 | 2962 |
] ifFalse:[ |
853 | 2963 |
w := 0. |
2964 |
]. |
|
2965 |
type == #blank ifFalse:[ |
|
2966 |
isSelected ifTrue:[self paint:hilightFgColor] |
|
2967 |
ifFalse:[self paint:fgColor]. |
|
2968 |
||
2969 |
x1 := x0 + 80. |
|
2970 |
y0 := yTop - 1 + (fontHeight // 2). |
|
2971 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
2972 |
||
2973 |
type == #double ifTrue:[ |
|
2974 |
y0 := y0 + 2. |
|
2975 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
2976 |
] |
|
2977 |
]. |
|
2978 |
||
2979 |
(isSelected and:[highlightMode == #label]) ifTrue:[ |
|
2980 |
self redrawSelFrameAtX:x y:yTop toX:(x + w) |
|
2981 |
]. |
|
2982 |
||
199 | 2983 |
! ! |
2984 |
||
407 | 2985 |
!MenuEditor::TreeView methodsFor:'event handling'! |
356 | 2986 |
|
2987 |
keyPress:key x:x y:y |
|
407 | 2988 |
"invoked if any key was pressed" |
2989 |
||
412 | 2990 |
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)> |
2991 |
||
686 | 2992 |
(key == #Delete or:[key == #BackSpace]) ifTrue: [^self doDelete]. |
748 | 2993 |
key == #Cut ifTrue:[^self doCut]. |
407 | 2994 |
key == #Copy ifTrue:[^self doCopy]. |
2995 |
key == #Paste ifTrue:[^self doPaste]. |
|
356 | 2996 |
|
412 | 2997 |
super keyPress:key x:x y:y |
356 | 2998 |
|
2999 |
! ! |
|
3000 |
||
407 | 3001 |
!MenuEditor::TreeView methodsFor:'initialization'! |
199 | 3002 |
|
3003 |
initialize |
|
734 | 3004 |
"initialize the tree view of the menu components" |
407 | 3005 |
|
199 | 3006 |
super initialize. |
275 | 3007 |
|
213 | 3008 |
self multipleSelectOk:true. |
407 | 3009 |
self showDirectoryIndicator: true. |
3010 |
self showDirectoryIndicatorForRoot: false. |
|
634 | 3011 |
self selectConditionBlock: [:i|self application askForItemModification]. |
412 | 3012 |
self validateDoubleClickBlock: [:node| node ~~ listOfNodes first]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3013 |
self model iconAction: [:aNode| aNode contents iconFor: aNode]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3014 |
self model labelAction: [:aNode| aNode contents treeViewLabel] |
199 | 3015 |
! ! |
3016 |
||
407 | 3017 |
!MenuEditor::TreeView methodsFor:'menus'! |
199 | 3018 |
|
3019 |
doCopy |
|
912 | 3020 |
|clip| |
398 | 3021 |
|
213 | 3022 |
self hasSelection ifTrue:[ |
912 | 3023 |
self application clipboard:(clip := OrderedCollection new). |
3024 |
self selectionDo:[:i | clip add:((listOfNodes at:i) copy)]. |
|
748 | 3025 |
self topView application updateAllToolInstances. |
213 | 3026 |
] |
199 | 3027 |
! |
3028 |
||
3029 |
doCreateItem |
|
398 | 3030 |
|
557 | 3031 |
self addElement: (self nodeLabel:'Item') |
199 | 3032 |
! |
3033 |
||
218 | 3034 |
doCreateLink |
407 | 3035 |
|
218 | 3036 |
|node item| |
3037 |
||
557 | 3038 |
node := self nodeLabel:'Submenu Link'. |
218 | 3039 |
item := node contents. |
3040 |
item submenuChannel:#menuDefaultLink. |
|
398 | 3041 |
self addElement:node. |
3042 |
self setModified. |
|
218 | 3043 |
|
3044 |
||
3045 |
! |
|
3046 |
||
199 | 3047 |
doCreateMenu |
398 | 3048 |
|
199 | 3049 |
|node| |
557 | 3050 |
node := self nodeLabel:'Submenu'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3051 |
node parent: self selectedNode. |
557 | 3052 |
node add:(self nodeLabel:'Item 1'). |
213 | 3053 |
self addElement:node |
199 | 3054 |
! |
3055 |
||
3056 |
doCreateSep |
|
398 | 3057 |
|
213 | 3058 |
self addElement:(self nodeLabel:nil) |
199 | 3059 |
! |
3060 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3061 |
doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3062 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3063 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3064 |
node := self nodeLabel:'Edit'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3065 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3066 |
node add:(self nodeLabel:'Copy' selector:#copySelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3067 |
node add:(self nodeLabel:'Cut' selector:#cutSelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3068 |
node add:(self nodeLabel:'Paste' selector:#paste). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3069 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3070 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3071 |
"Created: / 23.8.1998 / 15:52:16 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3072 |
"Modified: / 23.8.1998 / 15:59:36 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3073 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3074 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3075 |
doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3076 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3077 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3078 |
node := self nodeLabel:'File'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3079 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3080 |
node add:(self nodeLabel:'New' selector:#menuNew). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3081 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3082 |
node add:(self nodeLabel:'Open...' selector:#menuOpen). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3083 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3084 |
node add:(self nodeLabel:'Save' selector:#menuSave). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3085 |
node add:(self nodeLabel:'Save As...' selector:#menuSaveAs). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3086 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3087 |
node add:(self nodeLabel:'Exit' selector:#closeRequest). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3088 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3089 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3090 |
"Created: / 23.8.1998 / 15:51:55 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3091 |
"Modified: / 23.8.1998 / 16:04:24 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3092 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3093 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3094 |
doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3095 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3096 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3097 |
node := self nodeLabel:'Help'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3098 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3099 |
node contents startGroup:#right. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3100 |
node add:(self nodeLabel:'Documentation' selector:#openDocumentation). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3101 |
node add:(self nodeLabel:'-'). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3102 |
node add:(self nodeLabel:'About this Application' selector:#openAboutThisApplication). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3103 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3104 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3105 |
"Created: / 23.8.1998 / 15:52:46 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3106 |
"Modified: / 23.8.1998 / 17:30:12 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3107 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3108 |
|
199 | 3109 |
doCut |
912 | 3110 |
|app| |
3111 |
||
3112 |
app := self topView application. |
|
3113 |
(app hasValidSelection value and: [self askForItemModification]) |
|
603 | 3114 |
ifTrue: |
3115 |
[ |
|
3116 |
|selectedNodes| |
|
3117 |
self doCopy. |
|
3118 |
selectedNodes := self selection asSortedCollection. |
|
3119 |
self selectedNodesRemove. |
|
3120 |
self selection: selectedNodes first - 1. |
|
3121 |
self setModified. |
|
912 | 3122 |
app updateAllToolInstances. |
603 | 3123 |
] |
398 | 3124 |
|
199 | 3125 |
! |
3126 |
||
686 | 3127 |
doDelete |
3128 |
||
3129 |
(self topView application hasValidSelection value and: [self askForItemModification]) |
|
3130 |
ifTrue: |
|
3131 |
[ |
|
3132 |
|selectedNodes| |
|
3133 |
selectedNodes := self selection asSortedCollection. |
|
3134 |
self selectedNodesRemove. |
|
3135 |
self selection: selectedNodes first - 1. |
|
3136 |
self setModified. |
|
3137 |
] |
|
3138 |
||
3139 |
! |
|
3140 |
||
199 | 3141 |
doPaste |
912 | 3142 |
|clip| |
3143 |
||
3144 |
clip := self application clipboard. |
|
3145 |
(clip notNil and:[self selectedNode notNil]) ifTrue:[ |
|
3146 |
self addElement:(clip collect:[:el| el copy]) |
|
220 | 3147 |
]. |
199 | 3148 |
! ! |
3149 |
||
407 | 3150 |
!MenuEditor::TreeView methodsFor:'private'! |
199 | 3151 |
|
557 | 3152 |
addElement: aNode |
407 | 3153 |
"add something after selection" |
3154 |
||
634 | 3155 |
self askForItemModification |
603 | 3156 |
ifTrue: |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3157 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3158 |
self selectedNodeAdd: aNode. |
603 | 3159 |
(aNode isCollection not and: [aNode name = 'Item']) |
3160 |
ifTrue: |
|
3161 |
[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3162 |
|label| |
603 | 3163 |
label := aNode name, ' ', |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3164 |
(self selectedNode parent notNil |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3165 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3166 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3167 |
(((self selectedNode children size = 0 |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3168 |
ifTrue: [self selectedNode parent children] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3169 |
ifFalse: [self selectedNode children]) select: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3170 |
[:node| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3171 |
|lab| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3172 |
lab := node contents label. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3173 |
((node children size = 0) & |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3174 |
node contents submenuChannel isNil & |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3175 |
(lab ~= '-') & (lab ~= '=') & (lab ~= '')) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3176 |
]) size) printString] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3177 |
ifFalse: ['1']). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3178 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3179 |
aNode name: label string asBoldText. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3180 |
aNode contents label: label string. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3181 |
]. |
603 | 3182 |
aNode isCollection ifFalse: [self selectNode: aNode] ifTrue: [self selection: (aNode collect: [:node| self indexOfNode: node])]. |
3183 |
self setModified. |
|
3184 |
] |
|
3185 |
! |
|
3186 |
||
634 | 3187 |
askForItemModification |
3188 |
||
3189 |
^self topView application askForItemModification |
|
199 | 3190 |
! |
3191 |
||
213 | 3192 |
nodeLabel:aLabel |
407 | 3193 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3194 |
^TreeItem new contents: ((MenuEditor::Item new label:aLabel) translateLabel:true) |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3195 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3196 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
398 | 3197 |
! |
3198 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3199 |
nodeLabel:aLabel selector:aSelector |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3200 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3201 |
^TreeItem new contents: (((MenuEditor::Item new label:aLabel) value:aSelector) translateLabel:true) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3202 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3203 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3204 |
"Created: / 23.8.1998 / 15:58:59 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3205 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3206 |
|
557 | 3207 |
selectedNodeAdd:something |
3208 |
||
3209 |
|node| |
|
3210 |
||
3211 |
something notNil ifTrue:[ |
|
3212 |
(node := self selectedNode) notNil ifTrue:[ |
|
3213 |
node parent notNil ifTrue:[ |
|
3214 |
node isCollapsable ifTrue:[ |
|
3215 |
model add:something afterIndex:node children size below:node |
|
3216 |
] ifFalse:[ |
|
3217 |
model add:something after:node |
|
3218 |
] |
|
3219 |
] ifFalse:[ |
|
3220 |
model add:something afterIndex:node children size below:(self root) |
|
3221 |
] |
|
3222 |
] |
|
3223 |
] |
|
3224 |
||
3225 |
||
3226 |
! |
|
3227 |
||
398 | 3228 |
setModified |
912 | 3229 |
|app| |
3230 |
||
3231 |
(app := self topView application) modified: true. |
|
3232 |
app updateChannels |
|
199 | 3233 |
! ! |
3234 |
||
3235 |
!MenuEditor class methodsFor:'documentation'! |
|
3236 |
||
3237 |
version |
|
3238 |
^ '$Header$' |
|
3239 |
! ! |