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