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