author | tz |
Mon, 23 Feb 1998 19:12:28 +0100 | |
changeset 669 | 1f5b2d936bcf |
parent 667 | 0afd85e27240 |
child 686 | 6eabad89ebf6 |
permissions | -rw-r--r-- |
199 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
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 |
|
7 |
inclusion of the above copyright notice. This software may not |
|
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 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
15 |
ListSpecEditor subclass:#MenuEditor |
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 |
539 | 25 |
startGroup argument translateLabel isButton isVisible' |
220 | 26 |
classVariableNames:'' |
27 |
poolDictionaries:'' |
|
28 |
privateIn:MenuEditor |
|
199 | 29 |
! |
30 |
||
407 | 31 |
SelectionInTreeView subclass:#TreeView |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
32 |
instanceVariableNames:'' |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
33 |
classVariableNames:'' |
220 | 34 |
poolDictionaries:'' |
35 |
privateIn:MenuEditor |
|
199 | 36 |
! |
37 |
||
38 |
!MenuEditor class methodsFor:'documentation'! |
|
39 |
||
40 |
copyright |
|
41 |
" |
|
42 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
43 |
All Rights Reserved |
|
44 |
||
45 |
This software is furnished under a license and may be used |
|
46 |
only in accordance with the terms of that license and with the |
|
47 |
inclusion of the above copyright notice. This software may not |
|
48 |
be provided or otherwise made available to, or used by, any |
|
49 |
other person. No title to or ownership of the software is |
|
50 |
hereby transferred. |
|
51 |
" |
|
52 |
||
53 |
||
54 |
! |
|
55 |
||
56 |
documentation |
|
57 |
" |
|
58 |
create and modify or inspect popup and pullDown menus of the |
|
59 |
new style( derives from Menu). |
|
60 |
||
61 |
[start with:] |
|
62 |
MenuEditor open |
|
63 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuPullDown |
|
64 |
||
65 |
[see also:] |
|
66 |
UIPainter |
|
67 |
UIHelpTool |
|
68 |
UISpecificationTool |
|
69 |
SelectionInTreeView |
|
70 |
||
71 |
[author:] |
|
541 | 72 |
Claus Atzkern, eXept Software AG |
73 |
Thomas Zwick, eXept Software AG |
|
199 | 74 |
" |
75 |
||
76 |
! ! |
|
77 |
||
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
78 |
!MenuEditor class methodsFor:'initialization'! |
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
79 |
|
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
80 |
initialize |
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
81 |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
82 |
super initialize. |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
83 |
|
407 | 84 |
TreeView initialize |
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
85 |
! ! |
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
86 |
|
508 | 87 |
!MenuEditor class methodsFor:'instance creation'! |
88 |
||
89 |
openModalOnClass:aClass andSelector:aSelector |
|
90 |
^ self new openModalOnClass:aClass andSelector:aSelector |
|
91 |
||
92 |
||
93 |
! |
|
94 |
||
95 |
openOnClass:aClass andSelector:aSelector |
|
96 |
^ self new openOnClass:aClass andSelector:aSelector |
|
97 |
||
98 |
||
99 |
! ! |
|
100 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
101 |
!MenuEditor class methodsFor:'accessing'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
102 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
103 |
resourceType |
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 |
^#menu |
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 |
|
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 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
112 |
!MenuEditor class methodsFor:'aspects'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
113 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
114 |
aspects |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
115 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
116 |
^#( |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
117 |
label |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
118 |
accessCharacterPos |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
119 |
argument |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
120 |
submenuChannel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
121 |
enabled |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
122 |
value |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
123 |
nameKey |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
124 |
indication |
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 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
135 |
|
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 |
|
318 | 138 |
!MenuEditor class methodsFor:'code generation'! |
139 |
||
140 |
sourceCategory |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
141 |
"returns the category where to install the menu |
318 | 142 |
" |
143 |
^ 'accessing menu' |
|
144 |
! ! |
|
145 |
||
371 | 146 |
!MenuEditor class methodsFor:'help specs'! |
147 |
||
148 |
helpSpec |
|
149 |
"return a dictionary filled with helpKey -> helptext associations. |
|
150 |
These are used by the activeHelp tool." |
|
151 |
||
152 |
" |
|
153 |
UIHelpTool openOnClass:MenuEditor |
|
154 |
" |
|
155 |
||
156 |
^ super helpSpec addPairsFrom:#( |
|
157 |
||
548 | 158 |
#addMenuItem |
159 |
'Adds a new menu item.' |
|
160 |
||
161 |
#addMenuSeparator |
|
162 |
'Adds a new menu separator.' |
|
163 |
||
164 |
#addSubMenu |
|
613 | 165 |
'Adds a new sub menu.' |
548 | 166 |
|
167 |
#addSubMenuLink |
|
613 | 168 |
'Adds a new linked sub menu.' |
371 | 169 |
|
577 | 170 |
#basicsAction |
627 | 171 |
'An action selector with 0, 1 (the argument field), or 2 (the selected item) arguments.' |
577 | 172 |
|
173 |
#basicsArgument |
|
613 | 174 |
'An argument passed to above selector, if it is a 1 or a 2 argument selector.' |
577 | 175 |
|
176 |
#basicsIndication |
|
177 |
'A boolean value holder, a boolean evaluating block, or a boolean returning selector for specifying indication state.' |
|
178 |
||
179 |
#basicsIsButton |
|
603 | 180 |
'Turns on/off a button behavior.' |
577 | 181 |
|
182 |
#basicsLabel |
|
183 |
'Label of the item.' |
|
184 |
||
185 |
#basicsMenu |
|
613 | 186 |
'A value holder providing the sub menu to be opened if item is selected.' |
577 | 187 |
|
188 |
#basicsMenuArgument |
|
189 |
'An argument passes with menu selector.' |
|
190 |
||
191 |
#basicsNameKey |
|
192 |
'Unique identifier of the item (optional).' |
|
193 |
||
194 |
#basicsSelector |
|
613 | 195 |
'Selector under which the generated menu spec is saved.' |
577 | 196 |
|
197 |
#basicsSeparatorType |
|
198 |
'List of valid separators.' |
|
199 |
||
200 |
#basicsTranslateLabel |
|
603 | 201 |
'Turns on/off translation behavior of the label via class resource file.' |
577 | 202 |
|
203 |
#detailsAccelerator |
|
204 |
'Key to be pressed to select the menu item from the keyboard (accelerator key).' |
|
205 |
||
206 |
#detailsAccessCharaterPosition |
|
207 |
'Index of the access character position of the textual label (optional).' |
|
208 |
||
209 |
#detailsEnabled |
|
613 | 210 |
'A boolean value holder providing en- or disabling of the menu item.' |
577 | 211 |
|
212 |
#detailsVisibility |
|
213 |
'A boolean value holder providing visibility of the menu item.' |
|
214 |
||
548 | 215 |
#fileLoad |
612 | 216 |
'Opens a dialog for selecting and loading a menu spec from a class.' |
548 | 217 |
|
218 |
#fileNew |
|
219 |
'Creates a new menu spec.' |
|
220 |
||
577 | 221 |
#filePickAMenu |
222 |
'Changes the cursor for moving it over another menu view to load its menu spec.' |
|
223 |
||
548 | 224 |
#fileSave |
225 |
'Saves current menu spec and if modified the help spec.' |
|
455 | 226 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
227 |
#fileSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
228 |
'Opens a dialog to save current menu spec and if modified the help spec.' |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
229 |
|
577 | 230 |
#imageImageAndLabel |
603 | 231 |
'Turns on/off displaying both image and textual label.' |
577 | 232 |
|
233 |
#imageImageEditor |
|
234 |
'Opens an Image Editor on retriever and selector.' |
|
235 |
||
236 |
#imageRetriever |
|
237 |
'Class implementing the image resource method. If no class is given, the current application class will be taken.' |
|
238 |
||
239 |
#imageSelector |
|
613 | 240 |
'Selector returning an image.' |
371 | 241 |
|
242 |
) |
|
612 | 243 |
|
371 | 244 |
! ! |
245 |
||
199 | 246 |
!MenuEditor class methodsFor:'interface specs'! |
247 |
||
248 |
basicsItemSpec |
|
249 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
250 |
||
251 |
"do not manually edit this - the painter/builder may not be able to |
|
252 |
handle the specification if its corrupted." |
|
253 |
||
254 |
" |
|
255 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec |
|
256 |
MenuEditor new openInterface:#basicsItemSpec |
|
257 |
" |
|
258 |
||
259 |
<resource: #canvas> |
|
260 |
||
261 |
^ |
|
262 |
||
263 |
#(#FullSpec |
|
264 |
#'window:' |
|
265 |
#(#WindowSpec |
|
290 | 266 |
#'name:' 'unnamed canvas' |
577 | 267 |
#'layout:' #(#LayoutFrame 73 0 152 0 339 0 470 0) |
199 | 268 |
#'label:' 'unnamed canvas' |
290 | 269 |
#'min:' #(#Point 10 10) |
270 |
#'max:' #(#Point 1160 870) |
|
577 | 271 |
#'bounds:' #(#Rectangle 73 152 340 471) |
371 | 272 |
#'usePreferredExtent:' false |
199 | 273 |
) |
274 |
#'component:' |
|
275 |
#(#SpecCollection |
|
276 |
#'collection:' |
|
277 |
#( |
|
278 |
#(#LabelSpec |
|
279 |
#'name:' 'nameKeyLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
280 |
#'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5) |
577 | 281 |
#'label:' 'Name Key:' |
263 | 282 |
#'adjust:' #right |
199 | 283 |
#'resizeForLabel:' true |
284 |
) |
|
285 |
#(#InputFieldSpec |
|
371 | 286 |
#'name:' 'nameKeyField' |
411 | 287 |
#'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
577 | 288 |
#'activeHelpKey:' #basicsNameKey |
199 | 289 |
#'tabable:' true |
290 |
#'model:' #nameKey |
|
291 |
#'type:' #symbolOrNil |
|
407 | 292 |
#'acceptOnReturn:' false |
293 |
#'acceptOnTab:' false |
|
199 | 294 |
) |
295 |
#(#LabelSpec |
|
296 |
#'name:' 'labelLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
297 |
#'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5) |
398 | 298 |
#'label:' 'Label:' |
263 | 299 |
#'adjust:' #right |
199 | 300 |
#'resizeForLabel:' true |
301 |
) |
|
302 |
#(#InputFieldSpec |
|
371 | 303 |
#'name:' 'labelField' |
411 | 304 |
#'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
577 | 305 |
#'activeHelpKey:' #basicsLabel |
199 | 306 |
#'tabable:' true |
307 |
#'model:' #label |
|
407 | 308 |
#'acceptOnReturn:' false |
309 |
#'acceptOnTab:' false |
|
199 | 310 |
) |
311 |
#(#LabelSpec |
|
312 |
#'name:' 'valueLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
313 |
#'layout:' #(#AlignmentOrigin 107 0 90 0 1 0.5) |
577 | 314 |
#'label:' 'Action:' |
263 | 315 |
#'adjust:' #right |
199 | 316 |
#'resizeForLabel:' true |
317 |
) |
|
318 |
#(#InputFieldSpec |
|
371 | 319 |
#'name:' 'valueField' |
411 | 320 |
#'layout:' #(#LayoutFrame 110 0 79 0 -5 1.0 101 0) |
577 | 321 |
#'activeHelpKey:' #basicsAction |
199 | 322 |
#'tabable:' true |
323 |
#'model:' #value |
|
324 |
#'type:' #symbolOrNil |
|
407 | 325 |
#'acceptOnReturn:' false |
326 |
#'acceptOnTab:' false |
|
199 | 327 |
) |
328 |
#(#LabelSpec |
|
290 | 329 |
#'name:' 'argumentLabel' |
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
330 |
#'layout:' #(#AlignmentOrigin 107 0 115 0 1 0.5) |
290 | 331 |
#'label:' 'Argument:' |
332 |
#'adjust:' #right |
|
333 |
#'resizeForLabel:' true |
|
334 |
) |
|
335 |
#(#InputFieldSpec |
|
371 | 336 |
#'name:' 'argumentField' |
411 | 337 |
#'layout:' #(#LayoutFrame 110 0 104 0 -5 1.0 126 0) |
577 | 338 |
#'activeHelpKey:' #basicsArgument |
290 | 339 |
#'tabable:' true |
340 |
#'model:' #argument |
|
341 |
#'type:' #string |
|
407 | 342 |
#'acceptOnReturn:' false |
343 |
#'acceptOnTab:' false |
|
290 | 344 |
) |
371 | 345 |
#(#LabelSpec |
346 |
#'name:' 'indicationLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
347 |
#'layout:' #(#AlignmentOrigin 107 0 155 0 1 0.5) |
371 | 348 |
#'label:' 'Indication:' |
349 |
#'adjust:' #right |
|
350 |
#'resizeForLabel:' true |
|
351 |
) |
|
352 |
#(#InputFieldSpec |
|
353 |
#'name:' 'indicationField' |
|
411 | 354 |
#'layout:' #(#LayoutFrame 110 0 144 0 -5 1.0 166 0) |
577 | 355 |
#'activeHelpKey:' #basicsIndication |
371 | 356 |
#'tabable:' true |
357 |
#'model:' #indication |
|
358 |
#'type:' #symbolOrNil |
|
407 | 359 |
#'acceptOnReturn:' false |
360 |
#'acceptOnTab:' false |
|
371 | 361 |
) |
398 | 362 |
#(#CheckBoxSpec |
363 |
#'name:' 'translateLabelCheckBox' |
|
364 |
#'layout:' #(#Point 20 192) |
|
577 | 365 |
#'activeHelpKey:' #basicsTranslateLabel |
469 | 366 |
#'tabable:' true |
398 | 367 |
#'model:' #translateLabel |
368 |
#'label:' 'Translate Label' |
|
369 |
) |
|
370 |
#(#CheckBoxSpec |
|
371 |
#'name:' 'isButtonCheckBox' |
|
372 |
#'layout:' #(#Point 20 221) |
|
577 | 373 |
#'activeHelpKey:' #basicsIsButton |
469 | 374 |
#'tabable:' true |
398 | 375 |
#'model:' #isButton |
376 |
#'label:' 'Is Button' |
|
377 |
) |
|
199 | 378 |
) |
379 |
) |
|
380 |
) |
|
381 |
! |
|
382 |
||
218 | 383 |
basicsLinkSpec |
384 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
385 |
||
386 |
"do not manually edit this - the painter/builder may not be able to |
|
387 |
handle the specification if its corrupted." |
|
388 |
||
389 |
" |
|
390 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec |
|
391 |
MenuEditor new openInterface:#basicsLinkSpec |
|
392 |
" |
|
393 |
||
394 |
<resource: #canvas> |
|
395 |
||
396 |
^ |
|
397 |
||
398 |
#(#FullSpec |
|
399 |
#'window:' |
|
400 |
#(#WindowSpec |
|
371 | 401 |
#'name:' 'unnamed canvas' |
577 | 402 |
#'layout:' #(#LayoutFrame 73 0 152 0 339 0 470 0) |
218 | 403 |
#'label:' 'unnamed canvas' |
371 | 404 |
#'min:' #(#Point 10 10) |
405 |
#'max:' #(#Point 1280 1024) |
|
577 | 406 |
#'bounds:' #(#Rectangle 73 152 340 471) |
371 | 407 |
#'usePreferredExtent:' false |
218 | 408 |
) |
409 |
#'component:' |
|
410 |
#(#SpecCollection |
|
411 |
#'collection:' |
|
412 |
#( |
|
413 |
#(#LabelSpec |
|
414 |
#'name:' 'nameKeyLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
415 |
#'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5) |
371 | 416 |
#'activeHelpKey:' #nameKey |
577 | 417 |
#'label:' 'Name Key:' |
263 | 418 |
#'adjust:' #right |
218 | 419 |
#'resizeForLabel:' true |
420 |
) |
|
421 |
#(#InputFieldSpec |
|
371 | 422 |
#'name:' 'nameKeyField' |
411 | 423 |
#'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
577 | 424 |
#'activeHelpKey:' #basicsNameKey |
218 | 425 |
#'tabable:' true |
426 |
#'model:' #nameKey |
|
427 |
#'type:' #symbolOrNil |
|
407 | 428 |
#'acceptOnReturn:' false |
429 |
#'acceptOnTab:' false |
|
218 | 430 |
) |
431 |
#(#LabelSpec |
|
432 |
#'name:' 'labelLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
433 |
#'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5) |
398 | 434 |
#'label:' 'Label:' |
218 | 435 |
#'resizeForLabel:' true |
436 |
) |
|
437 |
#(#InputFieldSpec |
|
371 | 438 |
#'name:' 'labelField' |
411 | 439 |
#'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
577 | 440 |
#'activeHelpKey:' #basicsLabel |
218 | 441 |
#'tabable:' true |
442 |
#'model:' #label |
|
407 | 443 |
#'acceptOnReturn:' false |
444 |
#'acceptOnTab:' false |
|
218 | 445 |
) |
469 | 446 |
#(#LabelSpec |
447 |
#'name:' 'menuLabel' |
|
448 |
#'layout:' #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
449 |
#'label:' 'Menu:' |
|
450 |
#'resizeForLabel:' true |
|
451 |
) |
|
218 | 452 |
#(#InputFieldSpec |
371 | 453 |
#'name:' 'menuField' |
411 | 454 |
#'layout:' #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
577 | 455 |
#'activeHelpKey:' #basicsMenu |
218 | 456 |
#'tabable:' true |
457 |
#'model:' #submenuChannel |
|
458 |
#'type:' #symbolOrNil |
|
407 | 459 |
#'acceptOnReturn:' false |
460 |
#'acceptOnTab:' false |
|
218 | 461 |
) |
462 |
#(#LabelSpec |
|
469 | 463 |
#'name:' 'ArgumentLabel' |
464 |
#'layout:' #(#AlignmentOrigin 107 0 100 0 1 0.5) |
|
465 |
#'label:' 'Argument:' |
|
218 | 466 |
#'resizeForLabel:' true |
467 |
) |
|
411 | 468 |
#(#InputFieldSpec |
469 |
#'name:' 'argumentField' |
|
470 |
#'layout:' #(#LayoutFrame 110 0 90 0 -5 1.0 112 0) |
|
577 | 471 |
#'activeHelpKey:' #basicsMenuArgument |
411 | 472 |
#'tabable:' true |
537 | 473 |
#'model:' #argument |
411 | 474 |
#'acceptOnReturn:' false |
475 |
#'acceptOnTab:' false |
|
476 |
) |
|
469 | 477 |
#(#CheckBoxSpec |
478 |
#'name:' 'translateLabelCheckBox' |
|
479 |
#'layout:' #(#Point 20 128) |
|
577 | 480 |
#'activeHelpKey:' #basicsTranslateLabel |
469 | 481 |
#'tabable:' true |
482 |
#'model:' #translateLabel |
|
483 |
#'label:' 'Translate Label' |
|
411 | 484 |
) |
218 | 485 |
) |
486 |
) |
|
487 |
) |
|
488 |
! |
|
489 |
||
199 | 490 |
basicsMenuSpec |
491 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
492 |
||
493 |
"do not manually edit this - the painter/builder may not be able to |
|
494 |
handle the specification if its corrupted." |
|
495 |
||
496 |
" |
|
497 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec |
|
498 |
MenuEditor new openInterface:#basicsMenuSpec |
|
499 |
" |
|
500 |
||
501 |
<resource: #canvas> |
|
502 |
||
503 |
^ |
|
504 |
||
505 |
#(#FullSpec |
|
506 |
#'window:' |
|
507 |
#(#WindowSpec |
|
371 | 508 |
#'name:' 'unnamed canvas' |
577 | 509 |
#'layout:' #(#LayoutFrame 73 0 152 0 339 0 470 0) |
199 | 510 |
#'label:' 'unnamed canvas' |
371 | 511 |
#'min:' #(#Point 10 10) |
512 |
#'max:' #(#Point 1280 1024) |
|
577 | 513 |
#'bounds:' #(#Rectangle 73 152 340 471) |
371 | 514 |
#'usePreferredExtent:' false |
199 | 515 |
) |
516 |
#'component:' |
|
517 |
#(#SpecCollection |
|
518 |
#'collection:' |
|
519 |
#( |
|
520 |
#(#LabelSpec |
|
521 |
#'name:' 'nameKeyLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
522 |
#'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5) |
577 | 523 |
#'label:' 'Name Key:' |
263 | 524 |
#'adjust:' #right |
199 | 525 |
#'resizeForLabel:' true |
526 |
) |
|
527 |
#(#InputFieldSpec |
|
371 | 528 |
#'name:' 'nameKeyField' |
411 | 529 |
#'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
577 | 530 |
#'activeHelpKey:' #basicsNameKey |
199 | 531 |
#'tabable:' true |
532 |
#'model:' #nameKey |
|
533 |
#'type:' #symbolOrNil |
|
407 | 534 |
#'acceptOnReturn:' false |
535 |
#'acceptOnTab:' false |
|
199 | 536 |
) |
537 |
#(#LabelSpec |
|
538 |
#'name:' 'labelLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
539 |
#'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5) |
398 | 540 |
#'label:' 'Label:' |
263 | 541 |
#'adjust:' #right |
199 | 542 |
#'resizeForLabel:' true |
543 |
) |
|
544 |
#(#InputFieldSpec |
|
371 | 545 |
#'name:' 'labelField' |
411 | 546 |
#'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
577 | 547 |
#'activeHelpKey:' #basicsLabel |
199 | 548 |
#'tabable:' true |
549 |
#'model:' #label |
|
407 | 550 |
#'acceptOnReturn:' false |
551 |
#'acceptOnTab:' false |
|
199 | 552 |
) |
398 | 553 |
#(#CheckBoxSpec |
554 |
#'name:' 'translateLabelCheckBox' |
|
555 |
#'layout:' #(#Point 20 100) |
|
577 | 556 |
#'activeHelpKey:' #basicsTranslateLabel |
469 | 557 |
#'tabable:' true |
398 | 558 |
#'model:' #translateLabel |
559 |
#'label:' 'Translate Label' |
|
560 |
) |
|
199 | 561 |
) |
562 |
) |
|
563 |
) |
|
564 |
! |
|
565 |
||
566 |
basicsRootSpec |
|
567 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
568 |
||
569 |
"do not manually edit this - the painter/builder may not be able to |
|
570 |
handle the specification if its corrupted." |
|
571 |
||
572 |
" |
|
573 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec |
|
574 |
MenuEditor new openInterface:#basicsRootSpec |
|
575 |
" |
|
576 |
||
577 |
<resource: #canvas> |
|
578 |
||
579 |
^ |
|
580 |
||
581 |
#(#FullSpec |
|
582 |
#'window:' |
|
583 |
#(#WindowSpec |
|
371 | 584 |
#'name:' 'unnamed canvas' |
577 | 585 |
#'layout:' #(#LayoutFrame 73 0 152 0 339 0 470 0) |
199 | 586 |
#'label:' 'unnamed canvas' |
371 | 587 |
#'min:' #(#Point 10 10) |
588 |
#'max:' #(#Point 1280 1024) |
|
577 | 589 |
#'bounds:' #(#Rectangle 73 152 340 471) |
371 | 590 |
#'usePreferredExtent:' false |
199 | 591 |
) |
592 |
#'component:' |
|
593 |
#(#SpecCollection |
|
594 |
#'collection:' |
|
595 |
#( |
|
596 |
#(#LabelSpec |
|
597 |
#'name:' 'selectorLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
598 |
#'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5) |
199 | 599 |
#'label:' 'Selector:' |
263 | 600 |
#'adjust:' #right |
199 | 601 |
#'resizeForLabel:' true |
602 |
) |
|
603 |
#(#InputFieldSpec |
|
371 | 604 |
#'name:' 'selectorField' |
411 | 605 |
#'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
577 | 606 |
#'activeHelpKey:' #basicsSelector |
199 | 607 |
#'tabable:' true |
608 |
#'model:' #label |
|
407 | 609 |
#'acceptOnReturn:' false |
610 |
#'acceptOnTab:' false |
|
199 | 611 |
) |
612 |
) |
|
613 |
) |
|
614 |
) |
|
615 |
! |
|
616 |
||
218 | 617 |
basicsSeparatorSpec |
199 | 618 |
"this window spec was automatically generated by the ST/X UIPainter" |
619 |
||
620 |
"do not manually edit this - the painter/builder may not be able to |
|
621 |
handle the specification if its corrupted." |
|
622 |
||
623 |
" |
|
218 | 624 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec |
625 |
MenuEditor new openInterface:#basicsSeparatorSpec |
|
199 | 626 |
" |
627 |
||
628 |
<resource: #canvas> |
|
629 |
||
630 |
^ |
|
631 |
||
632 |
#(#FullSpec |
|
633 |
#'window:' |
|
634 |
#(#WindowSpec |
|
290 | 635 |
#'name:' 'unnamed canvas' |
606 | 636 |
#'layout:' #(#LayoutFrame 219 0 193 0 485 0 511 0) |
199 | 637 |
#'label:' 'unnamed canvas' |
290 | 638 |
#'min:' #(#Point 10 10) |
639 |
#'max:' #(#Point 1160 870) |
|
606 | 640 |
#'bounds:' #(#Rectangle 219 193 486 512) |
371 | 641 |
#'usePreferredExtent:' false |
199 | 642 |
) |
643 |
#'component:' |
|
644 |
#(#SpecCollection |
|
645 |
#'collection:' |
|
646 |
#( |
|
218 | 647 |
#(#LabelSpec |
648 |
#'name:' 'separatorLabel' |
|
398 | 649 |
#'layout:' #(#AlignmentOrigin 127 0 26 0 1 0.5) |
218 | 650 |
#'label:' 'Separator Type:' |
263 | 651 |
#'adjust:' #right |
218 | 652 |
#'resizeForLabel:' true |
653 |
) |
|
654 |
#(#ComboListSpec |
|
290 | 655 |
#'name:' 'seperatorList' |
411 | 656 |
#'layout:' #(#LayoutFrame 132 0 15 0 -5 1.0 37 0) |
577 | 657 |
#'activeHelpKey:' #basicsSeparatorType |
469 | 658 |
#'tabable:' true |
218 | 659 |
#'model:' #seperatorSelection |
290 | 660 |
#'useIndex:' true |
199 | 661 |
) |
606 | 662 |
#(#LabelSpec |
663 |
#'name:' 'visibilityLabel' |
|
664 |
#'layout:' #(#AlignmentOrigin 127 0 76 0 1 0.5) |
|
665 |
#'label:' 'Visibility:' |
|
666 |
#'adjust:' #right |
|
667 |
#'resizeForLabel:' true |
|
668 |
) |
|
669 |
#(#InputFieldSpec |
|
670 |
#'name:' 'isVisibleInputField' |
|
671 |
#'layout:' #(#LayoutFrame 132 0 65 0 -5 1.0 87 0) |
|
672 |
#'activeHelpKey:' #detailsVisibility |
|
673 |
#'tabable:' true |
|
674 |
#'model:' #isVisible |
|
675 |
#'type:' #symbolOrNil |
|
676 |
#'acceptOnReturn:' false |
|
677 |
#'acceptOnTab:' false |
|
678 |
) |
|
199 | 679 |
) |
680 |
) |
|
681 |
) |
|
682 |
! |
|
683 |
||
684 |
detailsEditSpec |
|
685 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
686 |
||
687 |
"do not manually edit this - the painter/builder may not be able to |
|
688 |
handle the specification if its corrupted." |
|
689 |
||
690 |
" |
|
691 |
UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec |
|
692 |
MenuEditor new openInterface:#detailsEditSpec |
|
693 |
" |
|
694 |
||
695 |
<resource: #canvas> |
|
696 |
||
697 |
^ |
|
698 |
||
699 |
#(#FullSpec |
|
700 |
#'window:' |
|
701 |
#(#WindowSpec |
|
371 | 702 |
#'name:' 'unnamed canvas' |
577 | 703 |
#'layout:' #(#LayoutFrame 73 0 152 0 331 0 439 0) |
199 | 704 |
#'label:' 'unnamed canvas' |
371 | 705 |
#'min:' #(#Point 10 10) |
706 |
#'max:' #(#Point 1280 1024) |
|
577 | 707 |
#'bounds:' #(#Rectangle 73 152 332 440) |
371 | 708 |
#'usePreferredExtent:' false |
199 | 709 |
) |
710 |
#'component:' |
|
711 |
#(#SpecCollection |
|
712 |
#'collection:' |
|
713 |
#( |
|
714 |
#(#LabelSpec |
|
371 | 715 |
#'name:' 'shortcutKeyLabel' |
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
716 |
#'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5) |
371 | 717 |
#'label:' 'Accelerator:' |
718 |
#'adjust:' #right |
|
719 |
#'resizeForLabel:' true |
|
720 |
) |
|
721 |
#(#InputFieldSpec |
|
722 |
#'name:' 'shortcutKeyField' |
|
411 | 723 |
#'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
577 | 724 |
#'activeHelpKey:' #detailsAccelerator |
371 | 725 |
#'tabable:' true |
726 |
#'model:' #shortcutKey |
|
727 |
#'type:' #symbolOrNil |
|
407 | 728 |
#'acceptOnReturn:' false |
729 |
#'acceptOnTab:' false |
|
371 | 730 |
) |
731 |
#(#LabelSpec |
|
199 | 732 |
#'name:' 'enabledLabel' |
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
733 |
#'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5) |
199 | 734 |
#'label:' 'Enabled:' |
263 | 735 |
#'adjust:' #right |
199 | 736 |
#'resizeForLabel:' true |
737 |
) |
|
738 |
#(#InputFieldSpec |
|
371 | 739 |
#'name:' 'enabledField' |
411 | 740 |
#'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
577 | 741 |
#'activeHelpKey:' #detailsEnabled |
199 | 742 |
#'tabable:' true |
743 |
#'model:' #enabled |
|
744 |
#'type:' #symbolOrNil |
|
407 | 745 |
#'acceptOnReturn:' false |
746 |
#'acceptOnTab:' false |
|
199 | 747 |
) |
748 |
#(#LabelSpec |
|
539 | 749 |
#'name:' 'visibilityLabel' |
750 |
#'layout:' #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
751 |
#'label:' 'Visibility:' |
|
263 | 752 |
#'adjust:' #right |
199 | 753 |
#'resizeForLabel:' true |
754 |
) |
|
755 |
#(#InputFieldSpec |
|
539 | 756 |
#'name:' 'isVisibleInputField' |
757 |
#'layout:' #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
|
577 | 758 |
#'activeHelpKey:' #detailsVisibility |
199 | 759 |
#'tabable:' true |
539 | 760 |
#'model:' #isVisible |
761 |
#'type:' #symbolOrNil |
|
407 | 762 |
#'acceptOnReturn:' false |
763 |
#'acceptOnTab:' false |
|
199 | 764 |
) |
532 | 765 |
#(#LabelSpec |
766 |
#'name:' 'StartGroupLabel' |
|
539 | 767 |
#'layout:' #(#AlignmentOrigin 107 0 111 0 1 0.5) |
532 | 768 |
#'label:' 'Start Group:' |
769 |
#'adjust:' #right |
|
770 |
#'resizeForLabel:' true |
|
771 |
) |
|
772 |
#(#PopUpListSpec |
|
773 |
#'name:' 'StartGroupPopUp' |
|
539 | 774 |
#'layout:' #(#LayoutFrame 110 0 100 0 -5 1.0 122 0) |
532 | 775 |
#'label:' 'PopUpList' |
776 |
#'model:' #startGroup |
|
777 |
#'menu:' |
|
778 |
#(nil |
|
779 |
#right |
|
780 |
) |
|
781 |
#'useIndex:' false |
|
782 |
) |
|
539 | 783 |
#(#LabelSpec |
784 |
#'name:' 'accessCharLabel' |
|
785 |
#'layout:' #(#AlignmentOrigin 217 0 142 0 1 0.5) |
|
786 |
#'label:' 'Access Character Position:' |
|
787 |
#'adjust:' #right |
|
788 |
#'resizeForLabel:' true |
|
789 |
) |
|
790 |
#(#InputFieldSpec |
|
791 |
#'name:' 'accessCharField' |
|
792 |
#'layout:' #(#LayoutFrame 220 0 131 0 -5 1.0 153 0) |
|
577 | 793 |
#'activeHelpKey:' #detailsAccessCharaterPosition |
539 | 794 |
#'tabable:' true |
795 |
#'model:' #accessCharacterPos |
|
796 |
#'type:' #numberOrNil |
|
797 |
#'acceptOnReturn:' false |
|
798 |
#'acceptOnTab:' false |
|
799 |
) |
|
199 | 800 |
) |
801 |
) |
|
802 |
) |
|
803 |
! |
|
804 |
||
398 | 805 |
imageEditSpec |
199 | 806 |
"this window spec was automatically generated by the ST/X UIPainter" |
807 |
||
808 |
"do not manually edit this - the painter/builder may not be able to |
|
809 |
handle the specification if its corrupted." |
|
810 |
||
811 |
" |
|
398 | 812 |
UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec |
813 |
MenuEditor new openInterface:#imageEditSpec |
|
199 | 814 |
" |
815 |
||
816 |
<resource: #canvas> |
|
817 |
||
818 |
^ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
819 |
|
199 | 820 |
#(#FullSpec |
821 |
#'window:' |
|
822 |
#(#WindowSpec |
|
371 | 823 |
#'name:' 'unnamed canvas' |
577 | 824 |
#'layout:' #(#LayoutFrame 238 0 321 0 482 0 462 0) |
199 | 825 |
#'label:' 'unnamed canvas' |
371 | 826 |
#'min:' #(#Point 10 10) |
827 |
#'max:' #(#Point 1280 1024) |
|
577 | 828 |
#'bounds:' #(#Rectangle 238 321 483 463) |
371 | 829 |
#'usePreferredExtent:' false |
199 | 830 |
) |
831 |
#'component:' |
|
832 |
#(#SpecCollection |
|
833 |
#'collection:' |
|
834 |
#( |
|
835 |
#(#LabelSpec |
|
836 |
#'name:' 'retrieverLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
837 |
#'layout:' #(#AlignmentOrigin 107 0 26 0 1 0.5) |
199 | 838 |
#'label:' 'Retriever:' |
263 | 839 |
#'adjust:' #right |
199 | 840 |
#'resizeForLabel:' true |
841 |
) |
|
842 |
#(#InputFieldSpec |
|
371 | 843 |
#'name:' 'retrieverField' |
411 | 844 |
#'layout:' #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
577 | 845 |
#'activeHelpKey:' #imageRetriever |
199 | 846 |
#'tabable:' true |
847 |
#'model:' #retriever |
|
848 |
#'type:' #symbolOrNil |
|
407 | 849 |
#'acceptOnReturn:' false |
850 |
#'acceptOnTab:' false |
|
199 | 851 |
) |
852 |
#(#LabelSpec |
|
853 |
#'name:' 'iconLabel' |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
854 |
#'layout:' #(#AlignmentOrigin 107 0 51 0 1 0.5) |
398 | 855 |
#'label:' 'Selector:' |
263 | 856 |
#'adjust:' #right |
199 | 857 |
#'resizeForLabel:' true |
858 |
) |
|
859 |
#(#InputFieldSpec |
|
371 | 860 |
#'name:' 'iconField' |
411 | 861 |
#'layout:' #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
577 | 862 |
#'activeHelpKey:' #imageSelector |
199 | 863 |
#'tabable:' true |
864 |
#'model:' #icon |
|
865 |
#'type:' #symbolOrNil |
|
407 | 866 |
#'acceptOnReturn:' false |
867 |
#'acceptOnTab:' false |
|
199 | 868 |
) |
469 | 869 |
#(#ActionButtonSpec |
870 |
#'name:' 'imageEditorButton' |
|
871 |
#'layout:' #(#LayoutFrame 110 0 66 0 -5 1 90 0) |
|
577 | 872 |
#'activeHelpKey:' #imageImageEditor |
469 | 873 |
#'label:' 'Image Editor' |
874 |
#'tabable:' true |
|
875 |
#'model:' #doEditImage |
|
876 |
) |
|
199 | 877 |
#(#CheckBoxSpec |
878 |
#'name:' 'iconAndLabel' |
|
398 | 879 |
#'layout:' #(#LayoutOrigin 20 0 104 0) |
577 | 880 |
#'activeHelpKey:' #imageImageAndLabel |
199 | 881 |
#'tabable:' true |
882 |
#'model:' #iconAndLabel |
|
398 | 883 |
#'label:' 'Image & Label' |
199 | 884 |
) |
885 |
) |
|
886 |
) |
|
887 |
) |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
888 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
889 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
890 |
|
525 | 891 |
! |
892 |
||
893 |
windowSpec |
|
894 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
895 |
||
896 |
"do not manually edit this - the painter/builder may not be able to |
|
897 |
handle the specification if its corrupted." |
|
898 |
||
899 |
" |
|
900 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
901 |
MenuEditor new openInterface:#windowSpec |
|
902 |
" |
|
903 |
"MenuEditor open" |
|
904 |
||
905 |
<resource: #canvas> |
|
906 |
||
907 |
^ |
|
908 |
||
909 |
#(#FullSpec |
|
910 |
#'window:' |
|
911 |
#(#WindowSpec |
|
912 |
#'name:' 'Menu Builder' |
|
571 | 913 |
#'layout:' #(#LayoutFrame 324 0 233 0 903 0 616 0) |
525 | 914 |
#'label:' 'Menu Builder' |
915 |
#'min:' #(#Point 10 10) |
|
916 |
#'max:' #(#Point 1152 900) |
|
571 | 917 |
#'bounds:' #(#Rectangle 324 233 904 617) |
525 | 918 |
#'menu:' #menu |
919 |
#'usePreferredExtent:' false |
|
920 |
) |
|
921 |
#'component:' |
|
922 |
#(#SpecCollection |
|
923 |
#'collection:' |
|
924 |
#( |
|
925 |
#(#MenuPanelSpec |
|
926 |
#'name:' 'menuToolbarView' |
|
927 |
#'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
928 |
#'menu:' #menuToolbar |
|
929 |
#'showSeparatingLines:' true |
|
930 |
) |
|
931 |
#(#VariableHorizontalPanelSpec |
|
932 |
#'name:' 'variableHorizontalPanel1' |
|
571 | 933 |
#'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
525 | 934 |
#'component:' |
935 |
#(#SpecCollection |
|
936 |
#'collection:' |
|
937 |
#( |
|
938 |
#(#ArbitraryComponentSpec |
|
939 |
#'name:' 'painterView' |
|
940 |
#'menu:' #menuEdit |
|
941 |
#'hasHorizontalScrollBar:' true |
|
942 |
#'hasVerticalScrollBar:' true |
|
943 |
#'component:' #treeView |
|
944 |
#'hasBorder:' false |
|
945 |
) |
|
946 |
#(#ViewSpec |
|
947 |
#'name:' 'view1' |
|
948 |
#'component:' |
|
949 |
#(#SpecCollection |
|
950 |
#'collection:' |
|
951 |
#( |
|
952 |
#(#NoteBookViewSpec |
|
953 |
#'name:' 'specificationView' |
|
954 |
#'layout:' #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -26 1.0) |
|
955 |
#'tabable:' true |
|
956 |
#'model:' #tabModel |
|
957 |
#'menu:' #tabList |
|
958 |
#'useIndex:' true |
|
959 |
#'canvas:' #noteBookView |
|
960 |
) |
|
961 |
#(#UISubSpecification |
|
962 |
#'name:' 'SubSpecification' |
|
963 |
#'layout:' #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
964 |
#'majorKey:' #ToolApplicationModel |
|
965 |
#'minorKey:' #windowSpecForCommit |
|
966 |
) |
|
967 |
) |
|
968 |
) |
|
969 |
#'level:' -1 |
|
970 |
) |
|
971 |
) |
|
972 |
) |
|
973 |
#'handles:' #(#Any 0.384483 1.0) |
|
974 |
) |
|
975 |
#(#UISubSpecification |
|
976 |
#'name:' 'infoBarSubSpec' |
|
571 | 977 |
#'layout:' #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
525 | 978 |
#'majorKey:' #ToolApplicationModel |
535 | 979 |
#'minorKey:' #windowSpecForInfoBarWithClock |
525 | 980 |
) |
981 |
) |
|
982 |
) |
|
983 |
) |
|
984 |
! ! |
|
985 |
||
986 |
!MenuEditor class methodsFor:'menu specs'! |
|
987 |
||
988 |
menu |
|
989 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
990 |
||
991 |
"do not manually edit this - the builder may not be able to |
|
992 |
handle the specification if its corrupted." |
|
993 |
||
994 |
" |
|
995 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
996 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
997 |
" |
|
998 |
||
999 |
<resource: #menu> |
|
1000 |
||
1001 |
^ |
|
1002 |
||
1003 |
#(#Menu |
|
1004 |
||
1005 |
#( |
|
1006 |
#(#MenuItem |
|
1007 |
#'label:' 'About' |
|
577 | 1008 |
#'activeHelpKey:' #about |
525 | 1009 |
#'accessCharacterPosition:' 1 |
546 | 1010 |
#'labelImage:' #(#ResourceRetriever nil #menuIcon) |
525 | 1011 |
#'submenuChannel:' #menuAbout |
1012 |
) |
|
1013 |
#(#MenuItem |
|
1014 |
#'label:' 'File' |
|
1015 |
#'translateLabel:' true |
|
577 | 1016 |
#'activeHelpKey:' #file |
525 | 1017 |
#'submenu:' |
1018 |
#(#Menu |
|
1019 |
||
1020 |
#( |
|
1021 |
#(#MenuItem |
|
1022 |
#'label:' 'New' |
|
1023 |
#'value:' #doNew |
|
548 | 1024 |
#'activeHelpKey:' #fileNew |
525 | 1025 |
) |
1026 |
#(#MenuItem |
|
1027 |
#'label:' '-' |
|
1028 |
) |
|
1029 |
#(#MenuItem |
|
1030 |
#'label:' 'Load...' |
|
1031 |
#'translateLabel:' true |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1032 |
#'value:' #doLoad |
548 | 1033 |
#'activeHelpKey:' #fileLoad |
525 | 1034 |
#'enabled:' #isStandAlone |
1035 |
) |
|
1036 |
#(#MenuItem |
|
1037 |
#'label:' '-' |
|
1038 |
) |
|
1039 |
#(#MenuItem |
|
1040 |
#'label:' 'Save' |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1041 |
#'value:' #doSave |
548 | 1042 |
#'activeHelpKey:' #fileSave |
525 | 1043 |
) |
1044 |
#(#MenuItem |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1045 |
#'label:' 'Save As...' |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1046 |
#'value:' #doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1047 |
#'activeHelpKey:' #fileSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1048 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1049 |
#(#MenuItem |
525 | 1050 |
#'label:' '-' |
1051 |
) |
|
1052 |
#(#MenuItem |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1053 |
#'label:' 'Pick A Menu...' |
525 | 1054 |
#'value:' #doPickAMenu |
577 | 1055 |
#'activeHelpKey:' #filePickAMenu |
525 | 1056 |
#'enabled:' #isStandAlone |
1057 |
) |
|
1058 |
#(#MenuItem |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1059 |
#'label:' '-' |
525 | 1060 |
) |
1061 |
#(#MenuItem |
|
603 | 1062 |
#'label:' 'Browse Class' |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1063 |
#'value:' #doBrowseClass |
578 | 1064 |
#'activeHelpKey:' #fileBrowseClass |
525 | 1065 |
) |
1066 |
#(#MenuItem |
|
1067 |
#'label:' '-' |
|
1068 |
) |
|
1069 |
#(#MenuItem |
|
1070 |
#'label:' 'Exit' |
|
1071 |
#'translateLabel:' true |
|
1072 |
#'value:' #closeRequest |
|
548 | 1073 |
#'activeHelpKey:' #fileExit |
525 | 1074 |
) |
1075 |
) nil |
|
1076 |
nil |
|
1077 |
) |
|
1078 |
) |
|
1079 |
#(#MenuItem |
|
1080 |
#'label:' 'Edit' |
|
577 | 1081 |
#'activeHelpKey:' #edit |
525 | 1082 |
#'submenuChannel:' #menuEdit |
1083 |
) |
|
1084 |
#(#MenuItem |
|
1085 |
#'label:' 'Add' |
|
577 | 1086 |
#'activeHelpKey:' #add |
525 | 1087 |
#'submenuChannel:' #menuAdd |
1088 |
) |
|
1089 |
#(#MenuItem |
|
1090 |
#'label:' 'Test' |
|
577 | 1091 |
#'activeHelpKey:' #test |
525 | 1092 |
#'submenuChannel:' #submenuTest |
1093 |
) |
|
1094 |
#(#MenuItem |
|
1095 |
#'label:' 'History' |
|
577 | 1096 |
#'activeHelpKey:' #history |
525 | 1097 |
#'submenuChannel:' #menuHistory |
1098 |
) |
|
1099 |
#(#MenuItem |
|
1100 |
#'label:' 'Help' |
|
546 | 1101 |
#'startGroup:' #right |
577 | 1102 |
#'activeHelpKey:' #help |
525 | 1103 |
#'submenuChannel:' #menuHelp |
1104 |
) |
|
1105 |
) nil |
|
1106 |
nil |
|
1107 |
) |
|
1108 |
! |
|
1109 |
||
1110 |
menuAdd |
|
1111 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1112 |
||
1113 |
"do not manually edit this - the builder may not be able to |
|
1114 |
handle the specification if its corrupted." |
|
1115 |
||
1116 |
" |
|
1117 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd |
|
1118 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp |
|
1119 |
" |
|
1120 |
||
1121 |
<resource: #menu> |
|
1122 |
||
1123 |
^ |
|
1124 |
||
1125 |
#(#Menu |
|
1126 |
||
1127 |
#( |
|
1128 |
#(#MenuItem |
|
548 | 1129 |
#'label:' 'Menu Item' |
525 | 1130 |
#'value:' #doCreateItem |
548 | 1131 |
#'activeHelpKey:' #addMenuItem |
1132 |
#'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') |
|
525 | 1133 |
) |
1134 |
#(#MenuItem |
|
548 | 1135 |
#'label:' 'Menu Separator' |
525 | 1136 |
#'value:' #doCreateSep |
548 | 1137 |
#'activeHelpKey:' #addMenuSeparator |
1138 |
#'labelImage:' #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') |
|
525 | 1139 |
) |
1140 |
#(#MenuItem |
|
1141 |
#'label:' '-' |
|
1142 |
) |
|
1143 |
#(#MenuItem |
|
1144 |
#'label:' 'Submenu' |
|
1145 |
#'value:' #doCreateMenu |
|
577 | 1146 |
#'activeHelpKey:' #addSubMenu |
525 | 1147 |
#'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') |
1148 |
) |
|
1149 |
#(#MenuItem |
|
1150 |
#'label:' 'Submenu Link' |
|
1151 |
#'value:' #doCreateLink |
|
577 | 1152 |
#'activeHelpKey:' #addSubMenuLink |
525 | 1153 |
#'labelImage:' #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Submenu Link') |
1154 |
) |
|
1155 |
) nil |
|
1156 |
nil |
|
1157 |
) |
|
1158 |
! |
|
1159 |
||
1160 |
menuDefaultLink |
|
1161 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1162 |
||
1163 |
"do not manually edit this - the builder may not be able to |
|
1164 |
handle the specification if its corrupted." |
|
1165 |
||
1166 |
" |
|
1167 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
1168 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
1169 |
" |
|
1170 |
||
1171 |
<resource: #menu> |
|
1172 |
||
1173 |
^ |
|
1174 |
||
1175 |
#(#Menu |
|
1176 |
||
1177 |
#( |
|
1178 |
#(#MenuItem |
|
1179 |
#'label:' '!! derives from application !!' |
|
1180 |
) |
|
1181 |
) nil |
|
1182 |
nil |
|
1183 |
) |
|
1184 |
! |
|
1185 |
||
1186 |
menuEdit |
|
1187 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1188 |
||
1189 |
"do not manually edit this - the builder may not be able to |
|
1190 |
handle the specification if its corrupted." |
|
1191 |
||
1192 |
" |
|
1193 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit |
|
1194 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp |
|
1195 |
" |
|
1196 |
||
1197 |
<resource: #menu> |
|
1198 |
||
1199 |
^ |
|
1200 |
||
1201 |
#(#Menu |
|
1202 |
||
1203 |
#( |
|
1204 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1205 |
#label: 'Cut' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1206 |
#value: #doCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1207 |
#activeHelpKey: #editCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1208 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1209 |
#shortcutKeyCharacter: #Cut |
525 | 1210 |
) |
1211 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1212 |
#label: 'Copy' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1213 |
#value: #doCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1214 |
#activeHelpKey: #editCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1215 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1216 |
#shortcutKeyCharacter: #Copy |
525 | 1217 |
) |
1218 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1219 |
#label: 'Paste' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1220 |
#value: #doPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1221 |
#activeHelpKey: #editPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1222 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1223 |
#shortcutKeyCharacter: #Paste |
525 | 1224 |
) |
1225 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1226 |
#label: '-' |
525 | 1227 |
) |
1228 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1229 |
#label: 'Move Up' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1230 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1231 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1232 |
#enabled: #valueOfEnableMovingUpOrDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1233 |
#labelImage: #(#ResourceRetriever #ToolApplicationModel #upIcon 'Move Up') |
525 | 1234 |
) |
1235 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1236 |
#label: 'Move Down' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1237 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1238 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1239 |
#enabled: #valueOfEnableMovingUpOrDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1240 |
#labelImage: #(#ResourceRetriever #ToolApplicationModel #downIcon 'Move Down') |
525 | 1241 |
) |
1242 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1243 |
#label: 'Move In' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1244 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1245 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1246 |
#enabled: #valueOfEnableMovingIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1247 |
#labelImage: #(#ResourceRetriever #ToolApplicationModel #downRightIcon 'Move In') |
525 | 1248 |
) |
1249 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1250 |
#label: 'Move Out' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1251 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1252 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1253 |
#enabled: #valueOfEnableMovingOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1254 |
#labelImage: #(#ResourceRetriever #ToolApplicationModel #leftDownIcon 'Move Out') |
525 | 1255 |
) |
1256 |
) nil |
|
1257 |
nil |
|
1258 |
) |
|
1259 |
! |
|
1260 |
||
1261 |
menuToolbar |
|
1262 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1263 |
||
1264 |
"do not manually edit this - the builder may not be able to |
|
1265 |
handle the specification if its corrupted." |
|
1266 |
||
1267 |
" |
|
1268 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar |
|
1269 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp |
|
1270 |
" |
|
1271 |
||
1272 |
<resource: #menu> |
|
1273 |
||
1274 |
^ |
|
1275 |
||
1276 |
#(#Menu |
|
1277 |
||
1278 |
#( |
|
1279 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1280 |
#label: 'New' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1281 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1282 |
#value: #doNew |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1283 |
#activeHelpKey: #fileNew |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1284 |
#labelImage: #(#ResourceRetriever nil #newIcon) |
525 | 1285 |
) |
1286 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1287 |
#label: 'Load' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1288 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1289 |
#value: #doLoad |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1290 |
#activeHelpKey: #fileLoad |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1291 |
#labelImage: #(#ResourceRetriever nil #loadIcon) |
525 | 1292 |
) |
1293 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1294 |
#label: 'Save' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1295 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1296 |
#value: #doSave |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1297 |
#activeHelpKey: #fileSave |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1298 |
#labelImage: #(#ResourceRetriever nil #saveIcon) |
525 | 1299 |
) |
1300 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1301 |
#label: '' |
525 | 1302 |
) |
1303 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1304 |
#label: 'Add Item' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1305 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1306 |
#value: #doCreateItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1307 |
#activeHelpKey: #addMenuItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1308 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1309 |
#labelImage: #(#ResourceRetriever nil #menuItemImage) |
525 | 1310 |
) |
1311 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1312 |
#label: 'Add Separator' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1313 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1314 |
#value: #doCreateSep |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1315 |
#activeHelpKey: #addMenuSeparator |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1316 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1317 |
#labelImage: #(#ResourceRetriever nil #menuSeparatorImage) |
525 | 1318 |
) |
1319 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1320 |
#label: '' |
525 | 1321 |
) |
1322 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1323 |
#label: 'Add Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1324 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1325 |
#value: #doCreateMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1326 |
#activeHelpKey: #addSubMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1327 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1328 |
#labelImage: #(#ResourceRetriever nil #submenuImage) |
525 | 1329 |
) |
1330 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1331 |
#label: 'Add Linked Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1332 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1333 |
#value: #doCreateLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1334 |
#activeHelpKey: #addSubMenuLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1335 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1336 |
#labelImage: #(#ResourceRetriever nil #linkSubmenuImage) |
525 | 1337 |
) |
1338 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1339 |
#label: '' |
525 | 1340 |
) |
1341 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1342 |
#label: 'Move Up' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1343 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1344 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1345 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1346 |
#enabled: #valueOfEnableMovingUpOrDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1347 |
#labelImage: #(#ResourceRetriever nil #upIcon) |
525 | 1348 |
) |
1349 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1350 |
#label: 'Move Down' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1351 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1352 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1353 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1354 |
#enabled: #valueOfEnableMovingUpOrDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1355 |
#labelImage: #(#ResourceRetriever nil #downIcon) |
525 | 1356 |
) |
1357 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1358 |
#label: 'Move In' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1359 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1360 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1361 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1362 |
#enabled: #valueOfEnableMovingIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1363 |
#labelImage: #(#ResourceRetriever nil #downRightIcon) |
525 | 1364 |
) |
1365 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1366 |
#label: 'Move Out' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1367 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1368 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1369 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1370 |
#enabled: #valueOfEnableMovingOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1371 |
#labelImage: #(#ResourceRetriever nil #leftDownIcon) |
525 | 1372 |
) |
1373 |
) nil |
|
1374 |
nil |
|
1375 |
) |
|
1376 |
! ! |
|
1377 |
||
1378 |
!MenuEditor class methodsFor:'resources'! |
|
1379 |
||
1380 |
linkSubmenuImage |
|
1381 |
"Generated by the Image Editor" |
|
1382 |
" |
|
1383 |
ImageEditor openOnClass:self andSelector:#linkSubmenuImage |
|
1384 |
" |
|
1385 |
||
1386 |
<resource: #image> |
|
1387 |
||
1388 |
^Icon |
|
1389 |
constantNamed:#'MenuEditor linkSubmenuImage' |
|
1390 |
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'); colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); yourself); yourself]! |
|
1391 |
||
1392 |
menuItemImage |
|
1393 |
"Generated by the Image Editor" |
|
1394 |
" |
|
1395 |
ImageEditor openOnClass:self andSelector:#menuItemImage |
|
1396 |
" |
|
1397 |
||
1398 |
<resource: #image> |
|
1399 |
||
1400 |
^Icon |
|
1401 |
constantNamed:#'MenuEditor menuItemImage' |
|
1402 |
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'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); yourself); yourself]! |
|
1403 |
||
1404 |
menuSeparatorImage |
|
1405 |
"Generated by the Image Editor" |
|
1406 |
" |
|
1407 |
ImageEditor openOnClass:self andSelector:#menuSeparatorImage |
|
1408 |
" |
|
1409 |
||
1410 |
<resource: #image> |
|
1411 |
||
1412 |
^Icon |
|
1413 |
constantNamed:#'MenuEditor menuSeparatorImage' |
|
1414 |
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'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); yourself); yourself]! |
|
1415 |
||
1416 |
submenuImage |
|
1417 |
"Generated by the Image Editor" |
|
1418 |
" |
|
1419 |
ImageEditor openOnClass:self andSelector:#submenuImage |
|
1420 |
" |
|
1421 |
||
1422 |
<resource: #image> |
|
1423 |
||
1424 |
^Icon |
|
1425 |
constantNamed:#'MenuEditor submenuImage' |
|
1426 |
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??????@@@@@@@@@@@@@@@@@'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); yourself); yourself]! ! |
|
1427 |
||
1428 |
!MenuEditor class methodsFor:'slices'! |
|
1429 |
||
1430 |
slicesItem |
|
1431 |
^#( |
|
1432 |
(Basics basicsItemSpec) |
|
1433 |
(Details detailsEditSpec) |
|
1434 |
(Image imageEditSpec) |
|
1435 |
) |
|
1436 |
||
1437 |
! |
|
1438 |
||
1439 |
slicesLink |
|
1440 |
^#( |
|
1441 |
(Basics basicsLinkSpec) |
|
1442 |
(Details detailsEditSpec) |
|
1443 |
(Image imageEditSpec) |
|
1444 |
) |
|
1445 |
||
1446 |
! |
|
1447 |
||
1448 |
slicesMenu |
|
1449 |
^#( |
|
1450 |
(Basics basicsMenuSpec) |
|
1451 |
(Details detailsEditSpec) |
|
1452 |
(Image imageEditSpec) |
|
1453 |
) |
|
1454 |
||
1455 |
! |
|
1456 |
||
1457 |
slicesRootMenu |
|
1458 |
^#( |
|
1459 |
(Basics basicsRootSpec) |
|
1460 |
) |
|
1461 |
||
1462 |
! |
|
1463 |
||
1464 |
slicesSeparatorMenu |
|
1465 |
^#( |
|
1466 |
(Basics basicsSeparatorSpec) |
|
1467 |
) |
|
1468 |
||
199 | 1469 |
! ! |
1470 |
||
1471 |
!MenuEditor methodsFor:'accessing'! |
|
1472 |
||
218 | 1473 |
submenuTest |
407 | 1474 |
"returns submenu assigned to item test" |
1475 |
||
218 | 1476 |
|menu| |
1477 |
||
407 | 1478 |
(menu := self treeView asMenu) allItemsDo: |
1479 |
[:anItem| |
|
218 | 1480 |
anItem value:nil. |
1481 |
anItem enabled:true. |
|
1482 |
]. |
|
407 | 1483 |
^menu |
287 | 1484 |
! |
1485 |
||
1486 |
useHelpDictionary:aDictionary |
|
407 | 1487 |
|
287 | 1488 |
self noteBookView. |
407 | 1489 |
self helpTool dictionary:aDictionary |
199 | 1490 |
! ! |
1491 |
||
1492 |
!MenuEditor methodsFor:'aspects'! |
|
1493 |
||
220 | 1494 |
hasAnySingleSelection |
407 | 1495 |
|
1496 |
^builder booleanValueAspectFor: #hasAnySingleSelection |
|
220 | 1497 |
! |
1498 |
||
1499 |
hasValidSelection |
|
407 | 1500 |
|
1501 |
^builder booleanValueAspectFor: #hasValidSelection |
|
220 | 1502 |
! |
1503 |
||
1504 |
hasValidSingleSelection |
|
407 | 1505 |
|
1506 |
^builder booleanValueAspectFor: #hasValidSingleSelection |
|
220 | 1507 |
! |
1508 |
||
287 | 1509 |
noteBookView |
199 | 1510 |
|
287 | 1511 |
|noteBook helpTool| |
1512 |
||
1513 |
(noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[ |
|
1514 |
noteBook := View new. |
|
1515 |
helpTool := UIHelpTool new. |
|
1516 |
||
1517 |
helpTool masterApplication:self. |
|
1518 |
helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1519 |
specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1520 |
||
1521 |
helpCanvas client:helpTool. |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1522 |
helpTool masterApplication:self. |
422 | 1523 |
helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
287 | 1524 |
|
1525 |
builder aspectAt:#noteBookView put:noteBook. |
|
199 | 1526 |
]. |
287 | 1527 |
^ noteBook |
199 | 1528 |
! |
1529 |
||
1530 |
tabList |
|
1531 |
||
298 | 1532 |
|holder| |
1533 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
|
1534 |
builder aspectAt:#tabList put:(holder := #('Properties') asValue). |
|
1535 |
]. |
|
1536 |
^ holder |
|
1537 |
||
1538 |
||
199 | 1539 |
! |
1540 |
||
407 | 1541 |
treeView |
1542 |
"returns the tree view representing hierarchically all the menu items" |
|
1543 |
||
1544 |
|treeView| |
|
1545 |
(treeView := builder bindingAt:#treeView) isNil ifTrue:[ |
|
1546 |
treeView := TreeView new. |
|
1547 |
treeView action:[:dummy|self menuChanged]. |
|
1548 |
builder aspectAt: #treeView put: treeView |
|
1549 |
]. |
|
1550 |
^treeView |
|
199 | 1551 |
! ! |
1552 |
||
1553 |
!MenuEditor methodsFor:'change & update'! |
|
1554 |
||
218 | 1555 |
updateEnabledChannels |
407 | 1556 |
"update enabled channels" |
1557 |
||
1558 |
|node parent next state| |
|
1559 |
||
412 | 1560 |
state := false. |
407 | 1561 |
|
1562 |
(node := self treeView selectedNode) notNil |
|
1563 |
ifTrue: |
|
1564 |
[ |
|
220 | 1565 |
self hasAnySingleSelection value:true. |
407 | 1566 |
(parent := node parent) notNil |
1567 |
ifTrue: |
|
1568 |
[ |
|
220 | 1569 |
next := parent childAt:((parent indexOfChild:node) + 1). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1570 |
self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1571 |
self valueOfEnableMovingUpOrDown value:(parent children size > 1). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1572 |
self valueOfEnableMovingOut value:parent parent notNil. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1573 |
self hasValidSingleSelection value:true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1574 |
self hasValidSelection value:true. |
220 | 1575 |
^ self |
1576 |
] |
|
407 | 1577 |
] |
1578 |
ifFalse: |
|
1579 |
[ |
|
220 | 1580 |
self hasAnySingleSelection value:false. |
407 | 1581 |
self treeView numberOfSelections ~~ 0 ifTrue:[ |
1582 |
state := (self treeView isInSelection:1) not |
|
220 | 1583 |
] |
407 | 1584 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1585 |
self valueOfEnableMovingUpOrDown value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1586 |
self valueOfEnableMovingIn value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1587 |
self valueOfEnableMovingOut value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1588 |
self hasValidSingleSelection value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1589 |
self hasValidSelection value:state. |
220 | 1590 |
! ! |
1591 |
||
1592 |
!MenuEditor methodsFor:'event handling'! |
|
1593 |
||
407 | 1594 |
doesNotUnderstand: aMessage |
1595 |
"detour incoming messages to the tree view" |
|
1596 |
||
1597 |
(self treeView respondsTo: aMessage selector) |
|
1598 |
ifTrue: |
|
1599 |
[ |
|
1600 |
^aMessage sendTo: self treeView |
|
1601 |
]. |
|
1602 |
super doesNotUnderstand:aMessage |
|
220 | 1603 |
|
1604 |
||
199 | 1605 |
! ! |
1606 |
||
571 | 1607 |
!MenuEditor methodsFor:'help'! |
1608 |
||
1609 |
openTutorial |
|
1610 |
||
621 | 1611 |
self openTutorial: 'tools/MenuEditor/TOP.html'. |
571 | 1612 |
|
1613 |
! ! |
|
1614 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1615 |
!MenuEditor methodsFor:'initialization'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1616 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1617 |
initialize |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1618 |
"initialize value holders for the menu item properties" |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1619 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1620 |
|holder| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1621 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1622 |
super initialize. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1623 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1624 |
aspects at:#seperatorSelection put:(holder := SelectionInList new). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1625 |
holder list: Item separatorList. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1626 |
holder addDependent:self. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1627 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1628 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1629 |
|
287 | 1630 |
!MenuEditor methodsFor:'private'! |
1631 |
||
1632 |
helpKey |
|
407 | 1633 |
|
287 | 1634 |
|node| |
407 | 1635 |
(node := self treeView selectedNode) notNil ifTrue:[ |
287 | 1636 |
^ node contents activeHelpKey |
1637 |
]. |
|
1638 |
^ nil |
|
1639 |
! |
|
1640 |
||
1641 |
helpTool |
|
407 | 1642 |
|
1643 |
^helpCanvas application |
|
287 | 1644 |
! ! |
1645 |
||
199 | 1646 |
!MenuEditor methodsFor:'queries'! |
1647 |
||
1648 |
isHelpToolSelected |
|
407 | 1649 |
"returns true if current selection is help tool" |
1650 |
||
290 | 1651 |
(tabSelection ~~ 0 and:[slices notNil]) ifTrue:[ |
407 | 1652 |
^(slices at:tabSelection) first = UIHelpTool label |
199 | 1653 |
]. |
407 | 1654 |
^false |
287 | 1655 |
! |
1656 |
||
1657 |
isStandAlone |
|
407 | 1658 |
"returns true in case of owner of the helptool" |
1659 |
||
1660 |
^self masterApplication isNil |
|
535 | 1661 |
! |
1662 |
||
1663 |
preferredExtent |
|
1664 |
||
1665 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//2.5) |
|
1666 |
||
1667 |
||
199 | 1668 |
! ! |
1669 |
||
1670 |
!MenuEditor methodsFor:'selection'! |
|
1671 |
||
1672 |
menuChanged |
|
407 | 1673 |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1674 |
|node item slc sel old dep| |
199 | 1675 |
|
407 | 1676 |
aspects do: [:holder| holder removeDependent:self]. |
1677 |
(node := self treeView selectedNode) notNil ifTrue:[ |
|
199 | 1678 |
aspects do:[:anAspect| anAspect value:nil ]. |
1679 |
item := node contents. |
|
1680 |
item toAspects:aspects. |
|
1681 |
||
218 | 1682 |
item isSeparator ifFalse:[ |
199 | 1683 |
node parent isNil ifFalse:[ |
218 | 1684 |
node hasChildren ifTrue:[ |
1685 |
slc := #slicesMenu |
|
1686 |
] ifFalse:[ |
|
1687 |
item submenuChannel isNil ifTrue:[slc := #slicesItem] |
|
1688 |
ifFalse:[slc := #slicesLink] |
|
1689 |
]. |
|
287 | 1690 |
slc := (self class perform:slc) copyWith:#( 'Help' #dummy ). |
199 | 1691 |
] ifTrue:[ |
287 | 1692 |
slc := self class perform:#slicesRootMenu |
1693 |
]. |
|
199 | 1694 |
] ifTrue:[ |
287 | 1695 |
slc := self class perform:#slicesSeparatorMenu. |
1696 |
] |
|
199 | 1697 |
]. |
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1698 |
|
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1699 |
self helpTool helpKey: self helpKey. |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1700 |
"Next line helps me to preserve myself against unnecessary settings of |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1701 |
valueOfEnablingCommitButtons to true in the help tool." |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1702 |
self valueOfEnablingCommitButtons value: false. |
199 | 1703 |
|
1704 |
slc ~= slices ifTrue:[ |
|
290 | 1705 |
tabSelection ~~ 0 ifTrue:[ |
287 | 1706 |
old := (slices at:tabSelection) first |
1707 |
]. |
|
1708 |
||
199 | 1709 |
(slices := slc) notNil ifTrue:[ |
287 | 1710 |
sel := slices collect:[:s| s first]. |
290 | 1711 |
tabSelection := 0. |
287 | 1712 |
self tabList value:sel. |
1713 |
||
1714 |
(old notNil and:[(sel := sel findFirst:[:n|n = old]) ~~ 0]) ifFalse:[ |
|
1715 |
sel := 1 |
|
1716 |
]. |
|
1717 |
self tabModel value:sel |
|
199 | 1718 |
] ifFalse:[ |
1719 |
self tabList value:nil. |
|
290 | 1720 |
self tabSelection:0. |
199 | 1721 |
] |
1722 |
]. |
|
407 | 1723 |
self updateEnabledChannels. |
1724 |
aspects do: [:holder| holder addDependent:self]. |
|
199 | 1725 |
! |
1726 |
||
407 | 1727 |
tabSelection: aSelection |
1728 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1729 |
|sel| |
287 | 1730 |
tabSelection = aSelection ifTrue:[ |
199 | 1731 |
^ self |
1732 |
]. |
|
298 | 1733 |
(aSelection ~~ 0 and:[slices isNil]) ifTrue:[ |
1734 |
^ self |
|
1735 |
]. |
|
290 | 1736 |
(tabSelection := aSelection) == 0 ifTrue:[ |
287 | 1737 |
slices isNil ifTrue:[ |
1738 |
specCanvas client:nil. |
|
1739 |
^ specCanvas raise. |
|
1740 |
]. |
|
1741 |
tabSelection == 1 ifTrue:[^ self]. |
|
1742 |
tabSelection := 1 |
|
199 | 1743 |
]. |
287 | 1744 |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1745 |
self isHelpToolSelected ifTrue:[ |
287 | 1746 |
self helpTool helpKey:(self helpKey). |
1747 |
helpCanvas raise. |
|
412 | 1748 |
] ifFalse:[ |
1749 |
sel := (slices at:tabSelection) last. |
|
407 | 1750 |
aspects do: [:holder| holder release]. |
287 | 1751 |
specCanvas client:self spec:(self class perform:sel) builder:builder. |
407 | 1752 |
aspects do: [:holder| holder addDependent:self]. |
1753 |
specCanvas raise. |
|
199 | 1754 |
] |
298 | 1755 |
|
199 | 1756 |
! ! |
1757 |
||
1758 |
!MenuEditor methodsFor:'startup / release'! |
|
1759 |
||
637 | 1760 |
buildFromClass:aClass andSelector:aSelector |
1761 |
||
1762 |
self isStandAlone ifTrue:[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1763 |
self helpTool helpSpecFrom:specClass |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1764 |
]. |
637 | 1765 |
self treeView buildFromClass: aClass andSelector: specSelector. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1766 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1767 |
self updateHistory. |
571 | 1768 |
self updateInfoLabel. |
412 | 1769 |
self treeView selection: 2. |
1770 |
self menuChanged |
|
398 | 1771 |
|
1772 |
! |
|
1773 |
||
412 | 1774 |
postOpenWith:aBuilder |
1775 |
||
537 | 1776 |
super postOpenWith:aBuilder. |
1777 |
||
412 | 1778 |
self isHelpToolSelected |
1779 |
ifTrue: [helpCanvas raise] |
|
1780 |
ifFalse: [specCanvas raise] |
|
199 | 1781 |
! ! |
1782 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1783 |
!MenuEditor methodsFor:'user actions'! |
199 | 1784 |
|
407 | 1785 |
accept |
1786 |
"invoked by button 'OK' and by save requests of menu item changes" |
|
1787 |
||
1788 |
|node| |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1789 |
|
637 | 1790 |
super accept. |
1791 |
||
642 | 1792 |
(node := self treeView selectedNode) notNil |
407 | 1793 |
ifTrue: |
1794 |
[ |
|
1795 |
self isHelpToolSelected |
|
1796 |
ifTrue: |
|
1797 |
[ |
|
1798 |
self helpTool accept. |
|
1799 |
node contents activeHelpKey: self helpTool helpKey |
|
1800 |
] |
|
1801 |
ifFalse: |
|
1802 |
[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1803 |
node contents buildFromAspects: aspects. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1804 |
node changed. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1805 |
specSelector := self treeView selectorName. |
407 | 1806 |
] |
1807 |
]. |
|
637 | 1808 |
|
407 | 1809 |
! |
1810 |
||
1811 |
cancel |
|
1812 |
"invoked by button 'Cancel'" |
|
1813 |
||
1814 |
|node| |
|
1815 |
(node := self treeView selectedNode) notNil |
|
1816 |
ifTrue: |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1817 |
[ |
407 | 1818 |
self helpTool helpKey:(self helpKey). |
1819 |
aspects do:[:anAspect| anAspect value:nil]. |
|
1820 |
node contents toAspects:aspects |
|
1821 |
]. |
|
422 | 1822 |
self valueOfEnablingCommitButtons value: false. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1823 |
modified := false |
407 | 1824 |
! |
1825 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1826 |
doNew |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1827 |
|
634 | 1828 |
self askForModification |
1829 |
ifTrue: |
|
1830 |
[ |
|
637 | 1831 |
specClass := specSelector := nil. |
1832 |
self buildFromClass: nil andSelector: #menu |
|
634 | 1833 |
] |
199 | 1834 |
! |
1835 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1836 |
doPickAMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1837 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1838 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1839 |
|
642 | 1840 |
((view := Screen current viewFromUser) isNil or: |
1841 |
[view == Screen current rootView]) ifTrue:[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1842 |
^ self |
398 | 1843 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1844 |
view specClass == MenuPanelSpec ifTrue:[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1845 |
^ self treeView buildFromMenu: view asMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1846 |
]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1847 |
^ nil |
381 | 1848 |
! |
1849 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1850 |
doSave |
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1851 |
|cls treeView menu spec mthd category code BANG| |
199 | 1852 |
|
642 | 1853 |
super doSave ifFalse: [^nil]. |
637 | 1854 |
|
1855 |
cls := self resolveName: specClass. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1856 |
treeView := self treeView. |
407 | 1857 |
menu := treeView asMenu. |
199 | 1858 |
menu := menu literalArrayEncoding. |
1859 |
spec := WriteStream on:String new. |
|
1860 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
1861 |
spec := spec contents. |
|
1862 |
||
1863 |
"/ if that method already exists, do not overwrite the category |
|
1864 |
||
576 | 1865 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1866 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 1867 |
category := mthd category. |
1868 |
]. |
|
1869 |
||
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1870 |
BANG := Character excla asString. |
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1871 |
|
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1872 |
code := BANG |
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1873 |
, (cls name , ' class methodsFor:' , category storeString) |
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1874 |
, BANG , '\\' |
199 | 1875 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1876 |
, specSelector , '\' |
199 | 1877 |
, ' "this window spec was automatically generated by the ST/X MenuEditor"\\' |
1878 |
, ' "do not manually edit this - the builder may not be able to\' |
|
1879 |
, ' handle the specification if its corrupted."\\' |
|
1880 |
, ' "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1881 |
, (' 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
|
1882 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 1883 |
, ' "\'. |
1884 |
||
1885 |
code := code |
|
1886 |
, '\' |
|
1887 |
, ' <resource: #menu>\\' |
|
1888 |
, ' ^\' |
|
1889 |
, ' ', spec |
|
1890 |
, '\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
1891 |
, (BANG , ' ' , BANG) |
199 | 1892 |
, '\\'. |
1893 |
||
1894 |
code := code withCRs. |
|
1895 |
(ReadStream on:code) fileIn. |
|
1896 |
||
455 | 1897 |
self isStandAlone ifTrue:[ |
1898 |
self helpTool installHelpSpecInto:(self specClass) |
|
1899 |
]. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1900 |
self updateHistory. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1901 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1902 |
modified := false. |
218 | 1903 |
|
199 | 1904 |
! |
1905 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1906 |
doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1907 |
|
637 | 1908 |
super doSaveAs ifTrue: [self treeView selectorName: specSelector] |
218 | 1909 |
! |
199 | 1910 |
|
218 | 1911 |
doStepDown |
407 | 1912 |
"shift selected menu item one step down" |
1913 |
||
1914 |
self treeView selectedNodeChangeSequenceOrder:1. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1915 |
modified := true. |
398 | 1916 |
|
1917 |
||
1918 |
||
1919 |
||
218 | 1920 |
! |
1921 |
||
1922 |
doStepIn |
|
407 | 1923 |
"move selected menu item into next submenu" |
1924 |
||
1925 |
self treeView selectedNodeBecomeChildOfNext. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1926 |
modified := true. |
398 | 1927 |
|
1928 |
||
1929 |
||
1930 |
||
199 | 1931 |
|
218 | 1932 |
! |
199 | 1933 |
|
218 | 1934 |
doStepOut |
407 | 1935 |
"move selected menu item out from parent submenu" |
1936 |
||
1937 |
self treeView selectedNodeBecomeSisterOfParent. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1938 |
modified := true. |
218 | 1939 |
! |
1940 |
||
1941 |
doStepUp |
|
407 | 1942 |
"shift selected menu item one step up" |
1943 |
||
1944 |
self treeView selectedNodeChangeSequenceOrder:-1. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1945 |
modified := true. |
199 | 1946 |
! ! |
1947 |
||
218 | 1948 |
!MenuEditor::Item class methodsFor:'constants'! |
1949 |
||
1950 |
separatorList |
|
407 | 1951 |
|
1952 |
^#('blank' 'single line' 'double line') |
|
218 | 1953 |
! |
1954 |
||
1955 |
separatorSlices |
|
1956 |
^ #( |
|
1957 |
( #blank '' ) |
|
1958 |
( #single '-' ) |
|
1959 |
( #double '=' ) |
|
1960 |
) |
|
1961 |
! ! |
|
1962 |
||
199 | 1963 |
!MenuEditor::Item class methodsFor:'documentation'! |
1964 |
||
1965 |
documentation |
|
1966 |
" |
|
213 | 1967 |
implements the contents assigned to a TreeItem. An instance |
199 | 1968 |
is associated with one item and keeps all its information |
1969 |
||
1970 |
[see also:] |
|
213 | 1971 |
TreeItem |
199 | 1972 |
MenuEditor |
1973 |
||
1974 |
[author:] |
|
1975 |
Claus Atzkern |
|
1976 |
" |
|
1977 |
||
1978 |
||
1979 |
! ! |
|
1980 |
||
1981 |
!MenuEditor::Item methodsFor:'accessing'! |
|
1982 |
||
287 | 1983 |
activeHelpKey |
407 | 1984 |
|
1985 |
^activeHelpKey |
|
287 | 1986 |
! |
1987 |
||
1988 |
activeHelpKey:aKey |
|
407 | 1989 |
|
287 | 1990 |
activeHelpKey := aKey |
1991 |
! |
|
1992 |
||
199 | 1993 |
label |
1994 |
"return the value of the instance variable 'label' (automatically generated)" |
|
1995 |
||
407 | 1996 |
^label |
1997 |
! |
|
199 | 1998 |
|
1999 |
label:something |
|
2000 |
"set the value of the instance variable 'label' (automatically generated)" |
|
2001 |
||
407 | 2002 |
label := something ? '-' |
218 | 2003 |
! |
2004 |
||
2005 |
separatorType |
|
407 | 2006 |
"returns separator type assigned to item or nil" |
2007 |
||
2008 |
label size > 1 |
|
2009 |
ifFalse: |
|
2010 |
[ |
|
2011 |
label size == 0 ifTrue:[^#blank]. |
|
2012 |
label first == $- ifTrue:[^#single]. |
|
2013 |
label first == $= ifTrue:[^#double]. |
|
218 | 2014 |
]. |
407 | 2015 |
^nil |
218 | 2016 |
|
2017 |
! |
|
2018 |
||
2019 |
submenuChannel |
|
2020 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2021 |
||
407 | 2022 |
^submenuChannel |
218 | 2023 |
! |
2024 |
||
2025 |
submenuChannel:aChannel |
|
2026 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2027 |
||
2028 |
submenuChannel := aChannel |
|
2029 |
! ! |
|
199 | 2030 |
|
2031 |
!MenuEditor::Item methodsFor:'conversion'! |
|
2032 |
||
2033 |
asMenuItem |
|
407 | 2034 |
"converts self to a menu item" |
2035 |
||
199 | 2036 |
|item rcv| |
2037 |
||
218 | 2038 |
item := MenuItem labeled:label. |
606 | 2039 |
item isVisible:isVisible. |
199 | 2040 |
|
398 | 2041 |
self isSeparator ifFalse:[ |
199 | 2042 |
item activeHelpKey:activeHelpKey. |
2043 |
item enabled:enabled. |
|
407 | 2044 |
item accessCharacterPosition:accessCharacterPos. |
290 | 2045 |
item argument:argument. |
218 | 2046 |
item submenuChannel:submenuChannel. |
199 | 2047 |
item nameKey:nameKey. |
2048 |
item shortcutKeyCharacter:shortcutKey. |
|
532 | 2049 |
item startGroup:startGroup. |
199 | 2050 |
item value:value. |
2051 |
item indication:indication. |
|
398 | 2052 |
item translateLabel: translateLabel. |
2053 |
item isButton: isButton. |
|
199 | 2054 |
|
2055 |
icon notNil ifTrue:[ |
|
2056 |
rcv := ResourceRetriever new. |
|
2057 |
rcv className:retriever. |
|
2058 |
rcv selector:icon. |
|
2059 |
iconAndLabel == true ifTrue:[ |
|
2060 |
rcv labelText:label |
|
2061 |
]. |
|
2062 |
item labelImage:rcv |
|
2063 |
] |
|
2064 |
]. |
|
407 | 2065 |
^item |
199 | 2066 |
! |
2067 |
||
2068 |
buildFromAspects:aspects |
|
407 | 2069 |
|
249 | 2070 |
|name| |
407 | 2071 |
self isSeparator |
2072 |
ifFalse: |
|
2073 |
[ |
|
199 | 2074 |
name := label. |
2075 |
label := (aspects at:#label) value. |
|
2076 |
||
218 | 2077 |
(label isNil or:[self isSeparator]) ifTrue:[ |
199 | 2078 |
(aspects at:#label) value:(label := name) |
2079 |
]. |
|
2080 |
||
407 | 2081 |
enabled := (aspects at:#enabled) value. |
2082 |
value := (aspects at:#value) value. |
|
2083 |
nameKey := (aspects at:#nameKey) value. |
|
2084 |
indication := (aspects at:#indication) value. |
|
2085 |
shortcutKey := (aspects at:#shortcutKey) value. |
|
532 | 2086 |
startGroup := (aspects at:#startGroup) value. |
407 | 2087 |
accessCharacterPos := (aspects at:#accessCharacterPos) value. |
2088 |
argument := (aspects at:#argument) value. |
|
2089 |
translateLabel := (aspects at:#translateLabel) value. |
|
2090 |
isButton := (aspects at:#isButton) value. |
|
298 | 2091 |
|
2092 |
argument isString ifTrue:[ |
|
2093 |
argument size > 1 ifTrue:[ |
|
2094 |
(argument at:1) == $# ifTrue:[ |
|
2095 |
argument := (argument copyFrom:2) asSymbol |
|
2096 |
] |
|
2097 |
] |
|
2098 |
]. |
|
407 | 2099 |
submenuChannel := (aspects at:#submenuChannel) value. |
2100 |
retriever := (aspects at:#retriever) value. |
|
2101 |
icon := (aspects at:#icon) value. |
|
2102 |
iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2103 |
] |
|
2104 |
ifTrue: |
|
2105 |
[ |
|
218 | 2106 |
name := (aspects at:#seperatorSelection) selectionIndex. |
2107 |
label := (self class separatorSlices at:name) last. |
|
606 | 2108 |
]. |
2109 |
isVisible := (aspects at:#isVisible) value. |
|
2110 |
||
199 | 2111 |
! |
2112 |
||
2113 |
buildFromMenuItem:anItem |
|
407 | 2114 |
|
199 | 2115 |
|rtv| |
2116 |
||
218 | 2117 |
self label:(anItem label). |
2118 |
activeHelpKey := anItem activeHelpKey. |
|
199 | 2119 |
|
2120 |
(enabled := anItem enabled) isSymbol ifFalse:[ |
|
2121 |
enabled := nil |
|
2122 |
]. |
|
2123 |
||
2124 |
(value := anItem value) isSymbol ifFalse:[ |
|
2125 |
value := nil. |
|
2126 |
]. |
|
2127 |
||
2128 |
(indication := anItem indication) isSymbol ifFalse:[ |
|
2129 |
indication := nil |
|
2130 |
]. |
|
2131 |
||
407 | 2132 |
nameKey := anItem nameKey. |
2133 |
shortcutKey := anItem shortcutKeyCharacter. |
|
532 | 2134 |
startGroup := anItem startGroup. |
407 | 2135 |
accessCharacterPos := anItem accessCharacterPosition. |
2136 |
argument := anItem argument. |
|
537 | 2137 |
|
407 | 2138 |
submenuChannel := anItem submenuChannel. |
2139 |
translateLabel := anItem translateLabel. |
|
2140 |
isButton := anItem isButton. |
|
539 | 2141 |
isVisible := anItem isVisible. |
407 | 2142 |
|
2143 |
(((rtv := anItem adornment) notNil) |
|
2144 |
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2145 |
ifTrue: |
|
2146 |
[ |
|
199 | 2147 |
retriever := rtv className. |
2148 |
icon := rtv selector. |
|
2149 |
(iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2150 |
label := rtv labelText. |
|
2151 |
] |
|
2152 |
] |
|
2153 |
! |
|
2154 |
||
2155 |
toAspects:aspects |
|
407 | 2156 |
|
249 | 2157 |
|type| |
407 | 2158 |
(type := self separatorType) notNil |
2159 |
ifTrue: |
|
2160 |
[ |
|
218 | 2161 |
type := self class separatorSlices findFirst:[:el| el first == type ]. |
2162 |
(aspects at:#seperatorSelection) selectionIndex:type. |
|
407 | 2163 |
] |
2164 |
ifFalse: |
|
2165 |
[ |
|
2166 |
(aspects at:#label) value:label. |
|
2167 |
(aspects at:#enabled) value:enabled. |
|
2168 |
(aspects at:#value) value:value. |
|
2169 |
(aspects at:#nameKey) value:nameKey. |
|
2170 |
(aspects at:#indication) value:indication. |
|
2171 |
(aspects at:#shortcutKey) value:shortcutKey. |
|
532 | 2172 |
(aspects at:#startGroup) value:startGroup. |
407 | 2173 |
(aspects at:#accessCharacterPos) value:accessCharacterPos. |
2174 |
(aspects at:#translateLabel) value:translateLabel. |
|
2175 |
(aspects at:#submenuChannel) value:submenuChannel. |
|
2176 |
(aspects at:#retriever) value:retriever. |
|
2177 |
(aspects at:#icon) value:icon. |
|
2178 |
(aspects at:#iconAndLabel) value:iconAndLabel. |
|
539 | 2179 |
(aspects at:#isButton) value:isButton. |
537 | 2180 |
|
407 | 2181 |
argument isSymbol |
2182 |
ifTrue: [(aspects at:#argument)value:'#', argument] |
|
2183 |
ifFalse:[(aspects at:#argument)value:argument]. |
|
606 | 2184 |
]. |
2185 |
(aspects at:#isVisible) value:isVisible. |
|
2186 |
||
199 | 2187 |
! ! |
2188 |
||
2189 |
!MenuEditor::Item methodsFor:'queries'! |
|
2190 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2191 |
iconFor: aNode |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2192 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2193 |
aNode hasChildren |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2194 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2195 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2196 |
^MenuEditor submenuImage |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2197 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2198 |
ifFalse: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2199 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2200 |
submenuChannel notNil |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2201 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2202 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2203 |
^MenuEditor linkSubmenuImage |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2204 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2205 |
ifFalse: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2206 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2207 |
self isSeparator |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2208 |
ifTrue: [^MenuEditor menuSeparatorImage] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2209 |
ifFalse: [^MenuEditor menuItemImage] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2210 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2211 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2212 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2213 |
|
218 | 2214 |
isSeparator |
407 | 2215 |
"returns true if item is a seperator" |
2216 |
||
2217 |
^self separatorType notNil |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2218 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2219 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2220 |
treeViewLabel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2221 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2222 |
^label asBoldText, |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2223 |
(value notNil ifTrue: [': [', |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2224 |
value , |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2225 |
(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
|
2226 |
']'] ifFalse: ['']) |
199 | 2227 |
! ! |
2228 |
||
407 | 2229 |
!MenuEditor::TreeView class methodsFor:'documentation'! |
199 | 2230 |
|
2231 |
documentation |
|
2232 |
" |
|
2233 |
menu selection list |
|
2234 |
||
2235 |
[see also:] |
|
2236 |
SelectionInTreeView |
|
213 | 2237 |
SelectionInTree |
2238 |
TreeItem |
|
199 | 2239 |
|
2240 |
[author:] |
|
2241 |
Claus Atzkern |
|
2242 |
" |
|
2243 |
||
2244 |
||
2245 |
! ! |
|
2246 |
||
407 | 2247 |
!MenuEditor::TreeView methodsFor:'accessing'! |
199 | 2248 |
|
2249 |
selectorName |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2250 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2251 |
^(listOfNodes first contents label) asSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2252 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2253 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2254 |
selectorName: aSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2255 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2256 |
listOfNodes first contents label: aSymbol |
199 | 2257 |
! ! |
2258 |
||
407 | 2259 |
!MenuEditor::TreeView methodsFor:'building'! |
199 | 2260 |
|
637 | 2261 |
buildFromClass:aClass andSelector:aSelector |
407 | 2262 |
|
199 | 2263 |
|spec cls menu node| |
2264 |
||
2265 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
|
340 | 2266 |
cls := self application resolveName:aClass. |
199 | 2267 |
|
2268 |
(cls respondsTo:aSelector) ifTrue:[ |
|
2269 |
spec := cls perform:aSelector |
|
2270 |
] |
|
2271 |
]. |
|
331 | 2272 |
|
199 | 2273 |
spec isNil ifFalse:[ |
298 | 2274 |
(spec isMemberOf:Menu) ifFalse:[ |
2275 |
menu := Menu new fromLiteralArrayEncoding:spec. |
|
2276 |
] ifTrue:[ |
|
2277 |
menu := spec. |
|
2278 |
]. |
|
213 | 2279 |
node := self nodeLabel:(aSelector asString). |
199 | 2280 |
self subMenu:menu parent:node. |
2281 |
] ifTrue:[ |
|
2282 |
aSelector notNil ifTrue:[cls := aSelector asString] |
|
2283 |
ifFalse:[cls := 'menu']. |
|
2284 |
||
213 | 2285 |
node := self nodeLabel:cls. |
199 | 2286 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2287 |
node expand. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2288 |
model root:node. |
199 | 2289 |
|
2290 |
node hasChildren ifFalse:[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2291 |
|n| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2292 |
n := self nodeLabel:'Item 1'. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2293 |
n parent: node. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2294 |
node add: n. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2295 |
model recomputeList |
199 | 2296 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2297 |
|
199 | 2298 |
|
2299 |
! |
|
2300 |
||
2301 |
buildFromMenu:aMenu |
|
2302 |
||
249 | 2303 |
|node| |
199 | 2304 |
|
213 | 2305 |
node := self nodeLabel:'menu'. |
199 | 2306 |
self subMenu:aMenu parent:node. |
2307 |
||
2308 |
node hasChildren ifFalse:[ |
|
557 | 2309 |
node add:(self nodeLabel:'Item') |
199 | 2310 |
]. |
213 | 2311 |
node expand. |
199 | 2312 |
model root:node. |
2313 |
||
2314 |
! |
|
2315 |
||
213 | 2316 |
menuItem:anItem |
199 | 2317 |
|
249 | 2318 |
|node| |
199 | 2319 |
|
407 | 2320 |
node := self nodeLabel: anItem label. |
199 | 2321 |
node contents buildFromMenuItem:anItem. |
407 | 2322 |
self subMenu: anItem submenu parent:node. |
2323 |
^node. |
|
199 | 2324 |
|
2325 |
||
2326 |
! |
|
2327 |
||
2328 |
subMenu:aMenu parent:aParent |
|
407 | 2329 |
|
213 | 2330 |
|idx grp| |
199 | 2331 |
|
2332 |
aMenu isNil ifFalse:[ |
|
2333 |
grp := aMenu groupSizes. |
|
213 | 2334 |
aMenu itemsDo:[:i| aParent add:(self menuItem:i)]. |
199 | 2335 |
|
2336 |
grp notNil ifTrue:[ |
|
213 | 2337 |
idx := 0. |
199 | 2338 |
|
2339 |
grp do:[:i| |
|
213 | 2340 |
idx := idx + i + 1. |
2341 |
aParent add:(self nodeLabel:nil) beforeIndex:idx. |
|
199 | 2342 |
] |
2343 |
] |
|
2344 |
] |
|
2345 |
! ! |
|
2346 |
||
407 | 2347 |
!MenuEditor::TreeView methodsFor:'conversion'! |
199 | 2348 |
|
2349 |
asMenu |
|
2350 |
|menu root| |
|
2351 |
||
2352 |
root := self root. |
|
2353 |
||
2354 |
root hasChildren ifTrue:[ |
|
2355 |
menu := Menu new. |
|
2356 |
root children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
2357 |
]. |
|
2358 |
^ menu |
|
2359 |
! |
|
2360 |
||
2361 |
asMenuItem:aNode |
|
2362 |
||
2363 |
|menu item| |
|
2364 |
||
2365 |
item := aNode contents asMenuItem. |
|
2366 |
||
2367 |
aNode hasChildren ifTrue:[ |
|
2368 |
menu := Menu new. |
|
2369 |
aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
2370 |
item submenu:menu |
|
2371 |
]. |
|
2372 |
^ item |
|
2373 |
||
2374 |
! ! |
|
2375 |
||
407 | 2376 |
!MenuEditor::TreeView methodsFor:'drawing basics'! |
199 | 2377 |
|
2378 |
drawLabelIndex:anIndex atX:x y:yCenter |
|
407 | 2379 |
"draw text label assigned to a node at x y( center)" |
2380 |
||
258 | 2381 |
|y x2 type item| |
199 | 2382 |
|
2383 |
item := (listOfNodes at:anIndex) contents. |
|
218 | 2384 |
type := item separatorType. |
199 | 2385 |
|
218 | 2386 |
type isNil ifTrue:[ |
2387 |
super drawLabelIndex:anIndex atX:x y:yCenter |
|
2388 |
] ifFalse:[ |
|
2389 |
type == #blank ifFalse:[ |
|
258 | 2390 |
x2 := x + 80. |
2391 |
||
2392 |
self displayLineFromX:x y:yCenter toX:x2 y:yCenter. |
|
218 | 2393 |
|
2394 |
type == #double ifTrue:[ |
|
258 | 2395 |
y := yCenter + 2. |
2396 |
self displayLineFromX:x y:y toX:x2 y:y. |
|
218 | 2397 |
] |
2398 |
] |
|
2399 |
] |
|
199 | 2400 |
! ! |
2401 |
||
407 | 2402 |
!MenuEditor::TreeView methodsFor:'event handling'! |
356 | 2403 |
|
2404 |
keyPress:key x:x y:y |
|
407 | 2405 |
"invoked if any key was pressed" |
2406 |
||
412 | 2407 |
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)> |
2408 |
||
2409 |
(key == #Cut or:[key == #Delete or:[key == #BackSpace]]) ifTrue: [^self doCut]. |
|
356 | 2410 |
|
407 | 2411 |
key == #Copy ifTrue:[^self doCopy]. |
2412 |
key == #Paste ifTrue:[^self doPaste]. |
|
356 | 2413 |
|
412 | 2414 |
super keyPress:key x:x y:y |
356 | 2415 |
|
2416 |
! ! |
|
2417 |
||
407 | 2418 |
!MenuEditor::TreeView methodsFor:'initialization'! |
199 | 2419 |
|
2420 |
initialize |
|
407 | 2421 |
|
199 | 2422 |
super initialize. |
275 | 2423 |
|
213 | 2424 |
self multipleSelectOk:true. |
407 | 2425 |
self showDirectoryIndicator: true. |
2426 |
self showDirectoryIndicatorForRoot: false. |
|
634 | 2427 |
self selectConditionBlock: [:i|self application askForItemModification]. |
412 | 2428 |
self validateDoubleClickBlock: [:node| node ~~ listOfNodes first]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2429 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2430 |
self model iconAction: [:aNode| aNode contents iconFor: aNode]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2431 |
self model labelAction: [:aNode| aNode contents treeViewLabel] |
199 | 2432 |
! ! |
2433 |
||
407 | 2434 |
!MenuEditor::TreeView methodsFor:'menus'! |
199 | 2435 |
|
2436 |
doCopy |
|
398 | 2437 |
|
213 | 2438 |
self hasSelection ifTrue:[ |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2439 |
self application clipboard: OrderedCollection new. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2440 |
self selectionDo:[:i| self application clipboard add:((listOfNodes at:i) copy)] |
213 | 2441 |
] |
199 | 2442 |
! |
2443 |
||
2444 |
doCreateItem |
|
398 | 2445 |
|
557 | 2446 |
self addElement: (self nodeLabel:'Item') |
199 | 2447 |
! |
2448 |
||
218 | 2449 |
doCreateLink |
407 | 2450 |
|
218 | 2451 |
|node item| |
2452 |
||
557 | 2453 |
node := self nodeLabel:'Submenu Link'. |
218 | 2454 |
item := node contents. |
2455 |
item submenuChannel:#menuDefaultLink. |
|
398 | 2456 |
self addElement:node. |
2457 |
self setModified. |
|
218 | 2458 |
|
2459 |
||
2460 |
! |
|
2461 |
||
199 | 2462 |
doCreateMenu |
398 | 2463 |
|
199 | 2464 |
|node| |
557 | 2465 |
node := self nodeLabel:'Submenu'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2466 |
node parent: self selectedNode. |
557 | 2467 |
node add:(self nodeLabel:'Item 1'). |
213 | 2468 |
self addElement:node |
199 | 2469 |
! |
2470 |
||
2471 |
doCreateSep |
|
398 | 2472 |
|
213 | 2473 |
self addElement:(self nodeLabel:nil) |
199 | 2474 |
! |
2475 |
||
2476 |
doCut |
|
398 | 2477 |
|
634 | 2478 |
self askForItemModification |
603 | 2479 |
ifTrue: |
2480 |
[ |
|
2481 |
|selectedNodes| |
|
2482 |
self doCopy. |
|
2483 |
selectedNodes := self selection asSortedCollection. |
|
2484 |
self selectedNodesRemove. |
|
2485 |
self selection: selectedNodes first - 1. |
|
2486 |
self setModified. |
|
2487 |
] |
|
398 | 2488 |
|
199 | 2489 |
! |
2490 |
||
2491 |
doPaste |
|
213 | 2492 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2493 |
(self application clipboard notNil and:[self selectedNode notNil]) ifTrue:[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2494 |
self addElement:(self application clipboard collect:[:el| el copy]) |
220 | 2495 |
]. |
199 | 2496 |
! ! |
2497 |
||
407 | 2498 |
!MenuEditor::TreeView methodsFor:'private'! |
199 | 2499 |
|
557 | 2500 |
addElement: aNode |
407 | 2501 |
"add something after selection" |
2502 |
||
634 | 2503 |
self askForItemModification |
603 | 2504 |
ifTrue: |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2505 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2506 |
self selectedNodeAdd: aNode. |
603 | 2507 |
(aNode isCollection not and: [aNode name = 'Item']) |
2508 |
ifTrue: |
|
2509 |
[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2510 |
|label| |
603 | 2511 |
label := aNode name, ' ', |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2512 |
(self selectedNode parent notNil |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2513 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2514 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2515 |
(((self selectedNode children size = 0 |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2516 |
ifTrue: [self selectedNode parent children] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2517 |
ifFalse: [self selectedNode children]) select: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2518 |
[:node| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2519 |
|lab| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2520 |
lab := node contents label. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2521 |
((node children size = 0) & |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2522 |
node contents submenuChannel isNil & |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2523 |
(lab ~= '-') & (lab ~= '=') & (lab ~= '')) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2524 |
]) size) printString] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2525 |
ifFalse: ['1']). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2526 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2527 |
aNode name: label string asBoldText. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2528 |
aNode contents label: label string. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2529 |
]. |
603 | 2530 |
aNode isCollection ifFalse: [self selectNode: aNode] ifTrue: [self selection: (aNode collect: [:node| self indexOfNode: node])]. |
2531 |
self setModified. |
|
2532 |
] |
|
2533 |
! |
|
2534 |
||
634 | 2535 |
askForItemModification |
2536 |
||
2537 |
^self topView application askForItemModification |
|
199 | 2538 |
! |
2539 |
||
213 | 2540 |
nodeLabel:aLabel |
407 | 2541 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2542 |
^TreeItem new contents: (MenuEditor::Item new label:aLabel) |
398 | 2543 |
! |
2544 |
||
557 | 2545 |
selectedNodeAdd:something |
2546 |
||
2547 |
|node| |
|
2548 |
||
2549 |
something notNil ifTrue:[ |
|
2550 |
(node := self selectedNode) notNil ifTrue:[ |
|
2551 |
node parent notNil ifTrue:[ |
|
2552 |
node isCollapsable ifTrue:[ |
|
2553 |
model add:something afterIndex:node children size below:node |
|
2554 |
] ifFalse:[ |
|
2555 |
model add:something after:node |
|
2556 |
] |
|
2557 |
] ifFalse:[ |
|
2558 |
model add:something afterIndex:node children size below:(self root) |
|
2559 |
] |
|
2560 |
] |
|
2561 |
] |
|
2562 |
||
2563 |
||
2564 |
! |
|
2565 |
||
398 | 2566 |
setModified |
2567 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2568 |
self topView application modified: true. |
508 | 2569 |
|
2570 |
self topView application updateEnabledChannels |
|
199 | 2571 |
! ! |
2572 |
||
2573 |
!MenuEditor class methodsFor:'documentation'! |
|
2574 |
||
2575 |
version |
|
2576 |
^ '$Header$' |
|
2577 |
! ! |
|
406
a519e0d547f6
widgets rearranged for different fonts + comfortable menu load support
tz
parents:
398
diff
changeset
|
2578 |
MenuEditor initialize! |