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