author | Claus Gittinger <cg@exept.de> |
Thu, 11 Nov 2004 10:12:57 +0100 | |
changeset 1895 | b7d6683ebaca |
parent 1891 | b2bdebd72f53 |
child 1908 | f782762ea789 |
permissions | -rw-r--r-- |
199 | 1 |
" |
738 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
1606 | 3 |
All Rights Reserved |
199 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
738 | 7 |
inclusion of the above copyright notice. This software may not |
199 | 8 |
be provided or otherwise made available to, or used by, any |
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
1372 | 13 |
"{ Package: 'stx:libtool2' }" |
14 |
||
738 | 15 |
ResourceSpecEditor subclass:#MenuEditor |
1606 | 16 |
instanceVariableNames:'selectionHolder tabHolder listOfItems listOfTabs |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
17 |
selectedSuperItems notifyDisabledCounter wizards listOfItemsView |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
18 |
dropOverLine' |
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
19 |
classVariableNames:'ImageRetrieverClasses' |
220 | 20 |
poolDictionaries:'' |
21 |
category:'Interface-UIPainter' |
|
199 | 22 |
! |
23 |
||
1606 | 24 |
HierarchicalItem subclass:#Item |
25 |
instanceVariableNames:'menuItem' |
|
26 |
classVariableNames:'' |
|
27 |
poolDictionaries:'' |
|
28 |
privateIn:MenuEditor |
|
29 |
! |
|
30 |
||
1631 | 31 |
MenuEditor::Item subclass:#ActionItem |
1606 | 32 |
instanceVariableNames:'' |
1407 | 33 |
classVariableNames:'' |
34 |
poolDictionaries:'' |
|
35 |
privateIn:MenuEditor |
|
36 |
! |
|
37 |
||
1631 | 38 |
MenuEditor::Item subclass:#LinkedMenuItem |
1606 | 39 |
instanceVariableNames:'' |
40 |
classVariableNames:'' |
|
41 |
poolDictionaries:'' |
|
42 |
privateIn:MenuEditor |
|
43 |
! |
|
44 |
||
1844 | 45 |
MenuEditor::Item subclass:#MenuSliceItem |
46 |
instanceVariableNames:'' |
|
47 |
classVariableNames:'' |
|
48 |
poolDictionaries:'' |
|
49 |
privateIn:MenuEditor |
|
50 |
! |
|
51 |
||
1633 | 52 |
MenuEditor::Item subclass:#RegularMenuItem |
1454 | 53 |
instanceVariableNames:'' |
54 |
classVariableNames:'' |
|
55 |
poolDictionaries:'' |
|
56 |
privateIn:MenuEditor |
|
57 |
! |
|
58 |
||
1606 | 59 |
ApplicationModel subclass:#ResourceEditor |
60 |
instanceVariableNames:'selectorHolder iconAndLabelHolder retrieverHolder imageHolder |
|
61 |
imageList imageViewer' |
|
62 |
classVariableNames:'' |
|
63 |
poolDictionaries:'' |
|
64 |
privateIn:MenuEditor |
|
65 |
! |
|
66 |
||
67 |
HierarchicalItem subclass:#ResourceEditorItem |
|
68 |
instanceVariableNames:'selector icon' |
|
69 |
classVariableNames:'' |
|
70 |
poolDictionaries:'' |
|
71 |
privateIn:MenuEditor |
|
72 |
! |
|
73 |
||
1633 | 74 |
MenuEditor::RegularMenuItem subclass:#RootItem |
1631 | 75 |
instanceVariableNames:'' |
76 |
classVariableNames:'' |
|
77 |
poolDictionaries:'' |
|
78 |
privateIn:MenuEditor |
|
79 |
! |
|
80 |
||
81 |
MenuEditor::Item subclass:#SeparatorItem |
|
82 |
instanceVariableNames:'' |
|
83 |
classVariableNames:'' |
|
84 |
poolDictionaries:'' |
|
85 |
privateIn:MenuEditor |
|
86 |
! |
|
87 |
||
199 | 88 |
!MenuEditor class methodsFor:'documentation'! |
89 |
||
90 |
copyright |
|
91 |
" |
|
738 | 92 |
COPYRIGHT (c) 1997 by eXept Software AG |
1606 | 93 |
All Rights Reserved |
199 | 94 |
|
95 |
This software is furnished under a license and may be used |
|
96 |
only in accordance with the terms of that license and with the |
|
738 | 97 |
inclusion of the above copyright notice. This software may not |
199 | 98 |
be provided or otherwise made available to, or used by, any |
99 |
other person. No title to or ownership of the software is |
|
100 |
hereby transferred. |
|
101 |
" |
|
102 |
! |
|
103 |
||
104 |
documentation |
|
105 |
" |
|
728 | 106 |
The MenuEditor allows you to create, modify or just inspect |
1606 | 107 |
menus. |
108 |
||
109 |
||
110 |
[Instance variables:] |
|
111 |
||
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
112 |
listOfItemsView <HierarcicalListView> the view which shows the list of items |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
113 |
listOfItems <HierarchicalList> hierarchical list of menu items |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
114 |
listOfTabs <List> list of current shown tab-labels |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
115 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
116 |
selectionHolder <ValueHolder> collection of current selected items |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
117 |
selectedSuperItems <Collection> collection of superItems derived from selection |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
118 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
119 |
tabHolder <ValueHolder> selected tab label holder |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
120 |
notifyDisabledCounter <SmallInteger> ~~ 0 than change notifications are discard |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
121 |
wizards <IdentityDictionary> keeps all created wizard dialogs |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
122 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
123 |
dropOverLine <nil or SmallInteger> nil: drop context not dropabel. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
124 |
= 0: drop context dropable but no item specified |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
125 |
~ 0: drop context dropable for item at lineNumber |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
126 |
used t6o restore drop indication drawings |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
127 |
|
1606 | 128 |
[Class variables:] |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
129 |
ImageRetrieverClasses <Collection> sorted collection of image receivers |
199 | 130 |
|
131 |
[start with:] |
|
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
132 |
MenuEditor open |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
133 |
MenuEditor openOnClass:MenuEditor andSelector:#menu |
199 | 134 |
|
135 |
[author:] |
|
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
136 |
Claus Atzkern, eXept Software AG |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
137 |
Thomas Zwick, eXept Software AG |
199 | 138 |
" |
139 |
! ! |
|
140 |
||
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
141 |
!MenuEditor class methodsFor:'initialization'! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
142 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
143 |
initialize |
1546
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
144 |
ImageRetrieverClasses := #( |
1606 | 145 |
Icon |
146 |
SystemBrowser |
|
147 |
ToolbarIconLibrary |
|
148 |
). |
|
1546
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
149 |
|
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
150 |
" |
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
151 |
self initialize |
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
152 |
" |
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
153 |
! ! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
154 |
|
508 | 155 |
!MenuEditor class methodsFor:'instance creation'! |
156 |
||
728 | 157 |
openModalOnMenu: aMenu |
1606 | 158 |
"Open a MenuEditor modal on aMenu |
159 |
self openModalOnMenu: (self perform: #menu) decodeAsLiteralArray |
|
734 | 160 |
" |
1606 | 161 |
^self new openModalOnMenu:aMenu |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
162 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
163 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
164 |
!MenuEditor class methodsFor:'accessing image retriever'! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
165 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
166 |
addNewImageRetriever:aSymbolOrClass |
1546
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
167 |
"add a class to the imageRetriever list" |
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
168 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
169 |
|key| |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
170 |
|
1546
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
171 |
aSymbolOrClass isBehavior ifTrue:[ |
1606 | 172 |
key := aSymbolOrClass nameWithNameSpacePrefix |
1546
4485d0c37aae
another default image retriever
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
173 |
] ifFalse:[ |
1606 | 174 |
key := aSymbolOrClass |
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
175 |
]. |
1463 | 176 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
177 |
key size ~~ 0 ifTrue:[ |
1606 | 178 |
key := key asSymbol. |
179 |
||
180 |
(ImageRetrieverClasses includes:key) ifFalse:[ |
|
181 |
ImageRetrieverClasses := ImageRetrieverClasses asOrderedCollection. |
|
182 |
ImageRetrieverClasses add:key. |
|
183 |
ImageRetrieverClasses sort. |
|
184 |
] |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
185 |
]. |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
186 |
! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
187 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
188 |
imageRetrieverClasses |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
189 |
"returns a collection of image retrievers |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
190 |
" |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
191 |
^ ImageRetrieverClasses |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
192 |
! ! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
193 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
194 |
!MenuEditor class methodsFor:'aspects'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
195 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
196 |
aspects |
728 | 197 |
"get the aspects for the attributes of the menu components" |
198 |
||
199 |
^#( |
|
1629 | 200 |
rawLabel |
201 |
accessCharacterPosition |
|
202 |
showBusyCursorWhilePerforming |
|
203 |
horizontalLayout |
|
204 |
triggerOnDown |
|
205 |
font |
|
206 |
argument |
|
207 |
submenuChannel |
|
208 |
keepLinkedMenu |
|
209 |
enabled |
|
210 |
itemValue |
|
211 |
nameKey |
|
212 |
indication |
|
213 |
choice |
|
214 |
choiceValue |
|
215 |
translateLabel |
|
216 |
isButton |
|
217 |
shortcutKeyCharacter |
|
218 |
startGroup |
|
219 |
isVisible |
|
220 |
hideMenuOnActivated |
|
221 |
auxValue |
|
222 |
activeHelpKey |
|
223 |
resourceRetriever |
|
1634 | 224 |
sendToOriginator |
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
225 |
ignoreMnemonicKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
226 |
ignoreShortcutKeys |
1844 | 227 |
isMenuSlice |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
228 |
) |
1606 | 229 |
! ! |
230 |
||
231 |
!MenuEditor class methodsFor:'defaults'! |
|
232 |
||
233 |
aboutImage |
|
234 |
"the image to be displayed in my about-box; |
|
235 |
If nil is returned, the ST/X default image is used. |
|
236 |
" |
|
237 |
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_menus.xpm' |
|
238 |
! |
|
239 |
||
240 |
resourceType |
|
241 |
"get the type of the resource of the method generated by the MenuEditor |
|
242 |
" |
|
243 |
^ #menu |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
244 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
245 |
|
371 | 246 |
!MenuEditor class methodsFor:'help specs'! |
247 |
||
1545 | 248 |
flyByHelpSpec |
1629 | 249 |
^super flyByHelpSpec addPairsFrom:(self localFlyHelpSpecStrings) |
1545 | 250 |
! |
251 |
||
371 | 252 |
helpSpec |
1690 | 253 |
"This resource specification was automatically generated |
254 |
by the UIHelpTool of ST/X." |
|
255 |
||
256 |
"Do not manually edit this!! If it is corrupted, |
|
257 |
the UIHelpTool may not be able to read the specification." |
|
258 |
||
259 |
" |
|
260 |
UIHelpTool openOnClass:MenuEditor |
|
261 |
" |
|
262 |
||
263 |
<resource: #help> |
|
264 |
||
265 |
^ super helpSpec addPairsFrom:#( |
|
266 |
||
267 |
#addDelayedMenu |
|
268 |
'Add a new delayed menu to item.' |
|
269 |
||
270 |
#addDelayedSubMenuLink |
|
271 |
'Add a new linked delayed menu to item.' |
|
272 |
||
273 |
#addMenuItem |
|
274 |
'Add a new menu item.' |
|
275 |
||
276 |
#addMenuSeparator |
|
277 |
'Add a new menu separator.' |
|
278 |
||
1844 | 279 |
#addMenuSliceItem |
280 |
'Add a new menu slice.' |
|
281 |
||
1690 | 282 |
#addSubMenu |
283 |
'Add a new sub menu.' |
|
284 |
||
285 |
#addSubMenuLink |
|
286 |
'Add a new linked sub menu.' |
|
287 |
||
288 |
#basicsAction |
|
289 |
'An action selector with 0, 1 (the argument field), or 2 (the selected item) arguments.' |
|
290 |
||
291 |
#basicsArgument |
|
292 |
'An optional arg passed with above selector, if it is a 1 or 2 arg selector (enter a Smalltalk literal).' |
|
293 |
||
294 |
#basicsChoice |
|
295 |
'Aspect for a boolean holder, block or method, specifying the choices state (RadioButton behavior).' |
|
296 |
||
297 |
#basicsChoiceValue |
|
298 |
'That choices value (typically number or symbol).' |
|
299 |
||
300 |
#basicsIndication |
|
301 |
'Aspect for boolean holder, block, or method, specifying the indication state (CheckToggle behavior).' |
|
302 |
||
303 |
#basicsIsButton |
|
304 |
'Button-like look and behavior.' |
|
305 |
||
306 |
#basicsKey |
|
307 |
'Internal key of the item (optional, for programmed accesses).' |
|
308 |
||
309 |
#basicsLabel |
|
310 |
'Label of the item.' |
|
311 |
||
312 |
#basicsMenu |
|
313 |
'Aspect providing the sub menu to be opened if item is selected (provide spec or valueHolder).' |
|
314 |
||
315 |
#basicsMenuArgument |
|
316 |
'An argument passed with the menu selector.' |
|
317 |
||
318 |
#basicsNameKey |
|
319 |
'Unique identifier of the item (optional).' |
|
320 |
||
321 |
#basicsSelector |
|
322 |
'Selector under which the generated menu spec is saved.' |
|
323 |
||
324 |
#basicsSeparatorType |
|
325 |
'List of valid separators.' |
|
326 |
||
327 |
#basicsTranslateLabel |
|
328 |
'Translate the label via the classes resource file (internationalization).' |
|
329 |
||
330 |
#browseResource |
|
331 |
'Search for methods with image resource.' |
|
332 |
||
333 |
#detailsAccelerator |
|
334 |
'Accelerator key to select the menu item from the keyboard (Cmdx or Ctrlx).' |
|
335 |
||
336 |
#detailsAccessCharaterPosition |
|
337 |
'Index of the access character position of the textual label (obsolete, VW compatibility).' |
|
338 |
||
339 |
#detailsAuxValue |
|
340 |
'Some additional value - for arbitrary use by the program.' |
|
341 |
||
342 |
#detailsEnabled |
|
1702 | 343 |
'Aspect or binding providing a boolean value holder to enable/disable the menu item.' |
1690 | 344 |
|
1844 | 345 |
#detailsIgnoreAcceleratorKeys |
346 |
'Ignore accelerator keys in submenu(s).' |
|
347 |
||
348 |
#detailsIgnoreMnemonicKeys |
|
349 |
'Ignore mnemonic keys (access characters) in submenu(s).' |
|
350 |
||
1690 | 351 |
#detailsStartGroup |
352 |
'Specify start of a right-aligned item group.' |
|
353 |
||
354 |
#detailsVisibility |
|
355 |
'Boolean, or aspect or binding for a boolean holder controlling the visibility of the menu item.' |
|
356 |
||
357 |
#fileLoad |
|
358 |
'Load a menu spec from a class.' |
|
359 |
||
360 |
#fileNew |
|
361 |
'Create a new menu spec.' |
|
362 |
||
363 |
#filePickAMenu |
|
364 |
'Select a menu from an open view and read its specification' |
|
365 |
||
366 |
#fileSave |
|
367 |
'Save the menu spec (and the help spec, if modified).' |
|
368 |
||
369 |
#fileSaveAs |
|
370 |
'Open a dialog to save the menu spec (and the help spec, if modified).' |
|
371 |
||
372 |
#fileShowMenuSpec |
|
373 |
'Opens a Workspace showing the current menu spec.' |
|
374 |
||
375 |
#generateAspectMethods |
|
376 |
'Generates aspect methods for defined aspect selectors of the menu.' |
|
377 |
||
378 |
#hideMenuOnActivated |
|
1702 | 379 |
'If on, the menu hides itself after the item was activated (PopUp/PullDown-Menus only).' |
1690 | 380 |
|
381 |
#horizontalLayout |
|
382 |
'If on, the submenu organizes its items horizontal insteat of vertical (default).' |
|
383 |
||
384 |
#imageImageAndLabel |
|
385 |
'Toggle display of both image and textual label.' |
|
386 |
||
387 |
#imageImageEditor |
|
388 |
'Open an Image Editor on the resource method defined by retriever and selector.' |
|
389 |
||
390 |
#imageImageList |
|
391 |
'Currently existing image resources.' |
|
392 |
||
393 |
#imageRetriever |
|
1702 | 394 |
'Class implementing the image resource method. If unspecified, the application class is taken.' |
1690 | 395 |
|
396 |
#imageSelector |
|
397 |
'Selector returning an image (sent to above or the application).' |
|
398 |
||
399 |
#keepLinkedMenu |
|
400 |
'Keep the linked menu after activation (do not destroy).' |
|
401 |
||
402 |
#sendToOriginator |
|
1702 | 403 |
'Send action-Message to widget (instead of application); only valid for PopUpMenus.' |
1690 | 404 |
|
405 |
#settingsRedefineAspectMethods |
|
406 |
'Toggles the permission to overwrite existing aspect methods.' |
|
407 |
||
408 |
#showBusyCursorWhilePerforming |
|
409 |
'If on, a busy cursor is shown while the items action is performing.' |
|
410 |
||
411 |
#triggerOnDown |
|
1702 | 412 |
'If on, the items action is performed on mouse-button press (default is: on button-release).' |
1690 | 413 |
|
414 |
) |
|
1606 | 415 |
! |
416 |
||
1629 | 417 |
localFlyHelpSpecStrings |
418 |
"This resource specification was automatically generated |
|
419 |
by the UIHelpTool of ST/X." |
|
420 |
||
421 |
"Do not manually edit this!! If it is corrupted, |
|
422 |
the UIHelpTool may not be able to read the specification." |
|
423 |
||
424 |
" |
|
425 |
UIHelpTool openOnClass:MenuEditor |
|
426 |
" |
|
427 |
||
428 |
<resource: #help> |
|
429 |
||
430 |
^ #( |
|
431 |
||
1820 | 432 |
#editCut |
433 |
'Cut Item' |
|
434 |
||
435 |
#editCopy |
|
436 |
'Copy Item' |
|
437 |
||
438 |
#editPaste |
|
439 |
'Paste Item' |
|
440 |
||
1629 | 441 |
#fileLoad |
1886 | 442 |
'Load Menuspec from Method' |
1629 | 443 |
|
444 |
#fileSave |
|
1886 | 445 |
'Save Menuspec as Method' |
1629 | 446 |
|
447 |
#fileSaveAs |
|
1886 | 448 |
'Save Menuspec as Method...' |
1629 | 449 |
|
450 |
#addMenuSeparator |
|
451 |
'Add Separator' |
|
452 |
||
453 |
#addMenuItem |
|
454 |
'Add Item' |
|
455 |
||
1891 | 456 |
#addMenuSlice |
457 |
'Add Menuslice' |
|
458 |
||
1629 | 459 |
#addSubMenu |
460 |
'Add Submenu' |
|
461 |
||
462 |
#addDelayedMenu |
|
463 |
'Add Delayed Menu' |
|
464 |
||
465 |
#addDelayedSubMenuLink |
|
1891 | 466 |
'Add Delayed Linked Menu' |
1629 | 467 |
|
468 |
#addSubMenuLink |
|
1656 | 469 |
'Add Linked Submenu' |
1629 | 470 |
|
471 |
#fileNew |
|
1886 | 472 |
'New Menuspec' |
1629 | 473 |
) |
371 | 474 |
! ! |
475 |
||
734 | 476 |
!MenuEditor class methodsFor:'image specs'! |
477 |
||
1606 | 478 |
iconUnknown |
479 |
"returns an image used for picked items containing an image |
|
734 | 480 |
" |
1606 | 481 |
<resource: #fileImage> |
482 |
||
483 |
^ MenuPanelSpec icon |
|
1425 | 484 |
! ! |
734 | 485 |
|
199 | 486 |
!MenuEditor class methodsFor:'interface specs'! |
487 |
||
525 | 488 |
windowSpec |
738 | 489 |
"This resource specification was automatically generated |
490 |
by the UIPainter of ST/X." |
|
491 |
||
492 |
"Do not manually edit this!! If it is corrupted, |
|
493 |
the UIPainter may not be able to read the specification." |
|
525 | 494 |
|
495 |
" |
|
496 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
497 |
MenuEditor new openInterface:#windowSpec |
|
738 | 498 |
MenuEditor open |
525 | 499 |
" |
500 |
||
501 |
<resource: #canvas> |
|
502 |
||
1244 | 503 |
^ |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
504 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
505 |
name: windowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
506 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
507 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
508 |
label: 'Menu Editor' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
509 |
name: 'Menu Editor' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
510 |
min: (Point 550 385) |
1788 | 511 |
bounds: (Rectangle 12 22 588 497) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
512 |
menu: menu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
513 |
returnIsOKInDialog: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
514 |
escapeIsCancelInDialog: false |
1244 | 515 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
516 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
517 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
518 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
519 |
(MenuPanelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
520 |
name: 'toolbar' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
521 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
522 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
523 |
menu: toolbar |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
524 |
showSeparatingLines: true |
1244 | 525 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
526 |
(VariableHorizontalPanelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
527 |
name: 'VariableHorizontalPanel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
528 |
layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
529 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
530 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
531 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
532 |
(HierarchicalListViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
533 |
name: 'ListOfItemsView' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
534 |
model: selectionHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
535 |
menu: editMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
536 |
hasHorizontalScrollBar: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
537 |
hasVerticalScrollBar: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
538 |
miniScrollerHorizontal: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
539 |
miniScrollerVertical: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
540 |
listModel: listOfItems |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
541 |
multipleSelectOk: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
542 |
useIndex: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
543 |
highlightMode: label |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
544 |
doubleClickSelector: indicatorClickedAt: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
545 |
selectConditionSelector: canSelect: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
546 |
showLeftIndicators: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
547 |
indicatorSelector: indicatorClickedAt: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
548 |
properties: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
549 |
(PropertyListDictionary |
1788 | 550 |
enterSelector: dropEnter: |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
551 |
dragArgument: nil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
552 |
dropObjectSelector: dropObjects |
1788 | 553 |
overSelector: dropOver: |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
554 |
dropArgument: nil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
555 |
canDropSelector: canDrop: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
556 |
leaveSelector: dropLeave: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
557 |
dropSelector: doDrop: |
1606 | 558 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
559 |
postBuildCallback: postBuildListOfItemsView: |
1244 | 560 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
561 |
(ViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
562 |
name: 'Box' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
563 |
level: -1 |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
564 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
565 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
566 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
567 |
(NoteBookViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
568 |
name: 'NoteBook' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
569 |
layout: (LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
570 |
enableChannel: hasSingleSelectionChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
571 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
572 |
model: tabHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
573 |
menu: listOfTabs |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
574 |
fitLastRow: false |
1788 | 575 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
576 |
canvas: wizardHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
577 |
keepCanvasAlive: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
578 |
postBuildCallback: postBuildNoteBook: |
1244 | 579 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
580 |
(UISubSpecification |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
581 |
name: 'SubSpecification' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
582 |
layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
583 |
majorKey: ToolApplicationModel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
584 |
minorKey: windowSpecForCommit |
525 | 585 |
) |
1244 | 586 |
) |
587 |
||
525 | 588 |
) |
1244 | 589 |
) |
590 |
) |
|
591 |
||
525 | 592 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
593 |
handles: (Any 0.300493 1.0) |
1244 | 594 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
595 |
(UISubSpecification |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
596 |
name: 'InfoBarSubSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
597 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
598 |
majorKey: ToolApplicationModel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
599 |
minorKey: windowSpecForInfoBar |
1244 | 600 |
) |
601 |
) |
|
602 |
||
603 |
) |
|
525 | 604 |
) |
605 |
! ! |
|
606 |
||
607 |
!MenuEditor class methodsFor:'menu specs'! |
|
608 |
||
1606 | 609 |
addMenu |
610 |
"This resource specification was automatically generated |
|
611 |
by the MenuEditor of ST/X." |
|
612 |
||
613 |
"Do not manually edit this!! If it is corrupted, |
|
614 |
the MenuEditor may not be able to read the specification." |
|
615 |
||
616 |
" |
|
617 |
MenuEditor new openOnClass:MenuEditor andSelector:#addMenu |
|
618 |
(Menu new fromLiteralArrayEncoding:(MenuEditor addMenu)) startUp |
|
619 |
" |
|
620 |
||
621 |
<resource: #menu> |
|
622 |
||
623 |
^ |
|
1844 | 624 |
#(Menu |
625 |
( |
|
626 |
(MenuItem |
|
627 |
activeHelpKey: addMenuSeparator |
|
628 |
label: 'Separator' |
|
629 |
itemValue: doCreateSep |
|
630 |
translateLabel: true |
|
631 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator '') |
|
1606 | 632 |
) |
1844 | 633 |
(MenuItem |
634 |
activeHelpKey: addMenuItem |
|
635 |
label: 'Item' |
|
636 |
itemValue: doCreateItem |
|
637 |
translateLabel: true |
|
638 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem '') |
|
1606 | 639 |
) |
1844 | 640 |
(MenuItem |
641 |
activeHelpKey: addMenuSliceItem |
|
642 |
label: 'Menu Slice' |
|
643 |
itemValue: doCreateMenuSliceItem |
|
644 |
translateLabel: true |
|
645 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu '') |
|
1606 | 646 |
) |
1844 | 647 |
(MenuItem |
648 |
activeHelpKey: addMenuItem |
|
649 |
label: 'Menu' |
|
650 |
itemValue: doCreateMenu |
|
651 |
translateLabel: true |
|
652 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu '') |
|
1606 | 653 |
) |
1844 | 654 |
(MenuItem |
655 |
activeHelpKey: addSubMenuLink |
|
656 |
label: 'Linked Menu' |
|
657 |
itemValue: doCreateLinkedMenu |
|
658 |
translateLabel: true |
|
659 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu '') |
|
1606 | 660 |
) |
1844 | 661 |
(MenuItem |
662 |
label: '-' |
|
1606 | 663 |
) |
1844 | 664 |
(MenuItem |
665 |
activeHelpKey: addDelayedMenu |
|
666 |
enabled: canCreateDelayedMenuChannel |
|
667 |
label: 'Delayed Menu' |
|
668 |
itemValue: doCreateDelayedMenu: |
|
669 |
translateLabel: true |
|
670 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu '') |
|
671 |
argument: menu |
|
1606 | 672 |
) |
1844 | 673 |
(MenuItem |
674 |
activeHelpKey: addDelayedSubMenuLink |
|
675 |
enabled: canCreateDelayedMenuChannel |
|
676 |
label: 'Delayed Linked Menu' |
|
677 |
itemValue: doCreateDelayedMenu: |
|
678 |
translateLabel: true |
|
679 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu '') |
|
680 |
argument: linkedMenu |
|
1606 | 681 |
) |
1844 | 682 |
(MenuItem |
683 |
label: '-' |
|
684 |
) |
|
685 |
(MenuItem |
|
686 |
label: 'Standard Menus' |
|
687 |
translateLabel: true |
|
688 |
submenuChannel: standardMenus |
|
689 |
keepLinkedMenu: true |
|
1606 | 690 |
) |
691 |
) |
|
692 |
nil |
|
693 |
nil |
|
694 |
) |
|
695 |
! |
|
696 |
||
697 |
editMenu |
|
698 |
"This resource specification was automatically generated |
|
699 |
by the MenuEditor of ST/X." |
|
700 |
||
701 |
"Do not manually edit this!! If it is corrupted, |
|
702 |
the MenuEditor may not be able to read the specification." |
|
703 |
||
704 |
" |
|
705 |
MenuEditor new openOnClass:MenuEditor andSelector:#editMenu |
|
706 |
(Menu new fromLiteralArrayEncoding:(MenuEditor editMenu)) startUp |
|
707 |
" |
|
708 |
||
709 |
<resource: #menu> |
|
710 |
||
711 |
^ |
|
712 |
#(#Menu |
|
1631 | 713 |
#( |
714 |
#(#MenuItem |
|
715 |
#activeHelpKey: #editCut |
|
716 |
#enabled: #hasSelectionChannel |
|
1632 | 717 |
#label: 'Cut' |
718 |
#itemValue: #doCut |
|
719 |
#translateLabel: true |
|
1631 | 720 |
) |
721 |
#(#MenuItem |
|
722 |
#activeHelpKey: #editCopy |
|
723 |
#enabled: #hasSelectionChannel |
|
1632 | 724 |
#label: 'Copy' |
725 |
#itemValue: #doCopy |
|
726 |
#translateLabel: true |
|
1631 | 727 |
) |
728 |
#(#MenuItem |
|
729 |
#activeHelpKey: #editPaste |
|
730 |
#enabled: #valueOfCanPaste |
|
1632 | 731 |
#label: 'Paste' |
732 |
#itemValue: #doPaste |
|
733 |
#translateLabel: true |
|
1631 | 734 |
) |
735 |
#(#MenuItem |
|
1632 | 736 |
#activeHelpKey: #editDelete |
737 |
#enabled: #hasSelectionChannel |
|
1631 | 738 |
#label: 'Delete' |
1632 | 739 |
#itemValue: #doDelete |
1631 | 740 |
#translateLabel: true |
741 |
#isVisible: false |
|
742 |
) |
|
743 |
#(#MenuItem |
|
744 |
#label: '-' |
|
745 |
) |
|
746 |
#(#MenuItem |
|
747 |
#activeHelpKey: #editMoveUp |
|
748 |
#enabled: #valueOfEnableMovingUpOrDown |
|
1632 | 749 |
#label: 'Move Up' |
750 |
#itemValue: #doMoveUpOrDown: |
|
751 |
#translateLabel: true |
|
752 |
#startGroup: #right |
|
753 |
#labelImage: #(#ResourceRetriever #Icon #upIcon '') |
|
1631 | 754 |
#argument: #up |
755 |
) |
|
756 |
#(#MenuItem |
|
757 |
#activeHelpKey: #editMoveDown |
|
758 |
#enabled: #valueOfEnableMovingUpOrDown |
|
1632 | 759 |
#label: 'Move Down' |
760 |
#itemValue: #doMoveUpOrDown: |
|
761 |
#translateLabel: true |
|
762 |
#labelImage: #(#ResourceRetriever #Icon #downIcon '') |
|
1631 | 763 |
#argument: #down |
764 |
) |
|
765 |
#(#MenuItem |
|
766 |
#activeHelpKey: #editMoveIn |
|
767 |
#enabled: #valueOfEnableMovingIn |
|
1632 | 768 |
#label: 'Move Into Next' |
769 |
#itemValue: #doMoveIn: |
|
770 |
#translateLabel: true |
|
771 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon '') |
|
1631 | 772 |
#argument: #inNext |
773 |
) |
|
774 |
#(#MenuItem |
|
775 |
#activeHelpKey: #editMoveInAbove |
|
776 |
#enabled: #valueOfEnableMovingInAbove |
|
1632 | 777 |
#label: 'Move Into Previous' |
778 |
#itemValue: #doMoveIn: |
|
779 |
#translateLabel: true |
|
780 |
#labelImage: #(#ResourceRetriever #Icon #upRightIcon '') |
|
1631 | 781 |
#argument: #inPrev |
782 |
) |
|
783 |
#(#MenuItem |
|
784 |
#activeHelpKey: #editMoveOut |
|
785 |
#enabled: #valueOfEnableMovingOut |
|
1632 | 786 |
#label: 'Move Out' |
787 |
#itemValue: #doMoveOut |
|
788 |
#translateLabel: true |
|
789 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon '') |
|
1631 | 790 |
) |
791 |
) |
|
792 |
nil |
|
793 |
nil |
|
1606 | 794 |
) |
795 |
! |
|
796 |
||
797 |
fileMenu |
|
798 |
"This resource specification was automatically generated |
|
799 |
by the MenuEditor of ST/X." |
|
800 |
||
801 |
"Do not manually edit this!! If it is corrupted, |
|
802 |
the MenuEditor may not be able to read the specification." |
|
803 |
||
804 |
" |
|
805 |
MenuEditor new openOnClass:MenuEditor andSelector:#fileMenu |
|
806 |
(Menu new fromLiteralArrayEncoding:(MenuEditor fileMenu)) startUp |
|
807 |
" |
|
808 |
||
809 |
<resource: #menu> |
|
810 |
||
811 |
^ |
|
812 |
#(#Menu |
|
813 |
#( |
|
814 |
#(#MenuItem |
|
1632 | 815 |
#activeHelpKey: #fileNew |
1606 | 816 |
#label: 'New' |
1632 | 817 |
#itemValue: #doNew |
1606 | 818 |
#translateLabel: true |
819 |
) |
|
820 |
#(#MenuItem |
|
821 |
#label: '-' |
|
822 |
) |
|
823 |
#(#MenuItem |
|
1632 | 824 |
#activeHelpKey: #fileLoad |
1606 | 825 |
#label: 'Load...' |
1632 | 826 |
#itemValue: #doLoad |
1606 | 827 |
#translateLabel: true |
828 |
) |
|
829 |
#(#MenuItem |
|
830 |
#label: '-' |
|
831 |
) |
|
832 |
#(#MenuItem |
|
1632 | 833 |
#activeHelpKey: #fileSave |
1606 | 834 |
#label: 'Save' |
1632 | 835 |
#itemValue: #doSave |
1606 | 836 |
#translateLabel: true |
837 |
) |
|
838 |
#(#MenuItem |
|
1632 | 839 |
#activeHelpKey: #fileSaveAs |
1606 | 840 |
#label: 'Save As...' |
1632 | 841 |
#itemValue: #doSaveAs |
1606 | 842 |
#translateLabel: true |
843 |
) |
|
844 |
#(#MenuItem |
|
845 |
#label: '-' |
|
846 |
) |
|
847 |
#(#MenuItem |
|
1632 | 848 |
#activeHelpKey: #filePickAMenu |
1606 | 849 |
#label: 'Pick a Menu...' |
1632 | 850 |
#itemValue: #doPickAMenu |
1606 | 851 |
#translateLabel: true |
852 |
) |
|
853 |
#(#MenuItem |
|
854 |
#label: '-' |
|
855 |
) |
|
856 |
#(#MenuItem |
|
1632 | 857 |
#activeHelpKey: #fileShowMenuSpec |
1606 | 858 |
#label: 'Show Menu Spec' |
1632 | 859 |
#itemValue: #doShowMenuSpec |
1606 | 860 |
#translateLabel: true |
861 |
) |
|
862 |
#(#MenuItem |
|
863 |
#activeHelpKey: #fileBrowseClass |
|
864 |
#enabled: #hasValidSpecClass |
|
1632 | 865 |
#label: 'Browse Class' |
866 |
#itemValue: #doBrowseClass |
|
867 |
#translateLabel: true |
|
1606 | 868 |
) |
869 |
#(#MenuItem |
|
870 |
#label: '-' |
|
871 |
) |
|
872 |
#(#MenuItem |
|
1632 | 873 |
#activeHelpKey: #fileExit |
1606 | 874 |
#label: 'Exit' |
1632 | 875 |
#itemValue: #closeRequest |
1606 | 876 |
#translateLabel: true |
877 |
) |
|
878 |
) |
|
879 |
nil |
|
880 |
nil |
|
881 |
) |
|
882 |
! |
|
883 |
||
1614 | 884 |
generateMenu |
885 |
"This resource specification was automatically generated |
|
886 |
by the MenuEditor of ST/X." |
|
887 |
||
888 |
"Do not manually edit this!! If it is corrupted, |
|
889 |
the MenuEditor may not be able to read the specification." |
|
890 |
||
891 |
" |
|
892 |
MenuEditor new openOnClass:MenuEditor andSelector:#generateMenu |
|
893 |
(Menu new fromLiteralArrayEncoding:(MenuEditor generateMenu)) startUp |
|
894 |
" |
|
895 |
||
896 |
<resource: #menu> |
|
897 |
||
898 |
^ |
|
899 |
#(#Menu |
|
900 |
#( |
|
901 |
#(#MenuItem |
|
902 |
#activeHelpKey: #generateAspectMethods |
|
903 |
#enabled: #hasValidSpecClass |
|
1632 | 904 |
#label: 'Aspect Methods' |
905 |
#itemValue: #doGenerateAspectMethods |
|
906 |
#translateLabel: true |
|
1614 | 907 |
) |
908 |
) |
|
909 |
nil |
|
910 |
nil |
|
911 |
) |
|
912 |
! |
|
913 |
||
1606 | 914 |
helpMenu |
915 |
"This resource specification was automatically generated |
|
916 |
by the MenuEditor of ST/X." |
|
917 |
||
918 |
"Do not manually edit this!! If it is corrupted, |
|
919 |
the MenuEditor may not be able to read the specification." |
|
920 |
||
921 |
" |
|
922 |
MenuEditor new openOnClass:MenuEditor andSelector:#helpMenu |
|
923 |
(Menu new fromLiteralArrayEncoding:(MenuEditor helpMenu)) startUp |
|
924 |
" |
|
925 |
||
926 |
<resource: #menu> |
|
927 |
||
928 |
^ |
|
929 |
#(#Menu |
|
930 |
#( |
|
931 |
#(#MenuItem |
|
1632 | 932 |
#activeHelpKey: #helpTutorial |
1606 | 933 |
#label: 'Documentation' |
1632 | 934 |
#itemValue: #openHTMLDocument: |
1606 | 935 |
#translateLabel: true |
936 |
#argument: 'tools/uipainter/MenuEditor.html' |
|
937 |
) |
|
938 |
#(#MenuItem |
|
939 |
#label: '-' |
|
940 |
) |
|
941 |
#(#MenuItem |
|
1632 | 942 |
#activeHelpKey: #helpHelpTool |
1606 | 943 |
#label: 'Help Tool' |
1632 | 944 |
#itemValue: #openHTMLDocument: |
1606 | 945 |
#translateLabel: true |
946 |
#argument: 'tools/uipainter/HelpTool.html' |
|
947 |
) |
|
948 |
#(#MenuItem |
|
949 |
#label: '-' |
|
950 |
) |
|
951 |
#(#MenuItem |
|
1632 | 952 |
#activeHelpKey: #helpShowHelp |
1606 | 953 |
#label: 'Show Help Texts' |
954 |
#translateLabel: true |
|
955 |
#indication: #showingHelp: |
|
956 |
) |
|
957 |
#(#MenuItem |
|
958 |
#label: '-' |
|
959 |
) |
|
960 |
#(#MenuItem |
|
1632 | 961 |
#activeHelpKey: #aboutThisAppliaction |
1606 | 962 |
#label: 'About MenuEditor...' |
1632 | 963 |
#itemValue: #openAboutThisApplication |
1606 | 964 |
#translateLabel: true |
965 |
) |
|
966 |
) |
|
967 |
nil |
|
968 |
nil |
|
969 |
) |
|
970 |
! |
|
971 |
||
525 | 972 |
menu |
738 | 973 |
"This resource specification was automatically generated |
974 |
by the MenuEditor of ST/X." |
|
975 |
||
976 |
"Do not manually edit this!! If it is corrupted, |
|
977 |
the MenuEditor may not be able to read the specification." |
|
525 | 978 |
|
979 |
" |
|
980 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
981 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
982 |
" |
|
983 |
||
984 |
<resource: #menu> |
|
985 |
||
1566 | 986 |
^ |
1775 | 987 |
#(Menu |
988 |
( |
|
989 |
(MenuItem |
|
990 |
label: '&File' |
|
991 |
translateLabel: true |
|
992 |
submenuChannel: fileMenu |
|
993 |
keepLinkedMenu: true |
|
1566 | 994 |
) |
1775 | 995 |
(MenuItem |
996 |
label: '&Edit' |
|
997 |
translateLabel: true |
|
998 |
submenuChannel: editMenu |
|
999 |
keepLinkedMenu: true |
|
1566 | 1000 |
) |
1775 | 1001 |
(MenuItem |
1002 |
enabled: hasSingleSelectionChannel |
|
1003 |
label: 'Item' |
|
1004 |
translateLabel: true |
|
1005 |
submenuChannel: addMenu |
|
1006 |
keepLinkedMenu: true |
|
1566 | 1007 |
) |
1775 | 1008 |
(MenuItem |
1009 |
label: 'Generate' |
|
1010 |
translateLabel: true |
|
1011 |
submenuChannel: generateMenu |
|
1012 |
keepLinkedMenu: true |
|
1631 | 1013 |
) |
1775 | 1014 |
(MenuItem |
1015 |
label: 'Test' |
|
1016 |
translateLabel: true |
|
1017 |
submenuChannel: submenuTest |
|
1566 | 1018 |
) |
1775 | 1019 |
(MenuItem |
1020 |
label: 'Settings' |
|
1021 |
translateLabel: true |
|
1022 |
submenuChannel: settingsMenu |
|
1023 |
keepLinkedMenu: true |
|
1631 | 1024 |
) |
1775 | 1025 |
(MenuItem |
1026 |
label: 'History' |
|
1027 |
translateLabel: true |
|
1028 |
submenuChannel: menuHistory |
|
1566 | 1029 |
) |
1775 | 1030 |
(MenuItem |
1031 |
label: '&Help' |
|
1032 |
translateLabel: true |
|
1033 |
startGroup: right |
|
1034 |
submenuChannel: helpMenu |
|
1035 |
keepLinkedMenu: true |
|
1566 | 1036 |
) |
1037 |
) |
|
1038 |
nil |
|
1039 |
nil |
|
525 | 1040 |
) |
1041 |
! |
|
1042 |
||
1631 | 1043 |
settingsMenu |
1044 |
"This resource specification was automatically generated |
|
1045 |
by the MenuEditor of ST/X." |
|
1046 |
||
1047 |
"Do not manually edit this!! If it is corrupted, |
|
1048 |
the MenuEditor may not be able to read the specification." |
|
1049 |
||
1050 |
" |
|
1632 | 1051 |
MenuEditor new openOnClass:MenuEditor andSelector:#settingsMenu |
1052 |
(Menu new fromLiteralArrayEncoding:(MenuEditor settingsMenu)) startUp |
|
1631 | 1053 |
" |
1054 |
||
1055 |
<resource: #menu> |
|
1056 |
||
1057 |
^ |
|
1058 |
#(#Menu |
|
1059 |
#( |
|
1060 |
#(#MenuItem |
|
1632 | 1061 |
#activeHelpKey: #settingsRedefineAspectMethods |
1062 |
#enabled: #hasValidSpecClass |
|
1631 | 1063 |
#label: 'Redefine Aspect Methods' |
1064 |
#translateLabel: true |
|
1065 |
#hideMenuOnActivated: false |
|
1066 |
#indication: #redefineAspectMethodsChannel |
|
1067 |
) |
|
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1068 |
#(#MenuItem |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1069 |
#activeHelpKey: #settingsRedefineAspectMethods |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1070 |
#label: 'AutoAccept on Selection-Change' |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1071 |
#translateLabel: true |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1072 |
#hideMenuOnActivated: false |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1073 |
#indication: #autoAcceptOnSelectionChange |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1074 |
) |
1631 | 1075 |
) |
1076 |
nil |
|
1077 |
nil |
|
1078 |
) |
|
1079 |
! |
|
1080 |
||
1606 | 1081 |
standardMenus |
738 | 1082 |
"This resource specification was automatically generated |
1083 |
by the MenuEditor of ST/X." |
|
1084 |
||
1085 |
"Do not manually edit this!! If it is corrupted, |
|
1086 |
the MenuEditor may not be able to read the specification." |
|
525 | 1087 |
|
1088 |
" |
|
1606 | 1089 |
MenuEditor new openOnClass:MenuEditor andSelector:#standardMenus |
1090 |
(Menu new fromLiteralArrayEncoding:(MenuEditor standardMenus)) startUp |
|
525 | 1091 |
" |
1092 |
||
1093 |
<resource: #menu> |
|
1094 |
||
1606 | 1095 |
^ |
1096 |
#(#Menu |
|
1632 | 1097 |
#( |
1098 |
#(#MenuItem |
|
1730 | 1099 |
#label: 'Standard Menu: File' |
1100 |
#itemValue: #doCreateStandardFileMenu |
|
1101 |
#translateLabel: true |
|
1102 |
) |
|
1103 |
#(#MenuItem |
|
1632 | 1104 |
#label: 'Standard Menu: Edit' |
1105 |
#itemValue: #doCreateStandardEditMenu |
|
1106 |
#translateLabel: true |
|
1107 |
) |
|
1108 |
#(#MenuItem |
|
1109 |
#label: 'Standard Menu: Help' |
|
1110 |
#itemValue: #doCreateStandardHelpMenu |
|
1111 |
#translateLabel: true |
|
1112 |
) |
|
1113 |
) |
|
1114 |
nil |
|
1115 |
nil |
|
525 | 1116 |
) |
1117 |
! |
|
1118 |
||
1606 | 1119 |
toolbar |
738 | 1120 |
"This resource specification was automatically generated |
1121 |
by the MenuEditor of ST/X." |
|
1122 |
||
1123 |
"Do not manually edit this!! If it is corrupted, |
|
1124 |
the MenuEditor may not be able to read the specification." |
|
525 | 1125 |
|
1126 |
" |
|
1606 | 1127 |
MenuEditor new openOnClass:MenuEditor andSelector:#toolbar |
1128 |
(Menu new fromLiteralArrayEncoding:(MenuEditor toolbar)) startUp |
|
525 | 1129 |
" |
1130 |
||
1131 |
<resource: #menu> |
|
1132 |
||
1322 | 1133 |
^ |
1749 | 1134 |
#(Menu |
1135 |
( |
|
1136 |
(MenuItem |
|
1137 |
activeHelpKey: fileNew |
|
1138 |
label: 'New' |
|
1139 |
itemValue: doNew |
|
1140 |
translateLabel: true |
|
1141 |
isButton: true |
|
1886 | 1142 |
labelImage: (ResourceRetriever ToolbarIconLibrary newMenuIcon) |
1690 | 1143 |
) |
1749 | 1144 |
(MenuItem |
1145 |
activeHelpKey: fileLoad |
|
1146 |
label: 'Load' |
|
1147 |
itemValue: doLoad |
|
1148 |
translateLabel: true |
|
1149 |
isButton: true |
|
1150 |
submenuChannel: menuHistory |
|
1886 | 1151 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) |
1820 | 1152 |
keepLinkedMenu: true |
1322 | 1153 |
) |
1749 | 1154 |
(MenuItem |
1155 |
activeHelpKey: fileSave |
|
1156 |
label: 'Save' |
|
1157 |
itemValue: doSave |
|
1158 |
translateLabel: true |
|
1159 |
isButton: true |
|
1886 | 1160 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) |
1322 | 1161 |
) |
1749 | 1162 |
(MenuItem |
1163 |
label: '' |
|
1322 | 1164 |
) |
1749 | 1165 |
(MenuItem |
1166 |
activeHelpKey: editCut |
|
1167 |
enabled: hasSelectionChannel |
|
1168 |
label: 'Cut' |
|
1169 |
itemValue: doCut |
|
1170 |
translateLabel: true |
|
1171 |
isButton: true |
|
1886 | 1172 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutMenuItemIcon) |
1322 | 1173 |
) |
1749 | 1174 |
(MenuItem |
1175 |
activeHelpKey: editCopy |
|
1176 |
enabled: hasSelectionChannel |
|
1177 |
label: 'Copy' |
|
1178 |
itemValue: doCopy |
|
1179 |
translateLabel: true |
|
1180 |
isButton: true |
|
1886 | 1181 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyMenuItemIcon) |
1322 | 1182 |
) |
1749 | 1183 |
(MenuItem |
1184 |
activeHelpKey: editPaste |
|
1185 |
enabled: valueOfCanPaste |
|
1186 |
label: 'Paste' |
|
1187 |
itemValue: doPaste |
|
1188 |
translateLabel: true |
|
1189 |
isButton: true |
|
1886 | 1190 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteMenuItemIcon) |
1322 | 1191 |
) |
1749 | 1192 |
(MenuItem |
1193 |
label: '' |
|
1322 | 1194 |
) |
1749 | 1195 |
(MenuItem |
1196 |
activeHelpKey: addMenuSeparator |
|
1197 |
enabled: hasSingleSelectionChannel |
|
1198 |
label: 'Add Separator' |
|
1199 |
itemValue: doCreateSep |
|
1200 |
translateLabel: true |
|
1201 |
isButton: true |
|
1202 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator) |
|
1322 | 1203 |
) |
1749 | 1204 |
(MenuItem |
1205 |
activeHelpKey: addMenuItem |
|
1206 |
enabled: hasSingleSelectionChannel |
|
1207 |
label: 'Add Item' |
|
1208 |
itemValue: doCreateItem |
|
1209 |
translateLabel: true |
|
1210 |
isButton: true |
|
1211 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem) |
|
1606 | 1212 |
) |
1749 | 1213 |
(MenuItem |
1891 | 1214 |
activeHelpKey: addMenuSlice |
1844 | 1215 |
enabled: hasSingleSelectionChannel |
1216 |
label: 'Menu Slice' |
|
1217 |
itemValue: doCreateMenuSliceItem |
|
1218 |
translateLabel: true |
|
1219 |
isButton: true |
|
1220 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu) |
|
1221 |
) |
|
1222 |
(MenuItem |
|
1749 | 1223 |
activeHelpKey: addSubMenu |
1224 |
enabled: hasSingleSelectionChannel |
|
1225 |
label: 'Add Menu' |
|
1226 |
itemValue: doCreateMenu |
|
1227 |
translateLabel: true |
|
1228 |
isButton: true |
|
1229 |
submenuChannel: standardMenus |
|
1230 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu) |
|
1820 | 1231 |
keepLinkedMenu: true |
1322 | 1232 |
) |
1749 | 1233 |
(MenuItem |
1234 |
activeHelpKey: addSubMenuLink |
|
1235 |
enabled: hasSingleSelectionChannel |
|
1236 |
label: 'Add Linked Menu' |
|
1237 |
itemValue: doCreateLinkedMenu |
|
1238 |
translateLabel: true |
|
1239 |
isButton: true |
|
1240 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu) |
|
1322 | 1241 |
) |
1749 | 1242 |
(MenuItem |
1243 |
label: '' |
|
1322 | 1244 |
) |
1749 | 1245 |
(MenuItem |
1246 |
activeHelpKey: addDelayedMenu |
|
1247 |
enabled: canCreateDelayedMenuChannel |
|
1248 |
label: 'Add Delayed Menu' |
|
1249 |
itemValue: doCreateDelayedMenu: |
|
1250 |
translateLabel: true |
|
1251 |
isButton: true |
|
1252 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu) |
|
1253 |
argument: menu |
|
1606 | 1254 |
) |
1749 | 1255 |
(MenuItem |
1256 |
activeHelpKey: addDelayedSubMenuLink |
|
1257 |
enabled: canCreateDelayedMenuChannel |
|
1258 |
label: 'Add Delayed Linked Menu' |
|
1259 |
itemValue: doCreateDelayedMenu: |
|
1260 |
translateLabel: true |
|
1261 |
isButton: true |
|
1262 |
labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu) |
|
1263 |
argument: linkedMenu |
|
1606 | 1264 |
) |
1749 | 1265 |
(MenuItem |
1266 |
activeHelpKey: editMoveUp |
|
1267 |
enabled: valueOfEnableMovingUpOrDown |
|
1268 |
label: 'Move Up' |
|
1269 |
itemValue: doMoveUpOrDown: |
|
1270 |
translateLabel: true |
|
1271 |
isButton: true |
|
1272 |
startGroup: right |
|
1273 |
labelImage: (ResourceRetriever Icon upIcon) |
|
1274 |
argument: up |
|
1322 | 1275 |
) |
1749 | 1276 |
(MenuItem |
1277 |
activeHelpKey: editMoveDown |
|
1278 |
enabled: valueOfEnableMovingUpOrDown |
|
1279 |
label: 'Move Down' |
|
1280 |
itemValue: doMoveUpOrDown: |
|
1281 |
translateLabel: true |
|
1282 |
isButton: true |
|
1283 |
labelImage: (ResourceRetriever Icon downIcon) |
|
1284 |
argument: down |
|
1322 | 1285 |
) |
1749 | 1286 |
(MenuItem |
1287 |
activeHelpKey: editMoveIn |
|
1288 |
enabled: valueOfEnableMovingIn |
|
1289 |
label: 'Move In' |
|
1290 |
itemValue: doMoveIn: |
|
1291 |
translateLabel: true |
|
1292 |
isButton: true |
|
1293 |
labelImage: (ResourceRetriever Icon downRightIcon) |
|
1294 |
argument: inNext |
|
1322 | 1295 |
) |
1749 | 1296 |
(MenuItem |
1297 |
activeHelpKey: editMoveInAbove |
|
1298 |
enabled: valueOfEnableMovingInAbove |
|
1299 |
label: 'Move In Above' |
|
1300 |
itemValue: doMoveIn: |
|
1301 |
translateLabel: true |
|
1302 |
isButton: true |
|
1303 |
labelImage: (ResourceRetriever Icon upRightIcon) |
|
1304 |
argument: inPrev |
|
1468 | 1305 |
) |
1749 | 1306 |
(MenuItem |
1307 |
activeHelpKey: editMoveOut |
|
1308 |
enabled: valueOfEnableMovingOut |
|
1309 |
label: 'Move Out' |
|
1310 |
itemValue: doMoveOut |
|
1311 |
translateLabel: true |
|
1312 |
isButton: true |
|
1313 |
labelImage: (ResourceRetriever Icon leftDownIcon) |
|
1322 | 1314 |
) |
1315 |
) |
|
1316 |
nil |
|
1317 |
nil |
|
525 | 1318 |
) |
1319 |
! ! |
|
1320 |
||
1725 | 1321 |
!MenuEditor class methodsFor:'menu specs-standard'! |
1606 | 1322 |
|
1323 |
standardEditMenu |
|
1324 |
"This resource specification was automatically generated |
|
1325 |
by the MenuEditor of ST/X." |
|
1326 |
||
1327 |
"Do not manually edit this!! If it is corrupted, |
|
1328 |
the MenuEditor may not be able to read the specification." |
|
1329 |
||
1330 |
" |
|
1331 |
MenuEditor new openOnClass:MenuEditor andSelector:#standardEditMenu |
|
1332 |
(Menu new fromLiteralArrayEncoding:(MenuEditor standardEditMenu)) startUp |
|
1333 |
" |
|
1334 |
||
1335 |
<resource: #menu> |
|
1336 |
||
1337 |
^ |
|
1338 |
#(#Menu |
|
1679
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1339 |
#( |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1340 |
#(#MenuItem |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1341 |
#label: 'Cut' |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1342 |
#translateLabel: true |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1343 |
#value: #cutSelection |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1344 |
) |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1345 |
#(#MenuItem |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1346 |
#label: 'Copy' |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1347 |
#translateLabel: true |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1348 |
#value: #copySelection |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1349 |
) |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1350 |
#(#MenuItem |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1351 |
#label: 'Paste' |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1352 |
#translateLabel: true |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1353 |
#value: #paste |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1354 |
) |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1355 |
) |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1356 |
nil |
876e76ae2997
editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents:
1676
diff
changeset
|
1357 |
nil |
525 | 1358 |
) |
1359 |
! |
|
1360 |
||
1606 | 1361 |
standardFileMenu |
1362 |
"This resource specification was automatically generated |
|
1363 |
by the MenuEditor of ST/X." |
|
1364 |
||
1365 |
"Do not manually edit this!! If it is corrupted, |
|
1366 |
the MenuEditor may not be able to read the specification." |
|
1367 |
||
1368 |
" |
|
1369 |
MenuEditor new openOnClass:MenuEditor andSelector:#standardFileMenu |
|
1370 |
(Menu new fromLiteralArrayEncoding:(MenuEditor standardFileMenu)) startUp |
|
1371 |
" |
|
1372 |
||
1373 |
<resource: #menu> |
|
1374 |
||
1375 |
^ |
|
1376 |
#(#Menu |
|
1377 |
#( |
|
1378 |
#(#MenuItem |
|
1379 |
#label: 'New' |
|
1380 |
#translateLabel: true |
|
1381 |
#value: #menuNew |
|
1382 |
) |
|
1383 |
#(#MenuItem |
|
1384 |
#label: '-' |
|
1385 |
) |
|
1386 |
#(#MenuItem |
|
1387 |
#label: 'Open...' |
|
1388 |
#translateLabel: true |
|
1389 |
#value: #menuOpen |
|
1390 |
) |
|
1391 |
#(#MenuItem |
|
1392 |
#label: '-' |
|
1393 |
) |
|
1394 |
#(#MenuItem |
|
1395 |
#label: 'Save' |
|
1396 |
#translateLabel: true |
|
1397 |
#value: #menuSave |
|
1398 |
) |
|
1399 |
#(#MenuItem |
|
1400 |
#label: 'Save As...' |
|
1401 |
#translateLabel: true |
|
1402 |
#value: #menuSaveAs |
|
1403 |
) |
|
1404 |
#(#MenuItem |
|
1405 |
#label: '-' |
|
1406 |
) |
|
1407 |
#(#MenuItem |
|
1408 |
#label: 'Exit' |
|
1409 |
#translateLabel: true |
|
1410 |
#value: #closeRequest |
|
1411 |
) |
|
1412 |
) |
|
1413 |
nil |
|
1414 |
nil |
|
525 | 1415 |
) |
1416 |
! |
|
1417 |
||
1606 | 1418 |
standardHelpMenu |
1419 |
"This resource specification was automatically generated |
|
1420 |
by the MenuEditor of ST/X." |
|
1421 |
||
1422 |
"Do not manually edit this!! If it is corrupted, |
|
1423 |
the MenuEditor may not be able to read the specification." |
|
1424 |
||
1425 |
" |
|
1426 |
MenuEditor new openOnClass:MenuEditor andSelector:#standardHelpMenu |
|
1427 |
(Menu new fromLiteralArrayEncoding:(MenuEditor standardHelpMenu)) startUp |
|
1428 |
" |
|
1429 |
||
1430 |
<resource: #menu> |
|
1431 |
||
1432 |
^ |
|
1433 |
#(#Menu |
|
1434 |
#( |
|
1435 |
#(#MenuItem |
|
1436 |
#label: 'Documentation' |
|
1437 |
#translateLabel: true |
|
1438 |
#value: #openDocumentation |
|
1439 |
) |
|
1440 |
#(#MenuItem |
|
1441 |
#label: '-' |
|
1442 |
) |
|
1443 |
#(#MenuItem |
|
1444 |
#label: 'About this Application' |
|
1445 |
#translateLabel: true |
|
1446 |
#value: #openAboutThisApplication |
|
1447 |
) |
|
1448 |
) |
|
1449 |
nil |
|
1450 |
nil |
|
525 | 1451 |
) |
199 | 1452 |
! ! |
1453 |
||
1454 |
!MenuEditor methodsFor:'accessing'! |
|
1455 |
||
1606 | 1456 |
helpTool |
1457 |
"get the help tool application |
|
1458 |
" |
|
1669 | 1459 |
^ wizards at:#help ifAbsentPut:[ |tool| |
1460 |
tool := UIHelpTool new. |
|
1461 |
tool masterApplication:self. |
|
1462 |
tool modifiedHolder: self valueOfEnablingCommitButtons. |
|
1463 |
tool builder window:(ApplicationSubView new client:tool). |
|
1464 |
tool masterApplication:self. |
|
1465 |
tool |
|
1606 | 1466 |
] |
1467 |
! |
|
1468 |
||
1469 |
imageTool |
|
1470 |
"get the image tool application |
|
1471 |
" |
|
1472 |
^ wizards at:#image ifAbsentPut:[ |tool| |
|
1473 |
tool := ResourceEditor new createBuilder. |
|
1474 |
tool masterApplication:self. |
|
1475 |
tool modifiedChannel: self valueOfEnablingCommitButtons. |
|
1476 |
tool builder window:(ApplicationSubView new client:tool). |
|
1477 |
tool |
|
1478 |
] |
|
1479 |
! |
|
1480 |
||
1481 |
useHelpTool:aHelpTool |
|
1482 |
"take the help dictionaries from aHelpTool into my helpTool |
|
1483 |
" |
|
1645 | 1484 |
self helpTool buildFromHelpTool:aHelpTool. |
1606 | 1485 |
! ! |
1486 |
||
1487 |
!MenuEditor methodsFor:'actions'! |
|
1488 |
||
1489 |
accept |
|
1490 |
"accept modifications |
|
1491 |
" |
|
1492 |
self accept:true. |
|
1493 |
! |
|
1494 |
||
1495 |
accept:ok |
|
1496 |
"ok if true the modifications are accepted |
|
1497 |
than reload from item |
|
1498 |
" |
|
1499 |
|selectedItem rscRetrHolder helpKeyHolder helpTool imageTool acceptChannel| |
|
1500 |
||
1501 |
selectedItem := self selectedItem. |
|
1502 |
||
1503 |
selectedItem ifNotNil:[ |
|
1504 |
self withoutNotifyDo:[ |
|
1505 |
rscRetrHolder := aspects at:#resourceRetriever. |
|
1506 |
helpKeyHolder := aspects at:#activeHelpKey. |
|
1507 |
imageTool := self imageTool. |
|
1508 |
helpTool := self helpTool. |
|
1509 |
acceptChannel := self acceptChannel. |
|
1510 |
||
1511 |
acceptChannel triggerValue:true. |
|
1512 |
acceptChannel setValue:false. |
|
1513 |
||
1514 |
ok ifTrue:[ |
|
1669 | 1515 |
helpTool accept. |
1606 | 1516 |
rscRetrHolder value:(imageTool resourceRetriever). |
1517 |
helpKeyHolder value:(helpTool helpKey). |
|
1518 |
selectedItem fromAspects:aspects. |
|
1519 |
modified := true. |
|
1520 |
||
1521 |
selectedItem isRootItem ifTrue:[ |
|
1522 |
"/ update specSelector |
|
1523 |
specSelector := selectedItem rawLabel. |
|
1524 |
]. |
|
1525 |
]. |
|
1526 |
selectedItem toAspects:aspects. |
|
1669 | 1527 |
helpTool helpKey:(helpKeyHolder value). |
1606 | 1528 |
imageTool resourceRetriever:(rscRetrHolder value). |
1529 |
] |
|
218 | 1530 |
]. |
1606 | 1531 |
self updateChannels. |
1532 |
self clearModified. |
|
1533 |
! |
|
1534 |
||
1535 |
cancel |
|
1536 |
"reload aspects from current selected item; reset modification flag |
|
1537 |
" |
|
1538 |
self accept:false. |
|
287 | 1539 |
! |
1540 |
||
1606 | 1541 |
indicatorClickedAt:atLine |
1542 |
"indicator clicked at line number; toggle expand of item at line |
|
1543 |
" |
|
1544 |
|item| |
|
1545 |
||
1546 |
item := listOfItems at:atLine ifAbsent:nil. |
|
1610
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
1547 |
item ifNotNil:[ |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
1548 |
item toggleExpand. |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
1549 |
self hasSelection ifFalse:[ |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
1550 |
self selectedItem:item |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
1551 |
] |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
1552 |
]. |
199 | 1553 |
! ! |
1554 |
||
1555 |
!MenuEditor methodsFor:'aspects'! |
|
1556 |
||
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1557 |
autoAcceptOnSelectionChange |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1558 |
^ builder valueAspectFor:#autoAcceptOnSelectionChange initialValue:true |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1559 |
! |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1560 |
|
1606 | 1561 |
canCreateDelayedMenuChannel |
1562 |
"boolean holder, true if the current selected item accepts a delayed menu |
|
1563 |
" |
|
1564 |
^ builder booleanValueAspectFor:#canCreateDelayedMenuChannel |
|
220 | 1565 |
! |
1566 |
||
1636 | 1567 |
hasItemValue |
1568 |
"boolean holder, true if any item is selected |
|
1569 |
" |
|
1570 |
^ BlockValue |
|
1571 |
with:[:holder | holder value size > 0] |
|
1572 |
argument:(self aspectFor:#itemValue) |
|
1573 |
! |
|
1574 |
||
1606 | 1575 |
hasSelectionChannel |
1576 |
"boolean holder, true if any item is selected |
|
1577 |
" |
|
1578 |
^ builder booleanValueAspectFor:#hasSelectionChannel |
|
220 | 1579 |
! |
1580 |
||
1606 | 1581 |
hasSingleSelectionChannel |
1582 |
"boolean holder, true if one item is selected |
|
1583 |
" |
|
1584 |
^ builder booleanValueAspectFor:#hasSingleSelectionChannel |
|
1585 |
! |
|
1586 |
||
1587 |
listOfItems |
|
1588 |
"returns the hierarchical list of menuItems |
|
1244 | 1589 |
" |
1606 | 1590 |
^ listOfItems |
1591 |
! |
|
1592 |
||
1593 |
listOfTabs |
|
1594 |
"returns the list of current shown tab-labels retrieved |
|
1595 |
from the current selected item. |
|
1596 |
" |
|
1597 |
^ listOfTabs |
|
1598 |
! |
|
1599 |
||
1617 | 1600 |
redefineAspectMethodsChannel |
1601 |
"boolean holder, true if aspects should be generated in only implemented |
|
1602 |
in superClass by calling #super ... |
|
1603 |
" |
|
1604 |
^ builder booleanValueAspectFor:#redefineAspectMethodsChannel |
|
1605 |
! |
|
1606 |
||
1606 | 1607 |
selectionHolder |
1608 |
"value holder, which keeps the current selected items |
|
1609 |
" |
|
1610 |
^ selectionHolder |
|
199 | 1611 |
! |
1612 |
||
1606 | 1613 |
tabHolder |
1614 |
"value holder, which keeps the current selected tab label or nil |
|
1615 |
" |
|
1616 |
^ tabHolder |
|
1617 |
! |
|
1618 |
||
1619 |
wizardHolder |
|
1620 |
"holder, which keeps the current wizard window |
|
1621 |
" |
|
879 | 1622 |
|holder| |
1606 | 1623 |
|
1624 |
holder := builder bindingAt:#wizardHolder. |
|
1625 |
||
1626 |
holder ifNil:[ |
|
1627 |
holder := nil asValue. |
|
1628 |
builder aspectAt:#wizardHolder put:holder. |
|
879 | 1629 |
]. |
1630 |
^ holder |
|
199 | 1631 |
! ! |
1632 |
||
728 | 1633 |
!MenuEditor methodsFor:'building'! |
1634 |
||
1606 | 1635 |
buildFromClass:aSpecClass andSelector:aSpecSelector |
1636 |
"rebuild menu from a class and selector |
|
1637 |
" |
|
1638 |
|cls menu| |
|
1639 |
||
1640 |
menu := nil. |
|
1641 |
||
1642 |
self isStandAlone ifTrue:[ self helpTool buildFromClass:aSpecClass ]. |
|
1643 |
||
1644 |
aSpecSelector notNil ifTrue:[ |
|
1645 |
aSpecClass ifNotNil:[ |
|
1646 |
cls := self resolveName:aSpecClass. |
|
1647 |
menu := cls perform:aSpecSelector ifNotUnderstood:nil. |
|
1648 |
||
1649 |
menu ifNotNil:[ |
|
1650 |
(menu isMemberOf:Menu) ifFalse:[ |
|
1651 |
menu := Menu new fromLiteralArrayEncoding:menu |
|
1652 |
]. |
|
1653 |
] |
|
1654 |
]. |
|
1655 |
]. |
|
1656 |
self buildFromMenu:menu selector:aSpecSelector. |
|
1657 |
! |
|
1658 |
||
1659 |
buildFromMenu:aMenu selector:aSelector |
|
1660 |
"rebuild menu from a Menu |
|
1661 |
" |
|
1662 |
|root menu| |
|
1663 |
||
1664 |
aMenu isCollection ifTrue:[menu := aMenu decodeAsLiteralArray] |
|
1665 |
ifFalse:[menu := aMenu]. |
|
1666 |
||
1667 |
self valueOfEnablingCommitButtons value:false. |
|
1668 |
root := listOfItems root. |
|
1669 |
||
1670 |
self withoutNotifyDo:[ |
|
1671 |
selectionHolder setValue:#(). |
|
1672 |
root menu:aMenu labeled:(aSelector ? specSelector). |
|
1673 |
]. |
|
1674 |
self selectedItem:root. |
|
734 | 1675 |
self updateHistory. |
1676 |
! |
|
1677 |
||
1244 | 1678 |
buildFromResourceSpec:aResourceSpec |
1606 | 1679 |
"rebuild menu from a resource spec |
1680 |
" |
|
1681 |
self buildFromMenu:aResourceSpec selector:nil |
|
728 | 1682 |
! ! |
1683 |
||
199 | 1684 |
!MenuEditor methodsFor:'change & update'! |
1685 |
||
1606 | 1686 |
selectedSuperItems |
1687 |
"returns collection of superItems derived from selection |
|
1688 |
" |
|
1689 |
|selection size root| |
|
1690 |
||
1691 |
selectedSuperItems ifNotNil:[ ^ selectedSuperItems ]. |
|
1692 |
||
1693 |
selection := selectionHolder value. |
|
1694 |
size := selection size. |
|
1695 |
||
1696 |
size <= 1 ifTrue:[ |
|
1697 |
selectedSuperItems := selection ? #(). |
|
1698 |
^ selectedSuperItems |
|
1699 |
]. |
|
1700 |
||
1701 |
root := listOfItems root. |
|
1702 |
||
1703 |
(selection includesIdentical:root) ifTrue:[ |
|
1704 |
selectedSuperItems := Array with:root. |
|
1705 |
^ selectedSuperItems |
|
1706 |
]. |
|
1707 |
selectedSuperItems := OrderedCollection new. |
|
1708 |
||
1709 |
selection do:[:anItem| |
|
1710 |
anItem parentsDetect:[:el| selection includesIdentical:el ] |
|
1711 |
ifNone:[ selectedSuperItems add:anItem ]. |
|
1712 |
]. |
|
1713 |
^ selectedSuperItems |
|
1714 |
! |
|
1715 |
||
1716 |
selectionChanged |
|
1717 |
"called if the selection has changed |
|
1718 |
" |
|
1719 |
|newTabList selection| |
|
1720 |
||
1721 |
selection := selectionHolder value. |
|
1722 |
||
1723 |
selection size == 1 ifTrue:[ |
|
1724 |
selectedSuperItems := selection. |
|
1725 |
||
1676 | 1726 |
newTabList := selection first slices collect:[:el| el first ]. |
1606 | 1727 |
newTabList = listOfTabs ifFalse:[ |
1728 |
listOfTabs contents:newTabList. |
|
1729 |
]. |
|
1730 |
] ifFalse:[ |
|
1731 |
"must compute selected super items on request |
|
1732 |
" |
|
1733 |
selectedSuperItems := nil. |
|
1734 |
]. |
|
1735 |
self cancel. |
|
1736 |
self tabChanged. |
|
1737 |
self updateChannels. |
|
1738 |
! |
|
1739 |
||
1740 |
tabChanged |
|
1741 |
"called if the tab changed |
|
1742 |
" |
|
1743 |
|tab selector item canvas wizardHolder| |
|
1744 |
||
1745 |
wizardHolder := self wizardHolder. |
|
1746 |
item := self selectedItem. |
|
1747 |
item ifNil:[ ^ wizardHolder value:nil ]. |
|
1748 |
||
1749 |
tab := tabHolder value. |
|
1750 |
||
1676 | 1751 |
tab notNil ifTrue:[ |
1606 | 1752 |
tab := item slices detect:[:el| el first = tab ] ifNone:nil. |
1753 |
]. |
|
1676 | 1754 |
tab isNil ifTrue:[ |
1606 | 1755 |
^ tabHolder value:( listOfTabs at:1 ifAbsent:nil ) |
1756 |
]. |
|
1757 |
selector := tab last. |
|
1758 |
||
1759 |
selector == #help ifTrue:[ ^ wizardHolder value:(self helpTool window) ]. |
|
1760 |
selector == #image ifTrue:[ ^ wizardHolder value:(self imageTool window) ]. |
|
1761 |
||
1762 |
canvas := wizards at:(item class name, selector) asSymbol |
|
1763 |
ifAbsentPut:[ SimpleView new client:self |
|
1764 |
spec:(item class perform:selector) |
|
1765 |
builder:(self builder) |
|
1766 |
]. |
|
1767 |
||
1768 |
wizardHolder value:canvas. |
|
1769 |
! |
|
1770 |
||
970 | 1771 |
update:something with:aParameter from:changedObject |
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1772 |
|lbl| |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1773 |
|
1606 | 1774 |
notifyDisabledCounter ~~ 0 ifTrue:[ ^ self ]. |
1775 |
||
1776 |
changedObject == selectionHolder ifTrue:[ ^ self selectionChanged ]. |
|
1777 |
changedObject == tabHolder ifTrue:[ ^ self tabChanged ]. |
|
1778 |
||
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1779 |
changedObject == self autoAcceptOnSelectionChange ifTrue:[ |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1780 |
lbl := changedObject value ifTrue:['Apply'] ifFalse:['OK']. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1781 |
(builder componentAt:'okButton') label:(resources string:lbl). |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1782 |
^ self |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1783 |
]. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
1784 |
|
1606 | 1785 |
super update:something with:aParameter from:changedObject |
970 | 1786 |
! |
1787 |
||
748 | 1788 |
updateChannels |
1606 | 1789 |
"update all channels |
1790 |
" |
|
1791 |
|selection sizeOfSel selectedItem| |
|
1792 |
||
1793 |
super updateChannels. |
|
1794 |
||
1795 |
selection := selectionHolder value. |
|
1796 |
sizeOfSel := selection size. |
|
1797 |
||
1798 |
sizeOfSel == 1 ifTrue:[selectedItem := selection at:1] |
|
1799 |
ifFalse:[selectedItem := nil]. |
|
1800 |
||
1801 |
self hasSelectionChannel value:(sizeOfSel ~~ 0). |
|
1802 |
self hasSingleSelectionChannel value:(selectedItem notNil). |
|
1803 |
||
1804 |
selectedItem isNil ifTrue:[ |
|
1805 |
self valueOfEnableMovingIn value:false. |
|
1806 |
self valueOfEnableMovingOut value:false. |
|
1807 |
self valueOfEnableMovingUpOrDown value:false. |
|
1808 |
self valueOfEnableMovingInAbove value:false. |
|
1809 |
self canCreateDelayedMenuChannel value:false. |
|
1244 | 1810 |
] ifFalse:[ |
1606 | 1811 |
self valueOfEnableMovingUpOrDown value:(selectedItem canMoveUpOrDown). |
1812 |
self valueOfEnableMovingOut value:(selectedItem canMoveOut). |
|
1813 |
self valueOfEnableMovingIn value:(selectedItem canMoveInNext). |
|
1814 |
self valueOfEnableMovingInAbove value:(selectedItem canMoveInAbove). |
|
1815 |
self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu). |
|
902 | 1816 |
]. |
220 | 1817 |
! ! |
1818 |
||
1617 | 1819 |
!MenuEditor methodsFor:'code generation'! |
1820 |
||
1821 |
createActionMethodFor:aSelector in:aClass category:aCategory redefine:redefine |
|
1822 |
|alreadyInSuperclass numArgs method code| |
|
1823 |
||
1824 |
(aClass includesSelector:aSelector) ifTrue:[ |
|
1825 |
^ nil |
|
1826 |
]. |
|
1827 |
||
1828 |
alreadyInSuperclass := aClass superclass canUnderstand:aSelector. |
|
1829 |
||
1830 |
(alreadyInSuperclass and:[redefine not]) ifTrue:[ |
|
1831 |
^ nil |
|
1832 |
]. |
|
1833 |
||
1834 |
numArgs := aSelector numArgs. |
|
1835 |
||
1836 |
numArgs == 1 ifTrue:[ |
|
1837 |
method := aSelector, 'anArgument'. |
|
1838 |
] ifFalse:[ |
|
1839 |
numArgs == 0 ifTrue:[ |
|
1840 |
method := aSelector |
|
1841 |
] ifFalse:[ |
|
1842 |
method := ''. |
|
1843 |
aSelector keywords keysAndValuesDo:[:i :key| |
|
1844 |
method := method, key, 'arg', i printString, ' '. |
|
1845 |
]. |
|
1846 |
] |
|
1847 |
]. |
|
1848 |
||
1849 |
code := '%1 |
|
1850 |
"automatically generated by UIEditor ..." |
|
1851 |
||
1852 |
"*** the code below performs no action" |
|
1853 |
"*** (except for some feedback on the Transcript)" |
|
1854 |
"*** Please change as required and accept in the browser." |
|
1855 |
"*** (and replace this comment by something more useful ;-)" |
|
1856 |
||
1857 |
"action to be added ..." |
|
1858 |
||
1859 |
Transcript showCR:self class name, '': action for #%2 ...''. |
|
1860 |
' bindWith:method with:aSelector. |
|
1861 |
||
1862 |
alreadyInSuperclass ifTrue:[ |
|
1863 |
code := code, (('\ super %1\' bindWith:method) withCRs). |
|
1864 |
]. |
|
1865 |
CodeGeneratorTool compile:code forClass:aClass inCategory:(aCategory ? 'actions'). |
|
1866 |
^ code |
|
1867 |
! |
|
1868 |
||
1869 |
createAspectMethodFor:anAspect in:aClass category:aCategory redefine:redefine |
|
1870 |
|alreadyInSuperclass numArgs method code text| |
|
1871 |
||
1872 |
(aClass includesSelector:anAspect) ifTrue:[ |
|
1873 |
^ nil |
|
1874 |
]. |
|
1875 |
||
1876 |
alreadyInSuperclass := aClass superclass canUnderstand:anAspect. |
|
1877 |
||
1878 |
(alreadyInSuperclass and:[redefine not]) ifTrue:[ |
|
1879 |
^ nil |
|
1880 |
]. |
|
1881 |
||
1882 |
numArgs := anAspect numArgs. |
|
1883 |
||
1884 |
numArgs == 1 ifTrue:[ |
|
1885 |
method := anAspect, 'anArgument'. |
|
1886 |
] ifFalse:[ |
|
1887 |
numArgs == 0 ifTrue:[ |
|
1888 |
method := anAspect |
|
1889 |
] ifFalse:[ |
|
1890 |
method := ''. |
|
1891 |
anAspect keywords keysAndValuesDo:[:i :key| |
|
1892 |
method := method, key, 'arg', i printString, ' '. |
|
1893 |
]. |
|
1894 |
] |
|
1895 |
]. |
|
1896 |
||
1897 |
code := '%1 |
|
1898 |
"automatically generated by UIEditor ..." |
|
1899 |
||
1900 |
"*** the code below creates a default model when invoked" |
|
1901 |
"*** (which may not be the one you wanted)" |
|
1902 |
"*** Please change as required and accept in the browser." |
|
1903 |
"*** (and replace this comment by something more useful ;-)" |
|
1904 |
||
1905 |
"aspect to be added ..." |
|
1906 |
||
1907 |
Transcript showCR:self class name, '': aspect for #%2 ...''. |
|
1908 |
||
1909 |
' bindWith:method with:anAspect. |
|
1910 |
||
1911 |
alreadyInSuperclass ifTrue:[ |
|
1912 |
text := ' ^ super %1\' bindWith:method. |
|
1913 |
] ifFalse:[ |
|
1914 |
text := ' ^ builder valueAspectFor:#''%1'' initialValue:true\' bindWith:anAspect. |
|
1915 |
]. |
|
1916 |
code := code, (text withCRs). |
|
1917 |
CodeGeneratorTool compile:code forClass:aClass inCategory:(aCategory ? 'actions'). |
|
1918 |
^ code |
|
1919 |
! ! |
|
1920 |
||
916 | 1921 |
!MenuEditor methodsFor:'defaults'! |
1922 |
||
1923 |
aboutImage |
|
1924 |
"the image to be displayed in my about-box; |
|
1606 | 1925 |
If nil is returned, the ST/X default image is used. |
1244 | 1926 |
" |
1606 | 1927 |
^ self class aboutImage |
1928 |
! ! |
|
1929 |
||
1930 |
!MenuEditor methodsFor:'drag & drop'! |
|
1931 |
||
1932 |
canDrop:aContext |
|
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1933 |
"return true, if the DropContext can be dropped into the list of items. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1934 |
The dropable objects are already validated by: #dropEnter: |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1935 |
" |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1936 |
^ (dropOverLine notNil and:[dropOverLine ~~ 0]) |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1937 |
! |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1938 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1939 |
changeDropLineTo:aLineOrNil in:aContext |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1940 |
"the over dropLine changed; redraw drop indication stuff |
1244 | 1941 |
" |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1942 |
|x0 x1 y0| |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1943 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1944 |
aLineOrNil == dropOverLine ifTrue:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1945 |
^ self. "/ nothing changed |
1244 | 1946 |
]. |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1947 |
x0 := listOfItemsView margin + 2. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1948 |
x1 := listOfItemsView width - x0. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1949 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1950 |
"/ inform the DragAndDrop handler that the draw contents will change |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1951 |
aContext contentsWillChange. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1952 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1953 |
(dropOverLine notNil and:[dropOverLine ~~ 0]) ifTrue:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1954 |
"/ restore old draw |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1955 |
y0 := listOfItemsView yVisibleOfLine:(dropOverLine + 1). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1956 |
y0 := y0 - 3. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1957 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1958 |
listOfItemsView invalidate:(Rectangle left:x0 top:y0 width:(x1-x0+1) height:2) |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1959 |
repairNow:true. |
1606 | 1960 |
]. |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1961 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1962 |
dropOverLine := aLineOrNil. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1963 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1964 |
(dropOverLine notNil and:[dropOverLine ~~ 0]) ifTrue:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1965 |
"/ highlight new drop target |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1966 |
y0 := listOfItemsView yVisibleOfLine:(dropOverLine + 1). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1967 |
y0 := y0 - 3. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1968 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1969 |
listOfItemsView paint:(Color white). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1970 |
listOfItemsView displayLineFromX:x0 y:y0 toX:x1 y:y0. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1971 |
y0 := y0 + 1. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1972 |
listOfItemsView paint:(Color black). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1973 |
listOfItemsView displayLineFromX:x0 y:y0 toX:x1 y:y0. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1974 |
]. |
1606 | 1975 |
! |
1976 |
||
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1977 |
doDrop:aContext |
1702 | 1978 |
"drop the dropContext into the hierachical list of items |
1244 | 1979 |
" |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1980 |
|done item| |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1981 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1982 |
dropOverLine ifNil:[^ false ]. "/ context not valid to me ... |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1983 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1984 |
item := listOfItems at:dropOverLine ifAbsent:nil. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1985 |
self dropLeave:aContext. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1986 |
item ifNil:[^ false]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1987 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1988 |
selectionHolder setValue:(Array with:item). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1989 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1990 |
done := false. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1991 |
|
1702 | 1992 |
self addAndSelectValueOf:[ |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1993 |
done := true. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1994 |
aContext dropObjects collect:[:el| Item menuItem:(el theObject) ] |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1995 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1996 |
^ done |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1997 |
! |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1998 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
1999 |
dropEnter:aContext |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2000 |
"a drop operation enters my widget; validate dropable objects. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2001 |
If the objects are not dropable, dropOverLine is set to nil, |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2002 |
otherwise to 0 (can drop the contents but not). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2003 |
" |
1606 | 2004 |
|objects| |
2005 |
||
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2006 |
dropOverLine := nil. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2007 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2008 |
self valueOfEnablingCommitButtons value ifTrue:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2009 |
"/ current editing spec is modified (couldn't accept operation) |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2010 |
^ self |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2011 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2012 |
objects := aContext dropObjects. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2013 |
objects isEmpty ifTrue:[ ^ self ]. "/ nothing to drop ??? |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2014 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2015 |
"/ test whether all objects are dropable (kind of MenuItem) |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2016 |
objects do:[:el| |
1633 | 2017 |
(el theObject askFor:#isMenuItem) ifFalse:[ |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2018 |
"/ contains none-dropable objects |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2019 |
^ self |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2020 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2021 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2022 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2023 |
"/ ok, the contents is dropable |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2024 |
dropOverLine := 0. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2025 |
! |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2026 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2027 |
dropLeave:aContext |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2028 |
"the widget is leaved; restore drop indications drawn ... |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2029 |
" |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2030 |
self changeDropLineTo:nil in:aContext. |
879 | 2031 |
! |
2032 |
||
1606 | 2033 |
dropObjects |
2034 |
"returns list of DropObjects |
|
2035 |
" |
|
2036 |
|obj items| |
|
2037 |
||
2038 |
items := self selectedSuperItems. |
|
2039 |
items isEmpty ifTrue:[ ^ nil ]. |
|
2040 |
||
2041 |
^ items collect:[:el| |
|
2042 |
obj := DropObject new:(el menuItem). |
|
2043 |
obj displayObject:(el rawLabel). |
|
2044 |
obj |
|
199 | 2045 |
]. |
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2046 |
! |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2047 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2048 |
dropOver:aContext |
1685 | 2049 |
"called during drag & drop while moving over the widget." |
2050 |
||
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2051 |
|lnNr item| |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2052 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2053 |
dropOverLine ifNil:[^ self ]. "/ context not valid to me ... |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2054 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2055 |
lnNr := listOfItemsView yVisibleToLineNr:(aContext targetPoint y). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2056 |
item := nil. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2057 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2058 |
lnNr ifNotNil:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2059 |
item := listOfItems at:lnNr ifAbsent:nil. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2060 |
item ifNotNil:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2061 |
(item isAction and:[item hasDelayedMenu]) ifTrue:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2062 |
item := nil |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2063 |
] |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2064 |
] |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2065 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2066 |
item ifNil:[ lnNr := 0 ]. "/ not dropable for item |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2067 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2068 |
"/ redraw drop indication |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2069 |
self changeDropLineTo:lnNr in:aContext. |
1606 | 2070 |
! ! |
2071 |
||
2072 |
!MenuEditor methodsFor:'event processing'! |
|
2073 |
||
2074 |
processEvent:anEvent |
|
1895 | 2075 |
"filter keyboard edit-events typed into the listOfItemsView. |
2076 |
Return true, if I have eaten the event" |
|
2077 |
||
1606 | 2078 |
|evView inView rawKey key| |
2079 |
||
1895 | 2080 |
anEvent isKeyPressEvent ifFalse:[ ^ false]. |
1606 | 2081 |
|
2082 |
evView := anEvent targetView. |
|
2083 |
evView ifNil:[ ^ false ]. |
|
2084 |
||
2085 |
inView := evView isSameOrComponentOf:listOfItemsView. |
|
2086 |
inView ifFalse:[^ false]. |
|
2087 |
||
2088 |
key := anEvent key. |
|
2089 |
rawKey := anEvent rawKey. |
|
2090 |
||
2091 |
( key == #Delete |
|
2092 |
or:[key == #BackSpace |
|
2093 |
or:[key == #Cut]] |
|
2094 |
) ifTrue:[ |
|
2095 |
self doCut. |
|
1895 | 2096 |
^ true. |
199 | 2097 |
]. |
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2098 |
|
1606 | 2099 |
key == #Copy ifTrue:[ self doCopy. ^ true ]. |
2100 |
key == #Paste ifTrue:[ self doPaste. ^ true ]. |
|
2101 |
||
1895 | 2102 |
^ false |
1606 | 2103 |
! ! |
2104 |
||
2105 |
!MenuEditor methodsFor:'initialization & release'! |
|
2106 |
||
2107 |
closeRequest |
|
2108 |
"ask for modification |
|
2109 |
" |
|
2110 |
self valueOfEnablingCommitButtons value ifTrue:[ |
|
2111 |
modified := true. |
|
2112 |
self askForListModification. |
|
2113 |
modified ifTrue:[^ self]. |
|
2114 |
self clearModified. |
|
1301 | 2115 |
]. |
1606 | 2116 |
^ super closeRequest |
2117 |
! |
|
199 | 2118 |
|
738 | 2119 |
initialize |
1606 | 2120 |
"setup aspects, ... |
2121 |
" |
|
738 | 2122 |
super initialize. |
1606 | 2123 |
notifyDisabledCounter := 0. |
2124 |
||
2125 |
Item withAllSubclasses do:[:aClass| |
|
2126 |
aClass addBindingsTo:aspects for:self. |
|
2127 |
]. |
|
2128 |
||
2129 |
selectionHolder := #() asValue. |
|
2130 |
selectionHolder addDependent:self. |
|
2131 |
||
2132 |
listOfItems := HierarchicalList new. |
|
2133 |
listOfItems application:self. |
|
1631 | 2134 |
listOfItems root:(RootItem new). |
1606 | 2135 |
|
2136 |
tabHolder := nil asValue. |
|
2137 |
tabHolder addDependent:self. |
|
2138 |
||
2139 |
listOfTabs := List new. |
|
2140 |
wizards := IdentityDictionary new. |
|
738 | 2141 |
! |
2142 |
||
1606 | 2143 |
openModalOnMenu:aMenu |
2144 |
"build a tree from aMenu and open it modal |
|
2145 |
" |
|
2146 |
self openModalOnResourceSpec:aMenu |
|
2147 |
! |
|
2148 |
||
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2149 |
postBuildListOfItemsView:aSrollableView |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2150 |
listOfItemsView := aSrollableView scrolledView. |
1250 | 2151 |
! |
2152 |
||
1676 | 2153 |
postBuildNoteBook:aNoteBook |
2154 |
aNoteBook tabLabelInset:16@4. |
|
2155 |
! |
|
2156 |
||
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2157 |
postBuildWith:aBuilder |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2158 |
super postBuildWith: aBuilder. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2159 |
|
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2160 |
self autoAcceptOnSelectionChange addDependent:self. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2161 |
self autoAcceptOnSelectionChange value ifTrue:[ |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2162 |
(builder componentAt:'okButton') label:(resources string:'Apply') |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2163 |
]. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2164 |
! |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2165 |
|
1250 | 2166 |
postOpenWith:aBuilder |
2167 |
"reset keyboardProcessor for menuBar |
|
2168 |
" |
|
2169 |
super postOpenWith: aBuilder. |
|
2170 |
aBuilder keyboardProcessor menuBar:nil. |
|
1606 | 2171 |
self windowGroup addPreEventHook:self. |
199 | 2172 |
! ! |
2173 |
||
1606 | 2174 |
!MenuEditor methodsFor:'private'! |
2175 |
||
1702 | 2176 |
addAndSelectValueOf:aBlockOrItem |
1606 | 2177 |
"add an item(s) derived from the block; test if add operation |
2178 |
is enabled. On success the new item(s) are returned otherwise nil. |
|
2179 |
" |
|
2180 |
|intoItem index newItem| |
|
2181 |
||
2182 |
intoItem := self selectedItem. |
|
2183 |
intoItem ifNil:[ ^ nil]. |
|
2184 |
||
2185 |
self askForItemModification ifFalse:[ ^ nil ]. |
|
2186 |
||
2187 |
index := 1. |
|
2188 |
||
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2189 |
(intoItem canAddChildren and:[intoItem isExpanded]) ifFalse:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2190 |
[ intoItem parent canAddChildren ] whileFalse:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2191 |
intoItem := intoItem parent. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2192 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2193 |
index := intoItem parent identityIndexOf:intoItem. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2194 |
index := index + 1. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2195 |
intoItem := intoItem parent. |
1606 | 2196 |
]. |
1702 | 2197 |
newItem := aBlockOrItem value. |
1606 | 2198 |
|
2199 |
newItem ifNotNil:[ |
|
1618
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2200 |
selectionHolder setValue:nil. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2201 |
intoItem expand. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2202 |
|
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2203 |
newItem isCollection ifTrue:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2204 |
intoItem addAll:newItem beforeIndex:index. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2205 |
selectionHolder value:newItem. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2206 |
] ifFalse:[ |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2207 |
intoItem add:newItem beforeIndex:index. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2208 |
selectionHolder value:(Array with:newItem). |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2209 |
]. |
9c9b649ce251
support drag & drop inside my widget (highlight the drop target)
ca
parents:
1617
diff
changeset
|
2210 |
modified := true. |
1606 | 2211 |
]. |
2212 |
^ newItem |
|
407 | 2213 |
! |
2214 |
||
1606 | 2215 |
clearModified |
2216 |
"clear the modifiedChannel and the commitPanel |
|
2217 |
" |
|
1244 | 2218 |
self valueOfEnablingCommitButtons value:false. |
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2219 |
self clearModifiedFlag. |
407 | 2220 |
! |
2221 |
||
1606 | 2222 |
generateMenuSpec |
2223 |
"generate and returns the current menu spec or nil |
|
2224 |
" |
|
2225 |
|menu spec| |
|
2226 |
||
2227 |
menu := listOfItems root submenu. |
|
2228 |
menu ifNil:[^ nil]. |
|
2229 |
menu := menu literalArrayEncoding. |
|
2230 |
spec := WriteStream on:String new. |
|
2231 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
2232 |
^ spec contents. |
|
2233 |
! |
|
2234 |
||
2235 |
submenuTest |
|
2236 |
"returns a menu on the current editing menu |
|
2237 |
" |
|
2238 |
|menu indication choice submenu retriever| |
|
2239 |
||
2240 |
menu := listOfItems root submenu. |
|
2241 |
menu ifNil:[^ nil ]. |
|
2242 |
||
2243 |
menu allItemsDo:[:anItem| |
|
2244 |
anItem isVisible:true. |
|
2245 |
anItem enabled:true. |
|
2246 |
anItem translateLabel:false. |
|
2247 |
||
1629 | 2248 |
anItem itemValue notNil ifTrue:[ |
2249 |
anItem itemValue:[ Transcript showCR:(anItem label) ]. |
|
1606 | 2250 |
]. |
1629 | 2251 |
anItem indication notNil ifTrue:[ |
2252 |
indication isNil ifTrue:[ indication := true asValue ]. |
|
1606 | 2253 |
anItem indication:indication |
2254 |
]. |
|
1629 | 2255 |
anItem choice notNil ifTrue:[ |
2256 |
choice isNil ifTrue:[ choice := anItem choiceValue asValue ]. |
|
1606 | 2257 |
anItem choice:choice |
2258 |
]. |
|
1844 | 2259 |
anItem isMenuSlice ifTrue:[ |
2260 |
anItem submenuChannel:nil. |
|
2261 |
anItem label:'... Slice Menu ...'. |
|
2262 |
]. |
|
1629 | 2263 |
anItem submenuChannel notNil ifTrue:[ |
1606 | 2264 |
anItem submenuChannel:nil. |
1629 | 2265 |
anItem submenu isNil ifTrue:[ |
2266 |
submenu isNil ifTrue:[ |
|
1606 | 2267 |
submenu := Menu new. |
2268 |
submenu addItem:(MenuItem labeled:'Linked Menu...'). |
|
2269 |
]. |
|
2270 |
anItem submenu:submenu. |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2271 |
]. |
1606 | 2272 |
]. |
2273 |
retriever := anItem resourceRetriever. |
|
1629 | 2274 |
retriever notNil ifTrue:[ |
2275 |
retriever labelText notNil ifTrue:[ retriever labelText:(anItem label) ] |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2276 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2277 |
]. |
1606 | 2278 |
menu findGuiResourcesIn:(self resolveName:specClass). |
2279 |
^ menu |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2280 |
! |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2281 |
|
1606 | 2282 |
withoutNotifyDo:aBlock |
2283 |
"evaluate the block; all change notifications are |
|
1722
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2284 |
discard during the block is evaluated" |
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2285 |
|
1606 | 2286 |
|blockResult| |
2287 |
||
1722
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2288 |
[ |
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2289 |
notifyDisabledCounter := notifyDisabledCounter + 1. |
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2290 |
blockResult := aBlock value. |
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2291 |
] ensure:[ |
517efee14b0d
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
1715
diff
changeset
|
2292 |
notifyDisabledCounter := notifyDisabledCounter - 1 |
1606 | 2293 |
]. |
2294 |
^ blockResult |
|
2295 |
! ! |
|
2296 |
||
2297 |
!MenuEditor methodsFor:'queries'! |
|
2298 |
||
2299 |
hasValidSpecClass |
|
2300 |
"returns true if a valid specClass exists |
|
2301 |
" |
|
2302 |
|cls| |
|
2303 |
||
2304 |
specClass ifNil:[^ false]. |
|
2305 |
cls := self resolveName:specClass. |
|
2306 |
^ cls notNil |
|
2307 |
! ! |
|
2308 |
||
2309 |
!MenuEditor methodsFor:'selection'! |
|
2310 |
||
2311 |
canSelect:anIndex |
|
2312 |
"called whenever the selection changed; test whether |
|
2313 |
current item is not modified .... |
|
2314 |
" |
|
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2315 |
|oldSelectedItem newSelectedItem anythingChanged| |
1606 | 2316 |
|
2317 |
self valueOfEnablingCommitButtons value ifFalse:[ |
|
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2318 |
^ true |
1606 | 2319 |
]. |
2320 |
oldSelectedItem := self selectedItem. |
|
2321 |
oldSelectedItem ifNil:[^ true]. |
|
2322 |
||
2323 |
newSelectedItem := listOfItems at:anIndex ifAbsent:nil. |
|
2324 |
oldSelectedItem == newSelectedItem ifTrue:[ |
|
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2325 |
^ true |
1606 | 2326 |
]. |
1711
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2327 |
|
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2328 |
anythingChanged := self valueOfEnablingCommitButtons value. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2329 |
anythingChanged ifTrue:[ |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2330 |
self autoAcceptOnSelectionChange value ifTrue:[ |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2331 |
self accept. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2332 |
^ true |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2333 |
]. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2334 |
]. |
548d690e780f
auto-accept on selection change
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
2335 |
|
1606 | 2336 |
^ self askForItemModification |
879 | 2337 |
! |
2338 |
||
1610
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
2339 |
hasSelection |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
2340 |
"returns true if a selection exists |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
2341 |
" |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
2342 |
^ selectionHolder value size ~~ 0 |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
2343 |
! |
cb3e093aa6d5
if after collapse no selection exists, use the collapsed element
ca
parents:
1609
diff
changeset
|
2344 |
|
1606 | 2345 |
selectedItem |
2346 |
"returns the selected item or nil (none or multiple selected) |
|
2347 |
" |
|
2348 |
|selection| |
|
2349 |
||
2350 |
selection := selectionHolder value. |
|
2351 |
selection size == 1 ifTrue:[ ^ selection first ]. |
|
2352 |
^ nil |
|
2353 |
! |
|
2354 |
||
2355 |
selectedItem:anItem |
|
2356 |
"change selection to an item |
|
2357 |
" |
|
2358 |
|selection| |
|
2359 |
||
2360 |
anItem notNil ifTrue:[ selection := Array with:anItem ] |
|
2361 |
ifFalse:[ selection := #() ]. |
|
2362 |
||
2363 |
selectionHolder value:selection. |
|
2364 |
! ! |
|
2365 |
||
1715 | 2366 |
!MenuEditor methodsFor:'user actions-aspects'! |
1614 | 2367 |
|
2368 |
collectActionSelectors |
|
2369 |
|selectors| |
|
2370 |
||
2371 |
selectors := IdentitySet new. |
|
2372 |
||
2373 |
listOfItems root recursiveDo:[:el| |
|
2374 |
el actionSelectors do:[:s| selectors add:s ]. |
|
2375 |
]. |
|
2376 |
^ selectors asOrderedCollection |
|
2377 |
! |
|
2378 |
||
2379 |
collectAspectSelectors |
|
2380 |
|selectors| |
|
2381 |
||
2382 |
selectors := IdentitySet new. |
|
2383 |
||
2384 |
listOfItems root recursiveDo:[:el| |
|
2385 |
el aspectSelectors do:[:s| selectors add:s ]. |
|
2386 |
]. |
|
2387 |
^ selectors asOrderedCollection |
|
2388 |
! |
|
2389 |
||
2390 |
doGenerateAspectMethods |
|
1805
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2391 |
"compile aspect and action methods" |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2392 |
|
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2393 |
|cls redefineAspectMethods category| |
1614 | 2394 |
|
2395 |
specClass ifNil:[ |
|
2396 |
self warn:'Define the class first !!'. |
|
1805
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2397 |
^ self |
1614 | 2398 |
]. |
1617 | 2399 |
redefineAspectMethods := self redefineAspectMethodsChannel value. |
1614 | 2400 |
|
2401 |
cls := self resolveName:specClass. |
|
2402 |
cls ifNil:[ |
|
2403 |
self warn:'Class ', specClass asString, ' does not exist!!'. |
|
1805
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2404 |
^ self |
1614 | 2405 |
]. |
1617 | 2406 |
|
1805
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2407 |
category := UserPreferences current categoryForMenuActionsMethods. |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2408 |
|
1617 | 2409 |
self collectActionSelectors do:[:aSelector| |
1805
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2410 |
self |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2411 |
createActionMethodFor:aSelector in:cls |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2412 |
category:category |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2413 |
redefine:redefineAspectMethods. |
1614 | 2414 |
]. |
1617 | 2415 |
|
2416 |
self collectAspectSelectors do:[:anAspect| |
|
1805
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2417 |
self |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2418 |
createAspectMethodFor:anAspect in:cls |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2419 |
category:category |
cf1a9d636bf7
category and comment flags now in Userprefs
Claus Gittinger <cg@exept.de>
parents:
1788
diff
changeset
|
2420 |
redefine:redefineAspectMethods |
1614 | 2421 |
]. |
2422 |
! ! |
|
2423 |
||
1715 | 2424 |
!MenuEditor methodsFor:'user actions-building'! |
1606 | 2425 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2426 |
doNew |
1606 | 2427 |
"clear editing menu; start from scratch |
2428 |
" |
|
2429 |
super doNew ifTrue:[ self helpTool doNew ]. |
|
199 | 2430 |
! |
2431 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2432 |
doPickAMenu |
1606 | 2433 |
"pick a menu from user |
2434 |
" |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2435 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2436 |
|
1244 | 2437 |
self askForModification ifTrue:[ |
1606 | 2438 |
( (view := Screen current viewFromUser) isNil |
2439 |
or:[view == Screen current rootView] |
|
2440 |
) ifTrue:[ |
|
1244 | 2441 |
^ self |
2442 |
]. |
|
2443 |
view specClass == MenuPanelSpec ifTrue:[ |
|
1606 | 2444 |
specSelector := #pickedMenu. |
2445 |
^ self buildFromMenu:(view asMenu) selector:specSelector. |
|
1244 | 2446 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2447 |
]. |
888 | 2448 |
! |
2449 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2450 |
doSave |
1606 | 2451 |
"save current editing menu to |
2452 |
class: specClass |
|
2453 |
selector: specSelector |
|
2454 |
" |
|
2455 |
|cls spec mthd category code excla| |
|
199 | 2456 |
|
642 | 2457 |
super doSave ifFalse: [^nil]. |
1606 | 2458 |
spec := self generateMenuSpec. |
2459 |
spec ifNil:[^ nil]. |
|
2460 |
||
2461 |
cls := self resolveName:specClass. |
|
199 | 2462 |
|
2463 |
"/ if that method already exists, do not overwrite the category |
|
2464 |
||
576 | 2465 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2466 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 2467 |
category := mthd category. |
2468 |
]. |
|
2469 |
||
764 | 2470 |
excla := Character excla asString. |
2471 |
||
2472 |
code := excla |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2473 |
, (cls name , ' class methodsFor:' , category storeString) |
764 | 2474 |
, excla , '\\' |
199 | 2475 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2476 |
, specSelector , '\' |
738 | 2477 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
2478 |
, '\\ "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2479 |
, (' 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
|
2480 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 2481 |
, ' "\'. |
2482 |
||
2483 |
code := code |
|
2484 |
, '\' |
|
2485 |
, ' <resource: #menu>\\' |
|
1083 | 2486 |
, ' ^ ' , spec |
199 | 2487 |
, '\' |
764 | 2488 |
, (excla , ' ' , excla) |
199 | 2489 |
, '\\'. |
2490 |
||
2491 |
code := code withCRs. |
|
2492 |
(ReadStream on:code) fileIn. |
|
2493 |
||
1669 | 2494 |
self isStandAlone ifTrue:[ |
2495 |
self helpTool doSave |
|
2496 |
]. |
|
699 | 2497 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2498 |
self updateHistory. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2499 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2500 |
modified := false. |
199 | 2501 |
! |
2502 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2503 |
doSaveAs |
1606 | 2504 |
"save current editing menu to class and selector |
2505 |
defined by the user. |
|
2506 |
" |
|
2507 |
super doSaveAs ifTrue:[ |
|
2508 |
listOfItems root rawLabel:specSelector |
|
2509 |
]. |
|
2510 |
! |
|
2511 |
||
2512 |
doShowMenuSpec |
|
2513 |
"opens a code view with the contents of the menu spec |
|
2514 |
" |
|
2515 |
|spec| |
|
2516 |
||
2517 |
spec := self generateMenuSpec. |
|
2518 |
||
2519 |
spec ifNotNil:[ |
|
2520 |
CodeView openWith:spec title: 'Menu Spec' |
|
2521 |
]. |
|
2522 |
! ! |
|
2523 |
||
1715 | 2524 |
!MenuEditor methodsFor:'user actions-creation'! |
1606 | 2525 |
|
2526 |
doCreateDelayedMenu:what |
|
2527 |
|selectedItem delayedItem| |
|
2528 |
||
2529 |
selectedItem := self selectedItem. |
|
2530 |
selectedItem ifNil:[^ self]. |
|
2531 |
||
2532 |
selectedItem canAddDelayedMenu ifFalse:[ ^ self ]. |
|
2533 |
self askForItemModification ifFalse:[ ^ self ]. |
|
2534 |
||
1633 | 2535 |
what == #menu ifTrue:[ delayedItem := RegularMenuItem new ] |
1631 | 2536 |
ifFalse:[ delayedItem := LinkedMenuItem new ]. |
1606 | 2537 |
|
2538 |
delayedItem setExpanded:true. |
|
2539 |
delayedItem := selectedItem add:delayedItem. |
|
2540 |
||
2541 |
delayedItem ifNotNil:[ |
|
2542 |
self selectedItem:delayedItem. |
|
2543 |
]. |
|
2544 |
! |
|
2545 |
||
2546 |
doCreateItem |
|
2547 |
"create a new Item |
|
2548 |
" |
|
1702 | 2549 |
self addAndSelectValueOf:[ ActionItem new translateLabel:true ]. |
1606 | 2550 |
! |
2551 |
||
2552 |
doCreateLinkedMenu |
|
2553 |
"create a new Linked Menu |
|
2554 |
" |
|
1702 | 2555 |
self addAndSelectValueOf:[ LinkedMenuItem new ]. |
1606 | 2556 |
! |
2557 |
||
2558 |
doCreateMenu |
|
2559 |
"create a new Menu |
|
2560 |
" |
|
1702 | 2561 |
self addAndSelectValueOf: |
2562 |
[ |item| |
|
2563 |
item := RegularMenuItem new. |
|
2564 |
item expand. |
|
2565 |
item |
|
2566 |
]. |
|
1606 | 2567 |
! |
2568 |
||
1844 | 2569 |
doCreateMenuSliceItem |
2570 |
"create a new MenuSlice Item |
|
2571 |
" |
|
2572 |
self addAndSelectValueOf:[ MenuSliceItem new ]. |
|
2573 |
! |
|
2574 |
||
1606 | 2575 |
doCreateSep |
2576 |
"create a new Separator Item |
|
2577 |
" |
|
1702 | 2578 |
self addAndSelectValueOf:[ SeparatorItem new ]. |
1606 | 2579 |
! |
2580 |
||
2581 |
doCreateStandardEditMenu |
|
2582 |
"create a standart edit menu |
|
2583 |
" |
|
1702 | 2584 |
self addAndSelectValueOf:[ |
1633 | 2585 |
RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true |
1606 | 2586 |
]. |
218 | 2587 |
! |
199 | 2588 |
|
1606 | 2589 |
doCreateStandardFileMenu |
2590 |
"create a standart file menu |
|
2591 |
" |
|
1702 | 2592 |
self addAndSelectValueOf:[ |
1633 | 2593 |
RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true |
1606 | 2594 |
]. |
2595 |
! |
|
2596 |
||
2597 |
doCreateStandardHelpMenu |
|
2598 |
"create a standart help menu |
|
2599 |
" |
|
2600 |
|item| |
|
2601 |
||
1702 | 2602 |
self addAndSelectValueOf:[ |
1633 | 2603 |
item := RegularMenuItem menu:(self class standardHelpMenu) labeled:'Help' translateLabel:true. |
1631 | 2604 |
item aspectAt:#startGroup put:#right. |
2605 |
item |
|
1606 | 2606 |
]. |
2607 |
! ! |
|
2608 |
||
1715 | 2609 |
!MenuEditor methodsFor:'user actions-editing'! |
1606 | 2610 |
|
2611 |
doCopy |
|
2612 |
"copy selected menuItems to the clipboard |
|
2613 |
" |
|
2614 |
|clip items| |
|
2615 |
||
2616 |
items := self selectedSuperItems. |
|
2617 |
items isEmpty ifTrue:[ ^ self ]. |
|
2618 |
||
2619 |
clip := OrderedCollection new. |
|
2620 |
items do:[:el| clip add:(el menuItem) ]. |
|
2621 |
||
2622 |
self clipboard:clip. |
|
2623 |
self updateAllToolInstances. |
|
2624 |
! |
|
2625 |
||
2626 |
doCut |
|
2627 |
"copy selected menuItems to the clipboard and delete |
|
2628 |
" |
|
2629 |
self doCopy. |
|
2630 |
self doDelete. |
|
2631 |
! |
|
2632 |
||
2633 |
doDelete |
|
2634 |
"delete selected menuItems |
|
2635 |
" |
|
2636 |
|selectedItem parent toDelete behind nextItem prevItem| |
|
2637 |
||
2638 |
toDelete := self selectedSuperItems. |
|
2639 |
toDelete isEmpty ifTrue:[ ^ self ]. |
|
2640 |
||
2641 |
self clearModified. |
|
2642 |
||
2643 |
selectedItem := toDelete first. |
|
2644 |
||
2645 |
selectedItem isRootItem ifTrue:[ |
|
2646 |
^ selectedItem removeAll. |
|
2647 |
]. |
|
2648 |
"/ compute the new selection |
|
2649 |
||
2650 |
prevItem := parent := selectedItem parent. |
|
2651 |
nextItem := nil. |
|
2652 |
||
2653 |
parent children size ~~ 1 ifTrue:[ |
|
2654 |
behind := false. |
|
2655 |
||
2656 |
parent do:[:el| |
|
2657 |
behind ifTrue:[ |
|
2658 |
(nextItem notNil or:[toDelete includesIdentical:el]) ifFalse:[ nextItem := el ]. |
|
2659 |
] ifFalse:[ |
|
2660 |
behind := el == selectedItem. |
|
2661 |
(behind or:[toDelete includesIdentical:el]) ifFalse:[ prevItem := el ]. |
|
2662 |
] |
|
2663 |
] |
|
2664 |
]. |
|
2665 |
self withoutNotifyDo:[ |
|
2666 |
toDelete do:[:el| el remove ]. |
|
2667 |
]. |
|
2668 |
self selectedItem:(nextItem ? prevItem). |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2669 |
modified := true. |
1606 | 2670 |
self updateChannels. |
2671 |
! |
|
2672 |
||
2673 |
doPaste |
|
2674 |
"paste from clipboard |
|
2675 |
" |
|
2676 |
^ self doPaste:(self clipboard) |
|
218 | 2677 |
! |
2678 |
||
1606 | 2679 |
doPaste:aCollection |
2680 |
"paste collection of MenuItems |
|
2681 |
" |
|
2682 |
|item loMenuItems| |
|
2683 |
||
2684 |
aCollection size == 0 ifTrue:[ ^ self ]. |
|
2685 |
||
2686 |
item := self selectedItem. |
|
2687 |
item ifNil:[ ^ self ]. |
|
2688 |
||
2689 |
loMenuItems := OrderedCollection new. |
|
2690 |
aCollection do:[:el| |
|
1633 | 2691 |
(el askFor:#isMenuItem) ifTrue:[ loMenuItems add:el ]. |
1606 | 2692 |
]. |
2693 |
loMenuItems isEmpty ifTrue:[ ^ self ]. |
|
2694 |
||
1702 | 2695 |
self addAndSelectValueOf:[ |
1633 | 2696 |
loMenuItems collect:[:el| Item menuItem:el ] |
1606 | 2697 |
]. |
2698 |
! ! |
|
2699 |
||
1715 | 2700 |
!MenuEditor methodsFor:'user actions-hierarchy'! |
1606 | 2701 |
|
2702 |
doMoveIn:aDirection |
|
2703 |
"move selected item into the next (#inNext) or previous (#inPrev) item |
|
2704 |
" |
|
2705 |
|item idx parent toParent| |
|
2706 |
||
2707 |
item := self selectedItem. |
|
2708 |
item ifNil:[^ self]. |
|
2709 |
||
2710 |
aDirection == #inNext ifTrue:[ item canMoveInNext ifFalse:[^ self] ] |
|
2711 |
ifFalse:[ item canMoveInAbove ifFalse:[^ self] ]. |
|
2712 |
||
2713 |
self askForItemModification ifFalse:[ ^ self ]. |
|
2714 |
||
2715 |
parent := item parent. |
|
2716 |
idx := parent identityIndexOf:item. |
|
2717 |
||
2718 |
aDirection == #inNext ifTrue:[ toParent := parent at:(idx + 1) ifAbsent:nil ] |
|
2719 |
ifFalse:[ toParent := parent at:(idx - 1) ifAbsent:nil ]. |
|
2720 |
||
2721 |
self withoutNotifyDo:[ |
|
2722 |
selectionHolder setValue:#(). |
|
2723 |
parent removeIndex:idx. |
|
2724 |
||
2725 |
aDirection == #inNext ifTrue:[ toParent addFirst:item ] |
|
2726 |
ifFalse:[ toParent addLast:item ]. |
|
2727 |
item makeVisible. |
|
2728 |
]. |
|
2729 |
self selectedItem:item. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2730 |
modified := true. |
1468 | 2731 |
! |
2732 |
||
1606 | 2733 |
doMoveOut |
2734 |
"move selected item out of current item |
|
2735 |
" |
|
2736 |
|item parent grandParent index| |
|
2737 |
||
2738 |
item := self selectedItem. |
|
2739 |
item ifNil:[^ self]. |
|
2740 |
item canMoveOut ifFalse:[^ self]. |
|
2741 |
||
2742 |
self askForItemModification ifFalse:[ ^ self ]. |
|
2743 |
||
2744 |
parent := item parent. |
|
2745 |
grandParent := parent parent. |
|
2746 |
index := grandParent identityIndexOf:parent. |
|
2747 |
||
2748 |
self withoutNotifyDo:[ |
|
2749 |
selectionHolder setValue:#(). |
|
2750 |
parent remove:item. |
|
2751 |
index > grandParent size ifTrue:[ grandParent add:item ] |
|
2752 |
ifFalse:[ grandParent add:item afterIndex:index ] |
|
2753 |
]. |
|
2754 |
self selectedItem:item. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2755 |
modified := true. |
218 | 2756 |
! |
2757 |
||
1606 | 2758 |
doMoveUpOrDown:aDirection |
2759 |
"move selected item up (#up) or down (#down) |
|
2760 |
" |
|
2761 |
|item index parent children| |
|
2762 |
||
2763 |
item := self selectedItem. |
|
2764 |
item ifNil:[^ self]. |
|
2765 |
item canMoveUpOrDown ifFalse:[^ self]. |
|
2766 |
||
2767 |
self askForItemModification ifFalse:[ ^ self ]. |
|
2768 |
||
2769 |
self withoutNotifyDo:[ |
|
2770 |
parent := item parent. |
|
2771 |
children := parent children. |
|
2772 |
index := children identityIndexOf:item. |
|
2773 |
||
2774 |
selectionHolder setValue:#(). |
|
2775 |
children removeIndex:index. |
|
2776 |
||
2777 |
aDirection == #up ifTrue:[ |
|
2778 |
index == 1 ifTrue:[ children add:item ] |
|
2779 |
ifFalse:[ children add:item beforeIndex:index - 1 ] |
|
2780 |
] ifFalse:[ |
|
2781 |
index > children size ifTrue:[ children addFirst:item ] |
|
2782 |
ifFalse:[ children add:item afterIndex:index ] |
|
2783 |
]. |
|
2784 |
parent childrenOrderChanged. |
|
2785 |
]. |
|
2786 |
self selectedItem:item. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2787 |
modified := true. |
199 | 2788 |
! ! |
2789 |
||
1606 | 2790 |
!MenuEditor::Item class methodsFor:'defaults'! |
2791 |
||
2792 |
defaultLabel |
|
2793 |
^ self subclassResponsibility |
|
2794 |
! ! |
|
2795 |
||
2796 |
!MenuEditor::Item class methodsFor:'image specs'! |
|
2797 |
||
2798 |
iconDelayedLinkedMenu |
|
2799 |
"This resource specification was automatically generated |
|
2800 |
by the ImageEditor of ST/X." |
|
2801 |
||
2802 |
"Do not manually edit this!! If it is corrupted, |
|
2803 |
the ImageEditor may not be able to read the specification." |
|
2804 |
||
2805 |
" |
|
2806 |
self iconDelayedLinkedMenu inspect |
|
2807 |
ImageEditor openOnClass:self andSelector:#iconDelayedLinkedMenu |
|
2808 |
Icon flushCachedIcons |
|
2809 |
" |
|
2810 |
||
2811 |
<resource: #image> |
|
2812 |
||
2813 |
^Icon |
|
2814 |
constantNamed:#'MenuEditor::Item class iconDelayedLinkedMenu' |
|
2815 |
ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
2816 |
@@@@@@@@@@@@@@DQDQDQDQDQDR@AH"H"H"H"H"H0@@@BH"H"@@@BL@QDPBH"H"@@H#@DQDPBH@H"@"H0ADQDPBA@H"H"L@@@QDP@Q@@@@@@ADPQDQDQ@DQD |
|
2817 |
@RH QDQDQ@H"L@D"H QDQD@"H#@A@@@@@DP@@@@0@QDQDQA@DQDQL@D"H"H @"H"H#@BL3L3L3L3L3L0@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127 255 0 0]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself] |
|
2818 |
! |
|
2819 |
||
2820 |
iconDelayedMenu |
|
2821 |
"This resource specification was automatically generated |
|
2822 |
by the ImageEditor of ST/X." |
|
2823 |
||
2824 |
"Do not manually edit this!! If it is corrupted, |
|
2825 |
the ImageEditor may not be able to read the specification." |
|
2826 |
||
2827 |
" |
|
2828 |
self iconDelayedMenu inspect |
|
2829 |
ImageEditor openOnClass:self andSelector:#iconDelayedMenu |
|
2830 |
Icon flushCachedIcons |
|
2831 |
" |
|
2832 |
||
2833 |
<resource: #image> |
|
2834 |
||
2835 |
^Icon |
|
2836 |
constantNamed:#'MenuEditor::Item class iconDelayedMenu' |
|
2837 |
ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@UUUUUVA*****,F***@B0Z***@+A****J,F*****0@@@@@@AUUUUUXF*****0Z****+A@@@@@LEUUUUU0Z****+B?????<@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself] |
|
2838 |
! |
|
2839 |
||
2840 |
iconItem |
|
2841 |
"This resource specification was automatically generated |
|
2842 |
by the ImageEditor of ST/X." |
|
2843 |
||
2844 |
"Do not manually edit this!! If it is corrupted, |
|
2845 |
the ImageEditor may not be able to read the specification." |
|
2846 |
||
2847 |
" |
|
2848 |
self iconItem inspect |
|
2849 |
ImageEditor openOnClass:self andSelector:#iconItem |
|
2850 |
Icon flushCachedIcons |
|
2851 |
" |
|
2852 |
||
2853 |
<resource: #image> |
|
2854 |
||
2855 |
^Icon |
|
2856 |
constantNamed:#'MenuEditor::Item class iconItem' |
|
2857 |
ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUUUUUUUP@@@@@@EUUUUU Z****+A.?/;+,F:::/>0[++>:;A...++,F::?..0Z****+B?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself] |
|
2858 |
! |
|
2859 |
||
2860 |
iconLinkedMenu |
|
2861 |
"This resource specification was automatically generated |
|
2862 |
by the ImageEditor of ST/X." |
|
2863 |
||
2864 |
"Do not manually edit this!! If it is corrupted, |
|
2865 |
the ImageEditor may not be able to read the specification." |
|
2866 |
||
2867 |
" |
|
2868 |
self iconLinkedMenu inspect |
|
2869 |
ImageEditor openOnClass:self andSelector:#iconLinkedMenu |
|
2870 |
Icon flushCachedIcons |
|
2871 |
" |
|
2872 |
||
2873 |
<resource: #image> |
|
2874 |
||
2875 |
^Icon |
|
2876 |
constantNamed:#'MenuEditor::Item class iconLinkedMenu' |
|
2877 |
ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
2878 |
@@@@@@@@@@@@@@QDQDQDQDQDQA@DH"H"H"H"H"HPABH@@@H"H"H"D@PQ@3L0DQDQDQ@D@@L3L0@@@@@PADPCL3L0PCADD@P"@@@3L0@3@!!@DH"H"@3L3L3@P |
|
2879 |
AADQDQ@3L3L3@@P@@@@@@3L3LA@DQDQDQD@@L0PPABH"H"H"HC@"D@P"H"H"H"@BH!!@BDQDQDQDQDQDP@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 0 0 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself] |
|
2880 |
! |
|
2881 |
||
2882 |
iconMenu |
|
2883 |
"This resource specification was automatically generated |
|
2884 |
by the ImageEditor of ST/X." |
|
2885 |
||
2886 |
"Do not manually edit this!! If it is corrupted, |
|
2887 |
the ImageEditor may not be able to read the specification." |
|
2888 |
||
2889 |
" |
|
2890 |
self iconMenu inspect |
|
2891 |
ImageEditor openOnClass:self andSelector:#iconMenu |
|
2892 |
Icon flushCachedIcons |
|
2893 |
" |
|
2894 |
||
2895 |
<resource: #image> |
|
2896 |
||
2897 |
^Icon |
|
2898 |
constantNamed:#'MenuEditor::Item class iconMenu' |
|
2899 |
ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@?????=C*****$N*****P5UUUUUC@@@@@DO?????P:****)C*****$MUUUUUP0@@@@AC?????4N*****P:****)BUUUUUT@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself] |
|
2900 |
! |
|
2901 |
||
2902 |
iconSeparator |
|
2903 |
"This resource specification was automatically generated |
|
2904 |
by the ImageEditor of ST/X." |
|
2905 |
||
2906 |
"Do not manually edit this!! If it is corrupted, |
|
2907 |
the ImageEditor may not be able to read the specification." |
|
2908 |
||
2909 |
" |
|
2910 |
self iconSeparator inspect |
|
2911 |
ImageEditor openOnClass:self andSelector:#iconSeparator |
|
2912 |
Icon flushCachedIcons |
|
2913 |
" |
|
2914 |
||
2915 |
<resource: #image> |
|
2916 |
||
2917 |
^Icon |
|
2918 |
constantNamed:#'MenuEditor::Item class iconSeparator' |
|
2919 |
ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUUUUUUUP@@@@@@EUUUUU Z****+A*****,F????:0[@@@@[A)UUUU,F*****0Z****+B?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself] |
|
1844 | 2920 |
! |
2921 |
||
2922 |
iconSliceMenu |
|
2923 |
"This resource specification was automatically generated |
|
2924 |
by the ImageEditor of ST/X." |
|
2925 |
||
2926 |
"Do not manually edit this!! If it is corrupted, |
|
2927 |
the ImageEditor may not be able to read the specification." |
|
2928 |
||
2929 |
" |
|
2930 |
self iconSliceMenu inspect |
|
2931 |
ImageEditor openOnClass:self andSelector:#iconSliceMenu |
|
2932 |
Icon flushCachedIcons |
|
2933 |
" |
|
2934 |
||
2935 |
<resource: #image> |
|
2936 |
||
2937 |
^Icon |
|
2938 |
constantNamed:#'MenuEditor::Item class iconSliceMenu' |
|
2939 |
ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@O?????0:*****C/?6??XN:*[*) ;*).*&C.*&:*XN5U[UU :*****C*****(@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself] |
|
1606 | 2940 |
! ! |
2941 |
||
2942 |
!MenuEditor::Item class methodsFor:'instance creation'! |
|
2943 |
||
2944 |
classFor:aMenuItem |
|
2945 |
||
1631 | 2946 |
aMenuItem isNil ifTrue:[ ^ nil ]. |
2947 |
||
2948 |
aMenuItem itemValue isNil ifTrue:[ |
|
1844 | 2949 |
aMenuItem isMenuSlice ifTrue:[ ^ MenuEditor::MenuSliceItem ]. |
2950 |
aMenuItem submenu notNil ifTrue:[ ^ MenuEditor::RegularMenuItem ]. |
|
1631 | 2951 |
aMenuItem submenuChannel notNil ifTrue:[ ^ MenuEditor::LinkedMenuItem ]. |
2952 |
||
2953 |
(self separatorTypeOf:(aMenuItem rawLabel)) notNil ifTrue:[ |
|
2954 |
^ MenuEditor::SeparatorItem |
|
2955 |
] |
|
1606 | 2956 |
]. |
1631 | 2957 |
^ MenuEditor::ActionItem |
1454 | 2958 |
! |
2959 |
||
1606 | 2960 |
menuItem:aMenuItem |
2961 |
|item cls| |
|
2962 |
||
2963 |
cls := self classFor:aMenuItem. |
|
2964 |
cls ifNil:[^ nil]. |
|
2965 |
||
2966 |
item := cls new. |
|
2967 |
item menuItem:aMenuItem. |
|
2968 |
^ item |
|
2969 |
! ! |
|
2970 |
||
1668 | 2971 |
!MenuEditor::Item class methodsFor:'interface specs'! |
1606 | 2972 |
|
2973 |
detailsEditSpec |
|
2974 |
"This resource specification was automatically generated |
|
2975 |
by the UIPainter of ST/X." |
|
2976 |
||
2977 |
"Do not manually edit this!! If it is corrupted, |
|
2978 |
the UIPainter may not be able to read the specification." |
|
2979 |
||
2980 |
" |
|
2981 |
UIPainter new openOnClass:MenuEditor::Item andSelector:#detailsEditSpec |
|
2982 |
" |
|
2983 |
||
2984 |
<resource: #canvas> |
|
2985 |
||
2986 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2987 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2988 |
name: detailsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2989 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2990 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2991 |
label: 'Details Edit' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2992 |
name: 'Details Edit' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2993 |
min: (Point 10 10) |
1810 | 2994 |
bounds: (Rectangle 0 0 407 291) |
1636 | 2995 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2996 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2997 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2998 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
2999 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3000 |
label: 'Accelerator:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3001 |
name: 'shortcutKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3002 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3003 |
activeHelpKey: detailsAccelerator |
1810 | 3004 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3005 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3006 |
adjust: right |
1636 | 3007 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3008 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3009 |
name: 'shortcutKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3010 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3011 |
activeHelpKey: detailsAccelerator |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3012 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3013 |
model: shortcutKeyCharacter |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3014 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3015 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3016 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3017 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3018 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3019 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3020 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3021 |
acceptOnPointerLeave: false |
1636 | 3022 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3023 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3024 |
label: 'Enabled:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3025 |
name: 'enabledLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3026 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3027 |
activeHelpKey: detailsEnabled |
1810 | 3028 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3029 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3030 |
adjust: right |
1636 | 3031 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3032 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3033 |
name: 'enabledField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3034 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3035 |
activeHelpKey: detailsEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3036 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3037 |
model: enabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3038 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3039 |
type: symbolOrBooleanOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3040 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3041 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3042 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3043 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3044 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3045 |
acceptOnPointerLeave: false |
1636 | 3046 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3047 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3048 |
label: 'Visibility:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3049 |
name: 'visibilityLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3050 |
layout: (AlignmentOrigin 107 0 76 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3051 |
activeHelpKey: detailsVisibility |
1810 | 3052 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3053 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3054 |
adjust: right |
1636 | 3055 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3056 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3057 |
name: 'isVisibleInputField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3058 |
layout: (LayoutFrame 110 0 65 0 -5 1.0 87 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3059 |
activeHelpKey: detailsVisibility |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3060 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3061 |
model: isVisible |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3062 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3063 |
type: symbolOrBooleanOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3064 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3065 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3066 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3067 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3068 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3069 |
acceptOnPointerLeave: false |
1636 | 3070 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3071 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3072 |
label: 'Aux Value' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3073 |
name: 'auxLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3074 |
layout: (AlignmentOrigin 107 0 101 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3075 |
activeHelpKey: detailsAuxValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3076 |
translateLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3077 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3078 |
adjust: right |
1636 | 3079 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3080 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3081 |
name: 'auxInputField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3082 |
layout: (LayoutFrame 110 0 90 0 -5 1.0 112 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3083 |
activeHelpKey: detailsAuxValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3084 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3085 |
model: auxValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3086 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3087 |
type: smalltalkObject |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3088 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3089 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3090 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3091 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3092 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3093 |
acceptOnPointerLeave: false |
1636 | 3094 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3095 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3096 |
label: 'Start Group:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3097 |
name: 'StartGroupLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3098 |
layout: (AlignmentOrigin 107 0 139 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3099 |
activeHelpKey: detailsStartGroup |
1810 | 3100 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3101 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3102 |
adjust: right |
1636 | 3103 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3104 |
(PopUpListSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3105 |
label: 'left' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3106 |
name: 'StartGroupPopUp' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3107 |
layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3108 |
activeHelpKey: detailsStartGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3109 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3110 |
model: startGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3111 |
menu: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3112 |
(left |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3113 |
right |
1636 | 3114 |
) |
3115 |
) |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3116 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3117 |
label: 'Access Character Position:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3118 |
name: 'accessCharLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3119 |
layout: (AlignmentOrigin 217 0 170 0 1 0.5) |
1810 | 3120 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3121 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3122 |
adjust: right |
1636 | 3123 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3124 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3125 |
name: 'accessCharField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3126 |
layout: (LayoutFrame 220 0 159 0 -5 1.0 181 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3127 |
activeHelpKey: detailsAccessCharaterPosition |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3128 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3129 |
model: accessCharacterPosition |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3130 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3131 |
type: numberOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3132 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3133 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3134 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3135 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3136 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3137 |
acceptOnPointerLeave: false |
1636 | 3138 |
) |
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3139 |
(CheckBoxSpec |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3140 |
label: 'Ignore Accelerators in Submenu' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3141 |
name: 'ignoreShortcutKeys' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3142 |
layout: (AlignmentOrigin 42 0 204 0 0 0.5) |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3143 |
activeHelpKey: detailsIgnoreAcceleratorKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3144 |
visibilityChannel: hasSubmenu |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3145 |
model: ignoreShortcutKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3146 |
translateLabel: true |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3147 |
resizeForLabel: true |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3148 |
) |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3149 |
(CheckBoxSpec |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3150 |
label: 'Ignore Mnemonics in Submenu' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3151 |
name: 'ignoreMnemonicKeys' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3152 |
layout: (AlignmentOrigin 42 0 232 0 0 0.5) |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3153 |
activeHelpKey: detailsIgnoreMnemonicKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3154 |
visibilityChannel: hasSubmenu |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3155 |
model: ignoreMnemonicKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3156 |
translateLabel: true |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3157 |
resizeForLabel: true |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3158 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3159 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3160 |
label: 'Font:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3161 |
name: 'fontLabel' |
1810 | 3162 |
layout: (AlignmentOrigin 107 0 271 0 1 0.5) |
3163 |
translateLabel: true |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3164 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3165 |
adjust: right |
1636 | 3166 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3167 |
(FontMenuSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3168 |
attributes: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3169 |
(tabable |
1636 | 3170 |
true |
3171 |
) |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3172 |
name: 'fontMenu' |
1810 | 3173 |
layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3174 |
activeHelpKey: fontMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3175 |
model: font |
1636 | 3176 |
) |
3177 |
) |
|
1606 | 3178 |
|
1636 | 3179 |
) |
1454 | 3180 |
) |
3181 |
! ! |
|
3182 |
||
1725 | 3183 |
!MenuEditor::Item class methodsFor:'interface-editor'! |
3184 |
||
3185 |
addBindingsTo:aspects for:aMenuEditor |
|
3186 |
"add additional bindings to the aspects |
|
3187 |
" |
|
3188 |
aspects at:#notDelayedMenu ifAbsentPut:[ |
|
3189 |
true asValue |
|
3190 |
]. |
|
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3191 |
aspects at:#hasSubmenu ifAbsentPut:[ |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3192 |
false asValue |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3193 |
]. |
1725 | 3194 |
! ! |
3195 |
||
1606 | 3196 |
!MenuEditor::Item class methodsFor:'testing'! |
3197 |
||
3198 |
separatorTypeOf:aString |
|
3199 |
|size first| |
|
3200 |
||
3201 |
size := aString size. |
|
3202 |
||
3203 |
size == 0 ifTrue:[ ^ #blank ]. |
|
3204 |
||
3205 |
size == 1 ifTrue:[ |
|
3206 |
first := aString first. |
|
3207 |
first == $- ifTrue:[ ^ #single ]. |
|
3208 |
first == $= ifTrue:[ ^ #double ]. |
|
3209 |
first == (Character space) ifTrue:[ ^ #blank ]. |
|
3210 |
]. |
|
3211 |
^ nil |
|
1454 | 3212 |
! ! |
3213 |
||
3214 |
!MenuEditor::Item methodsFor:'accessing'! |
|
3215 |
||
1606 | 3216 |
children |
3217 |
"optimize access; do not ask the model for unspecified children |
|
3218 |
" |
|
3219 |
^ children |
|
3220 |
! |
|
3221 |
||
3222 |
menuItem |
|
3223 |
"returns self as a MenuItem |
|
3224 |
" |
|
3225 |
^ MenuItem new fromLiteralArrayEncoding:(menuItem literalArrayEncoding). |
|
3226 |
! |
|
3227 |
||
3228 |
menuItem:aMenuItem |
|
3229 |
"rebuild self from a MenuItem |
|
3230 |
" |
|
3231 |
|value| |
|
3232 |
||
3233 |
menuItem := MenuItem labeled:(self rawLabel). |
|
3234 |
||
3235 |
MenuEditor aspects do:[:aKey| |
|
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3236 |
value := self validateValue:(aMenuItem perform:aKey). |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3237 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3238 |
value notNil ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3239 |
self aspectAt:aKey put:value. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3240 |
]. |
1606 | 3241 |
]. |
3242 |
! |
|
3243 |
||
3244 |
rawLabel |
|
3245 |
"returns the label assigned to the item |
|
3246 |
" |
|
3247 |
^ menuItem rawLabel |
|
3248 |
! |
|
3249 |
||
3250 |
rawLabel:aValue |
|
3251 |
"set the label assigned to the item |
|
3252 |
" |
|
3253 |
aValue isString ifTrue:[ |
|
1691
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3254 |
"/ KLUDGE alarm: '-' and '' indicate a separator |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3255 |
"/ (there is no separate menuItem class for them) |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3256 |
|
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3257 |
(self isKindOfMenu or:[(self class separatorTypeOf:aValue) isNil]) ifTrue:[ |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3258 |
menuItem rawLabel:aValue |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3259 |
] |
1606 | 3260 |
]. |
3261 |
! |
|
3262 |
||
3263 |
slices |
|
3264 |
"returns a sequence of supported slices |
|
3265 |
" |
|
3266 |
^ self subclassResponsibility |
|
1454 | 3267 |
! |
3268 |
||
1606 | 3269 |
submenu |
3270 |
"returns the submenu (of class Menu) or nil |
|
3271 |
" |
|
3272 |
^ nil |
|
1631 | 3273 |
! |
3274 |
||
3275 |
translateLabel:aBoolean |
|
3276 |
menuItem translateLabel:aBoolean |
|
1606 | 3277 |
! ! |
3278 |
||
3279 |
!MenuEditor::Item methodsFor:'aspects'! |
|
3280 |
||
3281 |
aspectAt:aKey put:aValue |
|
3282 |
"set a specific aspect named aKey to the aValue |
|
3283 |
" |
|
3284 |
aKey == #rawLabel ifTrue:[ ^ self rawLabel:aValue ]. |
|
3285 |
aKey == #submenuChannel ifTrue:[ ^ self ]. |
|
3286 |
menuItem perform:((aKey, ':') asSymbol) with:aValue. |
|
3287 |
! |
|
3288 |
||
3289 |
fromAspects:aspects |
|
3290 |
"read values from aspects |
|
3291 |
" |
|
3292 |
MenuEditor aspects do:[:aKey| |
|
3293 |
self aspectAt:aKey put:((aspects at:aKey) value) |
|
3294 |
]. |
|
3295 |
self changed. |
|
3296 |
! |
|
3297 |
||
3298 |
toAspects:aspects |
|
3299 |
"write values to aspects |
|
3300 |
" |
|
3301 |
MenuEditor aspects do:[:aKey| |
|
3302 |
(aspects at:aKey) value:(menuItem perform:aKey) |
|
3303 |
]. |
|
3304 |
(aspects at:#notDelayedMenu) value:(self isDelayedMenu not). |
|
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3305 |
(aspects at:#hasSubmenu) value:(self isKindOfMenu or:[self children size ~~ 0]). |
1606 | 3306 |
! ! |
3307 |
||
3308 |
!MenuEditor::Item methodsFor:'displaying'! |
|
3309 |
||
3310 |
displayLabel |
|
3311 |
"returns the label on default displayed on the screen |
|
3312 |
" |
|
3313 |
^ menuItem rawLabel |
|
3314 |
! |
|
3315 |
||
3316 |
displayOn:aGC x:x y:y h:h |
|
3317 |
"display the item in the graphicsContext, aGC. |
|
3318 |
" |
|
3319 |
|label| |
|
3320 |
||
3321 |
label := self displayLabel. |
|
3322 |
||
3323 |
label notNil ifTrue:[ |
|
3324 |
self displayLabel:label h:(self heightOn:aGC) on:aGC x:x y:y h:h |
|
3325 |
]. |
|
3326 |
! |
|
3327 |
||
3328 |
heightOn:aGC |
|
3329 |
"returns the height of the label on a GC |
|
3330 |
" |
|
3331 |
height ifNil:[ height := parent heightOn:aGC ]. |
|
3332 |
^ height |
|
1454 | 3333 |
! |
3334 |
||
3335 |
label |
|
1606 | 3336 |
"get the rawLabel assigned to the item |
3337 |
" |
|
3338 |
^ menuItem rawLabel |
|
1454 | 3339 |
! |
3340 |
||
1606 | 3341 |
label:aLabel |
3342 |
"set the rawLabel assigned to the item |
|
3343 |
" |
|
3344 |
self rawLabel:aLabel |
|
1454 | 3345 |
! |
3346 |
||
1606 | 3347 |
widthOn:aGC |
3348 |
"returns the height of the displayLabel on a GC |
|
3349 |
" |
|
3350 |
width ifNil:[ width := self widthOf:(self displayLabel) on:aGC ]. |
|
3351 |
^ width |
|
1454 | 3352 |
! ! |
3353 |
||
1606 | 3354 |
!MenuEditor::Item methodsFor:'initialization'! |
3355 |
||
3356 |
initialize |
|
3357 |
super initialize. |
|
3358 |
menuItem := MenuItem label:(self class defaultLabel). |
|
1454 | 3359 |
! ! |
3360 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3361 |
!MenuEditor::Item methodsFor:'private'! |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3362 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3363 |
validateValue:aValue |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3364 |
"if we pick a menupanel, the values of an item can be |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3365 |
a block model, .... |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3366 |
" |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3367 |
aValue notNil ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3368 |
aValue isBlock ifTrue:[ ^ #block ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3369 |
aValue isValueModel ifTrue:[ ^ #valueModel ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3370 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3371 |
^ aValue |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3372 |
! ! |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3373 |
|
1454 | 3374 |
!MenuEditor::Item methodsFor:'queries'! |
3375 |
||
1606 | 3376 |
isAction |
3377 |
"returns true if the item is an Action |
|
3378 |
" |
|
3379 |
^ false |
|
3380 |
! |
|
3381 |
||
3382 |
isDelayedMenu |
|
3383 |
"returns true if the item is a Delayed (Linked) Menu |
|
3384 |
" |
|
3385 |
^ parent isAction |
|
3386 |
! |
|
3387 |
||
3388 |
isKindOfMenu |
|
3389 |
"returns true if the item is a Linked Menu or Menu |
|
3390 |
" |
|
3391 |
^ false |
|
3392 |
! |
|
3393 |
||
1633 | 3394 |
isMenuEditItem |
3395 |
^ true |
|
3396 |
! |
|
3397 |
||
1606 | 3398 |
isRootItem |
3399 |
"returns true if the item is the root item |
|
3400 |
" |
|
3401 |
^ false |
|
3402 |
! ! |
|
3403 |
||
1660 | 3404 |
!MenuEditor::Item methodsFor:'queries-editor'! |
1614 | 3405 |
|
3406 |
actionSelectors |
|
3407 |
"returns my action selectors |
|
3408 |
" |
|
3409 |
|value| |
|
3410 |
||
3411 |
value := menuItem value. |
|
3412 |
value isSymbol ifTrue:[ ^ Array with:value ]. |
|
3413 |
^ #() |
|
3414 |
! |
|
3415 |
||
3416 |
aspectSelectors |
|
3417 |
"returns my aspect selectors |
|
3418 |
" |
|
3419 |
|aspects| |
|
3420 |
||
3421 |
aspects := OrderedCollection new. |
|
3422 |
||
3423 |
#( indication choice enabled isVisible ) do:[:aKey| |sel| |
|
3424 |
sel := menuItem perform:aKey. |
|
3425 |
sel isSymbol ifTrue:[ aspects add:sel ] |
|
3426 |
]. |
|
3427 |
^ aspects |
|
3428 |
! ! |
|
3429 |
||
1660 | 3430 |
!MenuEditor::Item methodsFor:'queries-operation'! |
1606 | 3431 |
|
3432 |
canAddChildren |
|
3433 |
"returns true if children can be added |
|
3434 |
" |
|
3435 |
^ false |
|
3436 |
! |
|
3437 |
||
3438 |
canAddDelayedMenu |
|
3439 |
"returns true if a delayed menu can be added; |
|
3440 |
on default false is returned |
|
3441 |
" |
|
3442 |
^ false |
|
3443 |
! |
|
3444 |
||
3445 |
canMoveInAbove |
|
3446 |
"returns true if the item can become a child of its previous sibling |
|
3447 |
" |
|
3448 |
|siblings index nextItem| |
|
3449 |
||
3450 |
siblings := parent children. |
|
3451 |
siblings size > 1 ifFalse:[ ^ false ]. |
|
3452 |
||
3453 |
index := siblings identityIndexOf:self. |
|
3454 |
nextItem := siblings at:(index - 1) ifAbsent:nil. |
|
3455 |
||
3456 |
nextItem ifNil:[^ false]. |
|
3457 |
^ nextItem canAddChildren |
|
1454 | 3458 |
! |
3459 |
||
1606 | 3460 |
canMoveInNext |
3461 |
"returns true if the item can become a child of its next sibling |
|
3462 |
" |
|
3463 |
|siblings index nextItem| |
|
3464 |
||
3465 |
siblings := parent children. |
|
3466 |
siblings size > 1 ifFalse:[ ^ false ]. |
|
3467 |
||
3468 |
index := siblings identityIndexOf:self. |
|
3469 |
nextItem := siblings at:(index + 1) ifAbsent:nil. |
|
3470 |
||
3471 |
nextItem ifNil:[^ false]. |
|
3472 |
^ nextItem canAddChildren |
|
3473 |
! |
|
3474 |
||
3475 |
canMoveOut |
|
3476 |
"returns true if the item can be moved out from its current parent |
|
3477 |
" |
|
3478 |
self isDelayedMenu ifTrue:[^ false]. |
|
3479 |
parent isDelayedMenu ifTrue:[^ false]. |
|
3480 |
||
3481 |
^ parent parent notNil |
|
1454 | 3482 |
! |
3483 |
||
1606 | 3484 |
canMoveUpOrDown |
3485 |
"returns true if the item can change its vertical order in its sibling |
|
3486 |
" |
|
3487 |
^ parent children size > 1 |
|
3488 |
! ! |
|
3489 |
||
1631 | 3490 |
!MenuEditor::ActionItem class methodsFor:'defaults'! |
1606 | 3491 |
|
3492 |
defaultLabel |
|
3493 |
^ 'Action' |
|
3494 |
! ! |
|
3495 |
||
1668 | 3496 |
!MenuEditor::ActionItem class methodsFor:'interface specs'! |
1606 | 3497 |
|
3498 |
basicsEditSpec |
|
3499 |
"This resource specification was automatically generated |
|
3500 |
by the UIPainter of ST/X." |
|
3501 |
||
3502 |
"Do not manually edit this!! If it is corrupted, |
|
3503 |
the UIPainter may not be able to read the specification." |
|
3504 |
||
3505 |
" |
|
1634 | 3506 |
UIPainter new openOnClass:MenuEditor::ActionItem andSelector:#basicsEditSpec |
1606 | 3507 |
" |
3508 |
||
3509 |
<resource: #canvas> |
|
3510 |
||
3511 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3512 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3513 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3514 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3515 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3516 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3517 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3518 |
min: (Point 10 10) |
1810 | 3519 |
bounds: (Rectangle 0 0 340 340) |
1606 | 3520 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3521 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3522 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3523 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3524 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3525 |
label: 'Name Key:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3526 |
name: 'nameKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3527 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3528 |
activeHelpKey: basicsKey |
1810 | 3529 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3530 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3531 |
adjust: right |
1606 | 3532 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3533 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3534 |
name: 'nameKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3535 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3536 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3537 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3538 |
model: nameKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3539 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3540 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3541 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3542 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3543 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3544 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3545 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3546 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3547 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3548 |
acceptOnPointerLeave: false |
1606 | 3549 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3550 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3551 |
label: 'Label:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3552 |
name: 'labelLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3553 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3554 |
activeHelpKey: basicsLabel |
1810 | 3555 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3556 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3557 |
adjust: right |
1606 | 3558 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3559 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3560 |
name: 'labelField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3561 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3562 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3563 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3564 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3565 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3566 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3567 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3568 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3569 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3570 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3571 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3572 |
acceptOnPointerLeave: false |
1606 | 3573 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3574 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3575 |
label: 'Action:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3576 |
name: 'valueLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3577 |
layout: (AlignmentOrigin 107 0 82 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3578 |
activeHelpKey: basicsAction |
1810 | 3579 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3580 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3581 |
adjust: right |
1606 | 3582 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3583 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3584 |
name: 'valueField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3585 |
layout: (LayoutFrame 110 0 71 0 -5 1.0 93 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3586 |
activeHelpKey: basicsAction |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3587 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3588 |
model: itemValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3589 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3590 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3591 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3592 |
acceptOnLeave: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3593 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3594 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3595 |
acceptOnLostFocus: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3596 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3597 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3598 |
acceptOnPointerLeave: true |
1606 | 3599 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3600 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3601 |
label: 'Argument:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3602 |
name: 'argumentLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3603 |
layout: (AlignmentOrigin 107 0 107 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3604 |
activeHelpKey: basicsArgument |
1810 | 3605 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3606 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3607 |
adjust: right |
1606 | 3608 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3609 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3610 |
name: 'argumentField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3611 |
layout: (LayoutFrame 110 0 96 0 -5 1.0 118 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3612 |
activeHelpKey: basicsArgument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3613 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3614 |
model: argument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3615 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3616 |
type: smalltalkObject |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3617 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3618 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3619 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3620 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3621 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3622 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3623 |
acceptOnPointerLeave: false |
1606 | 3624 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3625 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3626 |
label: 'Indication:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3627 |
name: 'indicationLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3628 |
layout: (AlignmentOrigin 107 0 138 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3629 |
activeHelpKey: basicsIndication |
1810 | 3630 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3631 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3632 |
adjust: right |
1606 | 3633 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3634 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3635 |
name: 'indicationField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3636 |
layout: (LayoutFrame 110 0 127 0 -5 1.0 149 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3637 |
activeHelpKey: basicsIndication |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3638 |
enableChannel: indicationEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3639 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3640 |
model: indication |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3641 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3642 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3643 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3644 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3645 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3646 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3647 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3648 |
acceptOnPointerLeave: false |
1606 | 3649 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3650 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3651 |
label: 'Choice:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3652 |
name: 'choiceLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3653 |
layout: (AlignmentOrigin 107 0 163 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3654 |
activeHelpKey: basicsChoice |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3655 |
translateLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3656 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3657 |
adjust: right |
1606 | 3658 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3659 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3660 |
name: 'choiceField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3661 |
layout: (LayoutFrame 110 0 152 0 -5 1.0 174 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3662 |
activeHelpKey: basicsChoice |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3663 |
enableChannel: choiceEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3664 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3665 |
model: choice |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3666 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3667 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3668 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3669 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3670 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3671 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3672 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3673 |
acceptOnPointerLeave: false |
1606 | 3674 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3675 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3676 |
label: 'Value:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3677 |
name: 'choiceValueLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3678 |
layout: (AlignmentOrigin 107 0 188 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3679 |
activeHelpKey: basicsChoiceValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3680 |
translateLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3681 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3682 |
adjust: right |
1606 | 3683 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3684 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3685 |
name: 'choiceValueField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3686 |
layout: (LayoutFrame 110 0 177 0 -5 1.0 199 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3687 |
activeHelpKey: basicsChoiceValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3688 |
enableChannel: choiceValueEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3689 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3690 |
model: choiceValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3691 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3692 |
type: smalltalkObjectOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3693 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3694 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3695 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3696 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3697 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3698 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3699 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3700 |
acceptOnPointerLeave: false |
1606 | 3701 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3702 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3703 |
label: 'Translate Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3704 |
name: 'translateLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3705 |
layout: (AlignmentOrigin 7 0 213 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3706 |
activeHelpKey: basicsTranslateLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3707 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3708 |
model: translateLabel |
1810 | 3709 |
translateLabel: true |
1606 | 3710 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3711 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3712 |
label: 'Is Button' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3713 |
name: 'isButtonCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3714 |
layout: (AlignmentOrigin 7 0 238 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3715 |
activeHelpKey: basicsIsButton |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3716 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3717 |
model: isButton |
1810 | 3718 |
translateLabel: true |
1606 | 3719 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3720 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3721 |
label: 'Hide Menu after Activation' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3722 |
name: 'hideMenuOnActivated' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3723 |
layout: (AlignmentOrigin 7 0 263 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3724 |
activeHelpKey: hideMenuOnActivated |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3725 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3726 |
model: hideMenuOnActivated |
1810 | 3727 |
translateLabel: true |
1606 | 3728 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3729 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3730 |
label: 'BusyCursor while Active' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3731 |
name: 'showBusyCursorWhilePerforming' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3732 |
layout: (AlignmentOrigin 7 0 288 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3733 |
activeHelpKey: showBusyCursorWhilePerforming |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3734 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3735 |
model: showBusyCursorWhilePerforming |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3736 |
translateLabel: true |
1606 | 3737 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3738 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3739 |
label: 'Trigger On Down' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3740 |
name: 'triggerOnDown' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3741 |
layout: (AlignmentOrigin 25 0.5 238 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3742 |
activeHelpKey: triggerOnDown |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3743 |
enableChannel: hasNoDelayedMenuValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3744 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3745 |
model: triggerOnDown |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3746 |
translateLabel: true |
1606 | 3747 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3748 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3749 |
label: 'Send To Originating Widget' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3750 |
name: 'sendToOriginator' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3751 |
layout: (AlignmentOrigin 7 0 313 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3752 |
activeHelpKey: sendToOriginator |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3753 |
enableChannel: hasItemValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3754 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3755 |
model: sendToOriginator |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3756 |
translateLabel: true |
1634 | 3757 |
) |
1606 | 3758 |
) |
3759 |
||
3760 |
) |
|
3761 |
) |
|
199 | 3762 |
! ! |
3763 |
||
1725 | 3764 |
!MenuEditor::ActionItem class methodsFor:'interface-editor'! |
3765 |
||
3766 |
addBindingsTo:aspects for:aMenuEditor |
|
3767 |
"add additional bindings to the aspects |
|
3768 |
" |
|
3769 |
aspects at:#indicationEnabled ifAbsentPut:[ |
|
3770 |
BlockValue with:[:a | a size == 0 ] argument:(aspects at:#choice) |
|
3771 |
]. |
|
3772 |
||
3773 |
aspects at:#choiceEnabled ifAbsentPut:[ |
|
3774 |
BlockValue with:[:a | a size == 0 ] argument:(aspects at:#indication) |
|
3775 |
]. |
|
3776 |
||
3777 |
aspects at:#choiceValueEnabled ifAbsentPut:[ |
|
3778 |
BlockValue with:[:a | a size ~~ 0 ] argument:(aspects at:#choice) |
|
3779 |
]. |
|
3780 |
aspects at:#hasNoDelayedMenuValue ifAbsentPut:[ |
|
3781 |
true asValue |
|
3782 |
]. |
|
3783 |
! ! |
|
3784 |
||
1631 | 3785 |
!MenuEditor::ActionItem methodsFor:'accessing'! |
1606 | 3786 |
|
3787 |
menuItem |
|
3788 |
|item| |
|
3789 |
||
3790 |
item := super menuItem. |
|
3791 |
self hasDelayedMenu ifTrue:[ |
|
3792 |
children first setDelayedAttributesTo:item. |
|
3793 |
||
3794 |
menuItem value ifNil:[ |
|
3795 |
menuItem value:#unspecified |
|
199 | 3796 |
] |
3797 |
]. |
|
1606 | 3798 |
^ item |
199 | 3799 |
! |
3800 |
||
213 | 3801 |
menuItem:anItem |
1606 | 3802 |
|submenu item| |
3803 |
||
3804 |
super menuItem:anItem. |
|
3805 |
submenu := anItem submenu. |
|
3806 |
||
3807 |
submenu notNil ifTrue:[ |
|
1633 | 3808 |
item := MenuEditor::RegularMenuItem new |
1606 | 3809 |
] ifFalse:[ |
1631 | 3810 |
anItem submenuChannel isNil ifTrue:[ |
3811 |
^ self |
|
3812 |
]. |
|
3813 |
item := MenuEditor::LinkedMenuItem new |
|
1606 | 3814 |
]. |
3815 |
item getDelayedAttributesFrom:anItem. |
|
3816 |
self add:item. |
|
199 | 3817 |
! |
3818 |
||
1606 | 3819 |
slices |
3820 |
^ #( |
|
3821 |
(Basics basicsEditSpec ) |
|
3822 |
(Details detailsEditSpec) |
|
3823 |
(Image image ) |
|
3824 |
(Help help) |
|
3825 |
) |
|
199 | 3826 |
! ! |
3827 |
||
1631 | 3828 |
!MenuEditor::ActionItem methodsFor:'adding & removing'! |
1606 | 3829 |
|
3830 |
add:anItem |
|
3831 |
"add an item; test whether the item is a delayed menu and |
|
3832 |
not already a delayed menu exists. |
|
3833 |
" |
|
3834 |
(anItem isKindOfMenu and:[self canAddDelayedMenu]) ifFalse:[ |
|
3835 |
^ nil |
|
853 | 3836 |
]. |
1606 | 3837 |
"/ reset values not setable if a delayed menu is configured |
3838 |
menuItem triggerOnDown:false. |
|
1623 | 3839 |
anItem argument:(menuItem argument). |
1606 | 3840 |
|
3841 |
isExpanded := false. |
|
3842 |
anItem parent:self. |
|
3843 |
children := Array with:anItem. |
|
3844 |
self expand. |
|
3845 |
^ anItem |
|
199 | 3846 |
! ! |
3847 |
||
1631 | 3848 |
!MenuEditor::ActionItem methodsFor:'aspects'! |
1606 | 3849 |
|
3850 |
aspectAt:aKey put:aValue |
|
3851 |
"pass the argument to the delayed menu if existant |
|
3852 |
" |
|
3853 |
aKey == #argument ifTrue:[ |
|
3854 |
self hasDelayedMenu ifTrue:[ |
|
3855 |
children first argument:aValue |
|
3856 |
]. |
|
3857 |
menuItem argument:aValue. |
|
3858 |
^ self |
|
3859 |
]. |
|
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3860 |
|
1623 | 3861 |
aKey == #triggerOnDown ifTrue:[ |
3862 |
self hasDelayedMenu ifTrue:[ |
|
3863 |
menuItem triggerOnDown:false |
|
3864 |
] ifFalse:[ |
|
3865 |
menuItem triggerOnDown:aValue |
|
3866 |
]. |
|
3867 |
^ self. |
|
3868 |
]. |
|
1606 | 3869 |
super aspectAt:aKey put:aValue. |
3870 |
! |
|
3871 |
||
3872 |
toAspects:aspects |
|
3873 |
"write values to aspects |
|
3874 |
" |
|
1623 | 3875 |
|hasDelayedMenu| |
3876 |
||
1606 | 3877 |
super toAspects:aspects. |
3878 |
||
1623 | 3879 |
hasDelayedMenu := self hasDelayedMenu. |
3880 |
(aspects at:#hasNoDelayedMenuValue) value:(hasDelayedMenu not). |
|
3881 |
||
3882 |
hasDelayedMenu ifTrue:[ |
|
3883 |
(aspects at:#triggerOnDown) value:false |
|
3884 |
]. |
|
356 | 3885 |
! ! |
3886 |
||
1631 | 3887 |
!MenuEditor::ActionItem methodsFor:'displaying'! |
1606 | 3888 |
|
3889 |
icon |
|
3890 |
^ self class iconItem |
|
3891 |
! ! |
|
3892 |
||
1631 | 3893 |
!MenuEditor::ActionItem methodsFor:'initialization'! |
199 | 3894 |
|
3895 |
initialize |
|
3896 |
super initialize. |
|
1606 | 3897 |
isExpanded := true. |
3898 |
! ! |
|
3899 |
||
1631 | 3900 |
!MenuEditor::ActionItem methodsFor:'queries'! |
1606 | 3901 |
|
3902 |
canCollapse |
|
3903 |
^ false |
|
3904 |
! |
|
3905 |
||
3906 |
hasDelayedMenu |
|
3907 |
"returns true if a delayed menu exists |
|
3908 |
" |
|
3909 |
^ children size ~~ 0 |
|
3910 |
! |
|
3911 |
||
3912 |
hasIndicator |
|
3913 |
^ false |
|
3914 |
! |
|
3915 |
||
3916 |
isAction |
|
3917 |
^ true |
|
3918 |
! ! |
|
3919 |
||
1660 | 3920 |
!MenuEditor::ActionItem methodsFor:'queries-operation'! |
1606 | 3921 |
|
3922 |
canAddDelayedMenu |
|
1623 | 3923 |
"returns true if a delayed menu can be added |
1606 | 3924 |
" |
1623 | 3925 |
^ self hasDelayedMenu not |
1606 | 3926 |
! ! |
3927 |
||
1631 | 3928 |
!MenuEditor::LinkedMenuItem class methodsFor:'defaults'! |
1606 | 3929 |
|
3930 |
defaultLabel |
|
3931 |
^ 'Linked Menu' |
|
199 | 3932 |
! ! |
3933 |
||
1668 | 3934 |
!MenuEditor::LinkedMenuItem class methodsFor:'interface specs'! |
1606 | 3935 |
|
3936 |
basicsEditSpec |
|
3937 |
"This resource specification was automatically generated |
|
3938 |
by the UIPainter of ST/X." |
|
3939 |
||
3940 |
"Do not manually edit this!! If it is corrupted, |
|
3941 |
the UIPainter may not be able to read the specification." |
|
3942 |
||
3943 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3944 |
UIPainter new openOnClass:MenuEditor::LinkedMenuItem andSelector:#basicsEditSpec |
1606 | 3945 |
" |
3946 |
||
3947 |
<resource: #canvas> |
|
3948 |
||
3949 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3950 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3951 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3952 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3953 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3954 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3955 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3956 |
min: (Point 10 10) |
1810 | 3957 |
bounds: (Rectangle 0 0 340 340) |
1606 | 3958 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3959 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3960 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3961 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3962 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3963 |
label: 'Name Key:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3964 |
name: 'nameKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3965 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3966 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3967 |
visibilityChannel: notDelayedMenu |
1810 | 3968 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3969 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3970 |
adjust: right |
1606 | 3971 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3972 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3973 |
name: 'nameKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3974 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3975 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3976 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3977 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3978 |
model: nameKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3979 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3980 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3981 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3982 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3983 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3984 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3985 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3986 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3987 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3988 |
acceptOnPointerLeave: false |
1606 | 3989 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3990 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3991 |
label: 'Label:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3992 |
name: 'labelLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3993 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3994 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3995 |
visibilityChannel: notDelayedMenu |
1810 | 3996 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3997 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3998 |
adjust: right |
1606 | 3999 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4000 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4001 |
name: 'labelField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4002 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4003 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4004 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4005 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4006 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4007 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4008 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4009 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4010 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4011 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4012 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4013 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4014 |
acceptOnPointerLeave: false |
1606 | 4015 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4016 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4017 |
label: 'Menu:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4018 |
name: 'menuLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4019 |
layout: (AlignmentOrigin 107 0 90 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4020 |
activeHelpKey: basicsLabel |
1810 | 4021 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4022 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4023 |
adjust: right |
1606 | 4024 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4025 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4026 |
name: 'menuField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4027 |
layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4028 |
activeHelpKey: basicsMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4029 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4030 |
model: submenuChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4031 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4032 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4033 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4034 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4035 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4036 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4037 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4038 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4039 |
acceptOnPointerLeave: false |
1606 | 4040 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4041 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4042 |
label: 'Argument:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4043 |
name: 'argumentLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4044 |
layout: (AlignmentOrigin 107 0 115 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4045 |
activeHelpKey: basicsLabel |
1810 | 4046 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4047 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4048 |
adjust: right |
1606 | 4049 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4050 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4051 |
name: 'argumentField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4052 |
layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4053 |
activeHelpKey: basicsMenuArgument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4054 |
enableChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4055 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4056 |
model: argument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4057 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4058 |
type: smalltalkObject |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4059 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4060 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4061 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4062 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4063 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4064 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4065 |
acceptOnPointerLeave: false |
1606 | 4066 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4067 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4068 |
label: 'Translate Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4069 |
name: 'translateLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4070 |
layout: (Point 20 213) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4071 |
activeHelpKey: basicsTranslateLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4072 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4073 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4074 |
model: translateLabel |
1810 | 4075 |
translateLabel: true |
1606 | 4076 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4077 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4078 |
label: 'Is Button' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4079 |
name: 'isButtonCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4080 |
layout: (Point 20 238) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4081 |
activeHelpKey: basicsIsButton |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4082 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4083 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4084 |
model: isButton |
1810 | 4085 |
translateLabel: true |
1606 | 4086 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4087 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4088 |
label: 'Horizontal Layout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4089 |
name: 'horizontalLayout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4090 |
layout: (Point 20 263) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4091 |
activeHelpKey: horizontalLayout |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4092 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4093 |
model: horizontalLayout |
1810 | 4094 |
translateLabel: true |
1606 | 4095 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4096 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4097 |
label: 'Do not Destroy Linked Menu' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4098 |
name: 'keepLinkedMenu' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4099 |
layout: (Point 20 288) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4100 |
activeHelpKey: keepLinkedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4101 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4102 |
model: keepLinkedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4103 |
translateLabel: true |
1606 | 4104 |
) |
4105 |
) |
|
4106 |
||
4107 |
) |
|
4108 |
) |
|
4109 |
! ! |
|
4110 |
||
1631 | 4111 |
!MenuEditor::LinkedMenuItem methodsFor:'accessing'! |
1606 | 4112 |
|
4113 |
argument:aValue |
|
4114 |
menuItem argument:aValue. |
|
4115 |
! |
|
4116 |
||
4117 |
menuItem |
|
4118 |
"returns self as a MenuItem |
|
4119 |
" |
|
4120 |
|item| |
|
4121 |
||
4122 |
item := super menuItem. |
|
4123 |
item submenuChannel:(self submenuChannel). |
|
4124 |
^ item |
|
4125 |
! |
|
4126 |
||
4127 |
slices |
|
4128 |
self isDelayedMenu ifTrue:[ |
|
4129 |
^ #( |
|
4130 |
(Basics basicsEditSpec ) |
|
4131 |
) |
|
1389 | 4132 |
]. |
4133 |
||
1606 | 4134 |
^ #( |
4135 |
(Basics basicsEditSpec ) |
|
4136 |
(Details detailsEditSpec) |
|
4137 |
(Image image ) |
|
4138 |
(Help help) |
|
4139 |
) |
|
4140 |
! |
|
4141 |
||
4142 |
submenuChannel |
|
4143 |
^ menuItem submenuChannel ? #unspecified |
|
4144 |
! |
|
4145 |
||
4146 |
submenuChannel:aValue |
|
4147 |
menuItem submenuChannel:aValue. |
|
4148 |
! ! |
|
4149 |
||
1631 | 4150 |
!MenuEditor::LinkedMenuItem methodsFor:'aspects'! |
1606 | 4151 |
|
4152 |
aspectAt:aKey put:aValue |
|
4153 |
"set a specific aspect named aKey to the aValue |
|
4154 |
" |
|
4155 |
aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ]. |
|
4156 |
super aspectAt:aKey put:aValue. |
|
4157 |
! |
|
4158 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4159 |
getDelayedAttributesFrom:anItem |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4160 |
|
1606 | 4161 |
menuItem rawLabel:'Delayed'. |
4162 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4163 |
menuItem submenuChannel:(self validateValue:(anItem submenuChannel)). |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4164 |
menuItem horizontalLayout:(self validateValue:(anItem horizontalLayout)). |
1881
dde52f4278c0
horizontalLayout flag bug fixed
Claus Gittinger <cg@exept.de>
parents:
1867
diff
changeset
|
4165 |
menuItem keepLinkedMenu:(self validateValue:(anItem keepLinkedMenu)). |
1389 | 4166 |
! |
4167 |
||
1606 | 4168 |
setDelayedAttributesTo:aMenuItem |
4169 |
aMenuItem submenuChannel:(self submenuChannel). |
|
4170 |
aMenuItem horizontalLayout:(menuItem horizontalLayout). |
|
4171 |
aMenuItem keepLinkedMenu:(menuItem keepLinkedMenu). |
|
4172 |
! ! |
|
4173 |
||
1631 | 4174 |
!MenuEditor::LinkedMenuItem methodsFor:'displaying'! |
1606 | 4175 |
|
4176 |
displayLabel |
|
4177 |
"returns the label dependent on is delayed or not |
|
4178 |
" |
|
4179 |
self isDelayedMenu ifTrue:[ ^ self submenuChannel ]. |
|
4180 |
^ menuItem rawLabel |
|
199 | 4181 |
! |
4182 |
||
1606 | 4183 |
icon |
4184 |
self isDelayedMenu ifTrue:[ ^ self class iconDelayedLinkedMenu ]. |
|
4185 |
^ self class iconLinkedMenu |
|
4186 |
! ! |
|
4187 |
||
1780
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4188 |
!MenuEditor::LinkedMenuItem methodsFor:'initialization'! |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4189 |
|
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4190 |
initialize |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4191 |
"setup default values on the item |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4192 |
" |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4193 |
super initialize. |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4194 |
|
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4195 |
"setting default values |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4196 |
" |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4197 |
menuItem keepLinkedMenu:true. |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4198 |
! ! |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4199 |
|
1631 | 4200 |
!MenuEditor::LinkedMenuItem methodsFor:'queries'! |
1606 | 4201 |
|
4202 |
isKindOfMenu |
|
4203 |
^ true |
|
4204 |
! ! |
|
4205 |
||
1844 | 4206 |
!MenuEditor::MenuSliceItem class methodsFor:'defaults'! |
4207 |
||
4208 |
defaultLabel |
|
4209 |
^ 'Menu Slice' |
|
4210 |
! ! |
|
4211 |
||
4212 |
!MenuEditor::MenuSliceItem class methodsFor:'interface specs'! |
|
4213 |
||
4214 |
basicsEditSpec |
|
4215 |
"This resource specification was automatically generated |
|
4216 |
by the UIPainter of ST/X." |
|
4217 |
||
4218 |
"Do not manually edit this!! If it is corrupted, |
|
4219 |
the UIPainter may not be able to read the specification." |
|
4220 |
||
4221 |
" |
|
4222 |
UIPainter new openOnClass:MenuEditor::MenuSliceItem andSelector:#basicsEditSpec |
|
4223 |
" |
|
4224 |
||
4225 |
<resource: #canvas> |
|
4226 |
||
4227 |
^ |
|
4228 |
#(FullSpec |
|
4229 |
name: basicsEditSpec |
|
4230 |
window: |
|
4231 |
(WindowSpec |
|
4232 |
label: 'basicsEditSpec' |
|
4233 |
name: 'basicsEditSpec' |
|
4234 |
min: (Point 10 10) |
|
4235 |
bounds: (Rectangle 0 0 344 146) |
|
4236 |
) |
|
4237 |
component: |
|
4238 |
(SpecCollection |
|
4239 |
collection: ( |
|
4240 |
(LabelSpec |
|
4241 |
label: 'Name Key:' |
|
4242 |
name: 'nameKeyLabel' |
|
4243 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
|
4244 |
activeHelpKey: basicsKey |
|
4245 |
visibilityChannel: notDelayedMenu |
|
4246 |
translateLabel: true |
|
4247 |
resizeForLabel: true |
|
4248 |
adjust: right |
|
4249 |
) |
|
4250 |
(InputFieldSpec |
|
4251 |
name: 'nameKeyField' |
|
4252 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
4253 |
activeHelpKey: basicsKey |
|
4254 |
visibilityChannel: notDelayedMenu |
|
4255 |
tabable: true |
|
4256 |
model: nameKey |
|
4257 |
group: inputGroup |
|
4258 |
type: symbolOrNil |
|
4259 |
immediateAccept: false |
|
4260 |
acceptOnLeave: false |
|
4261 |
acceptOnReturn: true |
|
4262 |
acceptOnTab: true |
|
4263 |
acceptOnLostFocus: false |
|
4264 |
acceptChannel: acceptChannel |
|
4265 |
modifiedChannel: modifiedChannel |
|
4266 |
acceptOnPointerLeave: false |
|
4267 |
) |
|
4268 |
(LabelSpec |
|
4269 |
label: 'Label:' |
|
4270 |
name: 'labelLabel' |
|
4271 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
|
4272 |
activeHelpKey: basicsLabel |
|
4273 |
visibilityChannel: notDelayedMenu |
|
4274 |
translateLabel: true |
|
4275 |
resizeForLabel: true |
|
4276 |
adjust: right |
|
4277 |
) |
|
4278 |
(InputFieldSpec |
|
4279 |
name: 'labelField' |
|
4280 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
4281 |
activeHelpKey: basicsLabel |
|
4282 |
visibilityChannel: notDelayedMenu |
|
4283 |
tabable: true |
|
4284 |
model: rawLabel |
|
4285 |
group: inputGroup |
|
4286 |
immediateAccept: false |
|
4287 |
acceptOnReturn: true |
|
4288 |
acceptOnTab: true |
|
4289 |
acceptOnLostFocus: false |
|
4290 |
acceptChannel: acceptChannel |
|
4291 |
modifiedChannel: modifiedChannel |
|
4292 |
acceptOnPointerLeave: false |
|
4293 |
) |
|
4294 |
(LabelSpec |
|
4295 |
label: 'Menu:' |
|
4296 |
name: 'menuLabel' |
|
4297 |
layout: (AlignmentOrigin 107 0 90 0 1 0.5) |
|
4298 |
activeHelpKey: basicsLabel |
|
4299 |
translateLabel: true |
|
4300 |
resizeForLabel: true |
|
4301 |
adjust: right |
|
4302 |
) |
|
4303 |
(InputFieldSpec |
|
4304 |
name: 'menuField' |
|
4305 |
layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) |
|
4306 |
activeHelpKey: basicsMenu |
|
4307 |
tabable: true |
|
4308 |
model: submenuChannel |
|
4309 |
group: inputGroup |
|
4310 |
type: symbolOrNil |
|
4311 |
immediateAccept: false |
|
4312 |
acceptOnReturn: true |
|
4313 |
acceptOnTab: true |
|
4314 |
acceptOnLostFocus: false |
|
4315 |
acceptChannel: acceptChannel |
|
4316 |
modifiedChannel: modifiedChannel |
|
4317 |
acceptOnPointerLeave: false |
|
4318 |
) |
|
4319 |
(LabelSpec |
|
4320 |
label: 'Argument:' |
|
4321 |
name: 'argumentLabel' |
|
4322 |
layout: (AlignmentOrigin 107 0 115 0 1 0.5) |
|
4323 |
activeHelpKey: basicsLabel |
|
4324 |
translateLabel: true |
|
4325 |
resizeForLabel: true |
|
4326 |
adjust: right |
|
4327 |
) |
|
4328 |
(InputFieldSpec |
|
4329 |
name: 'argumentField' |
|
4330 |
layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) |
|
4331 |
activeHelpKey: basicsMenuArgument |
|
4332 |
enableChannel: notDelayedMenu |
|
4333 |
tabable: true |
|
4334 |
model: argument |
|
4335 |
group: inputGroup |
|
4336 |
type: smalltalkObject |
|
4337 |
immediateAccept: false |
|
4338 |
acceptOnReturn: true |
|
4339 |
acceptOnTab: true |
|
4340 |
acceptOnLostFocus: false |
|
4341 |
acceptChannel: acceptChannel |
|
4342 |
modifiedChannel: modifiedChannel |
|
4343 |
acceptOnPointerLeave: false |
|
4344 |
) |
|
4345 |
) |
|
4346 |
||
4347 |
) |
|
4348 |
) |
|
4349 |
! ! |
|
4350 |
||
4351 |
!MenuEditor::MenuSliceItem methodsFor:'accessing'! |
|
4352 |
||
4353 |
icon |
|
4354 |
^ self class iconSliceMenu |
|
4355 |
! |
|
4356 |
||
4357 |
menuItem |
|
4358 |
"returns self as a MenuItem |
|
4359 |
" |
|
4360 |
|item| |
|
4361 |
||
4362 |
item := super menuItem. |
|
4363 |
item submenuChannel:(self submenuChannel). |
|
4364 |
item isMenuSlice:true. |
|
4365 |
^ item |
|
4366 |
! |
|
4367 |
||
4368 |
slices |
|
4369 |
^ #( |
|
4370 |
(Basics basicsEditSpec) |
|
4371 |
) |
|
4372 |
! ! |
|
4373 |
||
4374 |
!MenuEditor::MenuSliceItem methodsFor:'aspects'! |
|
4375 |
||
4376 |
argument:aValue |
|
4377 |
menuItem argument:aValue. |
|
4378 |
! |
|
4379 |
||
4380 |
aspectAt:aKey put:aValue |
|
4381 |
"set a specific aspect named aKey to the aValue |
|
4382 |
" |
|
4383 |
aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ]. |
|
4384 |
aKey == #isSliceMenu ifTrue:[ ^ self ]. |
|
4385 |
||
4386 |
super aspectAt:aKey put:aValue. |
|
4387 |
! |
|
4388 |
||
4389 |
submenuChannel |
|
4390 |
^ menuItem submenuChannel ? #unspecified |
|
4391 |
! |
|
4392 |
||
4393 |
submenuChannel:aValue |
|
4394 |
menuItem submenuChannel:aValue. |
|
4395 |
! ! |
|
4396 |
||
1633 | 4397 |
!MenuEditor::RegularMenuItem class methodsFor:'defaults'! |
1606 | 4398 |
|
4399 |
defaultDelayedLabel |
|
4400 |
^ 'delayed' |
|
199 | 4401 |
! |
4402 |
||
1606 | 4403 |
defaultLabel |
4404 |
^ 'Menu' |
|
4405 |
! ! |
|
4406 |
||
1633 | 4407 |
!MenuEditor::RegularMenuItem class methodsFor:'instance creation'! |
1606 | 4408 |
|
4409 |
menu:aMenu labeled:aString |
|
4410 |
|item| |
|
4411 |
||
4412 |
item := self new. |
|
4413 |
item menu:aMenu labeled:aString. |
|
1631 | 4414 |
^ item |
4415 |
! |
|
4416 |
||
4417 |
menu:aMenu labeled:aString translateLabel:translateLabel |
|
4418 |
|item| |
|
4419 |
||
4420 |
item := self new. |
|
4421 |
item menu:aMenu labeled:aString. |
|
4422 |
item translateLabel:translateLabel. |
|
4423 |
^ item |
|
1606 | 4424 |
! ! |
4425 |
||
1668 | 4426 |
!MenuEditor::RegularMenuItem class methodsFor:'interface specs'! |
1606 | 4427 |
|
4428 |
basicsEditSpec |
|
4429 |
"This resource specification was automatically generated |
|
4430 |
by the UIPainter of ST/X." |
|
4431 |
||
4432 |
"Do not manually edit this!! If it is corrupted, |
|
4433 |
the UIPainter may not be able to read the specification." |
|
4434 |
||
4435 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4436 |
UIPainter new openOnClass:MenuEditor::RegularMenuItem andSelector:#basicsEditSpec |
1606 | 4437 |
" |
4438 |
||
4439 |
<resource: #canvas> |
|
4440 |
||
4441 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4442 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4443 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4444 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4445 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4446 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4447 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4448 |
min: (Point 10 10) |
1810 | 4449 |
bounds: (Rectangle 0 0 340 340) |
1606 | 4450 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4451 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4452 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4453 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4454 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4455 |
label: 'Name Key:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4456 |
name: 'nameKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4457 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4458 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4459 |
visibilityChannel: notDelayedMenu |
1810 | 4460 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4461 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4462 |
adjust: right |
1606 | 4463 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4464 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4465 |
name: 'nameKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4466 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4467 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4468 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4469 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4470 |
model: nameKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4471 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4472 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4473 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4474 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4475 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4476 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4477 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4478 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4479 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4480 |
acceptOnPointerLeave: false |
1606 | 4481 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4482 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4483 |
label: 'Label:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4484 |
name: 'labelLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4485 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4486 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4487 |
visibilityChannel: notDelayedMenu |
1810 | 4488 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4489 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4490 |
adjust: right |
1606 | 4491 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4492 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4493 |
name: 'labelField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4494 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4495 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4496 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4497 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4498 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4499 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4500 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4501 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4502 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4503 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4504 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4505 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4506 |
acceptOnPointerLeave: false |
1606 | 4507 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4508 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4509 |
label: 'Translate Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4510 |
name: 'translateLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4511 |
layout: (Point 20 213) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4512 |
activeHelpKey: basicsTranslateLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4513 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4514 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4515 |
model: translateLabel |
1810 | 4516 |
translateLabel: true |
1606 | 4517 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4518 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4519 |
label: 'Is Button' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4520 |
name: 'isButtonCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4521 |
layout: (Point 20 238) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4522 |
activeHelpKey: basicsIsButton |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4523 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4524 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4525 |
model: isButton |
1810 | 4526 |
translateLabel: true |
1606 | 4527 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4528 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4529 |
label: 'Horizontal Layout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4530 |
name: 'horizontalLayout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4531 |
layout: (Point 20 263) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4532 |
activeHelpKey: horizontalLayout |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4533 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4534 |
model: horizontalLayout |
1810 | 4535 |
translateLabel: true |
1606 | 4536 |
) |
4537 |
) |
|
4538 |
||
4539 |
) |
|
4540 |
) |
|
4541 |
! ! |
|
4542 |
||
1633 | 4543 |
!MenuEditor::RegularMenuItem methodsFor:'accessing'! |
1606 | 4544 |
|
4545 |
argument:aValue |
|
4546 |
"/ ignorred. |
|
218 | 4547 |
! |
4548 |
||
1606 | 4549 |
menu:aMenu labeled:aString |
4550 |
|expanded item menu| |
|
4551 |
||
4552 |
self criticalDo:[ |
|
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4553 |
self isRootItem ifTrue:[ expanded := true ] |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4554 |
ifFalse:[ expanded := isExpanded ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4555 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4556 |
self removeAll. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4557 |
self rawLabel:aString. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4558 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4559 |
menu := aMenu value. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4560 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4561 |
(menu isNil or:[menu isString]) ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4562 |
menu := nil |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4563 |
] ifFalse:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4564 |
aMenu isCollection ifTrue:[ menu := Menu new fromLiteralArrayEncoding:aMenu ] |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4565 |
ifFalse:[ menu := aMenu ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4566 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4567 |
menu numberOfItems == 0 ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4568 |
menu := nil |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4569 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4570 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4571 |
menu ifNotNil:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4572 |
isExpanded := false. "/ discard change notifications |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4573 |
children := OrderedCollection new. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4574 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4575 |
menu itemsDo:[:el| |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4576 |
item := self class menuItem:el. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4577 |
item parent:self. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4578 |
children add:item. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4579 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4580 |
expanded ifTrue:[ self expand ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4581 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4582 |
isExpanded := expanded. |
1606 | 4583 |
]. |
4584 |
self changed |
|
199 | 4585 |
! |
4586 |
||
1606 | 4587 |
menuItem |
4588 |
"returns self as a MenuItem |
|
4589 |
" |
|
4590 |
|item| |
|
4591 |
||
4592 |
item := super menuItem. |
|
4593 |
item submenu:(self submenu). |
|
4594 |
^ item |
|
199 | 4595 |
! |
4596 |
||
1606 | 4597 |
menuItem:anItem |
4598 |
||
4599 |
super menuItem:anItem. |
|
4600 |
self menu:(anItem submenu) labeled:nil. |
|
4601 |
! |
|
4602 |
||
4603 |
slices |
|
4604 |
self isDelayedMenu ifTrue:[ |
|
4605 |
^ #( |
|
4606 |
(Basics basicsEditSpec ) |
|
4607 |
) |
|
4608 |
]. |
|
4609 |
||
4610 |
^ #( |
|
4611 |
(Basics basicsEditSpec ) |
|
4612 |
(Details detailsEditSpec) |
|
4613 |
(Image image ) |
|
4614 |
(Help help) |
|
4615 |
) |
|
4616 |
! |
|
4617 |
||
4618 |
submenu |
|
4619 |
|menu| |
|
4620 |
||
4621 |
menu := Menu new. |
|
4622 |
||
4623 |
children size ~~ 0 ifTrue:[ |
|
4624 |
children do:[:el| menu addItem:(el menuItem) ]. |
|
4625 |
]. |
|
4626 |
^ menu |
|
4627 |
! ! |
|
4628 |
||
1633 | 4629 |
!MenuEditor::RegularMenuItem methodsFor:'aspects'! |
1606 | 4630 |
|
4631 |
getDelayedAttributesFrom:aMenuItem |
|
4632 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4633 |
|menu| |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4634 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4635 |
menu := self validateValue:(aMenuItem submenu value). |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4636 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4637 |
self menu:menu labeled:nil. |
1606 | 4638 |
menuItem horizontalLayout:(aMenuItem horizontalLayout). |
4639 |
! |
|
4640 |
||
4641 |
setDelayedAttributesTo:aMenuItem |
|
4642 |
aMenuItem submenu:(self submenu). |
|
4643 |
aMenuItem horizontalLayout:(menuItem horizontalLayout). |
|
4644 |
! ! |
|
4645 |
||
1633 | 4646 |
!MenuEditor::RegularMenuItem methodsFor:'displaying'! |
1606 | 4647 |
|
4648 |
displayLabel |
|
4649 |
"returns the label dependent on is delayed or not |
|
4650 |
" |
|
4651 |
self isDelayedMenu ifTrue:[ ^ self class defaultDelayedLabel ]. |
|
4652 |
^ menuItem rawLabel |
|
4653 |
! |
|
4654 |
||
4655 |
icon |
|
4656 |
self isDelayedMenu ifTrue:[ ^ self class iconDelayedMenu ]. |
|
4657 |
^ self class iconMenu |
|
4658 |
! ! |
|
4659 |
||
1633 | 4660 |
!MenuEditor::RegularMenuItem methodsFor:'queries'! |
1606 | 4661 |
|
4662 |
canAddChildren |
|
4663 |
"children can be added |
|
4664 |
" |
|
4665 |
^ true |
|
4666 |
! |
|
4667 |
||
4668 |
canExpand |
|
4669 |
"returns true if the item is expandable |
|
4670 |
" |
|
4671 |
^ isExpanded == false |
|
4672 |
! |
|
4673 |
||
4674 |
hasIndicator |
|
4675 |
^ true |
|
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
4676 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
4677 |
|
1606 | 4678 |
isKindOfMenu |
4679 |
^ true |
|
4680 |
! ! |
|
4681 |
||
4682 |
!MenuEditor::ResourceEditor class methodsFor:'interface specs'! |
|
4683 |
||
4684 |
windowSpec |
|
4685 |
"This resource specification was automatically generated |
|
4686 |
by the UIPainter of ST/X." |
|
4687 |
||
4688 |
"Do not manually edit this!! If it is corrupted, |
|
4689 |
the UIPainter may not be able to read the specification." |
|
4690 |
||
4691 |
" |
|
4692 |
UIPainter new openOnClass:MenuEditor::ResourceEditor andSelector:#windowSpec |
|
4693 |
MenuEditor::ResourceEditor new openInterface:#windowSpec |
|
4694 |
MenuEditor::ResourceEditor open |
|
4695 |
" |
|
4696 |
||
4697 |
<resource: #canvas> |
|
4698 |
||
4699 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4700 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4701 |
name: windowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4702 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4703 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4704 |
label: 'Image Item' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4705 |
name: 'Image Item' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4706 |
min: (Point 10 10) |
1810 | 4707 |
bounds: (Rectangle 0 0 288 295) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4708 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4709 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4710 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4711 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4712 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4713 |
label: 'Retriever:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4714 |
name: 'retrieverLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4715 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4716 |
activeHelpKey: imageRetriever |
1810 | 4717 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4718 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4719 |
adjust: right |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4720 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4721 |
(ComboBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4722 |
name: 'retrieverHolder' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4723 |
layout: (LayoutFrame 110 0 15 0 -20 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4724 |
activeHelpKey: imageRetriever |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4725 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4726 |
model: retrieverHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4727 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4728 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4729 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4730 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4731 |
acceptOnPointerLeave: false |
1853
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4732 |
entryCompletionBlock: entryCompletionForRetriever |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4733 |
comboList: retrieverList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4734 |
isFilenameBox: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4735 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4736 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4737 |
label: 'Selector:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4738 |
name: 'iconLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4739 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4740 |
activeHelpKey: imageSelector |
1810 | 4741 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4742 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4743 |
adjust: right |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4744 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4745 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4746 |
name: 'selectorHolder' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4747 |
layout: (LayoutFrame 110 0 40 0 -42 1.0 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4748 |
activeHelpKey: imageSelector |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4749 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4750 |
model: selectorHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4751 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4752 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4753 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4754 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4755 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4756 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4757 |
acceptOnPointerLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4758 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4759 |
(ActionButtonSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4760 |
label: '...' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4761 |
name: 'browseButton' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4762 |
layout: (LayoutFrame -40 1 40 0 -20 1 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4763 |
activeHelpKey: browseResource |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4764 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4765 |
model: doBrowseForImageResource |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4766 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4767 |
(HierarchicalListViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4768 |
name: 'imageList' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4769 |
layout: (LayoutFrame 20 0.0 67 0 -20 1.0 -30 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4770 |
activeHelpKey: imageImageList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4771 |
model: imageHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4772 |
menu: menuEditImage |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4773 |
hasHorizontalScrollBar: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4774 |
hasVerticalScrollBar: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4775 |
miniScrollerHorizontal: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4776 |
listModel: imageList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4777 |
useIndex: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4778 |
highlightMode: label |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4779 |
postBuildCallback: postBuildImageViewer: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4780 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4781 |
(ViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4782 |
name: 'Box1' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4783 |
layout: (LayoutFrame 20 0.0 -30 1.0 -20 1.0 0 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4784 |
level: 0 |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4785 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4786 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4787 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4788 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4789 |
label: 'Image & Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4790 |
name: 'iconAndLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4791 |
layout: (AlignmentOrigin 0 0 0 0.5 0 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4792 |
activeHelpKey: imageImageAndLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4793 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4794 |
model: iconAndLabelHolder |
1810 | 4795 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4796 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4797 |
(ActionButtonSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4798 |
label: 'Image Editor' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4799 |
name: 'imageEditorButton' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4800 |
layout: (AlignmentOrigin 0 1.0 0 0.5 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4801 |
activeHelpKey: imageImageEditor |
1810 | 4802 |
hasCharacterOrientedLabel: false |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4803 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4804 |
model: doEditImage |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4805 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4806 |
) |
1606 | 4807 |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4808 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4809 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4810 |
) |
1606 | 4811 |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4812 |
) |
1606 | 4813 |
) |
4814 |
! ! |
|
4815 |
||
4816 |
!MenuEditor::ResourceEditor methodsFor:'accessing'! |
|
4817 |
||
4818 |
resourceRetriever |
|
4819 |
|rcv sel cls| |
|
4820 |
||
4821 |
sel := selectorHolder value. |
|
4822 |
sel size == 0 ifTrue:[ ^ nil ]. |
|
4823 |
cls := self retrieverClass. |
|
4824 |
cls ifNotNil:[ cls := cls name asSymbol ]. |
|
4825 |
||
4826 |
rcv := ResourceRetriever new. |
|
4827 |
rcv className:cls. |
|
4828 |
rcv selector:sel. |
|
4829 |
||
4830 |
iconAndLabelHolder value ifTrue:[ rcv labelText:'' ]. |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4831 |
^ rcv |
1606 | 4832 |
! |
4833 |
||
4834 |
resourceRetriever:aResourceRetriever |
|
4835 |
|cls sel isOn| |
|
4836 |
||
4837 |
aResourceRetriever notNil ifTrue:[ |
|
4838 |
cls := aResourceRetriever className. |
|
4839 |
cls ifNotNil:[ |
|
4840 |
cls isBehavior ifTrue:[cls := cls name asSymbol]. |
|
4841 |
]. |
|
4842 |
sel := aResourceRetriever selector. |
|
4843 |
isOn := aResourceRetriever labelText notNil. |
|
4844 |
] ifFalse:[ |
|
4845 |
cls := sel := nil. |
|
4846 |
isOn := false. |
|
1586 | 4847 |
]. |
1606 | 4848 |
|
4849 |
retrieverHolder value:cls. |
|
4850 |
selectorHolder value:sel. |
|
4851 |
iconAndLabelHolder value:isOn. |
|
4852 |
! |
|
4853 |
||
4854 |
retrieverClass |
|
4855 |
|cls| |
|
4856 |
||
4857 |
cls := retrieverHolder value. |
|
4858 |
||
4859 |
cls size ~~ 0 ifTrue:[ |
|
4860 |
cls := Smalltalk at:cls ifAbsent:nil. |
|
4861 |
||
4862 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
4863 |
^ cls |
|
4864 |
]. |
|
4865 |
]. |
|
4866 |
^ nil |
|
4867 |
! ! |
|
4868 |
||
4869 |
!MenuEditor::ResourceEditor methodsFor:'actions'! |
|
4870 |
||
4871 |
doBrowseForImageResource |
|
4872 |
"opens a browser on image-resource methods" |
|
4873 |
||
4874 |
|msg| |
|
4875 |
||
4876 |
msg := ResourceSelectionBrowser |
|
4877 |
request:'Use Image From Class' |
|
4878 |
onSuperclass:nil |
|
4879 |
andClass:(self retrieverClass) |
|
4880 |
andSelector:(selectorHolder value) |
|
4881 |
withResourceTypes:#(image fileImage programImage). |
|
4882 |
||
4883 |
msg ifNil:[ ^ self ]. |
|
4884 |
msg := msg asCollectionOfWords. |
|
4885 |
msg size == 2 ifFalse:[ ^ self ]. |
|
4886 |
||
4887 |
retrieverHolder value:(msg first asSymbol). |
|
4888 |
selectorHolder value:(msg last asSymbol). |
|
4889 |
! |
|
4890 |
||
4891 |
doEditImage |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4892 |
|sel cls item| |
1606 | 4893 |
|
4894 |
item := imageHolder value. |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4895 |
item notNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4896 |
item doEdit |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4897 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4898 |
(sel := selectorHolder value) isNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4899 |
Dialog warn:'No selector is defined.'. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4900 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4901 |
(cls := retrieverHolder value) isNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4902 |
Dialog warn:'No resource retriever is defined.'. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4903 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4904 |
cls := Smalltalk classNamed:cls. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4905 |
cls isNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4906 |
Dialog warn:'No such resource retriever class.'. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4907 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4908 |
ImageEditor openOnClass:cls andSelector:sel |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4909 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4910 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4911 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4912 |
]. |
1606 | 4913 |
! ! |
4914 |
||
4915 |
!MenuEditor::ResourceEditor methodsFor:'aspects'! |
|
4916 |
||
1853
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4917 |
entryCompletionForRetriever |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4918 |
^ [ :s :field | |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4919 |
|info| |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4920 |
|
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4921 |
info := Smalltalk classnameCompletion:s. |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4922 |
field contents:info first. |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4923 |
]. |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4924 |
! |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4925 |
|
1606 | 4926 |
iconAndLabelHolder |
4927 |
^ iconAndLabelHolder |
|
4928 |
! |
|
4929 |
||
4930 |
imageHolder |
|
4931 |
^ imageHolder. |
|
603 | 4932 |
! |
4933 |
||
1606 | 4934 |
imageList |
4935 |
^ imageList. |
|
4936 |
! |
|
4937 |
||
4938 |
modifiedChannel |
|
4939 |
^ builder booleanValueAspectFor: #modifiedChannel |
|
4940 |
! |
|
4941 |
||
4942 |
modifiedChannel:aChannel |
|
4943 |
builder aspectAt:#modifiedChannel put:aChannel. |
|
4944 |
! |
|
4945 |
||
4946 |
retrieverHolder |
|
4947 |
^ retrieverHolder |
|
4948 |
! |
|
4949 |
||
4950 |
retrieverList |
|
4951 |
|list| |
|
4952 |
||
4953 |
list := builder bindingAt:#retrieverList. |
|
4954 |
||
4955 |
list ifNil:[ |
|
4956 |
list := MenuEditor imageRetrieverClasses asList. |
|
4957 |
builder aspectAt:#retrieverList put:list. |
|
4958 |
]. |
|
4959 |
^ list |
|
199 | 4960 |
! |
4961 |
||
1606 | 4962 |
selectorHolder |
4963 |
^ selectorHolder. |
|
4964 |
! ! |
|
4965 |
||
4966 |
!MenuEditor::ResourceEditor methodsFor:'change & update'! |
|
4967 |
||
4968 |
retrieverChanged |
|
4969 |
"called if the retriever changed |
|
4970 |
" |
|
4971 |
|retriever list name| |
|
4972 |
||
4973 |
retriever := self retrieverClass. |
|
4974 |
imageHolder setValue:nil. |
|
4975 |
||
4976 |
imageList root fromClass:retriever. |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4977 |
self updateImageHolder. |
1606 | 4978 |
|
4979 |
(retriever notNil and:[imageList size ~~ 0]) ifTrue:[ |
|
4980 |
list := self retrieverList. |
|
4981 |
name := retriever name. |
|
4982 |
||
4983 |
(list includes:name) ifFalse:[ |
|
4984 |
list add:(name asSymbol). |
|
4985 |
] |
|
4986 |
]. |
|
398 | 4987 |
! |
4988 |
||
1606 | 4989 |
selectorChanged |
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4990 |
self updateImageHolder. |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
4991 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
4992 |
|
1606 | 4993 |
update:what with:aPara from:aModel |
4994 |
|item| |
|
4995 |
||
4996 |
self modifiedChannel value:true. |
|
4997 |
||
4998 |
aModel == retrieverHolder ifTrue:[ ^ self retrieverChanged ]. |
|
4999 |
aModel == selectorHolder ifTrue:[ ^ self selectorChanged ]. |
|
5000 |
||
5001 |
aModel == imageHolder ifTrue:[ |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5002 |
item := imageHolder value. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5003 |
item ifNotNil:[ selectorHolder value:(item label) ]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5004 |
^ self |
1606 | 5005 |
]. |
5006 |
super update:what with:aPara from:aModel |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5007 |
! |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5008 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5009 |
updateImageHolder |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5010 |
|item selector line| |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5011 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5012 |
imageList isEmpty ifTrue:[^ self]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5013 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5014 |
selector := selectorHolder value. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5015 |
selector size == 0 ifTrue:[ imageHolder value:nil. ^ self ]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5016 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5017 |
item := nil. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5018 |
selector := selector asSymbol. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5019 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5020 |
imageList do:[:anItem| |sel| |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5021 |
sel := anItem selector. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5022 |
selector == sel ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5023 |
imageHolder value:anItem. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5024 |
^ self |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5025 |
]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5026 |
item ifNil:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5027 |
(sel startsWith:selector) ifTrue:[ item := anItem ] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5028 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5029 |
]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5030 |
imageHolder value:nil. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5031 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5032 |
item ifNotNil:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5033 |
line := imageList identityIndexOf:item. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5034 |
imageViewer scrollToLine:line |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5035 |
]. |
1606 | 5036 |
! ! |
5037 |
||
5038 |
!MenuEditor::ResourceEditor methodsFor:'initialization'! |
|
5039 |
||
5040 |
initialize |
|
5041 |
super initialize. |
|
5042 |
||
5043 |
iconAndLabelHolder := true asValue. |
|
5044 |
iconAndLabelHolder addDependent:self. |
|
5045 |
||
5046 |
imageHolder := nil asValue. |
|
5047 |
||
5048 |
selectorHolder := nil asValue. |
|
5049 |
selectorHolder addDependent:self. |
|
5050 |
||
5051 |
imageList := HierarchicalList new. |
|
5052 |
imageList application:self. |
|
5053 |
imageList root:(MenuEditor::ResourceEditorItem new). |
|
5054 |
imageList showRoot:false. |
|
5055 |
||
5056 |
imageHolder := nil asValue. |
|
5057 |
imageHolder addDependent:self. |
|
5058 |
||
5059 |
retrieverHolder := nil asValue. |
|
5060 |
retrieverHolder addDependent:self. |
|
5061 |
! |
|
5062 |
||
5063 |
postBuildImageViewer:aWidget |
|
5064 |
imageViewer := aWidget. |
|
5065 |
! ! |
|
5066 |
||
5067 |
!MenuEditor::ResourceEditorItem class methodsFor:'instance creation'! |
|
5068 |
||
5069 |
fromClass:aClass selector:aSelector |
|
5070 |
|item| |
|
5071 |
||
5072 |
item := self new. |
|
5073 |
item fromClass:aClass selector:aSelector. |
|
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5074 |
^ item |
1606 | 5075 |
! ! |
5076 |
||
5077 |
!MenuEditor::ResourceEditorItem methodsFor:'accessing'! |
|
5078 |
||
5079 |
icon |
|
5080 |
^ icon |
|
5081 |
! |
|
5082 |
||
5083 |
label |
|
5084 |
^ selector |
|
557 | 5085 |
! |
5086 |
||
1606 | 5087 |
selector |
5088 |
^ selector |
|
5089 |
! ! |
|
5090 |
||
5091 |
!MenuEditor::ResourceEditorItem methodsFor:'instance creation'! |
|
5092 |
||
5093 |
fromClass:aClass |
|
5094 |
|r item| |
|
5095 |
||
5096 |
(aClass notNil and:[aClass isBehavior]) ifFalse:[ |
|
5097 |
^ self collapse. |
|
5098 |
]. |
|
5099 |
aClass == selector ifTrue:[ |
|
5100 |
^ self expand |
|
5101 |
]. |
|
5102 |
self collapse. |
|
5103 |
||
5104 |
selector := aClass. |
|
5105 |
children := SortedCollection sortBlock:[:a :b| a label < b label ]. |
|
5106 |
||
5107 |
self application withWaitCursorDo:[ |
|
5108 |
aClass withAllSuperclassesDo:[:aClass| |
|
5109 |
aClass class selectorsAndMethodsDo:[:sel :m| |
|
5110 |
((r := m resourceType) == #image or:[r == #programImage]) ifTrue:[ |
|
5111 |
item := self class fromClass:aClass selector:sel. |
|
5112 |
item parent:self. |
|
5113 |
children add:item |
|
5114 |
] |
|
5115 |
] |
|
5116 |
]. |
|
5117 |
self expand |
|
5118 |
]. |
|
5119 |
! |
|
5120 |
||
5121 |
fromClass:aClass selector:aSelector |
|
5122 |
|w h magnify| |
|
5123 |
||
5124 |
selector := aSelector asSymbol. |
|
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5125 |
selector numArgs == 0 ifFalse:[^ self]. |
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5126 |
|
1606 | 5127 |
icon := aClass perform:selector. |
5128 |
||
5129 |
w := icon width. |
|
5130 |
h := icon height. |
|
5131 |
||
5132 |
w > 32 ifTrue:[ |
|
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5133 |
magnify := 32 / w. |
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5134 |
h > 32 ifTrue:[ magnify := (32 / h) max:magnify ]. |
1606 | 5135 |
] ifFalse:[ |
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5136 |
h > 32 ifFalse:[^ self]. |
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5137 |
magnify := 32 / h. |
1606 | 5138 |
]. |
5139 |
icon := icon magnifiedBy: magnify. |
|
5140 |
! |
|
5141 |
||
5142 |
initialize |
|
5143 |
super initialize. |
|
5144 |
children := #(). |
|
5145 |
! ! |
|
5146 |
||
5147 |
!MenuEditor::ResourceEditorItem methodsFor:'user operations'! |
|
5148 |
||
5149 |
doEdit |
|
5150 |
"open image browser on self |
|
5151 |
" |
|
5152 |
|parent| |
|
5153 |
||
5154 |
parent := self parent. |
|
5155 |
||
5156 |
parent ifNotNil:[ |
|
5157 |
ImageEditor openOnClass:(parent selector) andSelector:selector |
|
5158 |
]. |
|
199 | 5159 |
! ! |
5160 |
||
1631 | 5161 |
!MenuEditor::RootItem class methodsFor:'defaults'! |
5162 |
||
5163 |
defaultLabel |
|
5164 |
^ MenuEditor resourceType |
|
5165 |
! ! |
|
5166 |
||
1668 | 5167 |
!MenuEditor::RootItem class methodsFor:'interface specs'! |
1631 | 5168 |
|
5169 |
basicsEditSpec |
|
5170 |
"This resource specification was automatically generated |
|
5171 |
by the UIPainter of ST/X." |
|
5172 |
||
5173 |
"Do not manually edit this!! If it is corrupted, |
|
5174 |
the UIPainter may not be able to read the specification." |
|
5175 |
||
5176 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5177 |
UIPainter new openOnClass:MenuEditor::RootItem andSelector:#basicsEditSpec |
1631 | 5178 |
" |
5179 |
||
5180 |
<resource: #canvas> |
|
5181 |
||
5182 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5183 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5184 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5185 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5186 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5187 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5188 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5189 |
min: (Point 10 10) |
1810 | 5190 |
bounds: (Rectangle 0 0 260 46) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5191 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5192 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5193 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5194 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5195 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5196 |
label: 'Selector:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5197 |
name: 'selectorLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5198 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5199 |
activeHelpKey: basicsSelector |
1810 | 5200 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5201 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5202 |
adjust: right |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5203 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5204 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5205 |
name: 'selectorField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5206 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5207 |
activeHelpKey: basicsSelector |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5208 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5209 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5210 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5211 |
type: string |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5212 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5213 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5214 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5215 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5216 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5217 |
acceptOnPointerLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5218 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5219 |
) |
1631 | 5220 |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5221 |
) |
1631 | 5222 |
) |
5223 |
! ! |
|
5224 |
||
1725 | 5225 |
!MenuEditor::RootItem class methodsFor:'interface-editor'! |
5226 |
||
5227 |
addBindingsTo:aspects for:aMenuEditor |
|
5228 |
"add additional bindings to the aspects |
|
5229 |
" |
|
5230 |
! ! |
|
5231 |
||
1631 | 5232 |
!MenuEditor::RootItem methodsFor:'accessing'! |
5233 |
||
5234 |
menuItem:aMenuItem |
|
5235 |
"rebuild self from a MenuItem |
|
5236 |
" |
|
5237 |
|submenu selector| |
|
5238 |
||
5239 |
aMenuItem notNil ifTrue:[ |
|
5240 |
submenu := aMenuItem submenu. |
|
5241 |
selector := aMenuItem rawLabel. |
|
5242 |
] ifFalse:[ |
|
5243 |
selector := submenu := nil. |
|
5244 |
]. |
|
5245 |
self menu:submenu labeled:selector. |
|
5246 |
! |
|
5247 |
||
5248 |
rawLabel:aValue |
|
5249 |
"set the label assigned to the item |
|
5250 |
" |
|
5251 |
|value| |
|
5252 |
||
5253 |
aValue isString ifTrue:[ |
|
5254 |
value := aValue withoutSeparators. |
|
5255 |
||
5256 |
(value notEmpty and:[value first isLetter]) ifTrue:[ |
|
5257 |
menuItem rawLabel:(value asSymbol) |
|
5258 |
]. |
|
5259 |
]. |
|
5260 |
! |
|
5261 |
||
5262 |
slices |
|
5263 |
^ #( |
|
5264 |
(Basics basicsEditSpec) |
|
5265 |
) |
|
5266 |
! ! |
|
5267 |
||
5268 |
!MenuEditor::RootItem methodsFor:'adding & removing'! |
|
5269 |
||
5270 |
remove |
|
5271 |
"cannot remove the root item; delete all my children |
|
5272 |
" |
|
5273 |
self removeAll. |
|
5274 |
! ! |
|
5275 |
||
5276 |
!MenuEditor::RootItem methodsFor:'aspects'! |
|
5277 |
||
5278 |
aspectAt:aKey put:aValue |
|
5279 |
"discard all other than the rawLabel |
|
5280 |
" |
|
5281 |
aKey == #rawLabel ifTrue:[ self rawLabel:aValue ]. |
|
5282 |
! ! |
|
5283 |
||
5284 |
!MenuEditor::RootItem methodsFor:'displaying'! |
|
5285 |
||
5286 |
heightOn:aGC |
|
5287 |
height ifNil:[ height := aGC font heightOn:aGC device ]. |
|
5288 |
^ height |
|
5289 |
! ! |
|
5290 |
||
5291 |
!MenuEditor::RootItem methodsFor:'initialization'! |
|
5292 |
||
5293 |
initialize |
|
5294 |
super initialize. |
|
5295 |
isExpanded := true. |
|
5296 |
! ! |
|
5297 |
||
5298 |
!MenuEditor::RootItem methodsFor:'queries'! |
|
5299 |
||
5300 |
canCollapse |
|
5301 |
^ false |
|
5302 |
! |
|
5303 |
||
5304 |
hasIndicator |
|
5305 |
^ false |
|
5306 |
! |
|
5307 |
||
5308 |
isDelayedMenu |
|
5309 |
^ false |
|
5310 |
! |
|
5311 |
||
5312 |
isRootItem |
|
5313 |
^ true |
|
5314 |
! ! |
|
5315 |
||
1660 | 5316 |
!MenuEditor::RootItem methodsFor:'queries-editor'! |
1631 | 5317 |
|
5318 |
actionSelectors |
|
5319 |
"returns my action selectors |
|
5320 |
" |
|
5321 |
^ #() |
|
5322 |
! |
|
5323 |
||
5324 |
aspectSelectors |
|
5325 |
"returns my aspect selectors |
|
5326 |
" |
|
5327 |
^ #() |
|
5328 |
! ! |
|
5329 |
||
1660 | 5330 |
!MenuEditor::RootItem methodsFor:'queries-operation'! |
1631 | 5331 |
|
5332 |
canMoveInAbove |
|
5333 |
^ false |
|
5334 |
! |
|
5335 |
||
5336 |
canMoveInNext |
|
5337 |
^ false |
|
5338 |
! |
|
5339 |
||
5340 |
canMoveOut |
|
5341 |
^ false |
|
5342 |
! |
|
5343 |
||
5344 |
canMoveUpOrDown |
|
5345 |
^ false |
|
5346 |
! ! |
|
5347 |
||
1668 | 5348 |
!MenuEditor::SeparatorItem class methodsFor:'interface specs'! |
1631 | 5349 |
|
5350 |
basicsEditSpec |
|
5351 |
"This resource specification was automatically generated |
|
5352 |
by the UIPainter of ST/X." |
|
5353 |
||
5354 |
"Do not manually edit this!! If it is corrupted, |
|
5355 |
the UIPainter may not be able to read the specification." |
|
5356 |
||
5357 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5358 |
UIPainter new openOnClass:MenuEditor::SeparatorItem andSelector:#basicsEditSpec |
1631 | 5359 |
" |
5360 |
||
5361 |
<resource: #canvas> |
|
5362 |
||
5363 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5364 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5365 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5366 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5367 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5368 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5369 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5370 |
min: (Point 10 10) |
1810 | 5371 |
bounds: (Rectangle 0 0 260 245) |
1636 | 5372 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5373 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5374 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5375 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5376 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5377 |
label: 'Separator:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5378 |
name: 'separatorLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5379 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
1810 | 5380 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5381 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5382 |
adjust: right |
1636 | 5383 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5384 |
(ComboListSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5385 |
name: 'seperatorList' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5386 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5387 |
activeHelpKey: basicsSeparatorType |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5388 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5389 |
model: seperatorSelection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5390 |
comboList: seperatorList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5391 |
useIndex: true |
1636 | 5392 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5393 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5394 |
label: 'Visibility:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5395 |
name: 'visibilityLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5396 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
1810 | 5397 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5398 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5399 |
adjust: right |
1636 | 5400 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5401 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5402 |
name: 'visibilityInputField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5403 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5404 |
activeHelpKey: detailsVisibility |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5405 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5406 |
model: isVisible |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5407 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5408 |
type: symbolOrBooleanOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5409 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5410 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5411 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5412 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5413 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5414 |
acceptOnPointerLeave: false |
1636 | 5415 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5416 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5417 |
label: 'Start Group:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5418 |
name: 'startGroupLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5419 |
layout: (AlignmentOrigin 107 0 88 0 1 0.5) |
1810 | 5420 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5421 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5422 |
adjust: right |
1636 | 5423 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5424 |
(PopUpListSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5425 |
label: 'left' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5426 |
name: 'startGroupPopUp' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5427 |
layout: (LayoutFrame 110 0 77 0 -5 1.0 99 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5428 |
activeHelpKey: detailsStartGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5429 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5430 |
model: startGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5431 |
menu: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5432 |
(left |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5433 |
right |
1636 | 5434 |
) |
5435 |
) |
|
5436 |
) |
|
1631 | 5437 |
|
1636 | 5438 |
) |
1631 | 5439 |
) |
5440 |
! ! |
|
5441 |
||
1725 | 5442 |
!MenuEditor::SeparatorItem class methodsFor:'interface-editor'! |
5443 |
||
5444 |
addBindingsTo:aspects for:aMenuEditor |
|
5445 |
"add additional bindings to the aspects |
|
5446 |
" |
|
5447 |
|holder| |
|
5448 |
||
1810 | 5449 |
aspects |
5450 |
at:#seperatorList |
|
5451 |
ifAbsentPut: |
|
5452 |
[ |
|
5453 |
|l| |
|
5454 |
||
5455 |
l := self separatorSlices collect:[:el| el last ]. |
|
5456 |
l := l collect:[:s | self classResources string:s ]. |
|
5457 |
l |
|
5458 |
]. |
|
1725 | 5459 |
|
5460 |
aspects at:#seperatorSelection ifAbsentPut:[ |
|
1810 | 5461 |
holder := 0 asValue. |
5462 |
holder addDependent:aMenuEditor. |
|
5463 |
holder |
|
1725 | 5464 |
]. |
5465 |
! |
|
5466 |
||
5467 |
defaultLabel |
|
5468 |
^ '-' |
|
5469 |
! |
|
5470 |
||
5471 |
separatorSlices |
|
5472 |
"get the list of menu spec values of the corresponding separator types |
|
5473 |
" |
|
5474 |
^ #( |
|
5475 |
( #blank '' 'blank' ) |
|
5476 |
( #single '-' 'single line') |
|
5477 |
( #double '=' 'double line') |
|
5478 |
) |
|
5479 |
! ! |
|
5480 |
||
1631 | 5481 |
!MenuEditor::SeparatorItem methodsFor:'accessing'! |
5482 |
||
5483 |
icon |
|
5484 |
^ self class iconSeparator |
|
5485 |
! |
|
5486 |
||
5487 |
rawLabel:aValue |
|
5488 |
|value| |
|
5489 |
||
5490 |
aValue isString ifTrue:[ |
|
5491 |
value := aValue withoutSeparators. |
|
5492 |
||
5493 |
(self class separatorTypeOf:value) ifNotNil:[ |
|
5494 |
menuItem rawLabel:value |
|
5495 |
] |
|
5496 |
]. |
|
5497 |
! |
|
5498 |
||
5499 |
separatorType |
|
5500 |
^ self class separatorTypeOf:(menuItem rawLabel). |
|
5501 |
! |
|
5502 |
||
5503 |
slices |
|
5504 |
^ #( |
|
5505 |
(Basics basicsEditSpec) |
|
5506 |
) |
|
5507 |
! ! |
|
5508 |
||
5509 |
!MenuEditor::SeparatorItem methodsFor:'aspects'! |
|
5510 |
||
5511 |
fromAspects:aspects |
|
5512 |
"put my values into the values of aspects |
|
5513 |
" |
|
5514 |
|index slice| |
|
5515 |
||
5516 |
index := (aspects at:#seperatorSelection) value ? 0. |
|
5517 |
slice := self class separatorSlices at:index ifAbsent:nil. |
|
5518 |
||
5519 |
slice ifNotNil:[ slice := slice at:2 ]. |
|
5520 |
||
5521 |
(aspects at:#rawLabel) value:slice. |
|
5522 |
^ super fromAspects:aspects. |
|
5523 |
! |
|
5524 |
||
5525 |
toAspects:aspects |
|
5526 |
"put my values into the values of aspects |
|
5527 |
" |
|
5528 |
|index type| |
|
5529 |
||
5530 |
type := self separatorType. |
|
5531 |
index := self class separatorSlices findFirst:[:el| el first == type ]. |
|
5532 |
||
5533 |
(aspects at:#seperatorSelection) value:index. |
|
5534 |
^ super toAspects:aspects. |
|
5535 |
! ! |
|
5536 |
||
5537 |
!MenuEditor::SeparatorItem methodsFor:'displaying'! |
|
5538 |
||
5539 |
displayOn:aGC x:x y:y h:h |
|
5540 |
"draw the receiver in the graphicsContext, aGC. |
|
5541 |
" |
|
5542 |
|x1 y0 type| |
|
5543 |
||
5544 |
type := self separatorType. |
|
5545 |
type == #blank ifTrue:[ ^ self ]. |
|
5546 |
||
5547 |
x1 := x + (self widthOn:aGC). |
|
5548 |
y0 := y + (h // 2) - 1. |
|
5549 |
||
5550 |
type == #double ifTrue:[ |
|
5551 |
y0 := y0 + 1. |
|
5552 |
aGC displayLineFromX:x y:y0 toX:x1 y:y0. |
|
5553 |
y0 := y0 - 2 |
|
5554 |
]. |
|
5555 |
aGC displayLineFromX:x y:y0 toX:x1 y:y0 |
|
5556 |
! |
|
5557 |
||
5558 |
widthOn:aGC |
|
5559 |
width ifNil:[ width := 60 ]. |
|
5560 |
^ width |
|
5561 |
! ! |
|
5562 |
||
199 | 5563 |
!MenuEditor class methodsFor:'documentation'! |
5564 |
||
5565 |
version |
|
5566 |
^ '$Header$' |
|
5567 |
! ! |
|
1606 | 5568 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
5569 |
MenuEditor initialize! |