author | Claus Gittinger <cg@exept.de> |
Mon, 06 Mar 2006 09:30:18 +0100 | |
changeset 2017 | 842d445b706a |
parent 2011 | d323a2d0dbfc |
child 2019 | fb6b725c7c8e |
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 |
|
2017 | 400 |
'Keep the linked menu after activation (do not destroy; rebuild menu for every activation).' |
1690 | 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) |
2003 | 511 |
bounds: (Rectangle 0 0 574 473) |
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 |
2003 | 550 |
leaveSelector: dropLeave: |
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: |
2003 | 557 |
dropSelector: doDrop: |
1606 | 558 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
559 |
postBuildCallback: postBuildListOfItemsView: |
1244 | 560 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
561 |
(ViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
562 |
name: 'Box' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
563 |
level: -1 |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
564 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
565 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
566 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
567 |
(NoteBookViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
568 |
name: 'NoteBook' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
569 |
layout: (LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
570 |
enableChannel: hasSingleSelectionChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
571 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
572 |
model: tabHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
573 |
menu: listOfTabs |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
574 |
fitLastRow: false |
1788 | 575 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
576 |
canvas: wizardHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
577 |
keepCanvasAlive: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
578 |
postBuildCallback: postBuildNoteBook: |
1244 | 579 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
580 |
(UISubSpecification |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
581 |
name: 'SubSpecification' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
582 |
layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
583 |
majorKey: ToolApplicationModel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
584 |
minorKey: windowSpecForCommit |
525 | 585 |
) |
1244 | 586 |
) |
587 |
||
525 | 588 |
) |
1244 | 589 |
) |
590 |
) |
|
591 |
||
525 | 592 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
593 |
handles: (Any 0.300493 1.0) |
1244 | 594 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
595 |
(UISubSpecification |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
748 |
#enabled: #enableMovingUpOrDownHolder |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
758 |
#enabled: #enableMovingUpOrDownHolder |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
767 |
#enabled: #enableMovingInHolder |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
776 |
#enabled: #enableMovingInAboveHolder |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
785 |
#enabled: #enableMovingOutHolder |
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 |
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1276 |
enabled: enableMovingUpOrDownHolder |
1749 | 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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1286 |
enabled: enableMovingUpOrDownHolder |
1749 | 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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1295 |
enabled: enableMovingInHolder |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1304 |
enabled: enableMovingInAboveHolder |
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 |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1313 |
enabled: enableMovingOutHolder |
1749 | 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 |
|
2017 | 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. |
2017 | 1468 |
tool builder window:(ApplicationSubView new client:tool spec:#innerSpec). |
1669 | 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 |
||
1971 | 1659 |
loadFromClass:aClass andSelector:aSelector |
1660 |
"rebuild menu from a class and selector" |
|
1661 |
||
1662 |
|cls menu| |
|
1663 |
||
1664 |
self assert:(aClass isNil or:[aClass isClass]). |
|
1665 |
||
1666 |
menu := nil. |
|
1667 |
||
1668 |
self isStandAlone ifTrue:[ self helpTool loadFromClass:aClass ]. |
|
1669 |
||
1670 |
specClass := aClass. |
|
1671 |
specSelector := aSelector. |
|
1672 |
||
1673 |
aSelector notNil ifTrue:[ |
|
1674 |
aClass notNil ifTrue:[ |
|
1675 |
cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass]. |
|
1676 |
||
1677 |
(cls respondsTo:aSelector) ifTrue:[ |
|
1678 |
menu := cls perform: aSelector. |
|
1679 |
]. |
|
1680 |
||
1681 |
menu notNil ifTrue:[ |
|
1682 |
(menu isMemberOf:Menu) ifFalse:[ |
|
1683 |
menu := Menu new fromLiteralArrayEncoding:menu |
|
1684 |
]. |
|
1685 |
] |
|
1686 |
]. |
|
1687 |
]. |
|
1688 |
self buildFromMenu:menu selector:aSelector. |
|
1689 |
self clearModified. |
|
2017 | 1690 |
! |
1691 |
||
1692 |
loadFromResourceSpec:aResourceSpec |
|
1693 |
"rebuild the menu from a resource spec" |
|
1694 |
||
1695 |
self buildFromMenu:aResourceSpec selector:nil |
|
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] |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1813 |
ifFalse:[selectedItem := nil]. |
1606 | 1814 |
|
1815 |
self hasSelectionChannel value:(sizeOfSel ~~ 0). |
|
1816 |
self hasSingleSelectionChannel value:(selectedItem notNil). |
|
1817 |
||
1818 |
selectedItem isNil ifTrue:[ |
|
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1819 |
self enableMovingInHolder value:false. |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1820 |
self enableMovingOutHolder value:false. |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1821 |
self enableMovingUpOrDownHolder value:false. |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1822 |
self enableMovingInAboveHolder value:false. |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1823 |
self canCreateDelayedMenuChannel value:false. |
1244 | 1824 |
] ifFalse:[ |
2011
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1825 |
self enableMovingUpOrDownHolder value:(selectedItem canMoveUpOrDown). |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1826 |
self enableMovingOutHolder value:(selectedItem canMoveOut). |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1827 |
self enableMovingInHolder value:(selectedItem canMoveInNext). |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
1828 |
self enableMovingInAboveHolder value:(selectedItem canMoveInAbove). |
d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2010
diff
changeset
|
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 |
|
2017 | 2139 |
"asks for permission before closing" |
2140 |
||
1988 | 2141 |
self enablingCommitButtonsHolder value ifTrue:[ |
1971 | 2142 |
self setModified. |
1606 | 2143 |
self askForListModification. |
2144 |
modified ifTrue:[^ self]. |
|
2145 |
self clearModified. |
|
1301 | 2146 |
]. |
2017 | 2147 |
super closeRequest |
1606 | 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 |
2017 | 2202 |
"reset keyboardProcessor for menuBar" |
2203 |
||
1250 | 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 |
||
2008
a2906aabdbb1
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2003
diff
changeset
|
2255 |
super clearModified. |
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 |
2010
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3206 |
label: 'Ignore Accelerator (i.e. Display Only)' |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3207 |
name: 'ignoreShortcutKeysInItem' |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3208 |
layout: (AlignmentOrigin 42 0 204 0 0 0.5) |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3209 |
activeHelpKey: detailsIgnoreAcceleratorKeys |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3210 |
visibilityChannel: hasNoSubmenu |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3211 |
model: ignoreShortcutKeys |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3212 |
translateLabel: true |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3213 |
resizeForLabel: true |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3214 |
) |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3215 |
(CheckBoxSpec |
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3216 |
label: 'Ignore Accelerators in Submenu' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3217 |
name: 'ignoreShortcutKeys' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3218 |
layout: (AlignmentOrigin 42 0 204 0 0 0.5) |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3219 |
activeHelpKey: detailsIgnoreAcceleratorKeys |
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: ignoreShortcutKeys |
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 |
) |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3225 |
(CheckBoxSpec |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3226 |
label: 'Ignore Mnemonics in Submenu' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3227 |
name: 'ignoreMnemonicKeys' |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3228 |
layout: (AlignmentOrigin 42 0 232 0 0 0.5) |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3229 |
activeHelpKey: detailsIgnoreMnemonicKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3230 |
visibilityChannel: hasSubmenu |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3231 |
model: ignoreMnemonicKeys |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3232 |
translateLabel: true |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3233 |
resizeForLabel: true |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3234 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3235 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3236 |
label: 'Font:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3237 |
name: 'fontLabel' |
1810 | 3238 |
layout: (AlignmentOrigin 107 0 271 0 1 0.5) |
3239 |
translateLabel: true |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3240 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3241 |
adjust: right |
1636 | 3242 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3243 |
(FontMenuSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3244 |
attributes: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3245 |
(tabable |
1636 | 3246 |
true |
3247 |
) |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3248 |
name: 'fontMenu' |
1810 | 3249 |
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
|
3250 |
activeHelpKey: fontMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3251 |
model: font |
1636 | 3252 |
) |
3253 |
) |
|
1606 | 3254 |
|
1636 | 3255 |
) |
1454 | 3256 |
) |
3257 |
! ! |
|
3258 |
||
1725 | 3259 |
!MenuEditor::Item class methodsFor:'interface-editor'! |
3260 |
||
3261 |
addBindingsTo:aspects for:aMenuEditor |
|
3262 |
"add additional bindings to the aspects |
|
3263 |
" |
|
3264 |
aspects at:#notDelayedMenu ifAbsentPut:[ |
|
3265 |
true asValue |
|
3266 |
]. |
|
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3267 |
aspects at:#hasSubmenu ifAbsentPut:[ |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3268 |
false asValue |
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3269 |
]. |
2010
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3270 |
aspects at:#hasNoSubmenu ifAbsentPut:[ |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3271 |
true asValue |
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3272 |
]. |
1725 | 3273 |
! ! |
3274 |
||
1606 | 3275 |
!MenuEditor::Item class methodsFor:'testing'! |
3276 |
||
3277 |
separatorTypeOf:aString |
|
3278 |
|size first| |
|
3279 |
||
3280 |
size := aString size. |
|
3281 |
||
3282 |
size == 0 ifTrue:[ ^ #blank ]. |
|
3283 |
||
3284 |
size == 1 ifTrue:[ |
|
3285 |
first := aString first. |
|
3286 |
first == $- ifTrue:[ ^ #single ]. |
|
3287 |
first == $= ifTrue:[ ^ #double ]. |
|
3288 |
first == (Character space) ifTrue:[ ^ #blank ]. |
|
3289 |
]. |
|
3290 |
^ nil |
|
1454 | 3291 |
! ! |
3292 |
||
3293 |
!MenuEditor::Item methodsFor:'accessing'! |
|
3294 |
||
1606 | 3295 |
children |
3296 |
"optimize access; do not ask the model for unspecified children |
|
3297 |
" |
|
3298 |
^ children |
|
3299 |
! |
|
3300 |
||
3301 |
menuItem |
|
3302 |
"returns self as a MenuItem |
|
3303 |
" |
|
3304 |
^ MenuItem new fromLiteralArrayEncoding:(menuItem literalArrayEncoding). |
|
3305 |
! |
|
3306 |
||
3307 |
menuItem:aMenuItem |
|
3308 |
"rebuild self from a MenuItem |
|
3309 |
" |
|
3310 |
|value| |
|
3311 |
||
3312 |
menuItem := MenuItem labeled:(self rawLabel). |
|
3313 |
||
3314 |
MenuEditor aspects do:[:aKey| |
|
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3315 |
value := self validateValue:(aMenuItem perform:aKey). |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3316 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3317 |
value notNil ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3318 |
self aspectAt:aKey put:value. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3319 |
]. |
1606 | 3320 |
]. |
3321 |
! |
|
3322 |
||
3323 |
rawLabel |
|
3324 |
"returns the label assigned to the item |
|
3325 |
" |
|
3326 |
^ menuItem rawLabel |
|
3327 |
! |
|
3328 |
||
3329 |
rawLabel:aValue |
|
3330 |
"set the label assigned to the item |
|
3331 |
" |
|
3332 |
aValue isString ifTrue:[ |
|
1691
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3333 |
"/ KLUDGE alarm: '-' and '' indicate a separator |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3334 |
"/ (there is no separate menuItem class for them) |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3335 |
|
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3336 |
(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
|
3337 |
menuItem rawLabel:aValue |
a3f8baada9e6
allow empty rawLabel (for menu-menuitems).
Claus Gittinger <cg@exept.de>
parents:
1690
diff
changeset
|
3338 |
] |
1606 | 3339 |
]. |
3340 |
! |
|
3341 |
||
3342 |
slices |
|
3343 |
"returns a sequence of supported slices |
|
3344 |
" |
|
3345 |
^ self subclassResponsibility |
|
1454 | 3346 |
! |
3347 |
||
1606 | 3348 |
submenu |
3349 |
"returns the submenu (of class Menu) or nil |
|
3350 |
" |
|
3351 |
^ nil |
|
1631 | 3352 |
! |
3353 |
||
3354 |
translateLabel:aBoolean |
|
3355 |
menuItem translateLabel:aBoolean |
|
1606 | 3356 |
! ! |
3357 |
||
3358 |
!MenuEditor::Item methodsFor:'aspects'! |
|
3359 |
||
3360 |
aspectAt:aKey put:aValue |
|
3361 |
"set a specific aspect named aKey to the aValue |
|
3362 |
" |
|
3363 |
aKey == #rawLabel ifTrue:[ ^ self rawLabel:aValue ]. |
|
3364 |
aKey == #submenuChannel ifTrue:[ ^ self ]. |
|
3365 |
menuItem perform:((aKey, ':') asSymbol) with:aValue. |
|
3366 |
! |
|
3367 |
||
3368 |
fromAspects:aspects |
|
3369 |
"read values from aspects |
|
3370 |
" |
|
3371 |
MenuEditor aspects do:[:aKey| |
|
3372 |
self aspectAt:aKey put:((aspects at:aKey) value) |
|
3373 |
]. |
|
3374 |
self changed. |
|
3375 |
! |
|
3376 |
||
3377 |
toAspects:aspects |
|
3378 |
"write values to aspects |
|
3379 |
" |
|
3380 |
MenuEditor aspects do:[:aKey| |
|
3381 |
(aspects at:aKey) value:(menuItem perform:aKey) |
|
3382 |
]. |
|
3383 |
(aspects at:#notDelayedMenu) value:(self isDelayedMenu not). |
|
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3384 |
(aspects at:#hasSubmenu) value:(self isKindOfMenu or:[self children size ~~ 0]). |
2010
f5f5a961cfa8
ignoreShortcutKeys also blocks individual items
Claus Gittinger <cg@exept.de>
parents:
2008
diff
changeset
|
3385 |
(aspects at:#hasNoSubmenu) value:(self isKindOfMenu not ). |
1606 | 3386 |
! ! |
3387 |
||
3388 |
!MenuEditor::Item methodsFor:'displaying'! |
|
3389 |
||
3390 |
displayLabel |
|
3391 |
"returns the label on default displayed on the screen |
|
3392 |
" |
|
3393 |
^ menuItem rawLabel |
|
3394 |
! |
|
3395 |
||
3396 |
displayOn:aGC x:x y:y h:h |
|
3397 |
"display the item in the graphicsContext, aGC. |
|
3398 |
" |
|
3399 |
|label| |
|
3400 |
||
3401 |
label := self displayLabel. |
|
3402 |
||
3403 |
label notNil ifTrue:[ |
|
3404 |
self displayLabel:label h:(self heightOn:aGC) on:aGC x:x y:y h:h |
|
3405 |
]. |
|
3406 |
! |
|
3407 |
||
3408 |
heightOn:aGC |
|
3409 |
"returns the height of the label on a GC |
|
3410 |
" |
|
3411 |
height ifNil:[ height := parent heightOn:aGC ]. |
|
3412 |
^ height |
|
1454 | 3413 |
! |
3414 |
||
3415 |
label |
|
1606 | 3416 |
"get the rawLabel assigned to the item |
3417 |
" |
|
3418 |
^ menuItem rawLabel |
|
1454 | 3419 |
! |
3420 |
||
1606 | 3421 |
label:aLabel |
3422 |
"set the rawLabel assigned to the item |
|
3423 |
" |
|
3424 |
self rawLabel:aLabel |
|
1454 | 3425 |
! |
3426 |
||
1606 | 3427 |
widthOn:aGC |
3428 |
"returns the height of the displayLabel on a GC |
|
3429 |
" |
|
3430 |
width ifNil:[ width := self widthOf:(self displayLabel) on:aGC ]. |
|
3431 |
^ width |
|
1454 | 3432 |
! ! |
3433 |
||
1606 | 3434 |
!MenuEditor::Item methodsFor:'initialization'! |
3435 |
||
3436 |
initialize |
|
3437 |
super initialize. |
|
3438 |
menuItem := MenuItem label:(self class defaultLabel). |
|
1454 | 3439 |
! ! |
3440 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3441 |
!MenuEditor::Item methodsFor:'private'! |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3442 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3443 |
validateValue:aValue |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3444 |
"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
|
3445 |
a block model, .... |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3446 |
" |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3447 |
aValue notNil ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3448 |
aValue isBlock ifTrue:[ ^ #block ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3449 |
aValue isValueModel ifTrue:[ ^ #valueModel ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3450 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3451 |
^ aValue |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3452 |
! ! |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
3453 |
|
1454 | 3454 |
!MenuEditor::Item methodsFor:'queries'! |
3455 |
||
1606 | 3456 |
isAction |
3457 |
"returns true if the item is an Action |
|
3458 |
" |
|
3459 |
^ false |
|
3460 |
! |
|
3461 |
||
3462 |
isDelayedMenu |
|
3463 |
"returns true if the item is a Delayed (Linked) Menu |
|
3464 |
" |
|
3465 |
^ parent isAction |
|
3466 |
! |
|
3467 |
||
3468 |
isKindOfMenu |
|
3469 |
"returns true if the item is a Linked Menu or Menu |
|
3470 |
" |
|
3471 |
^ false |
|
3472 |
! |
|
3473 |
||
1633 | 3474 |
isMenuEditItem |
3475 |
^ true |
|
3476 |
! |
|
3477 |
||
1606 | 3478 |
isRootItem |
3479 |
"returns true if the item is the root item |
|
3480 |
" |
|
3481 |
^ false |
|
3482 |
! ! |
|
3483 |
||
1660 | 3484 |
!MenuEditor::Item methodsFor:'queries-editor'! |
1614 | 3485 |
|
3486 |
actionSelectors |
|
3487 |
"returns my action selectors |
|
3488 |
" |
|
3489 |
|value| |
|
3490 |
||
3491 |
value := menuItem value. |
|
3492 |
value isSymbol ifTrue:[ ^ Array with:value ]. |
|
3493 |
^ #() |
|
3494 |
! |
|
3495 |
||
3496 |
aspectSelectors |
|
3497 |
"returns my aspect selectors |
|
3498 |
" |
|
3499 |
|aspects| |
|
3500 |
||
3501 |
aspects := OrderedCollection new. |
|
3502 |
||
3503 |
#( indication choice enabled isVisible ) do:[:aKey| |sel| |
|
3504 |
sel := menuItem perform:aKey. |
|
3505 |
sel isSymbol ifTrue:[ aspects add:sel ] |
|
3506 |
]. |
|
3507 |
^ aspects |
|
3508 |
! ! |
|
3509 |
||
1660 | 3510 |
!MenuEditor::Item methodsFor:'queries-operation'! |
1606 | 3511 |
|
3512 |
canAddChildren |
|
3513 |
"returns true if children can be added |
|
3514 |
" |
|
3515 |
^ false |
|
3516 |
! |
|
3517 |
||
3518 |
canAddDelayedMenu |
|
3519 |
"returns true if a delayed menu can be added; |
|
3520 |
on default false is returned |
|
3521 |
" |
|
3522 |
^ false |
|
3523 |
! |
|
3524 |
||
3525 |
canMoveInAbove |
|
3526 |
"returns true if the item can become a child of its previous sibling |
|
3527 |
" |
|
3528 |
|siblings index nextItem| |
|
3529 |
||
3530 |
siblings := parent children. |
|
3531 |
siblings size > 1 ifFalse:[ ^ false ]. |
|
3532 |
||
3533 |
index := siblings identityIndexOf:self. |
|
3534 |
nextItem := siblings at:(index - 1) ifAbsent:nil. |
|
3535 |
||
3536 |
nextItem ifNil:[^ false]. |
|
3537 |
^ nextItem canAddChildren |
|
1454 | 3538 |
! |
3539 |
||
1606 | 3540 |
canMoveInNext |
3541 |
"returns true if the item can become a child of its next sibling |
|
3542 |
" |
|
3543 |
|siblings index nextItem| |
|
3544 |
||
3545 |
siblings := parent children. |
|
3546 |
siblings size > 1 ifFalse:[ ^ false ]. |
|
3547 |
||
3548 |
index := siblings identityIndexOf:self. |
|
3549 |
nextItem := siblings at:(index + 1) ifAbsent:nil. |
|
3550 |
||
3551 |
nextItem ifNil:[^ false]. |
|
3552 |
^ nextItem canAddChildren |
|
3553 |
! |
|
3554 |
||
3555 |
canMoveOut |
|
3556 |
"returns true if the item can be moved out from its current parent |
|
3557 |
" |
|
3558 |
self isDelayedMenu ifTrue:[^ false]. |
|
3559 |
parent isDelayedMenu ifTrue:[^ false]. |
|
3560 |
||
3561 |
^ parent parent notNil |
|
1454 | 3562 |
! |
3563 |
||
1606 | 3564 |
canMoveUpOrDown |
3565 |
"returns true if the item can change its vertical order in its sibling |
|
3566 |
" |
|
3567 |
^ parent children size > 1 |
|
3568 |
! ! |
|
3569 |
||
1631 | 3570 |
!MenuEditor::ActionItem class methodsFor:'defaults'! |
1606 | 3571 |
|
3572 |
defaultLabel |
|
3573 |
^ 'Action' |
|
3574 |
! ! |
|
3575 |
||
1668 | 3576 |
!MenuEditor::ActionItem class methodsFor:'interface specs'! |
1606 | 3577 |
|
3578 |
basicsEditSpec |
|
3579 |
"This resource specification was automatically generated |
|
3580 |
by the UIPainter of ST/X." |
|
3581 |
||
3582 |
"Do not manually edit this!! If it is corrupted, |
|
3583 |
the UIPainter may not be able to read the specification." |
|
3584 |
||
3585 |
" |
|
1634 | 3586 |
UIPainter new openOnClass:MenuEditor::ActionItem andSelector:#basicsEditSpec |
1606 | 3587 |
" |
3588 |
||
3589 |
<resource: #canvas> |
|
3590 |
||
3591 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3592 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3593 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3594 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3595 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3596 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3597 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3598 |
min: (Point 10 10) |
1810 | 3599 |
bounds: (Rectangle 0 0 340 340) |
1606 | 3600 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3601 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3602 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3603 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3604 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3605 |
label: 'Name Key:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3606 |
name: 'nameKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3607 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3608 |
activeHelpKey: basicsKey |
1810 | 3609 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3610 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3611 |
adjust: right |
1606 | 3612 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3613 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3614 |
name: 'nameKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3615 |
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
|
3616 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3617 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3618 |
model: nameKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3619 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3620 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3621 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3622 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3623 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3624 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3625 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3626 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3627 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3628 |
acceptOnPointerLeave: false |
1606 | 3629 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3630 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3631 |
label: 'Label:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3632 |
name: 'labelLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3633 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3634 |
activeHelpKey: basicsLabel |
1810 | 3635 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3636 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3637 |
adjust: right |
1606 | 3638 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3639 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3640 |
name: 'labelField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3641 |
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
|
3642 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3643 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3644 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3645 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3646 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3647 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3648 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3649 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3650 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3651 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3652 |
acceptOnPointerLeave: false |
1606 | 3653 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3654 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3655 |
label: 'Action:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3656 |
name: 'valueLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3657 |
layout: (AlignmentOrigin 107 0 82 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3658 |
activeHelpKey: basicsAction |
1810 | 3659 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3660 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3661 |
adjust: right |
1606 | 3662 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3663 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3664 |
name: 'valueField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3665 |
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
|
3666 |
activeHelpKey: basicsAction |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3667 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3668 |
model: itemValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3669 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3670 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3671 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3672 |
acceptOnLeave: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3673 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3674 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3675 |
acceptOnLostFocus: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3676 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3677 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3678 |
acceptOnPointerLeave: true |
1606 | 3679 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3680 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3681 |
label: 'Argument:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3682 |
name: 'argumentLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3683 |
layout: (AlignmentOrigin 107 0 107 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3684 |
activeHelpKey: basicsArgument |
1810 | 3685 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3686 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3687 |
adjust: right |
1606 | 3688 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3689 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3690 |
name: 'argumentField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3691 |
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
|
3692 |
activeHelpKey: basicsArgument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3693 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3694 |
model: argument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3695 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3696 |
type: smalltalkObject |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3697 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3698 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3699 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3700 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3701 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3702 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3703 |
acceptOnPointerLeave: false |
1606 | 3704 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3705 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3706 |
label: 'Indication:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3707 |
name: 'indicationLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3708 |
layout: (AlignmentOrigin 107 0 138 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3709 |
activeHelpKey: basicsIndication |
1810 | 3710 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3711 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3712 |
adjust: right |
1606 | 3713 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3714 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3715 |
name: 'indicationField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3716 |
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
|
3717 |
activeHelpKey: basicsIndication |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3718 |
enableChannel: indicationEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3719 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3720 |
model: indication |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3721 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3722 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3723 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3724 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3725 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3726 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3727 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3728 |
acceptOnPointerLeave: false |
1606 | 3729 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3730 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3731 |
label: 'Choice:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3732 |
name: 'choiceLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3733 |
layout: (AlignmentOrigin 107 0 163 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3734 |
activeHelpKey: basicsChoice |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3735 |
translateLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3736 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3737 |
adjust: right |
1606 | 3738 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3739 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3740 |
name: 'choiceField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3741 |
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
|
3742 |
activeHelpKey: basicsChoice |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3743 |
enableChannel: choiceEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3744 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3745 |
model: choice |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3746 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3747 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3748 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3749 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3750 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3751 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3752 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3753 |
acceptOnPointerLeave: false |
1606 | 3754 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3755 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3756 |
label: 'Value:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3757 |
name: 'choiceValueLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3758 |
layout: (AlignmentOrigin 107 0 188 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3759 |
activeHelpKey: basicsChoiceValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3760 |
translateLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3761 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3762 |
adjust: right |
1606 | 3763 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3764 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3765 |
name: 'choiceValueField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3766 |
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
|
3767 |
activeHelpKey: basicsChoiceValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3768 |
enableChannel: choiceValueEnabled |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3769 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3770 |
model: choiceValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3771 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3772 |
type: smalltalkObjectOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3773 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3774 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3775 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3776 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3777 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3778 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3779 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3780 |
acceptOnPointerLeave: false |
1606 | 3781 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3782 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3783 |
label: 'Translate Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3784 |
name: 'translateLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3785 |
layout: (AlignmentOrigin 7 0 213 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3786 |
activeHelpKey: basicsTranslateLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3787 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3788 |
model: translateLabel |
1810 | 3789 |
translateLabel: true |
1606 | 3790 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3791 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3792 |
label: 'Is Button' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3793 |
name: 'isButtonCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3794 |
layout: (AlignmentOrigin 7 0 238 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3795 |
activeHelpKey: basicsIsButton |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3796 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3797 |
model: isButton |
1810 | 3798 |
translateLabel: true |
1606 | 3799 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3800 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3801 |
label: 'Hide Menu after Activation' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3802 |
name: 'hideMenuOnActivated' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3803 |
layout: (AlignmentOrigin 7 0 263 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3804 |
activeHelpKey: hideMenuOnActivated |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3805 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3806 |
model: hideMenuOnActivated |
1810 | 3807 |
translateLabel: true |
1606 | 3808 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3809 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3810 |
label: 'BusyCursor while Active' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3811 |
name: 'showBusyCursorWhilePerforming' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3812 |
layout: (AlignmentOrigin 7 0 288 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3813 |
activeHelpKey: showBusyCursorWhilePerforming |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3814 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3815 |
model: showBusyCursorWhilePerforming |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3816 |
translateLabel: true |
1606 | 3817 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3818 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3819 |
label: 'Trigger On Down' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3820 |
name: 'triggerOnDown' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3821 |
layout: (AlignmentOrigin 25 0.5 238 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3822 |
activeHelpKey: triggerOnDown |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3823 |
enableChannel: hasNoDelayedMenuValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3824 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3825 |
model: triggerOnDown |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3826 |
translateLabel: true |
1606 | 3827 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3828 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3829 |
label: 'Send To Originating Widget' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3830 |
name: 'sendToOriginator' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3831 |
layout: (AlignmentOrigin 7 0 313 0 0 0) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3832 |
activeHelpKey: sendToOriginator |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3833 |
enableChannel: hasItemValue |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3834 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3835 |
model: sendToOriginator |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
3836 |
translateLabel: true |
1634 | 3837 |
) |
1606 | 3838 |
) |
3839 |
||
3840 |
) |
|
3841 |
) |
|
199 | 3842 |
! ! |
3843 |
||
1725 | 3844 |
!MenuEditor::ActionItem class methodsFor:'interface-editor'! |
3845 |
||
3846 |
addBindingsTo:aspects for:aMenuEditor |
|
3847 |
"add additional bindings to the aspects |
|
3848 |
" |
|
3849 |
aspects at:#indicationEnabled ifAbsentPut:[ |
|
3850 |
BlockValue with:[:a | a size == 0 ] argument:(aspects at:#choice) |
|
3851 |
]. |
|
3852 |
||
3853 |
aspects at:#choiceEnabled ifAbsentPut:[ |
|
3854 |
BlockValue with:[:a | a size == 0 ] argument:(aspects at:#indication) |
|
3855 |
]. |
|
3856 |
||
3857 |
aspects at:#choiceValueEnabled ifAbsentPut:[ |
|
3858 |
BlockValue with:[:a | a size ~~ 0 ] argument:(aspects at:#choice) |
|
3859 |
]. |
|
3860 |
aspects at:#hasNoDelayedMenuValue ifAbsentPut:[ |
|
3861 |
true asValue |
|
3862 |
]. |
|
3863 |
! ! |
|
3864 |
||
1631 | 3865 |
!MenuEditor::ActionItem methodsFor:'accessing'! |
1606 | 3866 |
|
3867 |
menuItem |
|
3868 |
|item| |
|
3869 |
||
3870 |
item := super menuItem. |
|
3871 |
self hasDelayedMenu ifTrue:[ |
|
3872 |
children first setDelayedAttributesTo:item. |
|
3873 |
||
3874 |
menuItem value ifNil:[ |
|
3875 |
menuItem value:#unspecified |
|
199 | 3876 |
] |
3877 |
]. |
|
1606 | 3878 |
^ item |
199 | 3879 |
! |
3880 |
||
213 | 3881 |
menuItem:anItem |
1606 | 3882 |
|submenu item| |
3883 |
||
3884 |
super menuItem:anItem. |
|
3885 |
submenu := anItem submenu. |
|
3886 |
||
3887 |
submenu notNil ifTrue:[ |
|
1633 | 3888 |
item := MenuEditor::RegularMenuItem new |
1606 | 3889 |
] ifFalse:[ |
1631 | 3890 |
anItem submenuChannel isNil ifTrue:[ |
3891 |
^ self |
|
3892 |
]. |
|
3893 |
item := MenuEditor::LinkedMenuItem new |
|
1606 | 3894 |
]. |
3895 |
item getDelayedAttributesFrom:anItem. |
|
3896 |
self add:item. |
|
199 | 3897 |
! |
3898 |
||
1606 | 3899 |
slices |
3900 |
^ #( |
|
3901 |
(Basics basicsEditSpec ) |
|
3902 |
(Details detailsEditSpec) |
|
3903 |
(Image image ) |
|
3904 |
(Help help) |
|
3905 |
) |
|
199 | 3906 |
! ! |
3907 |
||
1631 | 3908 |
!MenuEditor::ActionItem methodsFor:'adding & removing'! |
1606 | 3909 |
|
3910 |
add:anItem |
|
3911 |
"add an item; test whether the item is a delayed menu and |
|
3912 |
not already a delayed menu exists. |
|
3913 |
" |
|
3914 |
(anItem isKindOfMenu and:[self canAddDelayedMenu]) ifFalse:[ |
|
3915 |
^ nil |
|
853 | 3916 |
]. |
1606 | 3917 |
"/ reset values not setable if a delayed menu is configured |
3918 |
menuItem triggerOnDown:false. |
|
1623 | 3919 |
anItem argument:(menuItem argument). |
1606 | 3920 |
|
3921 |
isExpanded := false. |
|
3922 |
anItem parent:self. |
|
3923 |
children := Array with:anItem. |
|
3924 |
self expand. |
|
3925 |
^ anItem |
|
199 | 3926 |
! ! |
3927 |
||
1631 | 3928 |
!MenuEditor::ActionItem methodsFor:'aspects'! |
1606 | 3929 |
|
3930 |
aspectAt:aKey put:aValue |
|
3931 |
"pass the argument to the delayed menu if existant |
|
3932 |
" |
|
3933 |
aKey == #argument ifTrue:[ |
|
3934 |
self hasDelayedMenu ifTrue:[ |
|
3935 |
children first argument:aValue |
|
3936 |
]. |
|
3937 |
menuItem argument:aValue. |
|
3938 |
^ self |
|
3939 |
]. |
|
1778
32befdc61270
support ignoreShortcutKeys and ignoreMnemonicKeys in Editor
ca
parents:
1775
diff
changeset
|
3940 |
|
1623 | 3941 |
aKey == #triggerOnDown ifTrue:[ |
3942 |
self hasDelayedMenu ifTrue:[ |
|
3943 |
menuItem triggerOnDown:false |
|
3944 |
] ifFalse:[ |
|
3945 |
menuItem triggerOnDown:aValue |
|
3946 |
]. |
|
3947 |
^ self. |
|
3948 |
]. |
|
1606 | 3949 |
super aspectAt:aKey put:aValue. |
3950 |
! |
|
3951 |
||
3952 |
toAspects:aspects |
|
3953 |
"write values to aspects |
|
3954 |
" |
|
1623 | 3955 |
|hasDelayedMenu| |
3956 |
||
1606 | 3957 |
super toAspects:aspects. |
3958 |
||
1623 | 3959 |
hasDelayedMenu := self hasDelayedMenu. |
3960 |
(aspects at:#hasNoDelayedMenuValue) value:(hasDelayedMenu not). |
|
3961 |
||
3962 |
hasDelayedMenu ifTrue:[ |
|
3963 |
(aspects at:#triggerOnDown) value:false |
|
3964 |
]. |
|
356 | 3965 |
! ! |
3966 |
||
1631 | 3967 |
!MenuEditor::ActionItem methodsFor:'displaying'! |
1606 | 3968 |
|
3969 |
icon |
|
3970 |
^ self class iconItem |
|
3971 |
! ! |
|
3972 |
||
1631 | 3973 |
!MenuEditor::ActionItem methodsFor:'initialization'! |
199 | 3974 |
|
3975 |
initialize |
|
3976 |
super initialize. |
|
1606 | 3977 |
isExpanded := true. |
3978 |
! ! |
|
3979 |
||
1631 | 3980 |
!MenuEditor::ActionItem methodsFor:'queries'! |
1606 | 3981 |
|
3982 |
canCollapse |
|
3983 |
^ false |
|
3984 |
! |
|
3985 |
||
3986 |
hasDelayedMenu |
|
3987 |
"returns true if a delayed menu exists |
|
3988 |
" |
|
3989 |
^ children size ~~ 0 |
|
3990 |
! |
|
3991 |
||
3992 |
hasIndicator |
|
3993 |
^ false |
|
3994 |
! |
|
3995 |
||
3996 |
isAction |
|
3997 |
^ true |
|
3998 |
! ! |
|
3999 |
||
1660 | 4000 |
!MenuEditor::ActionItem methodsFor:'queries-operation'! |
1606 | 4001 |
|
4002 |
canAddDelayedMenu |
|
1623 | 4003 |
"returns true if a delayed menu can be added |
1606 | 4004 |
" |
1623 | 4005 |
^ self hasDelayedMenu not |
1606 | 4006 |
! ! |
4007 |
||
1631 | 4008 |
!MenuEditor::LinkedMenuItem class methodsFor:'defaults'! |
1606 | 4009 |
|
4010 |
defaultLabel |
|
4011 |
^ 'Linked Menu' |
|
199 | 4012 |
! ! |
4013 |
||
1668 | 4014 |
!MenuEditor::LinkedMenuItem class methodsFor:'interface specs'! |
1606 | 4015 |
|
4016 |
basicsEditSpec |
|
4017 |
"This resource specification was automatically generated |
|
4018 |
by the UIPainter of ST/X." |
|
4019 |
||
4020 |
"Do not manually edit this!! If it is corrupted, |
|
4021 |
the UIPainter may not be able to read the specification." |
|
4022 |
||
4023 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4024 |
UIPainter new openOnClass:MenuEditor::LinkedMenuItem andSelector:#basicsEditSpec |
1606 | 4025 |
" |
4026 |
||
4027 |
<resource: #canvas> |
|
4028 |
||
4029 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4030 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4031 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4032 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4033 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4034 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4035 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4036 |
min: (Point 10 10) |
1810 | 4037 |
bounds: (Rectangle 0 0 340 340) |
1606 | 4038 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4039 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4040 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4041 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4042 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4043 |
label: 'Name Key:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4044 |
name: 'nameKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4045 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4046 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4047 |
visibilityChannel: notDelayedMenu |
1810 | 4048 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4049 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4050 |
adjust: right |
1606 | 4051 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4052 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4053 |
name: 'nameKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4054 |
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
|
4055 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4056 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4057 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4058 |
model: nameKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4059 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4060 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4061 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4062 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4063 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4064 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4065 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4066 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4067 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4068 |
acceptOnPointerLeave: false |
1606 | 4069 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4070 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4071 |
label: 'Label:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4072 |
name: 'labelLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4073 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4074 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4075 |
visibilityChannel: notDelayedMenu |
1810 | 4076 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4077 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4078 |
adjust: right |
1606 | 4079 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4080 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4081 |
name: 'labelField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4082 |
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
|
4083 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4084 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4085 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4086 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4087 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4088 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4089 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4090 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4091 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4092 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4093 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4094 |
acceptOnPointerLeave: false |
1606 | 4095 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4096 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4097 |
label: 'Menu:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4098 |
name: 'menuLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4099 |
layout: (AlignmentOrigin 107 0 90 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4100 |
activeHelpKey: basicsLabel |
1810 | 4101 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4102 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4103 |
adjust: right |
1606 | 4104 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4105 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4106 |
name: 'menuField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4107 |
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
|
4108 |
activeHelpKey: basicsMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4109 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4110 |
model: submenuChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4111 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4112 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4113 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4114 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4115 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4116 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4117 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4118 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4119 |
acceptOnPointerLeave: false |
1606 | 4120 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4121 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4122 |
label: 'Argument:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4123 |
name: 'argumentLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4124 |
layout: (AlignmentOrigin 107 0 115 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4125 |
activeHelpKey: basicsLabel |
1810 | 4126 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4127 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4128 |
adjust: right |
1606 | 4129 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4130 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4131 |
name: 'argumentField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4132 |
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
|
4133 |
activeHelpKey: basicsMenuArgument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4134 |
enableChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4135 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4136 |
model: argument |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4137 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4138 |
type: smalltalkObject |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4139 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4140 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4141 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4142 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4143 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4144 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4145 |
acceptOnPointerLeave: false |
1606 | 4146 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4147 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4148 |
label: 'Translate Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4149 |
name: 'translateLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4150 |
layout: (Point 20 213) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4151 |
activeHelpKey: basicsTranslateLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4152 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4153 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4154 |
model: translateLabel |
1810 | 4155 |
translateLabel: true |
1606 | 4156 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4157 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4158 |
label: 'Is Button' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4159 |
name: 'isButtonCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4160 |
layout: (Point 20 238) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4161 |
activeHelpKey: basicsIsButton |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4162 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4163 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4164 |
model: isButton |
1810 | 4165 |
translateLabel: true |
1606 | 4166 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4167 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4168 |
label: 'Horizontal Layout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4169 |
name: 'horizontalLayout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4170 |
layout: (Point 20 263) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4171 |
activeHelpKey: horizontalLayout |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4172 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4173 |
model: horizontalLayout |
1810 | 4174 |
translateLabel: true |
1606 | 4175 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4176 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4177 |
label: 'Do not Destroy Linked Menu' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4178 |
name: 'keepLinkedMenu' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4179 |
layout: (Point 20 288) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4180 |
activeHelpKey: keepLinkedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4181 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4182 |
model: keepLinkedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4183 |
translateLabel: true |
1606 | 4184 |
) |
4185 |
) |
|
4186 |
||
4187 |
) |
|
4188 |
) |
|
4189 |
! ! |
|
4190 |
||
1631 | 4191 |
!MenuEditor::LinkedMenuItem methodsFor:'accessing'! |
1606 | 4192 |
|
4193 |
argument:aValue |
|
4194 |
menuItem argument:aValue. |
|
4195 |
! |
|
4196 |
||
4197 |
menuItem |
|
4198 |
"returns self as a MenuItem |
|
4199 |
" |
|
4200 |
|item| |
|
4201 |
||
4202 |
item := super menuItem. |
|
4203 |
item submenuChannel:(self submenuChannel). |
|
4204 |
^ item |
|
4205 |
! |
|
4206 |
||
4207 |
slices |
|
4208 |
self isDelayedMenu ifTrue:[ |
|
4209 |
^ #( |
|
4210 |
(Basics basicsEditSpec ) |
|
4211 |
) |
|
1389 | 4212 |
]. |
4213 |
||
1606 | 4214 |
^ #( |
4215 |
(Basics basicsEditSpec ) |
|
4216 |
(Details detailsEditSpec) |
|
4217 |
(Image image ) |
|
4218 |
(Help help) |
|
4219 |
) |
|
4220 |
! |
|
4221 |
||
4222 |
submenuChannel |
|
4223 |
^ menuItem submenuChannel ? #unspecified |
|
4224 |
! |
|
4225 |
||
4226 |
submenuChannel:aValue |
|
4227 |
menuItem submenuChannel:aValue. |
|
4228 |
! ! |
|
4229 |
||
1631 | 4230 |
!MenuEditor::LinkedMenuItem methodsFor:'aspects'! |
1606 | 4231 |
|
4232 |
aspectAt:aKey put:aValue |
|
4233 |
"set a specific aspect named aKey to the aValue |
|
4234 |
" |
|
4235 |
aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ]. |
|
4236 |
super aspectAt:aKey put:aValue. |
|
4237 |
! |
|
4238 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4239 |
getDelayedAttributesFrom:anItem |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4240 |
|
1606 | 4241 |
menuItem rawLabel:'Delayed'. |
4242 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4243 |
menuItem submenuChannel:(self validateValue:(anItem submenuChannel)). |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4244 |
menuItem horizontalLayout:(self validateValue:(anItem horizontalLayout)). |
1881
dde52f4278c0
horizontalLayout flag bug fixed
Claus Gittinger <cg@exept.de>
parents:
1867
diff
changeset
|
4245 |
menuItem keepLinkedMenu:(self validateValue:(anItem keepLinkedMenu)). |
1389 | 4246 |
! |
4247 |
||
1606 | 4248 |
setDelayedAttributesTo:aMenuItem |
4249 |
aMenuItem submenuChannel:(self submenuChannel). |
|
4250 |
aMenuItem horizontalLayout:(menuItem horizontalLayout). |
|
4251 |
aMenuItem keepLinkedMenu:(menuItem keepLinkedMenu). |
|
4252 |
! ! |
|
4253 |
||
1631 | 4254 |
!MenuEditor::LinkedMenuItem methodsFor:'displaying'! |
1606 | 4255 |
|
4256 |
displayLabel |
|
4257 |
"returns the label dependent on is delayed or not |
|
4258 |
" |
|
4259 |
self isDelayedMenu ifTrue:[ ^ self submenuChannel ]. |
|
4260 |
^ menuItem rawLabel |
|
199 | 4261 |
! |
4262 |
||
1606 | 4263 |
icon |
4264 |
self isDelayedMenu ifTrue:[ ^ self class iconDelayedLinkedMenu ]. |
|
4265 |
^ self class iconLinkedMenu |
|
4266 |
! ! |
|
4267 |
||
1780
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4268 |
!MenuEditor::LinkedMenuItem methodsFor:'initialization'! |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4269 |
|
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4270 |
initialize |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4271 |
"setup default values on the item |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4272 |
" |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4273 |
super initialize. |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4274 |
|
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4275 |
"setting default values |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4276 |
" |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4277 |
menuItem keepLinkedMenu:true. |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4278 |
! ! |
5f831e1fc839
set #keepLinkedMenu for linked menus on default to true (do not destroy)
ca
parents:
1778
diff
changeset
|
4279 |
|
1631 | 4280 |
!MenuEditor::LinkedMenuItem methodsFor:'queries'! |
1606 | 4281 |
|
4282 |
isKindOfMenu |
|
4283 |
^ true |
|
4284 |
! ! |
|
4285 |
||
1844 | 4286 |
!MenuEditor::MenuSliceItem class methodsFor:'defaults'! |
4287 |
||
4288 |
defaultLabel |
|
4289 |
^ 'Menu Slice' |
|
4290 |
! ! |
|
4291 |
||
4292 |
!MenuEditor::MenuSliceItem class methodsFor:'interface specs'! |
|
4293 |
||
4294 |
basicsEditSpec |
|
4295 |
"This resource specification was automatically generated |
|
4296 |
by the UIPainter of ST/X." |
|
4297 |
||
4298 |
"Do not manually edit this!! If it is corrupted, |
|
4299 |
the UIPainter may not be able to read the specification." |
|
4300 |
||
4301 |
" |
|
4302 |
UIPainter new openOnClass:MenuEditor::MenuSliceItem andSelector:#basicsEditSpec |
|
4303 |
" |
|
4304 |
||
4305 |
<resource: #canvas> |
|
4306 |
||
4307 |
^ |
|
4308 |
#(FullSpec |
|
4309 |
name: basicsEditSpec |
|
4310 |
window: |
|
4311 |
(WindowSpec |
|
4312 |
label: 'basicsEditSpec' |
|
4313 |
name: 'basicsEditSpec' |
|
4314 |
min: (Point 10 10) |
|
4315 |
bounds: (Rectangle 0 0 344 146) |
|
4316 |
) |
|
4317 |
component: |
|
4318 |
(SpecCollection |
|
4319 |
collection: ( |
|
4320 |
(LabelSpec |
|
4321 |
label: 'Name Key:' |
|
4322 |
name: 'nameKeyLabel' |
|
4323 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
|
4324 |
activeHelpKey: basicsKey |
|
4325 |
visibilityChannel: notDelayedMenu |
|
4326 |
translateLabel: true |
|
4327 |
resizeForLabel: true |
|
4328 |
adjust: right |
|
4329 |
) |
|
4330 |
(InputFieldSpec |
|
4331 |
name: 'nameKeyField' |
|
4332 |
layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
4333 |
activeHelpKey: basicsKey |
|
4334 |
visibilityChannel: notDelayedMenu |
|
4335 |
tabable: true |
|
4336 |
model: nameKey |
|
4337 |
group: inputGroup |
|
4338 |
type: symbolOrNil |
|
4339 |
immediateAccept: false |
|
4340 |
acceptOnLeave: false |
|
4341 |
acceptOnReturn: true |
|
4342 |
acceptOnTab: true |
|
4343 |
acceptOnLostFocus: false |
|
4344 |
acceptChannel: acceptChannel |
|
4345 |
modifiedChannel: modifiedChannel |
|
4346 |
acceptOnPointerLeave: false |
|
4347 |
) |
|
4348 |
(LabelSpec |
|
4349 |
label: 'Label:' |
|
4350 |
name: 'labelLabel' |
|
4351 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
|
4352 |
activeHelpKey: basicsLabel |
|
4353 |
visibilityChannel: notDelayedMenu |
|
4354 |
translateLabel: true |
|
4355 |
resizeForLabel: true |
|
4356 |
adjust: right |
|
4357 |
) |
|
4358 |
(InputFieldSpec |
|
4359 |
name: 'labelField' |
|
4360 |
layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
4361 |
activeHelpKey: basicsLabel |
|
4362 |
visibilityChannel: notDelayedMenu |
|
4363 |
tabable: true |
|
4364 |
model: rawLabel |
|
4365 |
group: inputGroup |
|
4366 |
immediateAccept: false |
|
4367 |
acceptOnReturn: true |
|
4368 |
acceptOnTab: true |
|
4369 |
acceptOnLostFocus: false |
|
4370 |
acceptChannel: acceptChannel |
|
4371 |
modifiedChannel: modifiedChannel |
|
4372 |
acceptOnPointerLeave: false |
|
4373 |
) |
|
4374 |
(LabelSpec |
|
4375 |
label: 'Menu:' |
|
4376 |
name: 'menuLabel' |
|
4377 |
layout: (AlignmentOrigin 107 0 90 0 1 0.5) |
|
4378 |
activeHelpKey: basicsLabel |
|
4379 |
translateLabel: true |
|
4380 |
resizeForLabel: true |
|
4381 |
adjust: right |
|
4382 |
) |
|
4383 |
(InputFieldSpec |
|
4384 |
name: 'menuField' |
|
4385 |
layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) |
|
4386 |
activeHelpKey: basicsMenu |
|
4387 |
tabable: true |
|
4388 |
model: submenuChannel |
|
4389 |
group: inputGroup |
|
4390 |
type: symbolOrNil |
|
4391 |
immediateAccept: false |
|
4392 |
acceptOnReturn: true |
|
4393 |
acceptOnTab: true |
|
4394 |
acceptOnLostFocus: false |
|
4395 |
acceptChannel: acceptChannel |
|
4396 |
modifiedChannel: modifiedChannel |
|
4397 |
acceptOnPointerLeave: false |
|
4398 |
) |
|
4399 |
(LabelSpec |
|
4400 |
label: 'Argument:' |
|
4401 |
name: 'argumentLabel' |
|
4402 |
layout: (AlignmentOrigin 107 0 115 0 1 0.5) |
|
4403 |
activeHelpKey: basicsLabel |
|
4404 |
translateLabel: true |
|
4405 |
resizeForLabel: true |
|
4406 |
adjust: right |
|
4407 |
) |
|
4408 |
(InputFieldSpec |
|
4409 |
name: 'argumentField' |
|
4410 |
layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) |
|
4411 |
activeHelpKey: basicsMenuArgument |
|
4412 |
enableChannel: notDelayedMenu |
|
4413 |
tabable: true |
|
4414 |
model: argument |
|
4415 |
group: inputGroup |
|
4416 |
type: smalltalkObject |
|
4417 |
immediateAccept: false |
|
4418 |
acceptOnReturn: true |
|
4419 |
acceptOnTab: true |
|
4420 |
acceptOnLostFocus: false |
|
4421 |
acceptChannel: acceptChannel |
|
4422 |
modifiedChannel: modifiedChannel |
|
4423 |
acceptOnPointerLeave: false |
|
4424 |
) |
|
4425 |
) |
|
4426 |
||
4427 |
) |
|
4428 |
) |
|
4429 |
! ! |
|
4430 |
||
4431 |
!MenuEditor::MenuSliceItem methodsFor:'accessing'! |
|
4432 |
||
4433 |
icon |
|
4434 |
^ self class iconSliceMenu |
|
4435 |
! |
|
4436 |
||
4437 |
menuItem |
|
4438 |
"returns self as a MenuItem |
|
4439 |
" |
|
4440 |
|item| |
|
4441 |
||
4442 |
item := super menuItem. |
|
4443 |
item submenuChannel:(self submenuChannel). |
|
4444 |
item isMenuSlice:true. |
|
4445 |
^ item |
|
4446 |
! |
|
4447 |
||
4448 |
slices |
|
4449 |
^ #( |
|
4450 |
(Basics basicsEditSpec) |
|
4451 |
) |
|
4452 |
! ! |
|
4453 |
||
4454 |
!MenuEditor::MenuSliceItem methodsFor:'aspects'! |
|
4455 |
||
4456 |
argument:aValue |
|
4457 |
menuItem argument:aValue. |
|
4458 |
! |
|
4459 |
||
4460 |
aspectAt:aKey put:aValue |
|
4461 |
"set a specific aspect named aKey to the aValue |
|
4462 |
" |
|
4463 |
aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ]. |
|
4464 |
aKey == #isSliceMenu ifTrue:[ ^ self ]. |
|
4465 |
||
4466 |
super aspectAt:aKey put:aValue. |
|
4467 |
! |
|
4468 |
||
4469 |
submenuChannel |
|
4470 |
^ menuItem submenuChannel ? #unspecified |
|
4471 |
! |
|
4472 |
||
4473 |
submenuChannel:aValue |
|
4474 |
menuItem submenuChannel:aValue. |
|
4475 |
! ! |
|
4476 |
||
1633 | 4477 |
!MenuEditor::RegularMenuItem class methodsFor:'defaults'! |
1606 | 4478 |
|
4479 |
defaultDelayedLabel |
|
4480 |
^ 'delayed' |
|
199 | 4481 |
! |
4482 |
||
1606 | 4483 |
defaultLabel |
4484 |
^ 'Menu' |
|
4485 |
! ! |
|
4486 |
||
1633 | 4487 |
!MenuEditor::RegularMenuItem class methodsFor:'instance creation'! |
1606 | 4488 |
|
4489 |
menu:aMenu labeled:aString |
|
4490 |
|item| |
|
4491 |
||
4492 |
item := self new. |
|
4493 |
item menu:aMenu labeled:aString. |
|
1631 | 4494 |
^ item |
4495 |
! |
|
4496 |
||
4497 |
menu:aMenu labeled:aString translateLabel:translateLabel |
|
4498 |
|item| |
|
4499 |
||
4500 |
item := self new. |
|
4501 |
item menu:aMenu labeled:aString. |
|
4502 |
item translateLabel:translateLabel. |
|
4503 |
^ item |
|
1606 | 4504 |
! ! |
4505 |
||
1668 | 4506 |
!MenuEditor::RegularMenuItem class methodsFor:'interface specs'! |
1606 | 4507 |
|
4508 |
basicsEditSpec |
|
4509 |
"This resource specification was automatically generated |
|
4510 |
by the UIPainter of ST/X." |
|
4511 |
||
4512 |
"Do not manually edit this!! If it is corrupted, |
|
4513 |
the UIPainter may not be able to read the specification." |
|
4514 |
||
4515 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4516 |
UIPainter new openOnClass:MenuEditor::RegularMenuItem andSelector:#basicsEditSpec |
1606 | 4517 |
" |
4518 |
||
4519 |
<resource: #canvas> |
|
4520 |
||
4521 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4522 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4523 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4524 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4525 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4526 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4527 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4528 |
min: (Point 10 10) |
1810 | 4529 |
bounds: (Rectangle 0 0 340 340) |
1606 | 4530 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4531 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4532 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4533 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4534 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4535 |
label: 'Name Key:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4536 |
name: 'nameKeyLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4537 |
layout: (AlignmentOrigin 107 0 25 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4538 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4539 |
visibilityChannel: notDelayedMenu |
1810 | 4540 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4541 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4542 |
adjust: right |
1606 | 4543 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4544 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4545 |
name: 'nameKeyField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4546 |
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
|
4547 |
activeHelpKey: basicsKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4548 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4549 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4550 |
model: nameKey |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4551 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4552 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4553 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4554 |
acceptOnLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4555 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4556 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4557 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4558 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4559 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4560 |
acceptOnPointerLeave: false |
1606 | 4561 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4562 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4563 |
label: 'Label:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4564 |
name: 'labelLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4565 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4566 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4567 |
visibilityChannel: notDelayedMenu |
1810 | 4568 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4569 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4570 |
adjust: right |
1606 | 4571 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4572 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4573 |
name: 'labelField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4574 |
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
|
4575 |
activeHelpKey: basicsLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4576 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4577 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4578 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4579 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4580 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4581 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4582 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4583 |
acceptOnLostFocus: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4584 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4585 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4586 |
acceptOnPointerLeave: false |
1606 | 4587 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4588 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4589 |
label: 'Translate Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4590 |
name: 'translateLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4591 |
layout: (Point 20 213) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4592 |
activeHelpKey: basicsTranslateLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4593 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4594 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4595 |
model: translateLabel |
1810 | 4596 |
translateLabel: true |
1606 | 4597 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4598 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4599 |
label: 'Is Button' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4600 |
name: 'isButtonCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4601 |
layout: (Point 20 238) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4602 |
activeHelpKey: basicsIsButton |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4603 |
visibilityChannel: notDelayedMenu |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4604 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4605 |
model: isButton |
1810 | 4606 |
translateLabel: true |
1606 | 4607 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4608 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4609 |
label: 'Horizontal Layout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4610 |
name: 'horizontalLayout' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4611 |
layout: (Point 20 263) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4612 |
activeHelpKey: horizontalLayout |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4613 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4614 |
model: horizontalLayout |
1810 | 4615 |
translateLabel: true |
1606 | 4616 |
) |
4617 |
) |
|
4618 |
||
4619 |
) |
|
4620 |
) |
|
4621 |
! ! |
|
4622 |
||
1633 | 4623 |
!MenuEditor::RegularMenuItem methodsFor:'accessing'! |
1606 | 4624 |
|
4625 |
argument:aValue |
|
4626 |
"/ ignorred. |
|
218 | 4627 |
! |
4628 |
||
1606 | 4629 |
menu:aMenu labeled:aString |
4630 |
|expanded item menu| |
|
4631 |
||
4632 |
self criticalDo:[ |
|
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4633 |
self isRootItem ifTrue:[ expanded := true ] |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4634 |
ifFalse:[ expanded := isExpanded ]. |
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 |
self removeAll. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4637 |
self rawLabel:aString. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4638 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4639 |
menu := aMenu value. |
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 isNil or:[menu isString]) ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4642 |
menu := nil |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4643 |
] ifFalse:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4644 |
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
|
4645 |
ifFalse:[ menu := aMenu ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4646 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4647 |
menu numberOfItems == 0 ifTrue:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4648 |
menu := nil |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4649 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4650 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4651 |
menu ifNotNil:[ |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4652 |
isExpanded := false. "/ discard change notifications |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4653 |
children := OrderedCollection new. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4654 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4655 |
menu itemsDo:[:el| |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4656 |
item := self class menuItem:el. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4657 |
item parent:self. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4658 |
children add:item. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4659 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4660 |
expanded ifTrue:[ self expand ]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4661 |
]. |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4662 |
isExpanded := expanded. |
1606 | 4663 |
]. |
4664 |
self changed |
|
199 | 4665 |
! |
4666 |
||
1606 | 4667 |
menuItem |
4668 |
"returns self as a MenuItem |
|
4669 |
" |
|
4670 |
|item| |
|
4671 |
||
4672 |
item := super menuItem. |
|
4673 |
item submenu:(self submenu). |
|
4674 |
^ item |
|
199 | 4675 |
! |
4676 |
||
1606 | 4677 |
menuItem:anItem |
4678 |
||
4679 |
super menuItem:anItem. |
|
4680 |
self menu:(anItem submenu) labeled:nil. |
|
4681 |
! |
|
4682 |
||
4683 |
slices |
|
4684 |
self isDelayedMenu ifTrue:[ |
|
4685 |
^ #( |
|
4686 |
(Basics basicsEditSpec ) |
|
4687 |
) |
|
4688 |
]. |
|
4689 |
||
4690 |
^ #( |
|
4691 |
(Basics basicsEditSpec ) |
|
4692 |
(Details detailsEditSpec) |
|
4693 |
(Image image ) |
|
4694 |
(Help help) |
|
4695 |
) |
|
4696 |
! |
|
4697 |
||
4698 |
submenu |
|
4699 |
|menu| |
|
4700 |
||
4701 |
menu := Menu new. |
|
4702 |
||
4703 |
children size ~~ 0 ifTrue:[ |
|
4704 |
children do:[:el| menu addItem:(el menuItem) ]. |
|
4705 |
]. |
|
4706 |
^ menu |
|
4707 |
! ! |
|
4708 |
||
1633 | 4709 |
!MenuEditor::RegularMenuItem methodsFor:'aspects'! |
1606 | 4710 |
|
4711 |
getDelayedAttributesFrom:aMenuItem |
|
4712 |
||
1653
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4713 |
|menu| |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4714 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4715 |
menu := self validateValue:(aMenuItem submenu value). |
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4716 |
|
1798c7bcb787
test whether attributes from MenuItem are not a block or model
ca
parents:
1645
diff
changeset
|
4717 |
self menu:menu labeled:nil. |
1606 | 4718 |
menuItem horizontalLayout:(aMenuItem horizontalLayout). |
4719 |
! |
|
4720 |
||
4721 |
setDelayedAttributesTo:aMenuItem |
|
4722 |
aMenuItem submenu:(self submenu). |
|
4723 |
aMenuItem horizontalLayout:(menuItem horizontalLayout). |
|
4724 |
! ! |
|
4725 |
||
1633 | 4726 |
!MenuEditor::RegularMenuItem methodsFor:'displaying'! |
1606 | 4727 |
|
4728 |
displayLabel |
|
4729 |
"returns the label dependent on is delayed or not |
|
4730 |
" |
|
4731 |
self isDelayedMenu ifTrue:[ ^ self class defaultDelayedLabel ]. |
|
4732 |
^ menuItem rawLabel |
|
4733 |
! |
|
4734 |
||
4735 |
icon |
|
4736 |
self isDelayedMenu ifTrue:[ ^ self class iconDelayedMenu ]. |
|
4737 |
^ self class iconMenu |
|
4738 |
! ! |
|
4739 |
||
1633 | 4740 |
!MenuEditor::RegularMenuItem methodsFor:'queries'! |
1606 | 4741 |
|
4742 |
canAddChildren |
|
4743 |
"children can be added |
|
4744 |
" |
|
4745 |
^ true |
|
4746 |
! |
|
4747 |
||
4748 |
canExpand |
|
4749 |
"returns true if the item is expandable |
|
4750 |
" |
|
4751 |
^ isExpanded == false |
|
4752 |
! |
|
4753 |
||
4754 |
hasIndicator |
|
4755 |
^ true |
|
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
4756 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
4757 |
|
1606 | 4758 |
isKindOfMenu |
4759 |
^ true |
|
4760 |
! ! |
|
4761 |
||
4762 |
!MenuEditor::ResourceEditor class methodsFor:'interface specs'! |
|
4763 |
||
4764 |
windowSpec |
|
4765 |
"This resource specification was automatically generated |
|
4766 |
by the UIPainter of ST/X." |
|
4767 |
||
4768 |
"Do not manually edit this!! If it is corrupted, |
|
4769 |
the UIPainter may not be able to read the specification." |
|
4770 |
||
4771 |
" |
|
4772 |
UIPainter new openOnClass:MenuEditor::ResourceEditor andSelector:#windowSpec |
|
4773 |
MenuEditor::ResourceEditor new openInterface:#windowSpec |
|
4774 |
MenuEditor::ResourceEditor open |
|
4775 |
" |
|
4776 |
||
4777 |
<resource: #canvas> |
|
4778 |
||
4779 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4780 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4781 |
name: windowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4782 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4783 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4784 |
label: 'Image Item' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4785 |
name: 'Image Item' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4786 |
min: (Point 10 10) |
1810 | 4787 |
bounds: (Rectangle 0 0 288 295) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4788 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4789 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4790 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4791 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4792 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4793 |
label: 'Retriever:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4794 |
name: 'retrieverLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4795 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4796 |
activeHelpKey: imageRetriever |
1810 | 4797 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4798 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4799 |
adjust: right |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4800 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4801 |
(ComboBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4802 |
name: 'retrieverHolder' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4803 |
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
|
4804 |
activeHelpKey: imageRetriever |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4805 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4806 |
model: retrieverHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4807 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4808 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4809 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4810 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4811 |
acceptOnPointerLeave: false |
1853
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4812 |
entryCompletionBlock: entryCompletionForRetriever |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4813 |
comboList: retrieverList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4814 |
isFilenameBox: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4815 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4816 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4817 |
label: 'Selector:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4818 |
name: 'iconLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4819 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4820 |
activeHelpKey: imageSelector |
1810 | 4821 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4822 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4823 |
adjust: right |
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 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4826 |
name: 'selectorHolder' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4827 |
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
|
4828 |
activeHelpKey: imageSelector |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4829 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4830 |
model: selectorHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4831 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4832 |
type: symbolOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4833 |
immediateAccept: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4834 |
acceptOnReturn: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4835 |
acceptOnTab: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4836 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4837 |
acceptOnPointerLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4838 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4839 |
(ActionButtonSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4840 |
label: '...' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4841 |
name: 'browseButton' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4842 |
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
|
4843 |
activeHelpKey: browseResource |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4844 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4845 |
model: doBrowseForImageResource |
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 |
(HierarchicalListViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4848 |
name: 'imageList' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4849 |
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
|
4850 |
activeHelpKey: imageImageList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4851 |
model: imageHolder |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4852 |
menu: menuEditImage |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4853 |
hasHorizontalScrollBar: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4854 |
hasVerticalScrollBar: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4855 |
miniScrollerHorizontal: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4856 |
listModel: imageList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4857 |
useIndex: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4858 |
highlightMode: label |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4859 |
postBuildCallback: postBuildImageViewer: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4860 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4861 |
(ViewSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4862 |
name: 'Box1' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4863 |
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
|
4864 |
level: 0 |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4865 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4866 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4867 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4868 |
(CheckBoxSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4869 |
label: 'Image & Label' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4870 |
name: 'iconAndLabelCheckBox' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4871 |
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
|
4872 |
activeHelpKey: imageImageAndLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4873 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4874 |
model: iconAndLabelHolder |
1810 | 4875 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4876 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4877 |
(ActionButtonSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4878 |
label: 'Image Editor' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4879 |
name: 'imageEditorButton' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4880 |
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
|
4881 |
activeHelpKey: imageImageEditor |
1810 | 4882 |
hasCharacterOrientedLabel: false |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4883 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4884 |
model: doEditImage |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4885 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4886 |
) |
1606 | 4887 |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4888 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4889 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4890 |
) |
1606 | 4891 |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
4892 |
) |
1606 | 4893 |
) |
4894 |
! ! |
|
4895 |
||
4896 |
!MenuEditor::ResourceEditor methodsFor:'accessing'! |
|
4897 |
||
4898 |
resourceRetriever |
|
4899 |
|rcv sel cls| |
|
4900 |
||
4901 |
sel := selectorHolder value. |
|
4902 |
sel size == 0 ifTrue:[ ^ nil ]. |
|
4903 |
cls := self retrieverClass. |
|
4904 |
cls ifNotNil:[ cls := cls name asSymbol ]. |
|
4905 |
||
4906 |
rcv := ResourceRetriever new. |
|
4907 |
rcv className:cls. |
|
4908 |
rcv selector:sel. |
|
4909 |
||
4910 |
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
|
4911 |
^ rcv |
1606 | 4912 |
! |
4913 |
||
4914 |
resourceRetriever:aResourceRetriever |
|
4915 |
|cls sel isOn| |
|
4916 |
||
4917 |
aResourceRetriever notNil ifTrue:[ |
|
4918 |
cls := aResourceRetriever className. |
|
4919 |
cls ifNotNil:[ |
|
4920 |
cls isBehavior ifTrue:[cls := cls name asSymbol]. |
|
4921 |
]. |
|
4922 |
sel := aResourceRetriever selector. |
|
4923 |
isOn := aResourceRetriever labelText notNil. |
|
4924 |
] ifFalse:[ |
|
4925 |
cls := sel := nil. |
|
4926 |
isOn := false. |
|
1586 | 4927 |
]. |
1606 | 4928 |
|
4929 |
retrieverHolder value:cls. |
|
4930 |
selectorHolder value:sel. |
|
4931 |
iconAndLabelHolder value:isOn. |
|
4932 |
! |
|
4933 |
||
4934 |
retrieverClass |
|
4935 |
|cls| |
|
4936 |
||
4937 |
cls := retrieverHolder value. |
|
4938 |
||
4939 |
cls size ~~ 0 ifTrue:[ |
|
4940 |
cls := Smalltalk at:cls ifAbsent:nil. |
|
4941 |
||
4942 |
(cls notNil and:[cls isBehavior]) ifTrue:[ |
|
4943 |
^ cls |
|
4944 |
]. |
|
4945 |
]. |
|
4946 |
^ nil |
|
4947 |
! ! |
|
4948 |
||
4949 |
!MenuEditor::ResourceEditor methodsFor:'actions'! |
|
4950 |
||
4951 |
doBrowseForImageResource |
|
4952 |
"opens a browser on image-resource methods" |
|
4953 |
||
1971 | 4954 |
|classAndSelector| |
4955 |
||
4956 |
classAndSelector := ResourceSelectionBrowser |
|
4957 |
request:'Use Image From Class' |
|
4958 |
onSuperclass:nil |
|
4959 |
andClass:(self retrieverClass) |
|
4960 |
andSelector:(selectorHolder value) |
|
4961 |
withResourceTypes:#(image fileImage programImage). |
|
4962 |
||
4963 |
classAndSelector isNil ifTrue:[ ^ self ]. |
|
4964 |
||
4965 |
retrieverHolder value:(classAndSelector methodClass) name. |
|
4966 |
selectorHolder value:(classAndSelector methodSelector). |
|
1606 | 4967 |
! |
4968 |
||
4969 |
doEditImage |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4970 |
|sel cls item| |
1606 | 4971 |
|
4972 |
item := imageHolder value. |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4973 |
item notNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4974 |
item doEdit |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4975 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4976 |
(sel := selectorHolder value) isNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4977 |
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
|
4978 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4979 |
(cls := retrieverHolder value) isNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4980 |
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
|
4981 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4982 |
cls := Smalltalk classNamed:cls. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4983 |
cls isNil ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4984 |
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
|
4985 |
] ifFalse:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4986 |
ImageEditor openOnClass:cls andSelector:sel |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4987 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4988 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4989 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
4990 |
]. |
1606 | 4991 |
! ! |
4992 |
||
4993 |
!MenuEditor::ResourceEditor methodsFor:'aspects'! |
|
4994 |
||
1853
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4995 |
entryCompletionForRetriever |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4996 |
^ [ :s :field | |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4997 |
|info| |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4998 |
|
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
4999 |
info := Smalltalk classnameCompletion:s. |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
5000 |
field contents:info first. |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
5001 |
]. |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
5002 |
! |
bd6900fa7f50
retriever field in Image-Slice: class-name completion
Claus Gittinger <cg@exept.de>
parents:
1848
diff
changeset
|
5003 |
|
1606 | 5004 |
iconAndLabelHolder |
5005 |
^ iconAndLabelHolder |
|
5006 |
! |
|
5007 |
||
5008 |
imageHolder |
|
5009 |
^ imageHolder. |
|
603 | 5010 |
! |
5011 |
||
1606 | 5012 |
imageList |
5013 |
^ imageList. |
|
5014 |
! |
|
5015 |
||
5016 |
modifiedChannel |
|
5017 |
^ builder booleanValueAspectFor: #modifiedChannel |
|
5018 |
! |
|
5019 |
||
5020 |
modifiedChannel:aChannel |
|
5021 |
builder aspectAt:#modifiedChannel put:aChannel. |
|
5022 |
! |
|
5023 |
||
5024 |
retrieverHolder |
|
5025 |
^ retrieverHolder |
|
5026 |
! |
|
5027 |
||
5028 |
retrieverList |
|
5029 |
|list| |
|
5030 |
||
5031 |
list := builder bindingAt:#retrieverList. |
|
5032 |
||
5033 |
list ifNil:[ |
|
5034 |
list := MenuEditor imageRetrieverClasses asList. |
|
5035 |
builder aspectAt:#retrieverList put:list. |
|
5036 |
]. |
|
5037 |
^ list |
|
199 | 5038 |
! |
5039 |
||
1606 | 5040 |
selectorHolder |
5041 |
^ selectorHolder. |
|
5042 |
! ! |
|
5043 |
||
5044 |
!MenuEditor::ResourceEditor methodsFor:'change & update'! |
|
5045 |
||
5046 |
retrieverChanged |
|
5047 |
"called if the retriever changed |
|
5048 |
" |
|
5049 |
|retriever list name| |
|
5050 |
||
5051 |
retriever := self retrieverClass. |
|
5052 |
imageHolder setValue:nil. |
|
5053 |
||
5054 |
imageList root fromClass:retriever. |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5055 |
self updateImageHolder. |
1606 | 5056 |
|
5057 |
(retriever notNil and:[imageList size ~~ 0]) ifTrue:[ |
|
5058 |
list := self retrieverList. |
|
5059 |
name := retriever name. |
|
5060 |
||
5061 |
(list includes:name) ifFalse:[ |
|
5062 |
list add:(name asSymbol). |
|
5063 |
] |
|
5064 |
]. |
|
398 | 5065 |
! |
5066 |
||
1606 | 5067 |
selectorChanged |
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5068 |
self updateImageHolder. |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
5069 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
5070 |
|
1606 | 5071 |
update:what with:aPara from:aModel |
5072 |
|item| |
|
5073 |
||
5074 |
self modifiedChannel value:true. |
|
5075 |
||
5076 |
aModel == retrieverHolder ifTrue:[ ^ self retrieverChanged ]. |
|
5077 |
aModel == selectorHolder ifTrue:[ ^ self selectorChanged ]. |
|
5078 |
||
5079 |
aModel == imageHolder ifTrue:[ |
|
1641
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5080 |
item := imageHolder value. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5081 |
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
|
5082 |
^ self |
1606 | 5083 |
]. |
5084 |
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
|
5085 |
! |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5086 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5087 |
updateImageHolder |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5088 |
|item selector line| |
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 |
imageList isEmpty ifTrue:[^ self]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5091 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5092 |
selector := selectorHolder value. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5093 |
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
|
5094 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5095 |
item := nil. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5096 |
selector := selector asSymbol. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5097 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5098 |
imageList do:[:anItem| |sel| |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5099 |
sel := anItem selector. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5100 |
selector == sel ifTrue:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5101 |
imageHolder value:anItem. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5102 |
^ self |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5103 |
]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5104 |
item ifNil:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5105 |
(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
|
5106 |
] |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5107 |
]. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5108 |
imageHolder value:nil. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5109 |
|
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5110 |
item ifNotNil:[ |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5111 |
line := imageList identityIndexOf:item. |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5112 |
imageViewer scrollToLine:line |
7e63a11f3333
allow editing even if there is no image yet
Claus Gittinger <cg@exept.de>
parents:
1636
diff
changeset
|
5113 |
]. |
1606 | 5114 |
! ! |
5115 |
||
5116 |
!MenuEditor::ResourceEditor methodsFor:'initialization'! |
|
5117 |
||
5118 |
initialize |
|
5119 |
super initialize. |
|
5120 |
||
5121 |
iconAndLabelHolder := true asValue. |
|
5122 |
iconAndLabelHolder addDependent:self. |
|
5123 |
||
5124 |
imageHolder := nil asValue. |
|
5125 |
||
5126 |
selectorHolder := nil asValue. |
|
5127 |
selectorHolder addDependent:self. |
|
5128 |
||
5129 |
imageList := HierarchicalList new. |
|
5130 |
imageList application:self. |
|
5131 |
imageList root:(MenuEditor::ResourceEditorItem new). |
|
5132 |
imageList showRoot:false. |
|
5133 |
||
5134 |
imageHolder := nil asValue. |
|
5135 |
imageHolder addDependent:self. |
|
5136 |
||
5137 |
retrieverHolder := nil asValue. |
|
5138 |
retrieverHolder addDependent:self. |
|
5139 |
! |
|
5140 |
||
5141 |
postBuildImageViewer:aWidget |
|
5142 |
imageViewer := aWidget. |
|
5143 |
! ! |
|
5144 |
||
5145 |
!MenuEditor::ResourceEditorItem class methodsFor:'instance creation'! |
|
5146 |
||
5147 |
fromClass:aClass selector:aSelector |
|
5148 |
|item| |
|
5149 |
||
5150 |
item := self new. |
|
5151 |
item fromClass:aClass selector:aSelector. |
|
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5152 |
^ item |
1606 | 5153 |
! ! |
5154 |
||
5155 |
!MenuEditor::ResourceEditorItem methodsFor:'accessing'! |
|
5156 |
||
5157 |
icon |
|
5158 |
^ icon |
|
5159 |
! |
|
5160 |
||
5161 |
label |
|
5162 |
^ selector |
|
557 | 5163 |
! |
5164 |
||
1606 | 5165 |
selector |
5166 |
^ selector |
|
5167 |
! ! |
|
5168 |
||
5169 |
!MenuEditor::ResourceEditorItem methodsFor:'instance creation'! |
|
5170 |
||
5171 |
fromClass:aClass |
|
5172 |
|r item| |
|
5173 |
||
5174 |
(aClass notNil and:[aClass isBehavior]) ifFalse:[ |
|
5175 |
^ self collapse. |
|
5176 |
]. |
|
5177 |
aClass == selector ifTrue:[ |
|
5178 |
^ self expand |
|
5179 |
]. |
|
5180 |
self collapse. |
|
5181 |
||
5182 |
selector := aClass. |
|
5183 |
children := SortedCollection sortBlock:[:a :b| a label < b label ]. |
|
5184 |
||
5185 |
self application withWaitCursorDo:[ |
|
5186 |
aClass withAllSuperclassesDo:[:aClass| |
|
5187 |
aClass class selectorsAndMethodsDo:[:sel :m| |
|
5188 |
((r := m resourceType) == #image or:[r == #programImage]) ifTrue:[ |
|
5189 |
item := self class fromClass:aClass selector:sel. |
|
5190 |
item parent:self. |
|
5191 |
children add:item |
|
5192 |
] |
|
5193 |
] |
|
5194 |
]. |
|
5195 |
self expand |
|
5196 |
]. |
|
5197 |
! |
|
5198 |
||
5199 |
fromClass:aClass selector:aSelector |
|
5200 |
|w h magnify| |
|
5201 |
||
5202 |
selector := aSelector asSymbol. |
|
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5203 |
selector numArgs == 0 ifFalse:[^ self]. |
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5204 |
|
1606 | 5205 |
icon := aClass perform:selector. |
5206 |
||
5207 |
w := icon width. |
|
5208 |
h := icon height. |
|
5209 |
||
5210 |
w > 32 ifTrue:[ |
|
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5211 |
magnify := 32 / w. |
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5212 |
h > 32 ifTrue:[ magnify := (32 / h) max:magnify ]. |
1606 | 5213 |
] ifFalse:[ |
1867
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5214 |
h > 32 ifFalse:[^ self]. |
08860770cd69
also offer programImages in image-list
Claus Gittinger <cg@exept.de>
parents:
1853
diff
changeset
|
5215 |
magnify := 32 / h. |
1606 | 5216 |
]. |
5217 |
icon := icon magnifiedBy: magnify. |
|
5218 |
! |
|
5219 |
||
5220 |
initialize |
|
5221 |
super initialize. |
|
5222 |
children := #(). |
|
5223 |
! ! |
|
5224 |
||
5225 |
!MenuEditor::ResourceEditorItem methodsFor:'user operations'! |
|
5226 |
||
5227 |
doEdit |
|
5228 |
"open image browser on self |
|
5229 |
" |
|
5230 |
|parent| |
|
5231 |
||
5232 |
parent := self parent. |
|
5233 |
||
5234 |
parent ifNotNil:[ |
|
5235 |
ImageEditor openOnClass:(parent selector) andSelector:selector |
|
5236 |
]. |
|
199 | 5237 |
! ! |
5238 |
||
1631 | 5239 |
!MenuEditor::RootItem class methodsFor:'defaults'! |
5240 |
||
5241 |
defaultLabel |
|
5242 |
^ MenuEditor resourceType |
|
5243 |
! ! |
|
5244 |
||
1668 | 5245 |
!MenuEditor::RootItem class methodsFor:'interface specs'! |
1631 | 5246 |
|
5247 |
basicsEditSpec |
|
5248 |
"This resource specification was automatically generated |
|
5249 |
by the UIPainter of ST/X." |
|
5250 |
||
5251 |
"Do not manually edit this!! If it is corrupted, |
|
5252 |
the UIPainter may not be able to read the specification." |
|
5253 |
||
5254 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5255 |
UIPainter new openOnClass:MenuEditor::RootItem andSelector:#basicsEditSpec |
1631 | 5256 |
" |
5257 |
||
5258 |
<resource: #canvas> |
|
5259 |
||
5260 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5261 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5262 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5263 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5264 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5265 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5266 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5267 |
min: (Point 10 10) |
1810 | 5268 |
bounds: (Rectangle 0 0 260 46) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5269 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5270 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5271 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5272 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5273 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5274 |
label: 'Selector:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5275 |
name: 'selectorLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5276 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5277 |
activeHelpKey: basicsSelector |
1810 | 5278 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5279 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5280 |
adjust: right |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5281 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5282 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5283 |
name: 'selectorField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5284 |
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
|
5285 |
activeHelpKey: basicsSelector |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5286 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5287 |
model: rawLabel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5288 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5289 |
type: string |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5290 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5291 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5292 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5293 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5294 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5295 |
acceptOnPointerLeave: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5296 |
) |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5297 |
) |
1631 | 5298 |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5299 |
) |
1631 | 5300 |
) |
5301 |
! ! |
|
5302 |
||
1725 | 5303 |
!MenuEditor::RootItem class methodsFor:'interface-editor'! |
5304 |
||
5305 |
addBindingsTo:aspects for:aMenuEditor |
|
5306 |
"add additional bindings to the aspects |
|
5307 |
" |
|
5308 |
! ! |
|
5309 |
||
1631 | 5310 |
!MenuEditor::RootItem methodsFor:'accessing'! |
5311 |
||
5312 |
menuItem:aMenuItem |
|
5313 |
"rebuild self from a MenuItem |
|
5314 |
" |
|
5315 |
|submenu selector| |
|
5316 |
||
5317 |
aMenuItem notNil ifTrue:[ |
|
5318 |
submenu := aMenuItem submenu. |
|
5319 |
selector := aMenuItem rawLabel. |
|
5320 |
] ifFalse:[ |
|
5321 |
selector := submenu := nil. |
|
5322 |
]. |
|
5323 |
self menu:submenu labeled:selector. |
|
5324 |
! |
|
5325 |
||
5326 |
rawLabel:aValue |
|
5327 |
"set the label assigned to the item |
|
5328 |
" |
|
5329 |
|value| |
|
5330 |
||
5331 |
aValue isString ifTrue:[ |
|
5332 |
value := aValue withoutSeparators. |
|
5333 |
||
5334 |
(value notEmpty and:[value first isLetter]) ifTrue:[ |
|
5335 |
menuItem rawLabel:(value asSymbol) |
|
5336 |
]. |
|
5337 |
]. |
|
5338 |
! |
|
5339 |
||
5340 |
slices |
|
5341 |
^ #( |
|
5342 |
(Basics basicsEditSpec) |
|
5343 |
) |
|
5344 |
! ! |
|
5345 |
||
5346 |
!MenuEditor::RootItem methodsFor:'adding & removing'! |
|
5347 |
||
5348 |
remove |
|
5349 |
"cannot remove the root item; delete all my children |
|
5350 |
" |
|
5351 |
self removeAll. |
|
5352 |
! ! |
|
5353 |
||
5354 |
!MenuEditor::RootItem methodsFor:'aspects'! |
|
5355 |
||
5356 |
aspectAt:aKey put:aValue |
|
5357 |
"discard all other than the rawLabel |
|
5358 |
" |
|
5359 |
aKey == #rawLabel ifTrue:[ self rawLabel:aValue ]. |
|
5360 |
! ! |
|
5361 |
||
5362 |
!MenuEditor::RootItem methodsFor:'displaying'! |
|
5363 |
||
5364 |
heightOn:aGC |
|
5365 |
height ifNil:[ height := aGC font heightOn:aGC device ]. |
|
5366 |
^ height |
|
5367 |
! ! |
|
5368 |
||
5369 |
!MenuEditor::RootItem methodsFor:'initialization'! |
|
5370 |
||
5371 |
initialize |
|
5372 |
super initialize. |
|
5373 |
isExpanded := true. |
|
5374 |
! ! |
|
5375 |
||
5376 |
!MenuEditor::RootItem methodsFor:'queries'! |
|
5377 |
||
5378 |
canCollapse |
|
5379 |
^ false |
|
5380 |
! |
|
5381 |
||
5382 |
hasIndicator |
|
5383 |
^ false |
|
5384 |
! |
|
5385 |
||
5386 |
isDelayedMenu |
|
5387 |
^ false |
|
5388 |
! |
|
5389 |
||
5390 |
isRootItem |
|
5391 |
^ true |
|
5392 |
! ! |
|
5393 |
||
1660 | 5394 |
!MenuEditor::RootItem methodsFor:'queries-editor'! |
1631 | 5395 |
|
5396 |
actionSelectors |
|
5397 |
"returns my action selectors |
|
5398 |
" |
|
5399 |
^ #() |
|
5400 |
! |
|
5401 |
||
5402 |
aspectSelectors |
|
5403 |
"returns my aspect selectors |
|
5404 |
" |
|
5405 |
^ #() |
|
5406 |
! ! |
|
5407 |
||
1660 | 5408 |
!MenuEditor::RootItem methodsFor:'queries-operation'! |
1631 | 5409 |
|
5410 |
canMoveInAbove |
|
5411 |
^ false |
|
5412 |
! |
|
5413 |
||
5414 |
canMoveInNext |
|
5415 |
^ false |
|
5416 |
! |
|
5417 |
||
5418 |
canMoveOut |
|
5419 |
^ false |
|
5420 |
! |
|
5421 |
||
5422 |
canMoveUpOrDown |
|
5423 |
^ false |
|
5424 |
! ! |
|
5425 |
||
1668 | 5426 |
!MenuEditor::SeparatorItem class methodsFor:'interface specs'! |
1631 | 5427 |
|
5428 |
basicsEditSpec |
|
5429 |
"This resource specification was automatically generated |
|
5430 |
by the UIPainter of ST/X." |
|
5431 |
||
5432 |
"Do not manually edit this!! If it is corrupted, |
|
5433 |
the UIPainter may not be able to read the specification." |
|
5434 |
||
5435 |
" |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5436 |
UIPainter new openOnClass:MenuEditor::SeparatorItem andSelector:#basicsEditSpec |
1631 | 5437 |
" |
5438 |
||
5439 |
<resource: #canvas> |
|
5440 |
||
5441 |
^ |
|
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5442 |
#(FullSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5443 |
name: basicsEditSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5444 |
window: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5445 |
(WindowSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5446 |
label: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5447 |
name: 'basicsEditSpec' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5448 |
min: (Point 10 10) |
1810 | 5449 |
bounds: (Rectangle 0 0 260 245) |
1636 | 5450 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5451 |
component: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5452 |
(SpecCollection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5453 |
collection: ( |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5454 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5455 |
label: 'Separator:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5456 |
name: 'separatorLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5457 |
layout: (AlignmentOrigin 107 0 26 0 1 0.5) |
1810 | 5458 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5459 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5460 |
adjust: right |
1636 | 5461 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5462 |
(ComboListSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5463 |
name: 'seperatorList' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5464 |
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
|
5465 |
activeHelpKey: basicsSeparatorType |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5466 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5467 |
model: seperatorSelection |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5468 |
comboList: seperatorList |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5469 |
useIndex: true |
1636 | 5470 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5471 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5472 |
label: 'Visibility:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5473 |
name: 'visibilityLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5474 |
layout: (AlignmentOrigin 107 0 51 0 1 0.5) |
1810 | 5475 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5476 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5477 |
adjust: right |
1636 | 5478 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5479 |
(InputFieldSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5480 |
name: 'visibilityInputField' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5481 |
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
|
5482 |
activeHelpKey: detailsVisibility |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5483 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5484 |
model: isVisible |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5485 |
group: inputGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5486 |
type: symbolOrBooleanOrNil |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5487 |
immediateAccept: false |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5488 |
acceptOnReturn: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5489 |
acceptOnTab: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5490 |
acceptChannel: acceptChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5491 |
modifiedChannel: modifiedChannel |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5492 |
acceptOnPointerLeave: false |
1636 | 5493 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5494 |
(LabelSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5495 |
label: 'Start Group:' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5496 |
name: 'startGroupLabel' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5497 |
layout: (AlignmentOrigin 107 0 88 0 1 0.5) |
1810 | 5498 |
translateLabel: true |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5499 |
resizeForLabel: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5500 |
adjust: right |
1636 | 5501 |
) |
1737
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5502 |
(PopUpListSpec |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5503 |
label: 'left' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5504 |
name: 'startGroupPopUp' |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5505 |
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
|
5506 |
activeHelpKey: detailsStartGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5507 |
tabable: true |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5508 |
model: startGroup |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5509 |
menu: |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5510 |
(left |
de6abd3c55d2
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1730
diff
changeset
|
5511 |
right |
1636 | 5512 |
) |
5513 |
) |
|
5514 |
) |
|
1631 | 5515 |
|
1636 | 5516 |
) |
1631 | 5517 |
) |
5518 |
! ! |
|
5519 |
||
1725 | 5520 |
!MenuEditor::SeparatorItem class methodsFor:'interface-editor'! |
5521 |
||
5522 |
addBindingsTo:aspects for:aMenuEditor |
|
5523 |
"add additional bindings to the aspects |
|
5524 |
" |
|
5525 |
|holder| |
|
5526 |
||
1810 | 5527 |
aspects |
5528 |
at:#seperatorList |
|
5529 |
ifAbsentPut: |
|
5530 |
[ |
|
5531 |
|l| |
|
5532 |
||
5533 |
l := self separatorSlices collect:[:el| el last ]. |
|
5534 |
l := l collect:[:s | self classResources string:s ]. |
|
5535 |
l |
|
5536 |
]. |
|
1725 | 5537 |
|
5538 |
aspects at:#seperatorSelection ifAbsentPut:[ |
|
1810 | 5539 |
holder := 0 asValue. |
5540 |
holder addDependent:aMenuEditor. |
|
5541 |
holder |
|
1725 | 5542 |
]. |
5543 |
! |
|
5544 |
||
5545 |
defaultLabel |
|
5546 |
^ '-' |
|
5547 |
! |
|
5548 |
||
5549 |
separatorSlices |
|
5550 |
"get the list of menu spec values of the corresponding separator types |
|
5551 |
" |
|
5552 |
^ #( |
|
5553 |
( #blank '' 'blank' ) |
|
5554 |
( #single '-' 'single line') |
|
5555 |
( #double '=' 'double line') |
|
5556 |
) |
|
5557 |
! ! |
|
5558 |
||
1631 | 5559 |
!MenuEditor::SeparatorItem methodsFor:'accessing'! |
5560 |
||
5561 |
icon |
|
5562 |
^ self class iconSeparator |
|
5563 |
! |
|
5564 |
||
5565 |
rawLabel:aValue |
|
5566 |
|value| |
|
5567 |
||
5568 |
aValue isString ifTrue:[ |
|
5569 |
value := aValue withoutSeparators. |
|
5570 |
||
5571 |
(self class separatorTypeOf:value) ifNotNil:[ |
|
5572 |
menuItem rawLabel:value |
|
5573 |
] |
|
5574 |
]. |
|
5575 |
! |
|
5576 |
||
5577 |
separatorType |
|
5578 |
^ self class separatorTypeOf:(menuItem rawLabel). |
|
5579 |
! |
|
5580 |
||
5581 |
slices |
|
5582 |
^ #( |
|
5583 |
(Basics basicsEditSpec) |
|
5584 |
) |
|
5585 |
! ! |
|
5586 |
||
5587 |
!MenuEditor::SeparatorItem methodsFor:'aspects'! |
|
5588 |
||
5589 |
fromAspects:aspects |
|
5590 |
"put my values into the values of aspects |
|
5591 |
" |
|
5592 |
|index slice| |
|
5593 |
||
5594 |
index := (aspects at:#seperatorSelection) value ? 0. |
|
5595 |
slice := self class separatorSlices at:index ifAbsent:nil. |
|
5596 |
||
5597 |
slice ifNotNil:[ slice := slice at:2 ]. |
|
5598 |
||
5599 |
(aspects at:#rawLabel) value:slice. |
|
5600 |
^ super fromAspects:aspects. |
|
5601 |
! |
|
5602 |
||
5603 |
toAspects:aspects |
|
5604 |
"put my values into the values of aspects |
|
5605 |
" |
|
5606 |
|index type| |
|
5607 |
||
5608 |
type := self separatorType. |
|
5609 |
index := self class separatorSlices findFirst:[:el| el first == type ]. |
|
5610 |
||
5611 |
(aspects at:#seperatorSelection) value:index. |
|
5612 |
^ super toAspects:aspects. |
|
5613 |
! ! |
|
5614 |
||
5615 |
!MenuEditor::SeparatorItem methodsFor:'displaying'! |
|
5616 |
||
5617 |
displayOn:aGC x:x y:y h:h |
|
5618 |
"draw the receiver in the graphicsContext, aGC. |
|
5619 |
" |
|
5620 |
|x1 y0 type| |
|
5621 |
||
5622 |
type := self separatorType. |
|
5623 |
type == #blank ifTrue:[ ^ self ]. |
|
5624 |
||
5625 |
x1 := x + (self widthOn:aGC). |
|
5626 |
y0 := y + (h // 2) - 1. |
|
5627 |
||
5628 |
type == #double ifTrue:[ |
|
5629 |
y0 := y0 + 1. |
|
5630 |
aGC displayLineFromX:x y:y0 toX:x1 y:y0. |
|
5631 |
y0 := y0 - 2 |
|
5632 |
]. |
|
5633 |
aGC displayLineFromX:x y:y0 toX:x1 y:y0 |
|
5634 |
! |
|
5635 |
||
5636 |
widthOn:aGC |
|
5637 |
width ifNil:[ width := 60 ]. |
|
5638 |
^ width |
|
5639 |
! ! |
|
5640 |
||
2017 | 5641 |
!MenuE Vù Vùass methodsFor:'documentation'! |
199 | 5642 |
|
5643 |
version |
|
5644 |
^ '$Header$' |
|
5645 |
! ! |
|
1606 | 5646 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
5647 |
MenuEditor initialize! |