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