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