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