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