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