author | ca |
Sun, 06 May 2001 12:53:41 +0200 | |
changeset 1464 | 00fa8c2e3329 |
parent 1463 | 7dde3777813a |
child 1468 | 94fcd912ef88 |
permissions | -rw-r--r-- |
199 | 1 |
" |
738 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
199 | 3 |
All Rights Reserved |
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 |
||
13 |
||
14 |
||
1372 | 15 |
"{ Package: 'stx:libtool2' }" |
16 |
||
738 | 17 |
ResourceSpecEditor subclass:#MenuEditor |
1244 | 18 |
instanceVariableNames:'treeView typeOfCanvas listOfCanvas listOfSlices |
19 |
lastImageRetriever slices' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
20 |
classVariableNames:'ImageRetrieverClasses' |
220 | 21 |
poolDictionaries:'' |
22 |
category:'Interface-UIPainter' |
|
199 | 23 |
! |
24 |
||
25 |
Object subclass:#Item |
|
220 | 26 |
instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey |
407 | 27 |
accessCharacterPos retriever icon iconAndLabel submenuChannel |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
28 |
startGroup argument translateLabel isButton isVisible choice |
1365 | 29 |
choiceValue auxValue hideMenuOnActivated font |
1410 | 30 |
showBusyCursorWhilePerforming keepLinkedMenu triggerOnDown' |
1407 | 31 |
classVariableNames:'' |
32 |
poolDictionaries:'' |
|
33 |
privateIn:MenuEditor |
|
34 |
! |
|
35 |
||
1454 | 36 |
SelectionInTreeView subclass:#TreeView |
37 |
instanceVariableNames:'' |
|
38 |
classVariableNames:'' |
|
39 |
poolDictionaries:'' |
|
40 |
privateIn:MenuEditor |
|
41 |
! |
|
42 |
||
199 | 43 |
!MenuEditor class methodsFor:'documentation'! |
44 |
||
45 |
copyright |
|
46 |
" |
|
738 | 47 |
COPYRIGHT (c) 1997 by eXept Software AG |
199 | 48 |
All Rights Reserved |
49 |
||
50 |
This software is furnished under a license and may be used |
|
51 |
only in accordance with the terms of that license and with the |
|
738 | 52 |
inclusion of the above copyright notice. This software may not |
199 | 53 |
be provided or otherwise made available to, or used by, any |
54 |
other person. No title to or ownership of the software is |
|
55 |
hereby transferred. |
|
56 |
" |
|
57 |
||
58 |
||
59 |
! |
|
60 |
||
61 |
documentation |
|
62 |
" |
|
728 | 63 |
The MenuEditor allows you to create, modify or just inspect |
64 |
hierarchical menus of menu bars, popup menu, or tool bar menus. |
|
199 | 65 |
|
66 |
[start with:] |
|
67 |
MenuEditor open |
|
728 | 68 |
MenuEditor openOnClass:MenuEditor andSelector:#menu |
199 | 69 |
|
70 |
[see also:] |
|
71 |
UIPainter |
|
72 |
||
73 |
[author:] |
|
541 | 74 |
Claus Atzkern, eXept Software AG |
75 |
Thomas Zwick, eXept Software AG |
|
199 | 76 |
" |
77 |
||
78 |
! ! |
|
79 |
||
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
80 |
!MenuEditor class methodsFor:'initialization'! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
81 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
82 |
initialize |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
83 |
ImageRetrieverClasses := #( Icon |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
84 |
NewLauncher |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
85 |
SystemBrowser |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
86 |
) asList. |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
87 |
! ! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
88 |
|
508 | 89 |
!MenuEditor class methodsFor:'instance creation'! |
90 |
||
728 | 91 |
openModalOnMenu: aMenu |
92 |
"Open a MenuEditor modal on aMenu" |
|
93 |
"self openModalOnMenu: (self perform: #menu) decodeAsLiteralArray" |
|
94 |
||
95 |
^self new openModalOnMenu: aMenu |
|
508 | 96 |
! ! |
97 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
98 |
!MenuEditor class methodsFor:'accessing'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
99 |
|
734 | 100 |
iconUnknown |
101 |
"returns an image used for picked items containing an image |
|
102 |
" |
|
103 |
<resource: #fileImage> |
|
104 |
||
1400 | 105 |
^ MenuPanelSpec icon |
734 | 106 |
! |
107 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
108 |
resourceType |
728 | 109 |
"get the type of resource of the method generated by the MenuEditor" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
110 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
111 |
^#menu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
112 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
113 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
114 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
115 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
116 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
117 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
118 |
!MenuEditor class methodsFor:'accessing image retriever'! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
119 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
120 |
addNewImageRetriever:aSymbolOrClass |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
121 |
|key| |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
122 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
123 |
aSymbolOrClass isString ifFalse:[ |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
124 |
aSymbolOrClass isBehavior ifTrue:[ |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
125 |
key := aSymbolOrClass nameWithNameSpacePrefix |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
126 |
] |
1463 | 127 |
] ifTrue:[ |
128 |
key := aSymbolOrClass |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
129 |
]. |
1463 | 130 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
131 |
key size ~~ 0 ifTrue:[ |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
132 |
key := key asSymbol. |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
133 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
134 |
(ImageRetrieverClasses identityIndexOf:key) == 0 ifTrue:[ |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
135 |
ImageRetrieverClasses add:key. |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
136 |
] |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
137 |
]. |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
138 |
! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
139 |
|
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
140 |
imageRetrieverClasses |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
141 |
"returns a collection of image retrievers |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
142 |
" |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
143 |
^ ImageRetrieverClasses |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
144 |
! ! |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
145 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
146 |
!MenuEditor class methodsFor:'aspects'! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
147 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
148 |
aspects |
728 | 149 |
"get the aspects for the attributes of the menu components" |
150 |
||
151 |
^#( |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
152 |
label |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
153 |
accessCharacterPos |
1348
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
154 |
showBusyCursorWhilePerforming |
1410 | 155 |
triggerOnDown |
1365 | 156 |
font |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
157 |
argument |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
158 |
submenuChannel |
1378 | 159 |
keepLinkedMenu |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
160 |
enabled |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
161 |
value |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
162 |
nameKey |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
163 |
indication |
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
164 |
choice |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
165 |
choiceValue |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
166 |
translateLabel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
167 |
isButton |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
168 |
shortcutKey |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
169 |
startGroup |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
170 |
retriever |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
171 |
iconAndLabel |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
172 |
icon |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
173 |
isVisible |
1321 | 174 |
hideMenuOnActivated |
1199 | 175 |
auxValue |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
176 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
177 |
|
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
178 |
"Modified: / 14.8.1998 / 14:46:36 / cg" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
179 |
! ! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
180 |
|
371 | 181 |
!MenuEditor class methodsFor:'help specs'! |
182 |
||
183 |
helpSpec |
|
738 | 184 |
"This resource specification was automatically generated |
185 |
by the UIHelpTool of ST/X." |
|
186 |
||
187 |
"Do not manually edit this!! If it is corrupted, |
|
188 |
the UIHelpTool may not be able to read the specification." |
|
371 | 189 |
|
190 |
" |
|
738 | 191 |
UIHelpTool openOnClass:MenuEditor |
371 | 192 |
" |
193 |
||
738 | 194 |
<resource: #help> |
195 |
||
196 |
^super helpSpec addPairsFrom:#( |
|
371 | 197 |
|
548 | 198 |
#addMenuItem |
199 |
'Adds a new menu item.' |
|
200 |
||
201 |
#addMenuSeparator |
|
202 |
'Adds a new menu separator.' |
|
203 |
||
204 |
#addSubMenu |
|
613 | 205 |
'Adds a new sub menu.' |
548 | 206 |
|
207 |
#addSubMenuLink |
|
613 | 208 |
'Adds a new linked sub menu.' |
371 | 209 |
|
577 | 210 |
#basicsAction |
627 | 211 |
'An action selector with 0, 1 (the argument field), or 2 (the selected item) arguments.' |
577 | 212 |
|
213 |
#basicsArgument |
|
1330 | 214 |
'An optional arg passed with above selector, if it is a 1 or 2 arg selector (enter a Smalltalk literal).' |
577 | 215 |
|
959 | 216 |
#basicsChoice |
1330 | 217 |
'Aspect for a boolean holder, block or method, specifying the choices state (RadioButton behavior).' |
959 | 218 |
|
219 |
#basicsChoiceValue |
|
220 |
'That choices value (typically number or symbol).' |
|
577 | 221 |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
222 |
#basicsIndication |
1330 | 223 |
'Aspect for boolean holder, block, or method, specifying the indication state (CheckToggle behavior).' |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
224 |
|
577 | 225 |
#basicsIsButton |
603 | 226 |
'Turns on/off a button behavior.' |
577 | 227 |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
228 |
#basicsKey |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
229 |
'Internal key of the item (optional, for programmed accesses).' |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
230 |
|
577 | 231 |
#basicsLabel |
232 |
'Label of the item.' |
|
233 |
||
234 |
#basicsMenu |
|
1330 | 235 |
'Aspect providing the sub menu to be opened if item is selected (provide spec or valueHolder).' |
577 | 236 |
|
237 |
#basicsMenuArgument |
|
943 | 238 |
'An argument passed with the menu selector.' |
577 | 239 |
|
240 |
#basicsNameKey |
|
241 |
'Unique identifier of the item (optional).' |
|
242 |
||
243 |
#basicsSelector |
|
613 | 244 |
'Selector under which the generated menu spec is saved.' |
577 | 245 |
|
246 |
#basicsSeparatorType |
|
247 |
'List of valid separators.' |
|
248 |
||
249 |
#basicsTranslateLabel |
|
943 | 250 |
'Translate the label via the classes resource file (internationalization).' |
577 | 251 |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
252 |
#browseResource |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
253 |
'Search for methods with image resource.' |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
254 |
|
577 | 255 |
#detailsAccelerator |
256 |
'Key to be pressed to select the menu item from the keyboard (accelerator key).' |
|
257 |
||
258 |
#detailsAccessCharaterPosition |
|
259 |
'Index of the access character position of the textual label (optional).' |
|
260 |
||
1199 | 261 |
#detailsAuxValue |
262 |
'Some additional value - for arbitrary use by the program' |
|
263 |
||
577 | 264 |
#detailsEnabled |
943 | 265 |
'Aspect or binding providing a boolean value holder for the enable-state of the menu item.' |
577 | 266 |
|
959 | 267 |
#detailsStartGroup |
268 |
'Specify start of a right-aligned item group.' |
|
269 |
||
577 | 270 |
#detailsVisibility |
943 | 271 |
'Aspect or binding providing a boolean value holder for the visibility-state of the menu item.' |
577 | 272 |
|
548 | 273 |
#fileLoad |
943 | 274 |
'Opens a dialog to select and load a menu spec from a class.' |
548 | 275 |
|
276 |
#fileNew |
|
277 |
'Creates a new menu spec.' |
|
278 |
||
577 | 279 |
#filePickAMenu |
836 | 280 |
'Select a menu from an open view and read its specification' |
577 | 281 |
|
548 | 282 |
#fileSave |
943 | 283 |
'Saves the menu spec (and the help spec, if modified).' |
455 | 284 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
285 |
#fileSaveAs |
943 | 286 |
'Opens a dialog to save the menu spec (and the help spec, if modified).' |
287 |
||
1321 | 288 |
#hideMenuOnActivated |
1426 | 289 |
'If on, the menu hides itself after an item was activated' |
290 |
||
577 | 291 |
#imageImageAndLabel |
943 | 292 |
'Toggles display of both image and textual label.' |
577 | 293 |
|
294 |
#imageImageEditor |
|
943 | 295 |
'Opens an Image Editor on the resource method defined by retriever and selector.' |
577 | 296 |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
297 |
#imageImageList |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
298 |
'Currently existing image resources.' |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
299 |
|
577 | 300 |
#imageRetriever |
301 |
'Class implementing the image resource method. If no class is given, the current application class will be taken.' |
|
302 |
||
303 |
#imageSelector |
|
959 | 304 |
'Selector returning an image (sent to above or the application).' |
305 |
||
1378 | 306 |
#keepLinkedMenu |
307 |
'Keep the linked menu after activation (do not destroy)' |
|
308 |
||
1464 | 309 |
#showBusyCursorWhilePerforming |
310 |
'If on, a busy cursor is shown while an items action is performed' |
|
311 |
||
312 |
#triggerOnDown |
|
313 |
'If on, the items action is performed on mouse-button press (default is on button-release)' |
|
314 |
||
371 | 315 |
) |
316 |
! ! |
|
317 |
||
734 | 318 |
!MenuEditor class methodsFor:'image specs'! |
319 |
||
320 |
linkSubmenuImage |
|
738 | 321 |
"This resource specification was automatically generated |
322 |
by the ImageEditor of ST/X." |
|
323 |
||
324 |
"Do not manually edit this!!!! If it is corrupted, |
|
325 |
the ImageEditor may not be able to read the specification." |
|
326 |
||
734 | 327 |
" |
738 | 328 |
ImageEditor openOnClass:self andSelector:#linkSubmenuImage |
734 | 329 |
" |
330 |
||
331 |
<resource: #image> |
|
332 |
||
333 |
^Icon |
|
334 |
constantNamed:#'MenuEditor linkSubmenuImage' |
|
1425 | 335 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@ADQDQDQDQDQDQH@D"H"H"H"H"H"K0@RH"H"H"H"H"H/@A????????????<@D@@@@@@@@@@@C0@PL3L0DQDQDQD_@A@3L3LBH"H"H"<@DCL3L3@"H"H"K0@PL3L3L0??????@A@@@@L3L@@@@@<@DQDQDCL3@PLAG0@RH"H"@3L0@3@/@AH"H"H L3L3L0<@G?????<CL3L3L@@P@@@@@@@3L3LO@ADQDQDQDP@CLA<@D"H"H"H"H LBK0@RH"H"H"H"@BH/@B????????????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
336 |
! |
|
734 | 337 |
|
338 |
menuItemImage |
|
738 | 339 |
"This resource specification was automatically generated |
340 |
by the ImageEditor of ST/X." |
|
341 |
||
342 |
"Do not manually edit this!!!! If it is corrupted, |
|
343 |
the ImageEditor may not be able to read the specification." |
|
344 |
||
734 | 345 |
" |
738 | 346 |
ImageEditor openOnClass:self andSelector:#menuItemImage |
734 | 347 |
" |
348 |
||
349 |
<resource: #image> |
|
350 |
||
351 |
^Icon |
|
352 |
constantNamed:#'MenuEditor menuItemImage' |
|
1425 | 353 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUQUUUUUUUPUUUUUUU_UUUUUUUPUUUUUUUP@@@@@@@@EUUUUUVAF*****+HF:?+::;@F:.+*?;@F:.+::;@F:.+*:;@F:.+::;@F*****+DK??????A@@@@@@@@UUUUUUUPUUUUUUUXUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUX') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
354 |
! |
|
734 | 355 |
|
356 |
menuSeparatorImage |
|
738 | 357 |
"This resource specification was automatically generated |
358 |
by the ImageEditor of ST/X." |
|
359 |
||
360 |
"Do not manually edit this!!!! If it is corrupted, |
|
361 |
the ImageEditor may not be able to read the specification." |
|
362 |
||
734 | 363 |
" |
738 | 364 |
ImageEditor openOnClass:self andSelector:#menuSeparatorImage |
734 | 365 |
" |
366 |
||
367 |
<resource: #image> |
|
368 |
||
369 |
^Icon |
|
370 |
constantNamed:#'MenuEditor menuSeparatorImage' |
|
1425 | 371 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUURUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP@@@@@@@@EUUUUUV@F*****+DF*****+CF?????+@F0@@@@[@F%UUUU[HF*****+@F*****+@K??????N@@@@@@@HUUUUUUUPUUUUUUUPUUUUUUUWUUUUUUUXUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
372 |
! |
|
734 | 373 |
|
374 |
submenuImage |
|
738 | 375 |
"This resource specification was automatically generated |
376 |
by the ImageEditor of ST/X." |
|
377 |
||
378 |
"Do not manually edit this!!!! If it is corrupted, |
|
379 |
the ImageEditor may not be able to read the specification." |
|
380 |
||
734 | 381 |
" |
738 | 382 |
ImageEditor openOnClass:self andSelector:#submenuImage |
734 | 383 |
" |
384 |
||
385 |
<resource: #image> |
|
386 |
||
387 |
^Icon |
|
388 |
constantNamed:#'MenuEditor submenuImage' |
|
1425 | 389 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@EUUUUUV@F*****+@F*****+@G??????GD@@@@@C@EUUUUUWLF*****+@F*****+@G??????HD@@@@@C@EUUUUUW@F*****+@F*****+OG??????@D@@@@@C@EUUUUUW@F*****+@F*****+@K??????@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
390 |
! ! |
|
734 | 391 |
|
199 | 392 |
!MenuEditor class methodsFor:'interface specs'! |
393 |
||
394 |
basicsItemSpec |
|
738 | 395 |
"This resource specification was automatically generated |
396 |
by the UIPainter of ST/X." |
|
397 |
||
398 |
"Do not manually edit this!! If it is corrupted, |
|
399 |
the UIPainter may not be able to read the specification." |
|
199 | 400 |
|
401 |
" |
|
402 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec |
|
403 |
MenuEditor new openInterface:#basicsItemSpec |
|
404 |
" |
|
405 |
||
406 |
<resource: #canvas> |
|
407 |
||
1155 | 408 |
^ |
409 |
#(#FullSpec |
|
410 |
#name: #basicsItemSpec |
|
411 |
#window: |
|
412 |
#(#WindowSpec |
|
413 |
#label: 'Basics Item' |
|
414 |
#name: 'Basics Item' |
|
415 |
#min: #(#Point 10 10) |
|
416 |
#max: #(#Point 1160 870) |
|
1410 | 417 |
#bounds: #(#Rectangle 898 390 1173 751) |
1155 | 418 |
) |
419 |
#component: |
|
420 |
#(#SpecCollection |
|
421 |
#collection: #( |
|
422 |
#(#LabelSpec |
|
423 |
#label: 'Name Key:' |
|
424 |
#name: 'nameKeyLabel' |
|
425 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
426 |
#activeHelpKey: #basicsKey |
|
427 |
#resizeForLabel: true |
|
428 |
#adjust: #right |
|
429 |
) |
|
430 |
#(#InputFieldSpec |
|
431 |
#name: 'nameKeyField' |
|
1244 | 432 |
#layout: #(#LayoutFrame 110 0 16 0 -5 1.0 38 0) |
1155 | 433 |
#activeHelpKey: #basicsKey |
434 |
#tabable: true |
|
435 |
#model: #nameKey |
|
1244 | 436 |
#group: #inputGroup1 |
1155 | 437 |
#type: #symbolOrNil |
438 |
#acceptOnLeave: false |
|
439 |
#acceptOnReturn: true |
|
440 |
#acceptOnTab: true |
|
441 |
#acceptOnLostFocus: false |
|
442 |
#acceptChannel: #acceptChannel |
|
443 |
#modifiedChannel: #modifiedChannel |
|
444 |
#acceptOnPointerLeave: false |
|
445 |
) |
|
446 |
#(#LabelSpec |
|
447 |
#label: 'Label:' |
|
448 |
#name: 'labelLabel' |
|
449 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
450 |
#activeHelpKey: #basicsLabel |
|
451 |
#resizeForLabel: true |
|
452 |
#adjust: #right |
|
453 |
) |
|
454 |
#(#InputFieldSpec |
|
455 |
#name: 'labelField' |
|
456 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
457 |
#activeHelpKey: #basicsLabel |
|
458 |
#tabable: true |
|
459 |
#model: #label |
|
1244 | 460 |
#group: #inputGroup1 |
1155 | 461 |
#acceptOnReturn: true |
462 |
#acceptOnTab: true |
|
463 |
#acceptOnLostFocus: false |
|
464 |
#acceptChannel: #acceptChannel |
|
465 |
#modifiedChannel: #modifiedChannel |
|
466 |
#acceptOnPointerLeave: false |
|
467 |
) |
|
468 |
#(#LabelSpec |
|
469 |
#label: 'Action:' |
|
470 |
#name: 'valueLabel' |
|
1410 | 471 |
#layout: #(#AlignmentOrigin 107 0 85 0 1 0.5) |
1155 | 472 |
#activeHelpKey: #basicsAction |
473 |
#resizeForLabel: true |
|
474 |
#adjust: #right |
|
475 |
) |
|
476 |
#(#InputFieldSpec |
|
477 |
#name: 'valueField' |
|
1410 | 478 |
#layout: #(#LayoutFrame 110 0 74 0 -5 1.0 96 0) |
1155 | 479 |
#activeHelpKey: #basicsAction |
480 |
#tabable: true |
|
481 |
#model: #value |
|
1244 | 482 |
#group: #inputGroup1 |
1155 | 483 |
#type: #symbolOrNil |
484 |
#acceptOnReturn: true |
|
485 |
#acceptOnTab: true |
|
486 |
#acceptOnLostFocus: false |
|
487 |
#acceptChannel: #acceptChannel |
|
488 |
#modifiedChannel: #modifiedChannel |
|
489 |
#acceptOnPointerLeave: false |
|
490 |
) |
|
491 |
#(#LabelSpec |
|
492 |
#label: 'Argument:' |
|
493 |
#name: 'argumentLabel' |
|
1410 | 494 |
#layout: #(#AlignmentOrigin 107 0 110 0 1 0.5) |
1155 | 495 |
#activeHelpKey: #basicsArgument |
496 |
#resizeForLabel: true |
|
497 |
#adjust: #right |
|
498 |
) |
|
499 |
#(#InputFieldSpec |
|
500 |
#name: 'argumentField' |
|
1410 | 501 |
#layout: #(#LayoutFrame 110 0 99 0 -5 1.0 121 0) |
1155 | 502 |
#activeHelpKey: #basicsArgument |
503 |
#tabable: true |
|
504 |
#model: #argument |
|
1244 | 505 |
#group: #inputGroup1 |
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
506 |
#type: #smalltalkObject |
1155 | 507 |
#acceptOnReturn: true |
508 |
#acceptOnTab: true |
|
509 |
#acceptOnLostFocus: false |
|
510 |
#acceptChannel: #acceptChannel |
|
511 |
#modifiedChannel: #modifiedChannel |
|
512 |
#acceptOnPointerLeave: false |
|
513 |
) |
|
514 |
#(#LabelSpec |
|
515 |
#label: 'Indication:' |
|
516 |
#name: 'indicationLabel' |
|
1410 | 517 |
#layout: #(#AlignmentOrigin 107 0 144 0 1 0.5) |
1155 | 518 |
#activeHelpKey: #basicsIndication |
519 |
#resizeForLabel: true |
|
520 |
#adjust: #right |
|
521 |
) |
|
522 |
#(#InputFieldSpec |
|
523 |
#name: 'indicationField' |
|
1410 | 524 |
#layout: #(#LayoutFrame 110 0 133 0 -5 1.0 155 0) |
1155 | 525 |
#activeHelpKey: #basicsIndication |
526 |
#enableChannel: #indicationEnabled |
|
527 |
#tabable: true |
|
528 |
#model: #indication |
|
1244 | 529 |
#group: #inputGroup1 |
1155 | 530 |
#type: #symbolOrNil |
531 |
#immediateAccept: true |
|
532 |
#acceptOnReturn: true |
|
533 |
#acceptOnTab: true |
|
534 |
#acceptOnLostFocus: false |
|
535 |
#acceptChannel: #acceptChannel |
|
536 |
#modifiedChannel: #modifiedChannel |
|
537 |
#acceptOnPointerLeave: false |
|
538 |
) |
|
539 |
#(#LabelSpec |
|
540 |
#label: 'Choice:' |
|
541 |
#name: 'choiceLabel' |
|
1410 | 542 |
#layout: #(#AlignmentOrigin 107 0 169 0 1 0.5) |
1155 | 543 |
#activeHelpKey: #basicsChoice |
544 |
#translateLabel: true |
|
545 |
#resizeForLabel: true |
|
546 |
#adjust: #right |
|
547 |
) |
|
548 |
#(#InputFieldSpec |
|
549 |
#name: 'choiceField' |
|
1410 | 550 |
#layout: #(#LayoutFrame 110 0 158 0 -5 1.0 180 0) |
1155 | 551 |
#activeHelpKey: #basicsChoice |
552 |
#enableChannel: #choiceEnabled |
|
553 |
#tabable: true |
|
554 |
#model: #choice |
|
1244 | 555 |
#group: #inputGroup1 |
1155 | 556 |
#type: #symbolOrNil |
557 |
#immediateAccept: true |
|
558 |
#acceptOnReturn: true |
|
559 |
#acceptOnTab: true |
|
560 |
#acceptOnLostFocus: false |
|
561 |
#acceptChannel: #acceptChannel |
|
562 |
#modifiedChannel: #modifiedChannel |
|
563 |
#acceptOnPointerLeave: false |
|
564 |
) |
|
565 |
#(#LabelSpec |
|
566 |
#label: 'Value:' |
|
567 |
#name: 'choiceValueLabel' |
|
1410 | 568 |
#layout: #(#AlignmentOrigin 107 0 194 0 1 0.5) |
1155 | 569 |
#activeHelpKey: #basicsChoiceValue |
570 |
#translateLabel: true |
|
571 |
#resizeForLabel: true |
|
572 |
#adjust: #right |
|
573 |
) |
|
574 |
#(#InputFieldSpec |
|
575 |
#name: 'choiceValueField' |
|
1410 | 576 |
#layout: #(#LayoutFrame 110 0 183 0 -5 1.0 205 0) |
1155 | 577 |
#activeHelpKey: #basicsChoiceValue |
578 |
#enableChannel: #choiceValueEnabled |
|
579 |
#tabable: true |
|
580 |
#model: #choiceValue |
|
1244 | 581 |
#group: #inputGroup1 |
1155 | 582 |
#type: #smalltalkObject |
583 |
#acceptOnLeave: false |
|
584 |
#acceptOnReturn: true |
|
585 |
#acceptOnTab: true |
|
586 |
#acceptOnLostFocus: false |
|
587 |
#acceptChannel: #acceptChannel |
|
588 |
#modifiedChannel: #modifiedChannel |
|
589 |
#acceptOnPointerLeave: false |
|
590 |
) |
|
591 |
#(#CheckBoxSpec |
|
592 |
#label: 'Translate Label' |
|
593 |
#name: 'translateLabelCheckBox' |
|
1410 | 594 |
#layout: #(#Point 20 218) |
1155 | 595 |
#activeHelpKey: #basicsTranslateLabel |
596 |
#tabable: true |
|
597 |
#model: #translateLabel |
|
598 |
) |
|
599 |
#(#CheckBoxSpec |
|
600 |
#label: 'Is Button' |
|
601 |
#name: 'isButtonCheckBox' |
|
1410 | 602 |
#layout: #(#Point 20 243) |
1155 | 603 |
#activeHelpKey: #basicsIsButton |
604 |
#tabable: true |
|
605 |
#model: #isButton |
|
606 |
) |
|
1321 | 607 |
#(#CheckBoxSpec |
608 |
#label: 'Hide Menu after Activation' |
|
609 |
#name: 'hideMenuOnActivated' |
|
1410 | 610 |
#layout: #(#Point 20 267) |
1321 | 611 |
#activeHelpKey: #hideMenuOnActivated |
612 |
#tabable: true |
|
613 |
#model: #hideMenuOnActivated |
|
614 |
) |
|
1348
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
615 |
#(#CheckBoxSpec |
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
616 |
#label: 'BusyCursor while Active' |
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
617 |
#name: 'showBusyCursorWhilePerforming' |
1410 | 618 |
#layout: #(#Point 20 291) |
1426 | 619 |
#activeHelpKey: #showBusyCursorWhilePerforming |
1348
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
620 |
#tabable: true |
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
621 |
#model: #showBusyCursorWhilePerforming |
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
622 |
#translateLabel: true |
48e25df6aa34
added 'showBysuCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1335
diff
changeset
|
623 |
) |
1410 | 624 |
#(#CheckBoxSpec |
625 |
#label: 'Trigger On Down' |
|
626 |
#name: 'triggerOnDown' |
|
627 |
#layout: #(#Point 20 315) |
|
1426 | 628 |
#activeHelpKey: #triggerOnDown |
1410 | 629 |
#tabable: true |
630 |
#model: #triggerOnDown |
|
631 |
#translateLabel: true |
|
632 |
) |
|
1155 | 633 |
) |
634 |
||
635 |
) |
|
199 | 636 |
) |
637 |
! |
|
638 |
||
218 | 639 |
basicsLinkSpec |
738 | 640 |
"This resource specification was automatically generated |
641 |
by the UIPainter of ST/X." |
|
642 |
||
643 |
"Do not manually edit this!! If it is corrupted, |
|
644 |
the UIPainter may not be able to read the specification." |
|
218 | 645 |
|
646 |
" |
|
647 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec |
|
648 |
MenuEditor new openInterface:#basicsLinkSpec |
|
649 |
" |
|
650 |
||
651 |
<resource: #canvas> |
|
652 |
||
1155 | 653 |
^ |
654 |
#(#FullSpec |
|
655 |
#name: #basicsLinkSpec |
|
656 |
#window: |
|
657 |
#(#WindowSpec |
|
658 |
#label: 'Basics Link' |
|
659 |
#name: 'Basics Link' |
|
660 |
#min: #(#Point 10 10) |
|
661 |
#max: #(#Point 1280 1024) |
|
1378 | 662 |
#bounds: #(#Rectangle 900 124 1167 443) |
1155 | 663 |
) |
664 |
#component: |
|
665 |
#(#SpecCollection |
|
666 |
#collection: #( |
|
667 |
#(#LabelSpec |
|
668 |
#label: 'Name Key:' |
|
669 |
#name: 'nameKeyLabel' |
|
670 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
671 |
#activeHelpKey: #nameKey |
|
672 |
#resizeForLabel: true |
|
673 |
#adjust: #right |
|
674 |
) |
|
675 |
#(#InputFieldSpec |
|
676 |
#name: 'nameKeyField' |
|
677 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
678 |
#activeHelpKey: #basicsNameKey |
|
679 |
#tabable: true |
|
680 |
#model: #nameKey |
|
1244 | 681 |
#group: #inputGroup2 |
1155 | 682 |
#type: #symbolOrNil |
683 |
#acceptOnReturn: true |
|
684 |
#acceptOnTab: true |
|
685 |
#acceptChannel: #acceptChannel |
|
686 |
#modifiedChannel: #modifiedChannel |
|
687 |
#acceptOnPointerLeave: false |
|
688 |
) |
|
689 |
#(#LabelSpec |
|
690 |
#label: 'Label:' |
|
691 |
#name: 'labelLabel' |
|
692 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
693 |
#resizeForLabel: true |
|
694 |
) |
|
695 |
#(#InputFieldSpec |
|
696 |
#name: 'labelField' |
|
697 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
698 |
#activeHelpKey: #basicsLabel |
|
699 |
#tabable: true |
|
700 |
#model: #label |
|
1244 | 701 |
#group: #inputGroup2 |
1155 | 702 |
#acceptOnReturn: true |
703 |
#acceptOnTab: true |
|
704 |
#acceptChannel: #acceptChannel |
|
705 |
#modifiedChannel: #modifiedChannel |
|
706 |
#acceptOnPointerLeave: false |
|
707 |
) |
|
708 |
#(#LabelSpec |
|
709 |
#label: 'Menu:' |
|
710 |
#name: 'menuLabel' |
|
711 |
#layout: #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
712 |
#resizeForLabel: true |
|
713 |
) |
|
714 |
#(#InputFieldSpec |
|
715 |
#name: 'menuField' |
|
716 |
#layout: #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
|
717 |
#activeHelpKey: #basicsMenu |
|
718 |
#tabable: true |
|
719 |
#model: #submenuChannel |
|
1244 | 720 |
#group: #inputGroup2 |
1155 | 721 |
#type: #symbolOrNil |
722 |
#acceptOnReturn: true |
|
723 |
#acceptOnTab: true |
|
724 |
#acceptChannel: #acceptChannel |
|
725 |
#modifiedChannel: #modifiedChannel |
|
726 |
#acceptOnPointerLeave: false |
|
727 |
) |
|
728 |
#(#LabelSpec |
|
729 |
#label: 'Argument:' |
|
730 |
#name: 'ArgumentLabel' |
|
731 |
#layout: #(#AlignmentOrigin 107 0 100 0 1 0.5) |
|
732 |
#resizeForLabel: true |
|
733 |
) |
|
734 |
#(#InputFieldSpec |
|
735 |
#name: 'argumentField' |
|
736 |
#layout: #(#LayoutFrame 110 0 90 0 -5 1.0 112 0) |
|
737 |
#activeHelpKey: #basicsMenuArgument |
|
738 |
#tabable: true |
|
739 |
#model: #argument |
|
1244 | 740 |
#group: #inputGroup2 |
1155 | 741 |
#acceptOnReturn: true |
742 |
#acceptOnTab: true |
|
743 |
#acceptChannel: #acceptChannel |
|
744 |
#modifiedChannel: #modifiedChannel |
|
745 |
#acceptOnPointerLeave: false |
|
746 |
) |
|
747 |
#(#CheckBoxSpec |
|
748 |
#label: 'Translate Label' |
|
749 |
#name: 'translateLabelCheckBox' |
|
750 |
#layout: #(#Point 20 190) |
|
751 |
#activeHelpKey: #basicsTranslateLabel |
|
752 |
#tabable: true |
|
753 |
#model: #translateLabel |
|
754 |
) |
|
1378 | 755 |
#(#CheckBoxSpec |
756 |
#label: 'Do not destroy linked Menu' |
|
757 |
#name: 'keepLinkedMenu' |
|
758 |
#layout: #(#Point 20 217) |
|
759 |
#tabable: true |
|
760 |
#activeHelpKey: #keepLinkedMenu |
|
761 |
#model: #keepLinkedMenu |
|
762 |
#translateLabel: true |
|
763 |
) |
|
1155 | 764 |
) |
765 |
||
766 |
) |
|
218 | 767 |
) |
768 |
! |
|
769 |
||
199 | 770 |
basicsMenuSpec |
738 | 771 |
"This resource specification was automatically generated |
772 |
by the UIPainter of ST/X." |
|
773 |
||
774 |
"Do not manually edit this!! If it is corrupted, |
|
775 |
the UIPainter may not be able to read the specification." |
|
199 | 776 |
|
777 |
" |
|
778 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec |
|
779 |
MenuEditor new openInterface:#basicsMenuSpec |
|
780 |
" |
|
781 |
||
782 |
<resource: #canvas> |
|
783 |
||
1155 | 784 |
^ |
785 |
#(#FullSpec |
|
786 |
#name: #basicsMenuSpec |
|
787 |
#window: |
|
788 |
#(#WindowSpec |
|
789 |
#label: 'Basics Menu' |
|
790 |
#name: 'Basics Menu' |
|
791 |
#min: #(#Point 10 10) |
|
792 |
#max: #(#Point 1280 1024) |
|
1244 | 793 |
#bounds: #(#Rectangle 93 223 360 542) |
1155 | 794 |
) |
795 |
#component: |
|
796 |
#(#SpecCollection |
|
797 |
#collection: #( |
|
798 |
#(#LabelSpec |
|
799 |
#label: 'Name Key:' |
|
800 |
#name: 'nameKeyLabel' |
|
801 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
802 |
#resizeForLabel: true |
|
803 |
#adjust: #right |
|
804 |
) |
|
805 |
#(#InputFieldSpec |
|
806 |
#name: 'nameKeyField' |
|
807 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
808 |
#activeHelpKey: #basicsNameKey |
|
809 |
#tabable: true |
|
810 |
#model: #nameKey |
|
1244 | 811 |
#group: #inputGroup3 |
1155 | 812 |
#type: #symbolOrNil |
813 |
#acceptOnReturn: true |
|
814 |
#acceptOnTab: true |
|
815 |
#acceptChannel: #acceptChannel |
|
816 |
#modifiedChannel: #modifiedChannel |
|
817 |
#acceptOnPointerLeave: false |
|
818 |
) |
|
819 |
#(#LabelSpec |
|
820 |
#label: 'Label:' |
|
821 |
#name: 'labelLabel' |
|
822 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
823 |
#resizeForLabel: true |
|
824 |
#adjust: #right |
|
825 |
) |
|
826 |
#(#InputFieldSpec |
|
827 |
#name: 'labelField' |
|
828 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
829 |
#activeHelpKey: #basicsLabel |
|
830 |
#tabable: true |
|
831 |
#model: #label |
|
1244 | 832 |
#group: #inputGroup3 |
1155 | 833 |
#acceptOnReturn: true |
834 |
#acceptOnTab: true |
|
835 |
#acceptChannel: #acceptChannel |
|
836 |
#modifiedChannel: #modifiedChannel |
|
837 |
#acceptOnPointerLeave: false |
|
838 |
) |
|
839 |
#(#CheckBoxSpec |
|
840 |
#label: 'Translate Label' |
|
841 |
#name: 'translateLabelCheckBox' |
|
842 |
#layout: #(#Point 20 190) |
|
843 |
#activeHelpKey: #basicsTranslateLabel |
|
844 |
#tabable: true |
|
845 |
#model: #translateLabel |
|
846 |
) |
|
847 |
) |
|
848 |
||
849 |
) |
|
199 | 850 |
) |
851 |
! |
|
852 |
||
853 |
basicsRootSpec |
|
738 | 854 |
"This resource specification was automatically generated |
855 |
by the UIPainter of ST/X." |
|
856 |
||
857 |
"Do not manually edit this!! If it is corrupted, |
|
858 |
the UIPainter may not be able to read the specification." |
|
199 | 859 |
|
860 |
" |
|
861 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec |
|
862 |
MenuEditor new openInterface:#basicsRootSpec |
|
863 |
" |
|
864 |
||
865 |
<resource: #canvas> |
|
866 |
||
1155 | 867 |
^ |
868 |
#(#FullSpec |
|
869 |
#name: #basicsRootSpec |
|
870 |
#window: |
|
871 |
#(#WindowSpec |
|
872 |
#label: 'Basics Root' |
|
873 |
#name: 'Basics Root' |
|
874 |
#layout: #(#LayoutFrame 11 0 100 0 277 0 418 0) |
|
875 |
#level: 0 |
|
876 |
#min: #(#Point 10 10) |
|
877 |
#max: #(#Point 1280 1024) |
|
878 |
#bounds: #(#Rectangle 11 100 278 419) |
|
879 |
#usePreferredExtent: false |
|
880 |
#returnIsOKInDialog: true |
|
881 |
#escapeIsCancelInDialog: true |
|
882 |
) |
|
883 |
#component: |
|
884 |
#(#SpecCollection |
|
885 |
#collection: #( |
|
886 |
#(#LabelSpec |
|
887 |
#label: 'Selector:' |
|
888 |
#name: 'selectorLabel' |
|
889 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
890 |
#resizeForLabel: true |
|
891 |
#adjust: #right |
|
892 |
) |
|
893 |
#(#InputFieldSpec |
|
894 |
#name: 'selectorField' |
|
895 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
896 |
#activeHelpKey: #basicsSelector |
|
897 |
#tabable: true |
|
898 |
#model: #label |
|
899 |
#group: #inputGroup |
|
900 |
#acceptOnReturn: true |
|
901 |
#acceptOnTab: true |
|
902 |
#acceptChannel: #acceptChannel |
|
903 |
#modifiedChannel: #modifiedChannel |
|
904 |
#acceptOnPointerLeave: false |
|
905 |
) |
|
906 |
) |
|
907 |
||
908 |
) |
|
199 | 909 |
) |
910 |
! |
|
911 |
||
218 | 912 |
basicsSeparatorSpec |
738 | 913 |
"This resource specification was automatically generated |
914 |
by the UIPainter of ST/X." |
|
915 |
||
916 |
"Do not manually edit this!! If it is corrupted, |
|
917 |
the UIPainter may not be able to read the specification." |
|
199 | 918 |
|
919 |
" |
|
218 | 920 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec |
921 |
MenuEditor new openInterface:#basicsSeparatorSpec |
|
199 | 922 |
" |
923 |
||
924 |
<resource: #canvas> |
|
925 |
||
1155 | 926 |
^ |
927 |
#(#FullSpec |
|
928 |
#name: #basicsSeparatorSpec |
|
929 |
#window: |
|
930 |
#(#WindowSpec |
|
931 |
#label: 'Basics Separator' |
|
932 |
#name: 'Basics Separator' |
|
933 |
#layout: #(#LayoutFrame 9 0 149 0 275 0 467 0) |
|
934 |
#level: 0 |
|
935 |
#min: #(#Point 10 10) |
|
936 |
#max: #(#Point 1160 870) |
|
937 |
#bounds: #(#Rectangle 9 149 276 468) |
|
938 |
#usePreferredExtent: false |
|
939 |
#returnIsOKInDialog: true |
|
940 |
#escapeIsCancelInDialog: true |
|
941 |
) |
|
942 |
#component: |
|
943 |
#(#SpecCollection |
|
944 |
#collection: #( |
|
945 |
#(#LabelSpec |
|
946 |
#label: 'Separator Type:' |
|
947 |
#name: 'separatorLabel' |
|
948 |
#layout: #(#AlignmentOrigin 127 0 26 0 1 0.5) |
|
949 |
#resizeForLabel: true |
|
950 |
#adjust: #right |
|
951 |
) |
|
952 |
#(#ComboListSpec |
|
953 |
#name: 'seperatorList' |
|
954 |
#layout: #(#LayoutFrame 132 0 15 0 -5 1.0 37 0) |
|
955 |
#activeHelpKey: #basicsSeparatorType |
|
956 |
#tabable: true |
|
957 |
#model: #seperatorSelection |
|
958 |
#useIndex: true |
|
959 |
) |
|
960 |
#(#LabelSpec |
|
961 |
#label: 'Visibility:' |
|
962 |
#name: 'visibilityLabel' |
|
963 |
#layout: #(#AlignmentOrigin 127 0 76 0 1 0.5) |
|
964 |
#resizeForLabel: true |
|
965 |
#adjust: #right |
|
966 |
) |
|
967 |
#(#InputFieldSpec |
|
968 |
#name: 'visibilityInputField' |
|
969 |
#layout: #(#LayoutFrame 132 0 65 0 -5 1.0 87 0) |
|
970 |
#activeHelpKey: #detailsVisibility |
|
971 |
#tabable: true |
|
972 |
#model: #isVisible |
|
973 |
#group: #inputGroup |
|
974 |
#type: #symbolOrNil |
|
975 |
#acceptOnReturn: true |
|
976 |
#acceptOnTab: true |
|
977 |
#acceptChannel: #acceptChannel |
|
978 |
#modifiedChannel: #modifiedChannel |
|
979 |
#acceptOnPointerLeave: false |
|
980 |
) |
|
981 |
) |
|
982 |
||
983 |
) |
|
199 | 984 |
) |
985 |
! |
|
986 |
||
987 |
detailsEditSpec |
|
738 | 988 |
"This resource specification was automatically generated |
989 |
by the UIPainter of ST/X." |
|
990 |
||
991 |
"Do not manually edit this!! If it is corrupted, |
|
992 |
the UIPainter may not be able to read the specification." |
|
199 | 993 |
|
994 |
" |
|
995 |
UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec |
|
996 |
MenuEditor new openInterface:#detailsEditSpec |
|
997 |
" |
|
998 |
||
999 |
<resource: #canvas> |
|
1000 |
||
1155 | 1001 |
^ |
1002 |
#(#FullSpec |
|
1003 |
#name: #detailsEditSpec |
|
1004 |
#window: |
|
1005 |
#(#WindowSpec |
|
1006 |
#label: 'Details Edit' |
|
1007 |
#name: 'Details Edit' |
|
1008 |
#min: #(#Point 10 10) |
|
1009 |
#max: #(#Point 1280 1024) |
|
1365 | 1010 |
#bounds: #(#Rectangle 12 22 327 306) |
1155 | 1011 |
) |
1012 |
#component: |
|
1013 |
#(#SpecCollection |
|
1014 |
#collection: #( |
|
1015 |
#(#LabelSpec |
|
1016 |
#label: 'Accelerator:' |
|
1017 |
#name: 'shortcutKeyLabel' |
|
1018 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
1019 |
#activeHelpKey: #detailsAccelerator |
|
1020 |
#resizeForLabel: true |
|
1021 |
#adjust: #right |
|
1022 |
) |
|
1023 |
#(#InputFieldSpec |
|
1024 |
#name: 'shortcutKeyField' |
|
1025 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
1026 |
#activeHelpKey: #detailsAccelerator |
|
1027 |
#tabable: true |
|
1028 |
#model: #shortcutKey |
|
1244 | 1029 |
#group: #inputGroup4 |
1155 | 1030 |
#type: #symbolOrNil |
1031 |
#acceptOnReturn: true |
|
1032 |
#acceptOnTab: true |
|
1033 |
#acceptChannel: #acceptChannel |
|
1034 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1035 |
#acceptOnPointerLeave: false |
1155 | 1036 |
) |
1037 |
#(#LabelSpec |
|
1038 |
#label: 'Enabled:' |
|
1039 |
#name: 'enabledLabel' |
|
1040 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
1041 |
#activeHelpKey: #detailsEnabled |
|
1042 |
#resizeForLabel: true |
|
1043 |
#adjust: #right |
|
1044 |
) |
|
1045 |
#(#InputFieldSpec |
|
1046 |
#name: 'enabledField' |
|
1047 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
1048 |
#activeHelpKey: #detailsEnabled |
|
1049 |
#tabable: true |
|
1050 |
#model: #enabled |
|
1244 | 1051 |
#group: #inputGroup4 |
1155 | 1052 |
#type: #symbolOrNil |
1053 |
#acceptOnReturn: true |
|
1054 |
#acceptOnTab: true |
|
1055 |
#acceptChannel: #acceptChannel |
|
1056 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1057 |
#acceptOnPointerLeave: false |
1155 | 1058 |
) |
1059 |
#(#LabelSpec |
|
1060 |
#label: 'Visibility:' |
|
1061 |
#name: 'visibilityLabel' |
|
1062 |
#layout: #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
1063 |
#activeHelpKey: #detailsVisibility |
|
1064 |
#resizeForLabel: true |
|
1065 |
#adjust: #right |
|
1066 |
) |
|
1067 |
#(#InputFieldSpec |
|
1068 |
#name: 'isVisibleInputField' |
|
1069 |
#layout: #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
|
1070 |
#activeHelpKey: #detailsVisibility |
|
1071 |
#tabable: true |
|
1072 |
#model: #isVisible |
|
1244 | 1073 |
#group: #inputGroup4 |
1155 | 1074 |
#type: #symbolOrNil |
1075 |
#acceptOnReturn: true |
|
1076 |
#acceptOnTab: true |
|
1077 |
#acceptChannel: #acceptChannel |
|
1078 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1079 |
#acceptOnPointerLeave: false |
1080 |
) |
|
1081 |
#(#LabelSpec |
|
1082 |
#label: 'Aux Value' |
|
1083 |
#name: 'auxLabel' |
|
1084 |
#layout: #(#AlignmentOrigin 107 0 101 0 1 0.5) |
|
1085 |
#activeHelpKey: #detailsAuxValue |
|
1086 |
#translateLabel: true |
|
1087 |
#resizeForLabel: true |
|
1088 |
#adjust: #right |
|
1089 |
) |
|
1090 |
#(#InputFieldSpec |
|
1091 |
#name: 'auxInputField' |
|
1092 |
#layout: #(#LayoutFrame 110 0 90 0 -5 1.0 112 0) |
|
1093 |
#activeHelpKey: #detailsAuxValue |
|
1094 |
#tabable: true |
|
1095 |
#model: #auxValue |
|
1096 |
#group: #inputGroup4 |
|
1097 |
#type: #smalltalkObject |
|
1098 |
#acceptOnReturn: true |
|
1099 |
#acceptOnTab: true |
|
1100 |
#acceptChannel: #acceptChannel |
|
1101 |
#modifiedChannel: #modifiedChannel |
|
1102 |
#acceptOnPointerLeave: false |
|
1155 | 1103 |
) |
1104 |
#(#LabelSpec |
|
1105 |
#label: 'Start Group:' |
|
1106 |
#name: 'StartGroupLabel' |
|
1199 | 1107 |
#layout: #(#AlignmentOrigin 107 0 139 0 1 0.5) |
1155 | 1108 |
#activeHelpKey: #detailsStartGroup |
1109 |
#resizeForLabel: true |
|
1110 |
#adjust: #right |
|
1111 |
) |
|
1112 |
#(#PopUpListSpec |
|
1113 |
#label: 'PopUpList' |
|
1114 |
#name: 'StartGroupPopUp' |
|
1199 | 1115 |
#layout: #(#LayoutFrame 110 0 128 0 -5 1.0 150 0) |
1155 | 1116 |
#activeHelpKey: #detailsStartGroup |
1117 |
#tabable: true |
|
1118 |
#model: #startGroup |
|
1119 |
#menu: |
|
1264 | 1120 |
#(nil |
1155 | 1121 |
#right |
199 | 1122 |
) |
1155 | 1123 |
#useIndex: false |
1124 |
) |
|
1125 |
#(#LabelSpec |
|
1126 |
#label: 'Access Character Position:' |
|
1127 |
#name: 'accessCharLabel' |
|
1199 | 1128 |
#layout: #(#AlignmentOrigin 217 0 170 0 1 0.5) |
1155 | 1129 |
#activeHelpKey: #detailsAccessCharaterPosition |
1130 |
#resizeForLabel: true |
|
1131 |
#adjust: #right |
|
1132 |
) |
|
1133 |
#(#InputFieldSpec |
|
1134 |
#name: 'accessCharField' |
|
1199 | 1135 |
#layout: #(#LayoutFrame 220 0 159 0 -5 1.0 181 0) |
1155 | 1136 |
#activeHelpKey: #detailsAccessCharaterPosition |
1137 |
#tabable: true |
|
1138 |
#model: #accessCharacterPos |
|
1244 | 1139 |
#group: #inputGroup4 |
1155 | 1140 |
#type: #numberOrNil |
1141 |
#immediateAccept: false |
|
1142 |
#acceptOnReturn: true |
|
1143 |
#acceptOnTab: true |
|
1144 |
#acceptChannel: #acceptChannel |
|
1145 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1146 |
#acceptOnPointerLeave: false |
1155 | 1147 |
) |
1365 | 1148 |
#(#LabelSpec |
1149 |
#label: 'Font:' |
|
1150 |
#name: 'fontLabel' |
|
1151 |
#layout: #(#AlignmentOrigin 75 0 231 0 1 0.5) |
|
1152 |
#resizeForLabel: true |
|
1153 |
#adjust: #right |
|
1154 |
) |
|
1155 |
#(#FontMenuSpec |
|
1156 |
#attributes: |
|
1157 |
#(#tabable |
|
1158 |
true |
|
1159 |
) |
|
1160 |
#name: 'fontMenu' |
|
1161 |
#layout: #(#LayoutFrame 78 0 220 0 -5 1.0 242 0) |
|
1162 |
#activeHelpKey: #fontMenu |
|
1163 |
#model: #font |
|
1164 |
) |
|
1155 | 1165 |
) |
1166 |
||
1167 |
) |
|
199 | 1168 |
) |
1169 |
! |
|
1170 |
||
398 | 1171 |
imageEditSpec |
738 | 1172 |
"This resource specification was automatically generated |
1173 |
by the UIPainter of ST/X." |
|
1174 |
||
1175 |
"Do not manually edit this!! If it is corrupted, |
|
1176 |
the UIPainter may not be able to read the specification." |
|
199 | 1177 |
|
1178 |
" |
|
398 | 1179 |
UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec |
1180 |
MenuEditor new openInterface:#imageEditSpec |
|
199 | 1181 |
" |
1182 |
||
1183 |
<resource: #canvas> |
|
1184 |
||
1155 | 1185 |
^ |
1186 |
#(#FullSpec |
|
1187 |
#name: #imageEditSpec |
|
1188 |
#window: |
|
1189 |
#(#WindowSpec |
|
1190 |
#label: 'Image Item' |
|
1191 |
#name: 'Image Item' |
|
1192 |
#min: #(#Point 10 10) |
|
1193 |
#max: #(#Point 1280 1024) |
|
1464 | 1194 |
#bounds: #(#Rectangle 12 22 300 317) |
1155 | 1195 |
) |
1196 |
#component: |
|
1197 |
#(#SpecCollection |
|
1198 |
#collection: #( |
|
1199 |
#(#LabelSpec |
|
1200 |
#label: 'Retriever:' |
|
1201 |
#name: 'retrieverLabel' |
|
1202 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
1203 |
#activeHelpKey: #imageRetriever |
|
1204 |
#resizeForLabel: true |
|
1205 |
#adjust: #right |
|
1206 |
) |
|
1207 |
#(#ComboBoxSpec |
|
1208 |
#name: 'retrieverField' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1209 |
#layout: #(#LayoutFrame 110 0 15 0 -20 1.0 37 0) |
1155 | 1210 |
#activeHelpKey: #imageRetriever |
1211 |
#tabable: true |
|
1212 |
#model: #retriever |
|
1213 |
#type: #symbolOrNil |
|
1214 |
#acceptOnReturn: true |
|
1215 |
#acceptOnTab: true |
|
1216 |
#acceptChannel: #acceptChannel |
|
1217 |
#acceptOnPointerLeave: false |
|
1218 |
#comboList: #retrieverClassList |
|
1219 |
) |
|
1220 |
#(#LabelSpec |
|
1221 |
#label: 'Selector:' |
|
1222 |
#name: 'iconLabel' |
|
1223 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
1224 |
#activeHelpKey: #imageSelector |
|
1225 |
#resizeForLabel: true |
|
1226 |
#adjust: #right |
|
1227 |
) |
|
1228 |
#(#InputFieldSpec |
|
1229 |
#name: 'iconField' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1230 |
#layout: #(#LayoutFrame 110 0 40 0 -42 1.0 62 0) |
1155 | 1231 |
#activeHelpKey: #imageSelector |
1232 |
#tabable: true |
|
1233 |
#model: #icon |
|
1244 | 1234 |
#group: #inputGroup5 |
1155 | 1235 |
#type: #symbolOrNil |
1236 |
#acceptOnReturn: true |
|
1237 |
#acceptOnTab: true |
|
1238 |
#acceptChannel: #acceptChannel |
|
1239 |
#modifiedChannel: #modifiedChannel |
|
1240 |
#acceptOnPointerLeave: false |
|
1241 |
) |
|
1242 |
#(#ActionButtonSpec |
|
1301 | 1243 |
#label: '...' |
1244 |
#name: 'browseButton' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1245 |
#layout: #(#LayoutFrame -40 1 40 0 -20 1 62 0) |
1301 | 1246 |
#activeHelpKey: #browseResource |
1155 | 1247 |
#tabable: true |
1301 | 1248 |
#model: #doBrowseForImageResource |
1155 | 1249 |
) |
1464 | 1250 |
#(#SelectionInListModelViewSpec |
1251 |
#name: 'selectionOfImage' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1252 |
#layout: #(#LayoutFrame 20 0.0 67 0 -20 1.0 -30 1.0) |
1155 | 1253 |
#activeHelpKey: #imageImageList |
1301 | 1254 |
#tabable: true |
1155 | 1255 |
#model: #selectionOfImage |
1256 |
#menu: #menuEditImage |
|
1257 |
#hasHorizontalScrollBar: true |
|
1258 |
#hasVerticalScrollBar: true |
|
1259 |
#miniScrollerHorizontal: true |
|
1464 | 1260 |
#listModel: #listOfImages |
1261 |
#useIndex: false |
|
1262 |
#highlightMode: #line |
|
1155 | 1263 |
#doubleClickSelector: #doEditImage |
1264 |
#valueChangeSelector: #imageSelected |
|
1265 |
) |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1266 |
#(#ViewSpec |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1267 |
#name: 'Box1' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1268 |
#layout: #(#LayoutFrame 20 0.0 -30 1.0 -20 1.0 0 1.0) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1269 |
#level: 0 |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1270 |
#component: |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1271 |
#(#SpecCollection |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1272 |
#collection: #( |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1273 |
#(#CheckBoxSpec |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1274 |
#label: 'Image & Label' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1275 |
#name: 'iconAndLabelCheckBox' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1276 |
#layout: #(#AlignmentOrigin 0 0 0 0.5 0 0.5) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1277 |
#activeHelpKey: #imageImageAndLabel |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1278 |
#tabable: true |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1279 |
#model: #iconAndLabel |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1280 |
) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1281 |
#(#ActionButtonSpec |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1282 |
#label: 'Image Editor' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1283 |
#name: 'imageEditorButton' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1284 |
#layout: #(#AlignmentOrigin 0 1.0 0 0.5 1 0.5) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1285 |
#activeHelpKey: #imageImageEditor |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1286 |
#tabable: true |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1287 |
#model: #doEditImage |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1288 |
) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1289 |
) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1290 |
|
1301 | 1291 |
) |
1155 | 1292 |
) |
1293 |
) |
|
1294 |
||
1295 |
) |
|
199 | 1296 |
) |
525 | 1297 |
! |
1298 |
||
1299 |
windowSpec |
|
738 | 1300 |
"This resource specification was automatically generated |
1301 |
by the UIPainter of ST/X." |
|
1302 |
||
1303 |
"Do not manually edit this!! If it is corrupted, |
|
1304 |
the UIPainter may not be able to read the specification." |
|
525 | 1305 |
|
1306 |
" |
|
1307 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
1308 |
MenuEditor new openInterface:#windowSpec |
|
738 | 1309 |
MenuEditor open |
525 | 1310 |
" |
1311 |
||
1312 |
<resource: #canvas> |
|
1313 |
||
1244 | 1314 |
^ |
1315 |
#(#FullSpec |
|
1316 |
#name: #windowSpec |
|
1317 |
#window: |
|
1318 |
#(#WindowSpec |
|
1319 |
#label: 'Menu Editor' |
|
1320 |
#name: 'Menu Editor' |
|
1321 |
#min: #(#Point 550 440) |
|
1322 |
#max: #(#Point 1152 900) |
|
1349
47ccfd0fac75
added 'showBusyCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
1323 |
#bounds: #(#Rectangle 61 493 618 974) |
1244 | 1324 |
#menu: #menu |
1249 | 1325 |
#returnIsOKInDialog: false |
1326 |
#escapeIsCancelInDialog: false |
|
1244 | 1327 |
) |
1328 |
#component: |
|
1329 |
#(#SpecCollection |
|
1330 |
#collection: #( |
|
1331 |
#(#MenuPanelSpec |
|
1332 |
#name: 'menuToolbarView' |
|
1333 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1322 | 1334 |
#tabable: true |
1244 | 1335 |
#menu: #menuToolbar |
1336 |
#showSeparatingLines: true |
|
1337 |
) |
|
1338 |
#(#VariableHorizontalPanelSpec |
|
1339 |
#name: 'VariableHorizontalPanel' |
|
1340 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1341 |
#component: |
|
1342 |
#(#SpecCollection |
|
1343 |
#collection: #( |
|
1344 |
#(#ArbitraryComponentSpec |
|
1345 |
#name: 'TreeView' |
|
1346 |
#menu: #menuEdit |
|
1347 |
#hasHorizontalScrollBar: true |
|
1348 |
#hasVerticalScrollBar: true |
|
1349 |
#hasBorder: false |
|
1350 |
#component: #treeView |
|
1351 |
) |
|
1352 |
#(#ViewSpec |
|
1353 |
#name: 'Box' |
|
1354 |
#level: -1 |
|
703 | 1355 |
#component: |
1244 | 1356 |
#(#SpecCollection |
1357 |
#collection: #( |
|
1358 |
#(#NoteBookViewSpec |
|
1359 |
#name: 'NoteBook' |
|
1360 |
#layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
|
1361 |
#enableChannel: #hasAnySingleSelection |
|
1362 |
#tabable: true |
|
1363 |
#model: #tabModel |
|
1364 |
#menu: #tabList |
|
1365 |
#useIndex: true |
|
1366 |
#canvas: #tabCanvasHolder |
|
1367 |
#keepCanvasAlive: true |
|
1368 |
) |
|
1369 |
#(#UISubSpecification |
|
1370 |
#name: 'SubSpecification' |
|
1371 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1372 |
#majorKey: #ToolApplicationModel |
|
1373 |
#minorKey: #windowSpecForCommit |
|
525 | 1374 |
) |
1244 | 1375 |
) |
1376 |
||
525 | 1377 |
) |
1244 | 1378 |
) |
1379 |
) |
|
1380 |
||
525 | 1381 |
) |
1244 | 1382 |
#handles: #(#Any 0.346499 1.0) |
1383 |
) |
|
1384 |
#(#UISubSpecification |
|
1385 |
#name: 'InfoBarSubSpec' |
|
1386 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1387 |
#majorKey: #ToolApplicationModel |
|
1388 |
#minorKey: #windowSpecForInfoBar |
|
1389 |
) |
|
1390 |
) |
|
1391 |
||
1392 |
) |
|
525 | 1393 |
) |
1394 |
! ! |
|
1395 |
||
1396 |
!MenuEditor class methodsFor:'menu specs'! |
|
1397 |
||
1398 |
menu |
|
738 | 1399 |
"This resource specification was automatically generated |
1400 |
by the MenuEditor of ST/X." |
|
1401 |
||
1402 |
"Do not manually edit this!! If it is corrupted, |
|
1403 |
the MenuEditor may not be able to read the specification." |
|
525 | 1404 |
|
1405 |
" |
|
1406 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
1407 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
1408 |
" |
|
1409 |
||
1410 |
<resource: #menu> |
|
1411 |
||
1412 |
^ |
|
1413 |
||
1414 |
#(#Menu |
|
1415 |
||
1416 |
#( |
|
1417 |
#(#MenuItem |
|
686 | 1418 |
#label: 'About' |
836 | 1419 |
#translateLabel: true |
686 | 1420 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
1421 |
#submenuChannel: #menuAbout |
|
525 | 1422 |
) |
1423 |
#(#MenuItem |
|
686 | 1424 |
#label: 'File' |
1425 |
#activeHelpKey: #file |
|
836 | 1426 |
#translateLabel: true |
686 | 1427 |
#submenu: |
525 | 1428 |
#(#Menu |
1429 |
||
1430 |
#( |
|
1431 |
#(#MenuItem |
|
686 | 1432 |
#label: 'New' |
1433 |
#value: #doNew |
|
836 | 1434 |
#translateLabel: true |
686 | 1435 |
#activeHelpKey: #fileNew |
525 | 1436 |
) |
1437 |
#(#MenuItem |
|
686 | 1438 |
#label: '-' |
525 | 1439 |
) |
1440 |
#(#MenuItem |
|
686 | 1441 |
#label: 'Load...' |
1442 |
#translateLabel: true |
|
1443 |
#value: #doLoad |
|
1444 |
#activeHelpKey: #fileLoad |
|
525 | 1445 |
) |
1446 |
#(#MenuItem |
|
686 | 1447 |
#label: '-' |
525 | 1448 |
) |
1449 |
#(#MenuItem |
|
686 | 1450 |
#label: 'Save' |
836 | 1451 |
#translateLabel: true |
686 | 1452 |
#value: #doSave |
1453 |
#activeHelpKey: #fileSave |
|
525 | 1454 |
) |
1455 |
#(#MenuItem |
|
686 | 1456 |
#label: 'Save As...' |
836 | 1457 |
#translateLabel: true |
686 | 1458 |
#value: #doSaveAs |
1459 |
#activeHelpKey: #fileSaveAs |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1460 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1461 |
#(#MenuItem |
686 | 1462 |
#label: '-' |
525 | 1463 |
) |
1464 |
#(#MenuItem |
|
686 | 1465 |
#label: 'Pick A Menu...' |
836 | 1466 |
#translateLabel: true |
686 | 1467 |
#value: #doPickAMenu |
1468 |
#activeHelpKey: #filePickAMenu |
|
525 | 1469 |
) |
1470 |
#(#MenuItem |
|
686 | 1471 |
#label: '-' |
525 | 1472 |
) |
1473 |
#(#MenuItem |
|
686 | 1474 |
#label: 'Browse Class' |
836 | 1475 |
#translateLabel: true |
686 | 1476 |
#value: #doBrowseClass |
1477 |
#activeHelpKey: #fileBrowseClass |
|
525 | 1478 |
) |
1479 |
#(#MenuItem |
|
686 | 1480 |
#label: '-' |
525 | 1481 |
) |
1482 |
#(#MenuItem |
|
686 | 1483 |
#label: 'Exit' |
1484 |
#translateLabel: true |
|
1485 |
#value: #closeRequest |
|
1486 |
#activeHelpKey: #fileExit |
|
525 | 1487 |
) |
1488 |
) nil |
|
1489 |
nil |
|
1490 |
) |
|
1491 |
) |
|
1492 |
#(#MenuItem |
|
686 | 1493 |
#label: 'Edit' |
1494 |
#activeHelpKey: #edit |
|
836 | 1495 |
#translateLabel: true |
686 | 1496 |
#submenuChannel: #menuEdit |
525 | 1497 |
) |
1498 |
#(#MenuItem |
|
686 | 1499 |
#label: 'Add' |
1500 |
#activeHelpKey: #add |
|
836 | 1501 |
#translateLabel: true |
686 | 1502 |
#submenuChannel: #menuAdd |
525 | 1503 |
) |
1504 |
#(#MenuItem |
|
686 | 1505 |
#label: 'Test' |
1506 |
#activeHelpKey: #test |
|
836 | 1507 |
#translateLabel: true |
686 | 1508 |
#submenuChannel: #submenuTest |
525 | 1509 |
) |
1033
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1510 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1511 |
"/ #label: 'Settings' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1512 |
"/ #submenu: |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1513 |
"/ #(#Menu |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1514 |
"/ |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1515 |
"/ #( |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1516 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1517 |
"/ #label: 'Fonts' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1518 |
"/ #translateLabel: true |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1519 |
"/ #submenuChannel: #menuFont |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1520 |
"/ ) |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1521 |
"/ ) nil |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1522 |
"/ nil |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1523 |
"/ ) |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1524 |
"/ ) |
738 | 1525 |
#(#MenuItem |
748 | 1526 |
#label: 'History' |
1527 |
#activeHelpKey: #history |
|
836 | 1528 |
#translateLabel: true |
748 | 1529 |
#submenuChannel: #menuHistory |
1530 |
) |
|
1531 |
#(#MenuItem |
|
686 | 1532 |
#label: 'Help' |
836 | 1533 |
#translateLabel: true |
686 | 1534 |
#startGroup: #right |
748 | 1535 |
#submenu: |
1536 |
#(#Menu |
|
1537 |
||
1538 |
#( |
|
1539 |
#(#MenuItem |
|
1540 |
#label: 'Documentation' |
|
1541 |
#value: #openHTMLDocument: |
|
836 | 1542 |
#translateLabel: true |
748 | 1543 |
#activeHelpKey: #helpTutorial |
764 | 1544 |
#argument: 'tools/uipainter/MenuEditor.html' |
748 | 1545 |
) |
1546 |
#(#MenuItem |
|
1547 |
#label: '-' |
|
1548 |
) |
|
1549 |
#(#MenuItem |
|
1550 |
#label: 'Help Tool' |
|
1551 |
#value: #openHTMLDocument: |
|
836 | 1552 |
#translateLabel: true |
748 | 1553 |
#activeHelpKey: #helpHelpTool |
1554 |
#argument: 'tools/uipainter/HelpTool.html' |
|
1555 |
) |
|
1556 |
#(#MenuItem |
|
1557 |
#label: '-' |
|
1558 |
) |
|
1559 |
#(#MenuItem |
|
1560 |
#label: 'Show Help Texts' |
|
836 | 1561 |
#translateLabel: true |
748 | 1562 |
#activeHelpKey: #helpShowHelp |
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1563 |
#indication: #showingHelp: |
748 | 1564 |
) |
1565 |
) nil |
|
1566 |
nil |
|
1567 |
) |
|
525 | 1568 |
) |
1569 |
) nil |
|
1570 |
nil |
|
1571 |
) |
|
836 | 1572 |
|
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1573 |
"Modified: / 31.7.1998 / 18:19:47 / cg" |
525 | 1574 |
! |
1575 |
||
1576 |
menuAdd |
|
738 | 1577 |
"This resource specification was automatically generated |
1578 |
by the MenuEditor of ST/X." |
|
1579 |
||
1580 |
"Do not manually edit this!! If it is corrupted, |
|
1581 |
the MenuEditor may not be able to read the specification." |
|
525 | 1582 |
|
1583 |
" |
|
1584 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd |
|
1585 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp |
|
1586 |
" |
|
1587 |
||
1588 |
<resource: #menu> |
|
1589 |
||
1590 |
^ |
|
1591 |
||
1592 |
#(#Menu |
|
1593 |
||
1594 |
#( |
|
1595 |
#(#MenuItem |
|
703 | 1596 |
#label: 'Menu Item' |
836 | 1597 |
#translateLabel: true |
703 | 1598 |
#value: #doCreateItem |
1599 |
#activeHelpKey: #addMenuItem |
|
1600 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') |
|
525 | 1601 |
) |
1602 |
#(#MenuItem |
|
703 | 1603 |
#label: 'Menu Separator' |
836 | 1604 |
#translateLabel: true |
703 | 1605 |
#value: #doCreateSep |
1606 |
#activeHelpKey: #addMenuSeparator |
|
1607 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') |
|
525 | 1608 |
) |
1609 |
#(#MenuItem |
|
703 | 1610 |
#label: '-' |
525 | 1611 |
) |
1612 |
#(#MenuItem |
|
703 | 1613 |
#label: 'Submenu' |
836 | 1614 |
#translateLabel: true |
703 | 1615 |
#value: #doCreateMenu |
1616 |
#activeHelpKey: #addSubMenu |
|
1617 |
#labelImage: #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') |
|
525 | 1618 |
) |
1619 |
#(#MenuItem |
|
703 | 1620 |
#label: 'Submenu Link' |
836 | 1621 |
#translateLabel: true |
703 | 1622 |
#value: #doCreateLink |
1623 |
#activeHelpKey: #addSubMenuLink |
|
1624 |
#labelImage: #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Submenu Link') |
|
525 | 1625 |
) |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1626 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1627 |
#label: '-' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1628 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1629 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1630 |
#label: 'Standard Submenu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1631 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1632 |
#submenu: |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1633 |
#(#Menu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1634 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1635 |
#( |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1636 |
#(#MenuItem |
1425 | 1637 |
#label: 'Standard Menu: File' |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1638 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1639 |
#value: #doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1640 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1641 |
#(#MenuItem |
1425 | 1642 |
#label: 'Standard Menu: Edit' |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1643 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1644 |
#value: #doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1645 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1646 |
#(#MenuItem |
1425 | 1647 |
#label: 'Standard Menu: Help' |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1648 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1649 |
#value: #doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1650 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1651 |
) nil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1652 |
nil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1653 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1654 |
) |
525 | 1655 |
) nil |
1656 |
nil |
|
1657 |
) |
|
836 | 1658 |
|
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1659 |
"Modified: / 23.8.1998 / 15:48:21 / cg" |
525 | 1660 |
! |
1661 |
||
1662 |
menuDefaultLink |
|
738 | 1663 |
"This resource specification was automatically generated |
1664 |
by the MenuEditor of ST/X." |
|
1665 |
||
1666 |
"Do not manually edit this!! If it is corrupted, |
|
1667 |
the MenuEditor may not be able to read the specification." |
|
525 | 1668 |
|
1669 |
" |
|
1670 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
1671 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
1672 |
" |
|
1673 |
||
1674 |
<resource: #menu> |
|
1675 |
||
1676 |
^ |
|
738 | 1677 |
|
525 | 1678 |
#(#Menu |
738 | 1679 |
|
525 | 1680 |
#( |
1681 |
#(#MenuItem |
|
738 | 1682 |
#'label:' '!!!! derives from application !!!!' |
525 | 1683 |
) |
1684 |
) nil |
|
1685 |
nil |
|
1686 |
) |
|
1687 |
! |
|
1688 |
||
1689 |
menuEdit |
|
738 | 1690 |
"This resource specification was automatically generated |
1691 |
by the MenuEditor of ST/X." |
|
1692 |
||
1693 |
"Do not manually edit this!! If it is corrupted, |
|
1694 |
the MenuEditor may not be able to read the specification." |
|
525 | 1695 |
|
1696 |
" |
|
1697 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit |
|
1698 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp |
|
1699 |
" |
|
1700 |
||
1701 |
<resource: #menu> |
|
1702 |
||
1703 |
^ |
|
1704 |
||
1705 |
#(#Menu |
|
1706 |
||
1707 |
#( |
|
1708 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1709 |
#label: 'Cut' |
882 | 1710 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1711 |
#value: #doCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1712 |
#activeHelpKey: #editCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1713 |
#enabled: #hasValidSelection |
525 | 1714 |
) |
1715 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1716 |
#label: 'Copy' |
882 | 1717 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1718 |
#value: #doCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1719 |
#activeHelpKey: #editCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1720 |
#enabled: #hasValidSelection |
525 | 1721 |
) |
1722 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1723 |
#label: 'Paste' |
882 | 1724 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1725 |
#value: #doPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1726 |
#activeHelpKey: #editPaste |
738 | 1727 |
#enabled: #valueOfCanPaste |
525 | 1728 |
) |
1729 |
#(#MenuItem |
|
686 | 1730 |
#label: 'Delete' |
882 | 1731 |
#translateLabel: true |
686 | 1732 |
#value: #doDelete |
1733 |
#activeHelpKey: #editDelete |
|
1734 |
#enabled: #hasValidSelection |
|
1735 |
) |
|
1736 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1737 |
#label: '-' |
525 | 1738 |
) |
1739 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1740 |
#label: 'Move Up' |
882 | 1741 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1742 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1743 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1744 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1745 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up') |
525 | 1746 |
) |
1747 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1748 |
#label: 'Move Down' |
882 | 1749 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1750 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1751 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1752 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1753 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down') |
525 | 1754 |
) |
1755 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1756 |
#label: 'Move In' |
882 | 1757 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1758 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1759 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1760 |
#enabled: #valueOfEnableMovingIn |
882 | 1761 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In') |
525 | 1762 |
) |
1763 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1764 |
#label: 'Move Out' |
882 | 1765 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1766 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1767 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1768 |
#enabled: #valueOfEnableMovingOut |
882 | 1769 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out') |
525 | 1770 |
) |
1771 |
) nil |
|
1772 |
nil |
|
1773 |
) |
|
1774 |
! |
|
1775 |
||
888 | 1776 |
menuEditImage |
1777 |
"This resource specification was automatically generated |
|
1778 |
by the MenuEditor of ST/X." |
|
1779 |
||
1780 |
"Do not manually edit this!! If it is corrupted, |
|
1781 |
the MenuEditor may not be able to read the specification." |
|
1782 |
||
1783 |
" |
|
1784 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEditImage |
|
1785 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEditImage)) startUp |
|
1786 |
" |
|
1787 |
||
1788 |
<resource: #menu> |
|
1789 |
||
1790 |
^ |
|
1791 |
||
1792 |
#(#Menu |
|
1793 |
||
1794 |
#( |
|
1795 |
#(#MenuItem |
|
1796 |
#label: 'Edit' |
|
1797 |
#translateLabel: true |
|
1798 |
#value: #doEditImage |
|
1799 |
#activeHelpKey: #editCut |
|
1800 |
#enabled: #hasValidSelection |
|
1801 |
) |
|
1802 |
#(#MenuItem |
|
1803 |
#label: 'Remove' |
|
1804 |
#translateLabel: true |
|
1805 |
#value: #doRemoveImage |
|
1806 |
#activeHelpKey: #editCopy |
|
1807 |
#enabled: #hasValidSelection |
|
1808 |
) |
|
1809 |
) nil |
|
1810 |
nil |
|
1811 |
) |
|
1812 |
! |
|
1813 |
||
525 | 1814 |
menuToolbar |
738 | 1815 |
"This resource specification was automatically generated |
1816 |
by the MenuEditor of ST/X." |
|
1817 |
||
1818 |
"Do not manually edit this!! If it is corrupted, |
|
1819 |
the MenuEditor may not be able to read the specification." |
|
525 | 1820 |
|
1821 |
" |
|
1822 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar |
|
1823 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp |
|
1824 |
" |
|
1825 |
||
1826 |
<resource: #menu> |
|
1827 |
||
1322 | 1828 |
^ |
1829 |
#(#Menu |
|
1830 |
#( |
|
1831 |
#(#MenuItem |
|
1832 |
#label: 'New' |
|
1833 |
#isButton: true |
|
1834 |
#value: #doNew |
|
1835 |
#activeHelpKey: #fileNew |
|
1836 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
|
1837 |
) |
|
1838 |
#(#MenuItem |
|
1839 |
#label: 'Load' |
|
1840 |
#isButton: true |
|
1841 |
#value: #doLoad |
|
1842 |
#activeHelpKey: #fileLoad |
|
1843 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
|
1844 |
) |
|
1845 |
#(#MenuItem |
|
1846 |
#label: 'Save' |
|
1847 |
#isButton: true |
|
1848 |
#value: #doSave |
|
1849 |
#activeHelpKey: #fileSave |
|
1850 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
|
1851 |
) |
|
1852 |
#(#MenuItem |
|
1853 |
#label: '' |
|
1854 |
) |
|
1855 |
#(#MenuItem |
|
1856 |
#label: 'Cut' |
|
1857 |
#isButton: true |
|
1858 |
#value: #doCut |
|
1859 |
#activeHelpKey: #editCut |
|
1860 |
#enabled: #hasValidSelection |
|
1861 |
#labelImage: #(#ResourceRetriever #Icon #cutIcon) |
|
1862 |
) |
|
1863 |
#(#MenuItem |
|
1864 |
#label: 'Copy' |
|
1865 |
#isButton: true |
|
1866 |
#value: #doCopy |
|
1867 |
#activeHelpKey: #editCopy |
|
1868 |
#enabled: #hasValidSelection |
|
1869 |
#labelImage: #(#ResourceRetriever #Icon #copyIcon) |
|
1870 |
) |
|
1871 |
#(#MenuItem |
|
1872 |
#label: 'Paste' |
|
1873 |
#isButton: true |
|
1874 |
#value: #doPaste |
|
1875 |
#activeHelpKey: #editPaste |
|
1876 |
#enabled: #valueOfCanPaste |
|
1877 |
#labelImage: #(#ResourceRetriever #Icon #pasteIcon) |
|
1878 |
) |
|
1879 |
#(#MenuItem |
|
1880 |
#label: 'Delete' |
|
1881 |
#isButton: true |
|
1882 |
#value: #doDelete |
|
1883 |
#activeHelpKey: #editDelete |
|
1884 |
#enabled: #hasValidSelection |
|
1885 |
#labelImage: #(#ResourceRetriever #Icon #deleteIcon) |
|
1886 |
) |
|
1887 |
#(#MenuItem |
|
1888 |
#label: '' |
|
1889 |
) |
|
1890 |
#(#MenuItem |
|
1891 |
#label: 'Add Item' |
|
1892 |
#isButton: true |
|
1893 |
#value: #doCreateItem |
|
1894 |
#activeHelpKey: #addMenuItem |
|
1895 |
#enabled: #hasAnySingleSelection |
|
1896 |
#labelImage: #(#ResourceRetriever nil #menuItemImage) |
|
1897 |
) |
|
1898 |
#(#MenuItem |
|
1899 |
#label: 'Add Separator' |
|
1900 |
#isButton: true |
|
1901 |
#value: #doCreateSep |
|
1902 |
#activeHelpKey: #addMenuSeparator |
|
1903 |
#enabled: #hasAnySingleSelection |
|
1904 |
#labelImage: #(#ResourceRetriever nil #menuSeparatorImage) |
|
1905 |
) |
|
1906 |
#(#MenuItem |
|
1907 |
#label: 'Add Submenu' |
|
1908 |
#isButton: true |
|
1909 |
#value: #doCreateMenu |
|
1910 |
#activeHelpKey: #addSubMenu |
|
1911 |
#enabled: #hasAnySingleSelection |
|
1912 |
#labelImage: #(#ResourceRetriever nil #submenuImage) |
|
1913 |
) |
|
1914 |
#(#MenuItem |
|
1915 |
#label: 'Add Linked Submenu' |
|
1916 |
#isButton: true |
|
1917 |
#value: #doCreateLink |
|
1918 |
#activeHelpKey: #addSubMenuLink |
|
1919 |
#enabled: #hasAnySingleSelection |
|
1920 |
#labelImage: #(#ResourceRetriever nil #linkSubmenuImage) |
|
1921 |
) |
|
1922 |
#(#MenuItem |
|
1923 |
#label: '' |
|
1924 |
) |
|
1925 |
#(#MenuItem |
|
1926 |
#label: 'Move Up' |
|
1927 |
#isButton: true |
|
1928 |
#value: #doStepUp |
|
1929 |
#activeHelpKey: #editMoveUp |
|
1930 |
#enabled: #valueOfEnableMovingUpOrDown |
|
1931 |
#labelImage: #(#ResourceRetriever #Icon #upIcon) |
|
1932 |
) |
|
1933 |
#(#MenuItem |
|
1934 |
#label: 'Move Down' |
|
1935 |
#isButton: true |
|
1936 |
#value: #doStepDown |
|
1937 |
#activeHelpKey: #editMoveDown |
|
1938 |
#enabled: #valueOfEnableMovingUpOrDown |
|
1939 |
#labelImage: #(#ResourceRetriever #Icon #downIcon) |
|
1940 |
) |
|
1941 |
#(#MenuItem |
|
1942 |
#label: 'Move In' |
|
1943 |
#isButton: true |
|
1944 |
#value: #doStepIn |
|
1945 |
#activeHelpKey: #editMoveIn |
|
1946 |
#enabled: #valueOfEnableMovingIn |
|
1947 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon) |
|
1948 |
) |
|
1949 |
#(#MenuItem |
|
1950 |
#label: 'Move Out' |
|
1951 |
#isButton: true |
|
1952 |
#value: #doStepOut |
|
1953 |
#activeHelpKey: #editMoveOut |
|
1954 |
#enabled: #valueOfEnableMovingOut |
|
1955 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon) |
|
1956 |
) |
|
1957 |
) |
|
1958 |
nil |
|
1959 |
nil |
|
525 | 1960 |
) |
1961 |
! ! |
|
1962 |
||
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1963 |
!MenuEditor class methodsFor:'queries'! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1964 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1965 |
getAllImageSelectorsFrom: aClass |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1966 |
"returns all image selectors implementing an image spec in class aClass" |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1967 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1968 |
|iconClass imageMethodSelectors r| |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1969 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1970 |
aClass isNil ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1971 |
^ #() |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1972 |
]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1973 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1974 |
aClass isSymbol |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1975 |
ifTrue: [iconClass := Smalltalk at: aClass] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1976 |
ifFalse: [iconClass := aClass]. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1977 |
aClass isBehavior ifFalse:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1978 |
^ #() |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1979 |
]. |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1980 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1981 |
imageMethodSelectors := OrderedCollection new. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1982 |
|
1407 | 1983 |
iconClass withAllSuperclassesDo:[:cls | |
1372 | 1984 |
cls class selectorsAndMethodsDo:[:sel :m | |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1985 |
((r := m resourceType) == #image |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1986 |
or:[r == #programImage]) ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1987 |
imageMethodSelectors add:sel |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1988 |
] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1989 |
] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1990 |
]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1991 |
|
1454 | 1992 |
^ imageMethodSelectors sort |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1993 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1994 |
"Modified: / 24.8.1998 / 21:42:34 / cg" |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1995 |
"Created: / 24.8.1998 / 21:53:20 / cg" |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1996 |
! ! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1997 |
|
525 | 1998 |
!MenuEditor class methodsFor:'slices'! |
1999 |
||
2000 |
slicesItem |
|
2001 |
^#( |
|
2002 |
(Basics basicsItemSpec) |
|
2003 |
(Details detailsEditSpec) |
|
2004 |
(Image imageEditSpec) |
|
2005 |
) |
|
2006 |
||
2007 |
! |
|
2008 |
||
2009 |
slicesLink |
|
2010 |
^#( |
|
2011 |
(Basics basicsLinkSpec) |
|
2012 |
(Details detailsEditSpec) |
|
2013 |
(Image imageEditSpec) |
|
2014 |
) |
|
2015 |
||
2016 |
! |
|
2017 |
||
2018 |
slicesMenu |
|
2019 |
^#( |
|
2020 |
(Basics basicsMenuSpec) |
|
2021 |
(Details detailsEditSpec) |
|
2022 |
(Image imageEditSpec) |
|
2023 |
) |
|
2024 |
||
2025 |
! |
|
2026 |
||
2027 |
slicesRootMenu |
|
2028 |
^#( |
|
2029 |
(Basics basicsRootSpec) |
|
2030 |
) |
|
2031 |
||
2032 |
! |
|
2033 |
||
2034 |
slicesSeparatorMenu |
|
2035 |
^#( |
|
2036 |
(Basics basicsSeparatorSpec) |
|
2037 |
) |
|
2038 |
||
199 | 2039 |
! ! |
2040 |
||
2041 |
!MenuEditor methodsFor:'accessing'! |
|
2042 |
||
218 | 2043 |
submenuTest |
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2044 |
"return the submenu assigned to item test; |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2045 |
this is dynamically constructed, to reflect the current |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2046 |
edited menu." |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2047 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2048 |
|menu cls| |
218 | 2049 |
|
1244 | 2050 |
(menu := treeView asMenu) allItemsDo:[:anItem| |
218 | 2051 |
anItem value:nil. |
2052 |
anItem enabled:true. |
|
2053 |
]. |
|
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2054 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2055 |
cls := self resolveName:specClass. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2056 |
menu findGuiResourcesIn:cls. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2057 |
^ menu |
287 | 2058 |
! |
2059 |
||
716 | 2060 |
useHelpTool: aHelpTool |
728 | 2061 |
"take the help dictionaries from aHelpTool into my helpTool" |
407 | 2062 |
|
748 | 2063 |
self helpTool buildFromClass: aHelpTool specClass. |
2064 |
self helpTool dictionaries: aHelpTool dictionaries. |
|
2065 |
self helpTool dictionary: aHelpTool dictionary |
|
1244 | 2066 |
|
2067 |
||
199 | 2068 |
! ! |
2069 |
||
2070 |
!MenuEditor methodsFor:'aspects'! |
|
2071 |
||
220 | 2072 |
hasAnySingleSelection |
407 | 2073 |
|
2074 |
^builder booleanValueAspectFor: #hasAnySingleSelection |
|
220 | 2075 |
! |
2076 |
||
2077 |
hasValidSelection |
|
407 | 2078 |
|
2079 |
^builder booleanValueAspectFor: #hasValidSelection |
|
220 | 2080 |
! |
2081 |
||
879 | 2082 |
listOfImages |
1244 | 2083 |
"get a list of the images |
2084 |
" |
|
2085 |
|list| |
|
2086 |
||
2087 |
(list := builder bindingAt:#listOfImages) isNil ifTrue:[ |
|
2088 |
builder aspectAt:#listOfImages put: (list := List new). |
|
879 | 2089 |
]. |
1244 | 2090 |
^ list |
2091 |
||
2092 |
||
199 | 2093 |
! |
2094 |
||
879 | 2095 |
selectionOfImage |
2096 |
"get selection of list of the images as value" |
|
2097 |
||
2098 |
|holder| |
|
2099 |
(holder := builder bindingAt:#selectionOfImage) isNil ifTrue:[ |
|
2100 |
builder aspectAt:#selectionOfImage put: (holder := nil asValue). |
|
2101 |
]. |
|
2102 |
^ holder |
|
2103 |
||
2104 |
||
2105 |
! |
|
2106 |
||
1244 | 2107 |
tabCanvasHolder |
2108 |
"keep the canvas for the current selected item or nil |
|
2109 |
" |
|
2110 |
|holder| |
|
2111 |
||
2112 |
(holder := builder bindingAt:#tabCanvasHolder) isNil ifTrue:[ |
|
1301 | 2113 |
builder aspectAt:#tabCanvasHolder put: (holder := ValueHolder new). |
1244 | 2114 |
]. |
2115 |
^ holder |
|
2116 |
||
2117 |
||
2118 |
! |
|
2119 |
||
199 | 2120 |
tabList |
728 | 2121 |
"get a value holder with the list of the attribute sections (slices)" |
199 | 2122 |
|
298 | 2123 |
|holder| |
1244 | 2124 |
|
298 | 2125 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
1244 | 2126 |
builder aspectAt:#tabList put:(holder := nil asValue). |
298 | 2127 |
]. |
2128 |
^ holder |
|
2129 |
||
2130 |
||
199 | 2131 |
! |
2132 |
||
407 | 2133 |
treeView |
728 | 2134 |
"get a tree view representing hierarchically the menu items" |
407 | 2135 |
|
1244 | 2136 |
^ treeView |
199 | 2137 |
! ! |
2138 |
||
728 | 2139 |
!MenuEditor methodsFor:'building'! |
2140 |
||
734 | 2141 |
buildFromClass:aClass andSelector:aSelector |
2142 |
||
2143 |
self isStandAlone ifTrue:[ |
|
748 | 2144 |
self helpTool buildFromClass:specClass |
734 | 2145 |
]. |
1244 | 2146 |
treeView buildFromClass: aClass andSelector: aSelector. |
734 | 2147 |
|
2148 |
self updateHistory. |
|
2149 |
self updateInfoLabel. |
|
2150 |
||
2151 |
! |
|
2152 |
||
1244 | 2153 |
buildFromResourceSpec:aResourceSpec |
2154 |
|spec| |
|
2155 |
||
2156 |
spec := aResourceSpec isCollection ifTrue:[aResourceSpec decodeAsLiteralArray] |
|
2157 |
ifFalse:[aResourceSpec]. |
|
2158 |
||
2159 |
self buildFromMenu:spec |
|
728 | 2160 |
! ! |
2161 |
||
199 | 2162 |
!MenuEditor methodsFor:'change & update'! |
2163 |
||
970 | 2164 |
update:something with:aParameter from:changedObject |
2165 |
super update:something with:aParameter from:changedObject. |
|
2166 |
||
2167 |
changedObject == (aspects at:#retriever) ifTrue:[ |
|
1244 | 2168 |
self updateImageView. |
970 | 2169 |
]. |
2170 |
||
2171 |
"Modified: / 24.8.1998 / 21:47:48 / cg" |
|
2172 |
! |
|
2173 |
||
748 | 2174 |
updateChannels |
2175 |
"update channels" |
|
407 | 2176 |
|
1244 | 2177 |
|node parent next state canPaste| |
2178 |
||
412 | 2179 |
state := false. |
1244 | 2180 |
node := treeView selectedNode. |
2181 |
||
2182 |
node notNil ifTrue:[ |
|
220 | 2183 |
self hasAnySingleSelection value:true. |
1244 | 2184 |
canPaste := self valueOfCanPaste value. |
2185 |
||
2186 |
(parent := node parent) notNil ifTrue:[ |
|
220 | 2187 |
next := parent childAt:((parent indexOfChild:node) + 1). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2188 |
self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2189 |
self valueOfEnableMovingUpOrDown value:(parent children size > 1). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2190 |
self valueOfEnableMovingOut value:parent parent notNil. |
748 | 2191 |
self hasValidSelection value:true. |
1244 | 2192 |
self valueOfCanPaste value:canPaste. |
2193 |
^ self |
|
2194 |
]. |
|
2195 |
] ifFalse:[ |
|
2196 |
canPaste := false. |
|
2197 |
||
220 | 2198 |
self hasAnySingleSelection value:false. |
1244 | 2199 |
|
2200 |
treeView numberOfSelections ~~ 0 ifTrue:[ |
|
2201 |
canPaste := false. |
|
2202 |
state := (treeView isInSelection:1) not |
|
220 | 2203 |
] |
407 | 2204 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2205 |
self valueOfEnableMovingUpOrDown value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2206 |
self valueOfEnableMovingIn value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2207 |
self valueOfEnableMovingOut value:false. |
748 | 2208 |
self hasValidSelection value:state. |
1244 | 2209 |
self valueOfCanPaste value:canPaste. |
879 | 2210 |
|
2211 |
! |
|
2212 |
||
1244 | 2213 |
updateImageView |
2214 |
"update the image view |
|
2215 |
" |
|
2216 |
|cls newList icon| |
|
2217 |
||
2218 |
self isImageViewSelected ifFalse:[ |
|
2219 |
^ self |
|
902 | 2220 |
]. |
1244 | 2221 |
cls := self currentImageRetrieverClass. |
2222 |
||
2223 |
lastImageRetriever == cls ifTrue:[ |
|
2224 |
newList := self listOfImages |
|
2225 |
] ifFalse:[ |
|
2226 |
cls notNil ifTrue:[ |
|
1463 | 2227 |
self withWaitCursorDo:[ |
2228 |
lastImageRetriever := cls. |
|
2229 |
||
2230 |
newList := self class getAllImageSelectorsFrom:cls. |
|
2231 |
newList := newList collect: [:sel| |img| |
|
2232 |
img := cls perform: sel. |
|
1464 | 2233 |
img height > 32 ifTrue:[ |
2234 |
img := img magnifiedBy: 32 / img extent y |
|
1463 | 2235 |
]. |
2236 |
LabelAndIcon icon:img string:sel |
|
2237 |
]. |
|
2238 |
]. |
|
1244 | 2239 |
] ifFalse:[ |
2240 |
newList := #() |
|
2241 |
]. |
|
2242 |
self listOfImages contents:newList. |
|
2243 |
]. |
|
2244 |
||
2245 |
icon := (aspects at:#icon) value. |
|
2246 |
||
2247 |
icon notNil ifTrue:[ |
|
2248 |
icon := newList detect:[:el| el string == icon] ifNone:nil. |
|
2249 |
]. |
|
2250 |
self selectionOfImage value:icon. |
|
220 | 2251 |
! ! |
2252 |
||
916 | 2253 |
!MenuEditor methodsFor:'defaults'! |
2254 |
||
2255 |
aboutImage |
|
2256 |
"the image to be displayed in my about-box; |
|
2257 |
If nil is returned, thhe ST/X default image is used." |
|
2258 |
||
2259 |
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_menus.xpm' |
|
2260 |
||
2261 |
"Created: / 25.7.1998 / 20:48:12 / cg" |
|
2262 |
"Modified: / 27.7.1998 / 10:21:55 / cg" |
|
2263 |
! ! |
|
2264 |
||
220 | 2265 |
!MenuEditor methodsFor:'event handling'! |
2266 |
||
407 | 2267 |
doesNotUnderstand: aMessage |
2268 |
"detour incoming messages to the tree view" |
|
2269 |
||
1244 | 2270 |
^ aMessage sendTo:treeView |
199 | 2271 |
! ! |
2272 |
||
287 | 2273 |
!MenuEditor methodsFor:'private'! |
2274 |
||
1244 | 2275 |
currentImageRetrieverClass |
2276 |
"returns the current class which provides the images dependent on |
|
2277 |
the retriver or the current spec. |
|
2278 |
" |
|
2279 |
|clsName| |
|
2280 |
||
2281 |
clsName := (aspects at: #retriever) value. |
|
2282 |
||
2283 |
clsName size == 0 ifTrue:[ |
|
1355 | 2284 |
clsName := specClass. |
2285 |
clsName isNil ifTrue:[^ nil]. |
|
1244 | 2286 |
]. |
2287 |
^ Smalltalk at:clsName ifAbsent:nil |
|
2288 |
! |
|
2289 |
||
287 | 2290 |
helpKey |
728 | 2291 |
"get the help key of the selected menu item" |
407 | 2292 |
|
287 | 2293 |
|node| |
1244 | 2294 |
|
2295 |
(node := treeView selectedNode) notNil ifTrue:[ |
|
287 | 2296 |
^ node contents activeHelpKey |
2297 |
]. |
|
2298 |
^ nil |
|
2299 |
! |
|
2300 |
||
2301 |
helpTool |
|
1244 | 2302 |
"get the help tool application |
2303 |
" |
|
2304 |
|helpView helpTool| |
|
2305 |
||
2306 |
helpTool := listOfCanvas at:#help ifAbsent:nil. |
|
2307 |
||
2308 |
helpTool isNil ifTrue:[ |
|
2309 |
helpTool := UIHelpTool new createBuilder. |
|
2310 |
helpTool masterApplication:self. |
|
2311 |
helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
|
1335
b80f8c8ec3d6
use an ApplicationSubView instead of a View for a UIHelpTool
ca
parents:
1330
diff
changeset
|
2312 |
helpView := ApplicationSubView new client:helpTool. |
1244 | 2313 |
helpTool builder window:helpView. |
1335
b80f8c8ec3d6
use an ApplicationSubView instead of a View for a UIHelpTool
ca
parents:
1330
diff
changeset
|
2314 |
helpTool masterApplication:self. |
1244 | 2315 |
listOfCanvas at:#help put:helpTool. |
2316 |
]. |
|
2317 |
^ helpTool |
|
2318 |
||
2319 |
||
287 | 2320 |
! ! |
2321 |
||
199 | 2322 |
!MenuEditor methodsFor:'queries'! |
2323 |
||
2324 |
isHelpToolSelected |
|
1244 | 2325 |
"return true if current selection is help tool |
2326 |
" |
|
2327 |
^ typeOfCanvas == #help |
|
2328 |
||
2329 |
! |
|
2330 |
||
2331 |
isImageViewSelected |
|
2332 |
"return true if current selection is help tool |
|
2333 |
" |
|
2334 |
^ typeOfCanvas == #imageEditSpec |
|
2335 |
||
287 | 2336 |
! |
2337 |
||
535 | 2338 |
preferredExtent |
2339 |
||
2340 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//2.5) |
|
2341 |
||
2342 |
||
199 | 2343 |
! ! |
2344 |
||
2345 |
!MenuEditor methodsFor:'selection'! |
|
2346 |
||
879 | 2347 |
imageSelected |
1078
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2348 |
|imgSel| |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2349 |
|
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2350 |
imgSel := self selectionOfImage value. |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2351 |
imgSel notNil ifTrue:[ |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2352 |
(aspects at: #icon) value: imgSel string |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2353 |
] |
879 | 2354 |
! |
2355 |
||
199 | 2356 |
menuChanged |
407 | 2357 |
|
1244 | 2358 |
|node item myClass oldLabel oldSlices newList index| |
2359 |
||
2360 |
node := treeView selectedNode. |
|
2361 |
||
2362 |
node isNil ifTrue:[ |
|
2363 |
slices := nil. |
|
2364 |
index := 0. |
|
2365 |
] ifFalse:[ |
|
2366 |
oldSlices := slices. |
|
2367 |
myClass := self class. |
|
2368 |
item := node contents. |
|
2369 |
||
218 | 2370 |
item isSeparator ifFalse:[ |
199 | 2371 |
node parent isNil ifFalse:[ |
218 | 2372 |
node hasChildren ifTrue:[ |
1244 | 2373 |
slices := #slicesMenu |
218 | 2374 |
] ifFalse:[ |
1244 | 2375 |
item submenuChannel isNil ifTrue:[slices := #slicesItem] |
2376 |
ifFalse:[slices := #slicesLink] |
|
218 | 2377 |
]. |
1244 | 2378 |
slices := listOfSlices at:slices |
2379 |
ifAbsentPut:[(myClass perform:slices) copyWith:#('Help' #help)]. |
|
199 | 2380 |
] ifTrue:[ |
1244 | 2381 |
slices := listOfSlices at:#slicesRootMenu |
2382 |
ifAbsentPut:[myClass perform:#slicesRootMenu]. |
|
287 | 2383 |
]. |
199 | 2384 |
] ifTrue:[ |
1244 | 2385 |
slices := myClass perform:#slicesSeparatorMenu. |
287 | 2386 |
]. |
1244 | 2387 |
index := tabSelection ? 0. |
2388 |
||
2389 |
slices ~~ oldSlices ifTrue:[ |
|
1322 | 2390 |
tabSelection := 0. |
2391 |
typeOfCanvas := 0. |
|
2392 |
||
2393 |
self tabCanvasHolder value:nil. |
|
2394 |
||
1244 | 2395 |
newList := slices collect:[:el| el first]. |
2396 |
||
2397 |
index ~~ 0 ifTrue:[ |
|
2398 |
oldLabel := self tabList value at:index ifAbsent:nil. |
|
2399 |
||
2400 |
oldLabel notNil ifTrue:[ |
|
2401 |
index := newList indexOf:oldLabel. |
|
2402 |
] |
|
287 | 2403 |
]. |
1244 | 2404 |
self tabList value:newList. |
2405 |
]. |
|
2406 |
index := index max:1. |
|
199 | 2407 |
]. |
1244 | 2408 |
self tabModel value:index. |
1246 | 2409 |
aspects do:[:a| a removeDependent:self]. |
2410 |
self cancel. |
|
748 | 2411 |
self updateChannels. |
1246 | 2412 |
aspects do:[:a| a addDependent:self]. |
1244 | 2413 |
|
199 | 2414 |
! |
2415 |
||
1301 | 2416 |
tabSelection:aSelection |
1244 | 2417 |
"put the section aSelection into the note book |
2418 |
" |
|
1301 | 2419 |
|view spec| |
2420 |
||
1322 | 2421 |
aSelection = tabSelection ifTrue:[^self]. |
1301 | 2422 |
|
2423 |
(tabSelection := aSelection) isNil ifTrue:[ |
|
2424 |
tabSelection == 0 ifTrue:[^ self]. |
|
2425 |
tabSelection := 0. |
|
199 | 2426 |
]. |
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2427 |
|
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2428 |
"/ before bringing up the new notebook page, |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2429 |
"/ we must disable all now invisible input fields ... |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2430 |
"/ (otherwise, those would fire on #accept. |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2431 |
|
1301 | 2432 |
(view := self tabCanvasHolder value) notNil ifTrue:[ |
2433 |
view allSubViewsDo:[:aComponent | |
|
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2434 |
aComponent isInputField ifTrue:[ |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2435 |
aComponent disableIfInvisible:true |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2436 |
] |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2437 |
] |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2438 |
]. |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2439 |
|
1301 | 2440 |
tabSelection == 0 ifTrue:[ |
2441 |
^ self tabCanvasHolder value:nil. |
|
2442 |
]. |
|
2443 |
||
2444 |
typeOfCanvas := (slices at:tabSelection) last. |
|
2445 |
||
2446 |
self isHelpToolSelected ifTrue:[ |
|
2447 |
view := self helpTool window. |
|
2448 |
] ifFalse:[ |
|
2449 |
self updateImageView. |
|
2450 |
||
2451 |
view := listOfCanvas at:typeOfCanvas |
|
2452 |
ifAbsentPut:[SimpleView new client:self spec:typeOfCanvas builder:(self builder)]. |
|
2453 |
]. |
|
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2454 |
self tabCanvasHolder value:view. |
1244 | 2455 |
|
199 | 2456 |
! ! |
2457 |
||
2458 |
!MenuEditor methodsFor:'startup / release'! |
|
2459 |
||
738 | 2460 |
initialize |
2461 |
"initialize value holders for the attributes of the menu components" |
|
2462 |
||
2463 |
|holder| |
|
2464 |
||
2465 |
super initialize. |
|
2466 |
||
2467 |
aspects at:#seperatorSelection put:(holder := SelectionInList new). |
|
2468 |
holder list: Item separatorList. |
|
872
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2469 |
holder addDependent:self. |
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2470 |
|
1244 | 2471 |
listOfCanvas := IdentityDictionary new. |
2472 |
listOfSlices := IdentityDictionary new. |
|
2473 |
||
2474 |
treeView := TreeView new. |
|
2475 |
treeView action:[:dummy| self menuChanged ]. |
|
2476 |
||
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2477 |
aspects at:#indicationEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2478 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2479 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2480 |
aspects at:#choiceEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2481 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2482 |
argument:(aspects at:#indication)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2483 |
aspects at:#choiceValueEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2484 |
with:[:a | a size > 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2485 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2486 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
2487 |
aspects at:#retrieverClassList put:self class imageRetrieverClasses asValue. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2488 |
|
1244 | 2489 |
aspects do: [:holder| holder addDependent:self]. |
738 | 2490 |
! |
2491 |
||
728 | 2492 |
openModalOnMenu: aMenu |
734 | 2493 |
"build a tree from aMenu and open it modal" |
728 | 2494 |
|
738 | 2495 |
super openModalOnResourceSpec: aMenu |
1250 | 2496 |
! |
2497 |
||
2498 |
postOpenWith:aBuilder |
|
2499 |
"reset keyboardProcessor for menuBar |
|
2500 |
" |
|
2501 |
super postOpenWith: aBuilder. |
|
2502 |
aBuilder keyboardProcessor menuBar:nil. |
|
199 | 2503 |
! ! |
2504 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2505 |
!MenuEditor methodsFor:'user actions'! |
199 | 2506 |
|
407 | 2507 |
accept |
2508 |
"invoked by button 'OK' and by save requests of menu item changes" |
|
2509 |
||
1244 | 2510 |
|node item| |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2511 |
|
637 | 2512 |
super accept. |
2513 |
||
1244 | 2514 |
(node := treeView selectedNode) notNil ifTrue:[ |
2515 |
item := node contents. |
|
2516 |
||
1062 | 2517 |
self isHelpToolSelected ifTrue:[ |
407 | 2518 |
self helpTool accept. |
1244 | 2519 |
item activeHelpKey: self helpTool helpKey. |
686 | 2520 |
self valueOfEnablingCommitButtons value: false. |
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2521 |
self clearModifiedFlag. |
1062 | 2522 |
] ifFalse:[ |
1244 | 2523 |
item buildFromAspects:aspects. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2524 |
node changed. |
1244 | 2525 |
specSelector := treeView selectorName. |
407 | 2526 |
] |
734 | 2527 |
]. |
879 | 2528 |
self updateInfoLabel. |
1155 | 2529 |
|
407 | 2530 |
! |
2531 |
||
2532 |
cancel |
|
2533 |
"invoked by button 'Cancel'" |
|
1244 | 2534 |
|node item| |
2535 |
||
2536 |
node := treeView selectedNode. |
|
2537 |
||
2538 |
aspects keysAndValuesDo:[:aKey :anAspect| |
|
2539 |
aKey ~~ #retrieverClassList ifTrue:[ |
|
2540 |
anAspect setValue:''. "/ to clear the field. |
|
2541 |
anAspect value:'' |
|
2542 |
] |
|
407 | 2543 |
]. |
1244 | 2544 |
|
2545 |
node notNil ifTrue:[ |
|
2546 |
item := node contents. |
|
2547 |
item toAspects:aspects. |
|
2548 |
self helpTool helpKey:(item activeHelpKey). |
|
2549 |
]. |
|
2550 |
self updateImageView. |
|
2551 |
self valueOfEnablingCommitButtons value:false. |
|
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2552 |
self clearModifiedFlag. |
407 | 2553 |
! |
2554 |
||
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2555 |
doBrowseForImageResource |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2556 |
"opens a browser on image-resource methods" |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2557 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2558 |
|msg currClass w cls sel| |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2559 |
|
1244 | 2560 |
currClass := self currentImageRetrieverClass. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2561 |
msg := |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2562 |
(ResourceSelectionBrowser |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2563 |
request: 'Use Image From Class' |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2564 |
onSuperclass: nil |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2565 |
andClass: currClass |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2566 |
andSelector: (aspects at: #icon) |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2567 |
withResourceTypes: #(image fileImage programImage)). |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2568 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2569 |
msg notNil ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2570 |
(w := msg asCollectionOfWords) size == 2 ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2571 |
cls := w at:1. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2572 |
sel := w at:2. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2573 |
cls ~= currClass ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2574 |
(aspects at: #retriever) value:cls asSymbol. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2575 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2576 |
sel ~= (aspects at:#icon) ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2577 |
(aspects at: #icon) value:sel asSymbol. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2578 |
]. |
1244 | 2579 |
self updateImageView. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2580 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2581 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2582 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2583 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2584 |
! |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2585 |
|
879 | 2586 |
doEditImage |
888 | 2587 |
"opens a Image Editor on the resource retriever and the icon selector; |
2588 |
then updates the list of images and select the line of the image" |
|
879 | 2589 |
|
2590 |
super doEditImage. |
|
1244 | 2591 |
lastImageRetriever := nil. |
2592 |
self updateImageView. |
|
879 | 2593 |
! |
2594 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2595 |
doNew |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2596 |
|
748 | 2597 |
super doNew ifTrue: [self helpTool doNew] |
199 | 2598 |
! |
2599 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2600 |
doPickAMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2601 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2602 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2603 |
|
1244 | 2604 |
self askForModification ifTrue:[ |
2605 |
((view := Screen current viewFromUser) isNil or: |
|
2606 |
[view == Screen current rootView]) ifTrue:[ |
|
2607 |
^ self |
|
2608 |
]. |
|
2609 |
view specClass == MenuPanelSpec ifTrue:[ |
|
2610 |
^ treeView buildFromMenu: view asMenu |
|
2611 |
]. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2612 |
]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2613 |
^ nil |
381 | 2614 |
! |
2615 |
||
888 | 2616 |
doRemoveImage |
2617 |
"removes the image of the selected line" |
|
1244 | 2618 |
|cls sel| |
2619 |
||
2620 |
sel := self selectionOfImage value. |
|
2621 |
||
2622 |
sel size ~~ 0 ifTrue:[ |
|
2623 |
cls := self currentImageRetrieverClass. |
|
2624 |
cls notNil ifTrue:[ |
|
2625 |
cls class removeSelector:(sel string) |
|
2626 |
]. |
|
2627 |
(aspects at:#icon) value:nil. |
|
2628 |
lastImageRetriever := nil. |
|
2629 |
self updateImageView. |
|
888 | 2630 |
] |
2631 |
! |
|
2632 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2633 |
doSave |
1244 | 2634 |
|cls menu spec mthd category code excla| |
199 | 2635 |
|
642 | 2636 |
super doSave ifFalse: [^nil]. |
637 | 2637 |
|
1244 | 2638 |
cls := self resolveName: specClass. |
2639 |
menu := treeView asMenu literalArrayEncoding. |
|
199 | 2640 |
spec := WriteStream on:String new. |
2641 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
2642 |
spec := spec contents. |
|
2643 |
||
2644 |
"/ if that method already exists, do not overwrite the category |
|
2645 |
||
576 | 2646 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2647 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 2648 |
category := mthd category. |
2649 |
]. |
|
2650 |
||
764 | 2651 |
excla := Character excla asString. |
2652 |
||
2653 |
code := excla |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2654 |
, (cls name , ' class methodsFor:' , category storeString) |
764 | 2655 |
, excla , '\\' |
199 | 2656 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2657 |
, specSelector , '\' |
738 | 2658 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
2659 |
, '\\ "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2660 |
, (' 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
|
2661 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 2662 |
, ' "\'. |
2663 |
||
2664 |
code := code |
|
2665 |
, '\' |
|
2666 |
, ' <resource: #menu>\\' |
|
1083 | 2667 |
, ' ^ ' , spec |
199 | 2668 |
, '\' |
764 | 2669 |
, (excla , ' ' , excla) |
199 | 2670 |
, '\\'. |
2671 |
||
2672 |
code := code withCRs. |
|
2673 |
(ReadStream on:code) fileIn. |
|
2674 |
||
764 | 2675 |
self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. |
699 | 2676 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2677 |
self updateHistory. |
748 | 2678 |
self updateInfoLabel. |
2679 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2680 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2681 |
modified := false. |
218 | 2682 |
|
199 | 2683 |
! |
2684 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2685 |
doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2686 |
|
1244 | 2687 |
super doSaveAs ifTrue: [treeView selectorName:specSelector] |
218 | 2688 |
! |
199 | 2689 |
|
218 | 2690 |
doStepDown |
407 | 2691 |
"shift selected menu item one step down" |
2692 |
||
1244 | 2693 |
treeView selectedNodeChangeSequenceOrder:1. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2694 |
modified := true. |
398 | 2695 |
|
2696 |
||
2697 |
||
2698 |
||
218 | 2699 |
! |
2700 |
||
2701 |
doStepIn |
|
407 | 2702 |
"move selected menu item into next submenu" |
2703 |
||
1244 | 2704 |
treeView selectedNodeBecomeChildOfNext. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2705 |
modified := true. |
398 | 2706 |
|
2707 |
||
2708 |
||
2709 |
||
199 | 2710 |
|
218 | 2711 |
! |
199 | 2712 |
|
218 | 2713 |
doStepOut |
407 | 2714 |
"move selected menu item out from parent submenu" |
2715 |
||
1244 | 2716 |
treeView selectedNodeBecomeSisterOfParent. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2717 |
modified := true. |
218 | 2718 |
! |
2719 |
||
2720 |
doStepUp |
|
407 | 2721 |
"shift selected menu item one step up" |
2722 |
||
1244 | 2723 |
treeView selectedNodeChangeSequenceOrder:-1. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2724 |
modified := true. |
199 | 2725 |
! ! |
2726 |
||
1454 | 2727 |
!MenuEditor::Item class methodsFor:'constants'! |
2728 |
||
2729 |
separatorList |
|
2730 |
"get the list of available separator types" |
|
2731 |
||
2732 |
^#('blank' 'single line' 'double line') |
|
2733 |
! |
|
2734 |
||
2735 |
separatorSlices |
|
2736 |
"get the list of menu spec values of the corresponding separator types" |
|
2737 |
||
2738 |
^ #( |
|
2739 |
( #blank '' ) |
|
2740 |
( #single '-' ) |
|
2741 |
( #double '=' ) |
|
2742 |
) |
|
2743 |
! ! |
|
2744 |
||
2745 |
!MenuEditor::Item class methodsFor:'documentation'! |
|
2746 |
||
2747 |
documentation |
|
2748 |
" |
|
2749 |
implements the contents assigned to a TreeItem. An instance |
|
2750 |
is associated with one item and keeps all its information |
|
2751 |
||
2752 |
[see also:] |
|
2753 |
TreeItem |
|
2754 |
MenuEditor |
|
2755 |
||
2756 |
[author:] |
|
2757 |
Claus Atzkern |
|
2758 |
" |
|
2759 |
||
2760 |
||
2761 |
! ! |
|
2762 |
||
2763 |
!MenuEditor::Item methodsFor:'accessing'! |
|
2764 |
||
2765 |
activeHelpKey |
|
2766 |
"get the help key of the menu item" |
|
2767 |
||
2768 |
^activeHelpKey |
|
2769 |
! |
|
2770 |
||
2771 |
activeHelpKey:aKey |
|
2772 |
"set the help key of the menu item" |
|
2773 |
||
2774 |
activeHelpKey := aKey |
|
2775 |
! |
|
2776 |
||
2777 |
label |
|
2778 |
"get the value of the menu item" |
|
2779 |
||
2780 |
^label |
|
2781 |
! |
|
2782 |
||
2783 |
label:something |
|
2784 |
"set the value of the menu item" |
|
2785 |
||
2786 |
label := something ? '-' |
|
2787 |
! |
|
2788 |
||
2789 |
separatorType |
|
2790 |
"get the separator type assigned to item or nil" |
|
2791 |
||
2792 |
label size > 1 |
|
2793 |
ifFalse: |
|
2794 |
[ |
|
2795 |
label size == 0 ifTrue:[^#blank]. |
|
2796 |
label first == $- ifTrue:[^#single]. |
|
2797 |
label first == $= ifTrue:[^#double]. |
|
2798 |
]. |
|
2799 |
^nil |
|
2800 |
||
2801 |
! |
|
2802 |
||
2803 |
startGroup:aSymbolOrNil |
|
2804 |
"set the startGroup attribute" |
|
2805 |
||
2806 |
startGroup := aSymbolOrNil |
|
2807 |
||
2808 |
"Created: / 23.8.1998 / 15:56:03 / cg" |
|
2809 |
! |
|
2810 |
||
2811 |
submenuChannel |
|
2812 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2813 |
||
2814 |
^submenuChannel |
|
2815 |
! |
|
2816 |
||
2817 |
submenuChannel:aChannel |
|
2818 |
"get the submenuChannel" |
|
2819 |
||
2820 |
submenuChannel := aChannel |
|
2821 |
! |
|
2822 |
||
2823 |
translateLabel:aBoolean |
|
2824 |
"set/clear the translate to national-language flag" |
|
2825 |
||
2826 |
translateLabel := aBoolean |
|
2827 |
||
2828 |
"Created: / 6.6.1998 / 17:23:33 / cg" |
|
2829 |
! |
|
2830 |
||
2831 |
value:aSymbol |
|
2832 |
"set the value attribute" |
|
2833 |
||
2834 |
value := aSymbol |
|
2835 |
||
2836 |
"Created: / 23.8.1998 / 16:02:10 / cg" |
|
2837 |
! ! |
|
2838 |
||
2839 |
!MenuEditor::Item methodsFor:'building'! |
|
2840 |
||
2841 |
buildFromAspects:aspects |
|
2842 |
"read the values of the aspects into my values" |
|
2843 |
||
2844 |
|name| |
|
2845 |
self isSeparator |
|
2846 |
ifFalse: |
|
2847 |
[ |
|
2848 |
name := label. |
|
2849 |
label := (aspects at:#label) value. |
|
2850 |
||
2851 |
(label isNil or:[self isSeparator]) ifTrue:[ |
|
2852 |
(aspects at:#label) value:(label := name) |
|
2853 |
]. |
|
2854 |
||
2855 |
enabled := (aspects at:#enabled) value. |
|
2856 |
value := (aspects at:#value) value. |
|
2857 |
nameKey := (aspects at:#nameKey) value. |
|
2858 |
indication := (aspects at:#indication) value. |
|
2859 |
choice := (aspects at:#choice) value. |
|
2860 |
choiceValue := (aspects at:#choiceValue) value. |
|
2861 |
shortcutKey := (aspects at:#shortcutKey) value. |
|
2862 |
startGroup := (aspects at:#startGroup) value. |
|
2863 |
accessCharacterPos := (aspects at:#accessCharacterPos) value. |
|
2864 |
showBusyCursorWhilePerforming := (aspects at:#showBusyCursorWhilePerforming) value. |
|
2865 |
triggerOnDown := (aspects at:#triggerOnDown) value. |
|
2866 |
keepLinkedMenu := (aspects at:#keepLinkedMenu) value ? false. |
|
2867 |
font := (aspects at:#font) value. |
|
2868 |
argument := (aspects at:#argument) value. |
|
2869 |
translateLabel := (aspects at:#translateLabel) value. |
|
2870 |
isButton := (aspects at:#isButton) value. |
|
2871 |
auxValue := (aspects at:#auxValue) value. |
|
2872 |
||
2873 |
argument isString ifTrue:[ |
|
2874 |
argument size > 1 ifTrue:[ |
|
2875 |
(argument at:1) == $# ifTrue:[ |
|
2876 |
argument := (argument copyFrom:2) asSymbol |
|
2877 |
] |
|
2878 |
] |
|
2879 |
]. |
|
2880 |
submenuChannel := (aspects at:#submenuChannel) value. |
|
2881 |
retriever := (aspects at:#retriever) value. |
|
2882 |
icon := (aspects at:#icon) value. |
|
2883 |
iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2884 |
] |
|
2885 |
ifTrue: |
|
2886 |
[ |
|
2887 |
name := (aspects at:#seperatorSelection) selectionIndex. |
|
2888 |
label := (self class separatorSlices at:name) last. |
|
2889 |
]. |
|
2890 |
isVisible := (aspects at:#isVisible) value. |
|
2891 |
hideMenuOnActivated := (aspects at:#hideMenuOnActivated) value. |
|
2892 |
||
2893 |
"Modified: / 14.8.1998 / 15:36:38 / cg" |
|
2894 |
! |
|
2895 |
||
2896 |
buildFromMenuItem:anItem |
|
2897 |
"read the attributes of anItem into my values" |
|
2898 |
||
2899 |
|rtv| |
|
2900 |
||
2901 |
self label:(anItem rawLabel). |
|
2902 |
activeHelpKey := anItem activeHelpKey. |
|
2903 |
||
2904 |
(enabled := anItem enabled) isSymbol ifFalse:[ |
|
2905 |
enabled := nil |
|
2906 |
]. |
|
2907 |
(value := anItem value) isSymbol ifFalse:[ |
|
2908 |
value := nil. |
|
2909 |
]. |
|
2910 |
(indication := anItem indication) isSymbol ifFalse:[ |
|
2911 |
indication := nil |
|
2912 |
]. |
|
2913 |
(choice := anItem choice) isSymbol ifFalse:[ |
|
2914 |
choice := nil |
|
2915 |
]. |
|
2916 |
choiceValue := anItem choiceValue. |
|
2917 |
nameKey := anItem nameKey. |
|
2918 |
shortcutKey := anItem shortcutKeyCharacter. |
|
2919 |
startGroup := anItem startGroup. |
|
2920 |
accessCharacterPos := anItem accessCharacterPosition. |
|
2921 |
showBusyCursorWhilePerforming := anItem showBusyCursorWhilePerforming. |
|
2922 |
triggerOnDown := anItem triggerOnDown. |
|
2923 |
keepLinkedMenu := anItem keepLinkedMenu. |
|
2924 |
font := anItem font. |
|
2925 |
argument := anItem argument. |
|
2926 |
||
2927 |
submenuChannel := anItem submenuChannel. |
|
2928 |
translateLabel := anItem translateLabel. |
|
2929 |
isButton := anItem isButton. |
|
2930 |
isVisible := anItem isVisible. |
|
2931 |
hideMenuOnActivated := anItem hideMenuOnActivated. |
|
2932 |
auxValue := anItem auxValue. |
|
2933 |
||
2934 |
(((rtv := anItem adornment) notNil) |
|
2935 |
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2936 |
ifTrue: |
|
2937 |
[ |
|
2938 |
retriever := rtv className. |
|
2939 |
icon := rtv selector. |
|
2940 |
(iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2941 |
label := rtv labelText. |
|
2942 |
] |
|
2943 |
] |
|
2944 |
||
2945 |
"Modified: / 29.9.1998 / 11:18:25 / cg" |
|
2946 |
! ! |
|
2947 |
||
2948 |
!MenuEditor::Item methodsFor:'conversion'! |
|
2949 |
||
2950 |
asMenuItem |
|
2951 |
"converts self to a menu item" |
|
2952 |
||
2953 |
|item rcv| |
|
2954 |
||
2955 |
item := MenuItem labeled:label. |
|
2956 |
item isVisible:isVisible. |
|
2957 |
item hideMenuOnActivated:hideMenuOnActivated. |
|
2958 |
||
2959 |
self isSeparator ifFalse:[ |
|
2960 |
item activeHelpKey:activeHelpKey. |
|
2961 |
item enabled:enabled. |
|
2962 |
item accessCharacterPosition:accessCharacterPos. |
|
2963 |
item showBusyCursorWhilePerforming:showBusyCursorWhilePerforming. |
|
2964 |
item triggerOnDown:triggerOnDown. |
|
2965 |
item keepLinkedMenu:keepLinkedMenu. |
|
2966 |
item font:font. |
|
2967 |
item argument:argument. |
|
2968 |
item submenuChannel:submenuChannel. |
|
2969 |
item nameKey:nameKey. |
|
2970 |
item shortcutKeyCharacter:shortcutKey. |
|
2971 |
item startGroup:startGroup. |
|
2972 |
item value:value. |
|
2973 |
item indication:indication. |
|
2974 |
item choice:choice. |
|
2975 |
item choiceValue:choiceValue. |
|
2976 |
item translateLabel: translateLabel. |
|
2977 |
item isButton: isButton. |
|
2978 |
item auxValue: auxValue. |
|
2979 |
||
2980 |
icon notNil ifTrue:[ |
|
2981 |
rcv := ResourceRetriever new. |
|
2982 |
rcv className:retriever. |
|
2983 |
rcv selector:icon. |
|
2984 |
iconAndLabel == true ifTrue:[ |
|
2985 |
rcv labelText:label |
|
2986 |
]. |
|
2987 |
item labelImage:rcv |
|
2988 |
] |
|
2989 |
]. |
|
2990 |
^item |
|
2991 |
||
2992 |
"Modified: / 14.8.1998 / 15:36:35 / cg" |
|
2993 |
! |
|
2994 |
||
2995 |
toAspects:aspects |
|
2996 |
"put my values into the values of aspects" |
|
2997 |
||
2998 |
|type| |
|
2999 |
(type := self separatorType) notNil ifTrue: [ |
|
3000 |
type := self class separatorSlices findFirst:[:el| el first == type ]. |
|
3001 |
(aspects at:#seperatorSelection) selectionIndex:type. |
|
3002 |
] ifFalse: [ |
|
3003 |
(aspects at:#label) value:label. |
|
3004 |
(aspects at:#enabled) value:enabled. |
|
3005 |
(aspects at:#value) value:value. |
|
3006 |
(aspects at:#nameKey) value:nameKey. |
|
3007 |
(aspects at:#indication) value:indication. |
|
3008 |
(aspects at:#choice) value:choice. |
|
3009 |
(aspects at:#choiceValue) value:choiceValue. |
|
3010 |
(aspects at:#shortcutKey) value:shortcutKey. |
|
3011 |
(aspects at:#startGroup) value:startGroup. |
|
3012 |
(aspects at:#accessCharacterPos) value:accessCharacterPos. |
|
3013 |
(aspects at:#showBusyCursorWhilePerforming) value:showBusyCursorWhilePerforming. |
|
3014 |
(aspects at:#triggerOnDown) value:triggerOnDown. |
|
3015 |
(aspects at:#keepLinkedMenu) value:(keepLinkedMenu ? false). |
|
3016 |
(aspects at:#font) value:font. |
|
3017 |
(aspects at:#translateLabel) value:translateLabel. |
|
3018 |
(aspects at:#submenuChannel) value:submenuChannel. |
|
3019 |
(aspects at:#retriever) value:retriever. |
|
3020 |
(aspects at:#icon) value:icon. |
|
3021 |
(aspects at:#iconAndLabel) value:iconAndLabel. |
|
3022 |
(aspects at:#isButton) value:isButton. |
|
3023 |
(aspects at:#auxValue) value:auxValue. |
|
3024 |
||
3025 |
(aspects at:#argument) |
|
3026 |
value:(argument isSymbol |
|
3027 |
ifTrue: ['#', argument] |
|
3028 |
ifFalse:[argument]). |
|
3029 |
]. |
|
3030 |
(aspects at:#isVisible) value:isVisible. |
|
3031 |
(aspects at:#hideMenuOnActivated) value:(hideMenuOnActivated ? true). |
|
3032 |
||
3033 |
"Modified: / 14.8.1998 / 15:37:29 / cg" |
|
3034 |
! ! |
|
3035 |
||
3036 |
!MenuEditor::Item methodsFor:'queries'! |
|
3037 |
||
3038 |
iconFor: aNode |
|
3039 |
"get the icon of the menu item for the tree view" |
|
3040 |
||
3041 |
(aNode hasChildren or: [aNode parent isNil]) |
|
3042 |
ifTrue: |
|
3043 |
[ |
|
3044 |
^MenuEditor submenuImage |
|
3045 |
] |
|
3046 |
ifFalse: |
|
3047 |
[ |
|
3048 |
submenuChannel notNil |
|
3049 |
ifTrue: |
|
3050 |
[ |
|
3051 |
^MenuEditor linkSubmenuImage |
|
3052 |
] |
|
3053 |
ifFalse: |
|
3054 |
[ |
|
3055 |
self isSeparator |
|
3056 |
ifTrue: [^MenuEditor menuSeparatorImage] |
|
3057 |
ifFalse: [^MenuEditor menuItemImage] |
|
3058 |
] |
|
3059 |
] |
|
3060 |
! |
|
3061 |
||
3062 |
isSeparator |
|
3063 |
"return true if item is a seperator" |
|
3064 |
||
3065 |
^self separatorType notNil |
|
3066 |
! |
|
3067 |
||
3068 |
treeViewLabel |
|
3069 |
"get the label of the menu item for the tree view" |
|
3070 |
||
3071 |
^label |
|
3072 |
" asBoldText, |
|
3073 |
(value notNil ifTrue: [': [', |
|
3074 |
value , |
|
3075 |
(argument isString ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']), |
|
3076 |
']'] ifFalse: ['']) |
|
3077 |
||
3078 |
||
3079 |
" |
|
3080 |
! ! |
|
3081 |
||
407 | 3082 |
!MenuEditor::TreeView class methodsFor:'documentation'! |
199 | 3083 |
|
3084 |
documentation |
|
3085 |
" |
|
734 | 3086 |
This tree view class provides a hierarchical representation |
3087 |
of the components of a menu. |
|
199 | 3088 |
|
3089 |
[see also:] |
|
3090 |
SelectionInTreeView |
|
213 | 3091 |
SelectionInTree |
3092 |
TreeItem |
|
199 | 3093 |
|
3094 |
[author:] |
|
3095 |
Claus Atzkern |
|
3096 |
" |
|
3097 |
! ! |
|
3098 |
||
407 | 3099 |
!MenuEditor::TreeView methodsFor:'accessing'! |
199 | 3100 |
|
1322 | 3101 |
canTab |
3102 |
^ true |
|
3103 |
! |
|
3104 |
||
199 | 3105 |
selectorName |
734 | 3106 |
"get the selector of the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3107 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3108 |
^(listOfNodes first contents label) asSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3109 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3110 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3111 |
selectorName: aSymbol |
734 | 3112 |
"set the selector for the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3113 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3114 |
listOfNodes first contents label: aSymbol |
199 | 3115 |
! ! |
3116 |
||
407 | 3117 |
!MenuEditor::TreeView methodsFor:'building'! |
199 | 3118 |
|
637 | 3119 |
buildFromClass:aClass andSelector:aSelector |
734 | 3120 |
"read a menu spec from aClass and aSelector and put |
3121 |
the encoded menu into the tree view" |
|
407 | 3122 |
|
728 | 3123 |
|spec cls menu firstNode firstNodeLabel| |
3124 |
||
3125 |
"if opened on a menu" |
|
3126 |
(aClass isNil and: [aSelector isNil and: [listOfNodes size > 0]]) ifTrue: [^nil]. |
|
199 | 3127 |
|
1244 | 3128 |
self selection:nil. |
3129 |
||
199 | 3130 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
340 | 3131 |
cls := self application resolveName:aClass. |
199 | 3132 |
|
3133 |
(cls respondsTo:aSelector) ifTrue:[ |
|
3134 |
spec := cls perform:aSelector |
|
3135 |
] |
|
3136 |
]. |
|
331 | 3137 |
|
199 | 3138 |
spec isNil ifFalse:[ |
298 | 3139 |
(spec isMemberOf:Menu) ifFalse:[ |
3140 |
menu := Menu new fromLiteralArrayEncoding:spec. |
|
3141 |
] ifTrue:[ |
|
3142 |
menu := spec. |
|
3143 |
]. |
|
728 | 3144 |
firstNode := self nodeLabel:(aSelector asString). |
3145 |
self subMenu:menu parent:firstNode. |
|
199 | 3146 |
] ifTrue:[ |
728 | 3147 |
(aClass notNil and: [aSelector isNil and: [listOfNodes size > 0]]) |
3148 |
ifTrue: |
|
3149 |
[ |
|
3150 |
firstNode := listOfNodes first |
|
3151 |
] |
|
3152 |
ifFalse: |
|
3153 |
[ |
|
3154 |
aSelector notNil ifTrue:[firstNodeLabel := aSelector asString] |
|
3155 |
ifFalse:[firstNodeLabel := 'menu']. |
|
3156 |
firstNode := self nodeLabel:firstNodeLabel. |
|
3157 |
] |
|
199 | 3158 |
]. |
734 | 3159 |
|
728 | 3160 |
firstNode expand. |
3161 |
model root: firstNode. |
|
3162 |
||
3163 |
firstNode hasChildren ifFalse:[ |
|
775 | 3164 |
model add:(self nodeLabel:'Item 1') below:firstNode |
199 | 3165 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3166 |
|
199 | 3167 |
|
3168 |
! |
|
3169 |
||
3170 |
buildFromMenu:aMenu |
|
734 | 3171 |
"put aMenu into the tree view" |
199 | 3172 |
|
249 | 3173 |
|node| |
199 | 3174 |
|
1244 | 3175 |
self selection:nil. |
3176 |
||
213 | 3177 |
node := self nodeLabel:'menu'. |
199 | 3178 |
self subMenu:aMenu parent:node. |
3179 |
||
3180 |
node hasChildren ifFalse:[ |
|
728 | 3181 |
node add:(self nodeLabel:'Item 1') |
199 | 3182 |
]. |
213 | 3183 |
node expand. |
199 | 3184 |
model root:node. |
3185 |
! |
|
3186 |
||
213 | 3187 |
menuItem:anItem |
199 | 3188 |
|
249 | 3189 |
|node| |
199 | 3190 |
|
407 | 3191 |
node := self nodeLabel: anItem label. |
199 | 3192 |
node contents buildFromMenuItem:anItem. |
407 | 3193 |
self subMenu: anItem submenu parent:node. |
3194 |
^node. |
|
199 | 3195 |
|
3196 |
||
3197 |
! |
|
3198 |
||
3199 |
subMenu:aMenu parent:aParent |
|
407 | 3200 |
|
213 | 3201 |
|idx grp| |
199 | 3202 |
|
3203 |
aMenu isNil ifFalse:[ |
|
3204 |
grp := aMenu groupSizes. |
|
213 | 3205 |
aMenu itemsDo:[:i| aParent add:(self menuItem:i)]. |
199 | 3206 |
|
3207 |
grp notNil ifTrue:[ |
|
213 | 3208 |
idx := 0. |
199 | 3209 |
|
3210 |
grp do:[:i| |
|
213 | 3211 |
idx := idx + i + 1. |
3212 |
aParent add:(self nodeLabel:nil) beforeIndex:idx. |
|
199 | 3213 |
] |
3214 |
] |
|
3215 |
] |
|
3216 |
! ! |
|
3217 |
||
407 | 3218 |
!MenuEditor::TreeView methodsFor:'conversion'! |
199 | 3219 |
|
3220 |
asMenu |
|
3221 |
|menu root| |
|
3222 |
||
3223 |
root := self root. |
|
3224 |
||
3225 |
root hasChildren ifTrue:[ |
|
3226 |
menu := Menu new. |
|
3227 |
root children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
3228 |
]. |
|
3229 |
^ menu |
|
3230 |
! |
|
3231 |
||
3232 |
asMenuItem:aNode |
|
3233 |
||
3234 |
|menu item| |
|
3235 |
||
3236 |
item := aNode contents asMenuItem. |
|
3237 |
||
3238 |
aNode hasChildren ifTrue:[ |
|
3239 |
menu := Menu new. |
|
3240 |
aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
3241 |
item submenu:menu |
|
3242 |
]. |
|
3243 |
^ item |
|
3244 |
||
3245 |
! ! |
|
3246 |
||
407 | 3247 |
!MenuEditor::TreeView methodsFor:'drawing basics'! |
199 | 3248 |
|
853 | 3249 |
redrawLabelAt:x y:yTop index:anIndex |
407 | 3250 |
"draw text label assigned to a node at x y( center)" |
3251 |
||
1067 | 3252 |
|isSelected y0 x0 x1 w type item| |
199 | 3253 |
|
3254 |
item := (listOfNodes at:anIndex) contents. |
|
218 | 3255 |
type := item separatorType. |
199 | 3256 |
|
218 | 3257 |
type isNil ifTrue:[ |
853 | 3258 |
^ super redrawLabelAt:x y:yTop index:anIndex |
3259 |
]. |
|
3260 |
isSelected := self isInSelection:anIndex. |
|
854 | 3261 |
x0 := x. |
853 | 3262 |
|
3263 |
highlightMode == #label ifTrue:[ |
|
3264 |
x0 := x + 4. |
|
3265 |
||
3266 |
isSelected ifTrue:[ |
|
3267 |
w := 80 + 8. |
|
3268 |
self paint:hilightBgColor. |
|
3269 |
self fillRectangleX:x y:yTop width:w height:fontHeight. |
|
3270 |
] |
|
218 | 3271 |
] ifFalse:[ |
853 | 3272 |
w := 0. |
3273 |
]. |
|
3274 |
type == #blank ifFalse:[ |
|
3275 |
isSelected ifTrue:[self paint:hilightFgColor] |
|
3276 |
ifFalse:[self paint:fgColor]. |
|
3277 |
||
3278 |
x1 := x0 + 80. |
|
3279 |
y0 := yTop - 1 + (fontHeight // 2). |
|
3280 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
3281 |
||
3282 |
type == #double ifTrue:[ |
|
3283 |
y0 := y0 + 2. |
|
3284 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
3285 |
] |
|
3286 |
]. |
|
3287 |
||
3288 |
(isSelected and:[highlightMode == #label]) ifTrue:[ |
|
3289 |
self redrawSelFrameAtX:x y:yTop toX:(x + w) |
|
3290 |
]. |
|
3291 |
||
199 | 3292 |
! ! |
3293 |
||
407 | 3294 |
!MenuEditor::TreeView methodsFor:'event handling'! |
356 | 3295 |
|
3296 |
keyPress:key x:x y:y |
|
407 | 3297 |
"invoked if any key was pressed" |
3298 |
||
412 | 3299 |
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)> |
3300 |
||
686 | 3301 |
(key == #Delete or:[key == #BackSpace]) ifTrue: [^self doDelete]. |
748 | 3302 |
key == #Cut ifTrue:[^self doCut]. |
407 | 3303 |
key == #Copy ifTrue:[^self doCopy]. |
3304 |
key == #Paste ifTrue:[^self doPaste]. |
|
356 | 3305 |
|
412 | 3306 |
super keyPress:key x:x y:y |
356 | 3307 |
|
3308 |
! ! |
|
3309 |
||
407 | 3310 |
!MenuEditor::TreeView methodsFor:'initialization'! |
199 | 3311 |
|
3312 |
initialize |
|
734 | 3313 |
"initialize the tree view of the menu components" |
407 | 3314 |
|
199 | 3315 |
super initialize. |
275 | 3316 |
|
213 | 3317 |
self multipleSelectOk:true. |
407 | 3318 |
self showDirectoryIndicator: true. |
3319 |
self showDirectoryIndicatorForRoot: false. |
|
634 | 3320 |
self selectConditionBlock: [:i|self application askForItemModification]. |
412 | 3321 |
self validateDoubleClickBlock: [:node| node ~~ listOfNodes first]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3322 |
self model iconAction: [:aNode| aNode contents iconFor: aNode]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3323 |
self model labelAction: [:aNode| aNode contents treeViewLabel] |
199 | 3324 |
! ! |
3325 |
||
407 | 3326 |
!MenuEditor::TreeView methodsFor:'menus'! |
199 | 3327 |
|
1389 | 3328 |
XXdoDeleteSelectionBuffered:aBool |
3329 |
|appl idx| |
|
3330 |
||
3331 |
appl := self topView application. |
|
3332 |
||
3333 |
(appl hasValidSelection value and: [self askForItemModification]) ifFalse:[ |
|
3334 |
^ self |
|
3335 |
]. |
|
3336 |
aBool ifTrue:[ |
|
3337 |
self doCopy |
|
3338 |
]. |
|
3339 |
||
3340 |
idx := 10000. |
|
3341 |
self selection do:[:aNumber| idx := idx min:aNumber ]. |
|
3342 |
||
3343 |
self selectedNodesRemove. |
|
3344 |
self selection:(idx min:(self list size)). |
|
3345 |
self setModified. |
|
3346 |
||
3347 |
aBool ifTrue:[ |
|
3348 |
"/ must update copy&paste indication |
|
3349 |
appl updateAllToolInstances. |
|
3350 |
] |
|
3351 |
! |
|
3352 |
||
199 | 3353 |
doCopy |
912 | 3354 |
|clip| |
398 | 3355 |
|
213 | 3356 |
self hasSelection ifTrue:[ |
912 | 3357 |
self application clipboard:(clip := OrderedCollection new). |
3358 |
self selectionDo:[:i | clip add:((listOfNodes at:i) copy)]. |
|
748 | 3359 |
self topView application updateAllToolInstances. |
213 | 3360 |
] |
199 | 3361 |
! |
3362 |
||
3363 |
doCreateItem |
|
398 | 3364 |
|
557 | 3365 |
self addElement: (self nodeLabel:'Item') |
199 | 3366 |
! |
3367 |
||
218 | 3368 |
doCreateLink |
407 | 3369 |
|
218 | 3370 |
|node item| |
3371 |
||
557 | 3372 |
node := self nodeLabel:'Submenu Link'. |
218 | 3373 |
item := node contents. |
3374 |
item submenuChannel:#menuDefaultLink. |
|
398 | 3375 |
self addElement:node. |
3376 |
self setModified. |
|
218 | 3377 |
|
3378 |
||
3379 |
! |
|
3380 |
||
199 | 3381 |
doCreateMenu |
398 | 3382 |
|
199 | 3383 |
|node| |
557 | 3384 |
node := self nodeLabel:'Submenu'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3385 |
node parent: self selectedNode. |
557 | 3386 |
node add:(self nodeLabel:'Item 1'). |
213 | 3387 |
self addElement:node |
199 | 3388 |
! |
3389 |
||
3390 |
doCreateSep |
|
398 | 3391 |
|
213 | 3392 |
self addElement:(self nodeLabel:nil) |
199 | 3393 |
! |
3394 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3395 |
doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3396 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3397 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3398 |
node := self nodeLabel:'Edit'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3399 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3400 |
node add:(self nodeLabel:'Copy' selector:#copySelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3401 |
node add:(self nodeLabel:'Cut' selector:#cutSelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3402 |
node add:(self nodeLabel:'Paste' selector:#paste). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3403 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3404 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3405 |
"Created: / 23.8.1998 / 15:52:16 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3406 |
"Modified: / 23.8.1998 / 15:59:36 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3407 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3408 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3409 |
doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3410 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3411 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3412 |
node := self nodeLabel:'File'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3413 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3414 |
node add:(self nodeLabel:'New' selector:#menuNew). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3415 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3416 |
node add:(self nodeLabel:'Open...' selector:#menuOpen). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3417 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3418 |
node add:(self nodeLabel:'Save' selector:#menuSave). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3419 |
node add:(self nodeLabel:'Save As...' selector:#menuSaveAs). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3420 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3421 |
node add:(self nodeLabel:'Exit' selector:#closeRequest). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3422 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3423 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3424 |
"Created: / 23.8.1998 / 15:51:55 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3425 |
"Modified: / 23.8.1998 / 16:04:24 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3426 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3427 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3428 |
doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3429 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3430 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3431 |
node := self nodeLabel:'Help'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3432 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3433 |
node contents startGroup:#right. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3434 |
node add:(self nodeLabel:'Documentation' selector:#openDocumentation). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3435 |
node add:(self nodeLabel:'-'). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3436 |
node add:(self nodeLabel:'About this Application' selector:#openAboutThisApplication). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3437 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3438 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3439 |
"Created: / 23.8.1998 / 15:52:46 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3440 |
"Modified: / 23.8.1998 / 17:30:12 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3441 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3442 |
|
199 | 3443 |
doCut |
1389 | 3444 |
^ self doDeleteSelectionBuffered:true |
199 | 3445 |
! |
3446 |
||
686 | 3447 |
doDelete |
1389 | 3448 |
^ self doDeleteSelectionBuffered:false |
3449 |
! |
|
3450 |
||
3451 |
doDeleteSelectionBuffered:aBool |
|
3452 |
|appl nsel list item prnt| |
|
3453 |
||
3454 |
appl := self topView application. |
|
3455 |
||
3456 |
(appl hasValidSelection value and: [self askForItemModification]) ifFalse:[ |
|
3457 |
^ self |
|
3458 |
]. |
|
3459 |
aBool ifTrue:[ |
|
3460 |
self doCopy |
|
3461 |
]. |
|
3462 |
list := self list. |
|
3463 |
nsel := list size. |
|
3464 |
self selection do:[:aNumber| nsel := nsel min:aNumber ]. |
|
3465 |
||
3466 |
( (item := list at:nsel ifAbsent:nil) notNil |
|
3467 |
and:[(prnt := item parent) notNil |
|
3468 |
and:[prnt children last == item]] |
|
3469 |
) ifTrue:[ |
|
3470 |
nsel := nsel - 1 |
|
3471 |
]. |
|
3472 |
||
3473 |
self selectedNodesRemove. |
|
3474 |
self selection:(nsel min:(list size)). |
|
3475 |
self setModified. |
|
3476 |
||
3477 |
aBool ifTrue:[ |
|
3478 |
"/ must update copy&paste indication |
|
3479 |
appl updateAllToolInstances. |
|
686 | 3480 |
] |
3481 |
! |
|
3482 |
||
199 | 3483 |
doPaste |
912 | 3484 |
|clip| |
3485 |
||
3486 |
clip := self application clipboard. |
|
3487 |
(clip notNil and:[self selectedNode notNil]) ifTrue:[ |
|
3488 |
self addElement:(clip collect:[:el| el copy]) |
|
220 | 3489 |
]. |
199 | 3490 |
! ! |
3491 |
||
407 | 3492 |
!MenuEditor::TreeView methodsFor:'private'! |
199 | 3493 |
|
557 | 3494 |
addElement: aNode |
407 | 3495 |
"add something after selection" |
3496 |
||
1104 | 3497 |
|label sel| |
3498 |
||
3499 |
self askForItemModification ifTrue:[ |
|
3500 |
self selectedNodeAdd:aNode. |
|
3501 |
(aNode isCollection not |
|
3502 |
and: [aNode name = 'Item']) |
|
3503 |
ifTrue:[ |
|
3504 |
sel := self selectedNode. |
|
3505 |
label := aNode name , ' ', |
|
3506 |
(sel parent notNil |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3507 |
ifTrue: |
1104 | 3508 |
[ |
3509 |
(((sel children size = 0 |
|
3510 |
ifTrue: [sel parent children] |
|
3511 |
ifFalse: [sel children]) |
|
3512 |
select:[:node| |
|
3513 |
|lab| |
|
3514 |
lab := node contents label. |
|
3515 |
((node children size = 0) & |
|
3516 |
node contents submenuChannel isNil & |
|
3517 |
(lab ~= '-') & (lab ~= '=') & (lab ~= '')) |
|
3518 |
]) size) printString |
|
3519 |
] |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3520 |
ifFalse: ['1']). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3521 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3522 |
aNode name: label string asBoldText. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3523 |
aNode contents label: label string. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3524 |
]. |
603 | 3525 |
aNode isCollection ifFalse: [self selectNode: aNode] ifTrue: [self selection: (aNode collect: [:node| self indexOfNode: node])]. |
3526 |
self setModified. |
|
3527 |
] |
|
3528 |
! |
|
3529 |
||
634 | 3530 |
askForItemModification |
3531 |
||
3532 |
^self topView application askForItemModification |
|
199 | 3533 |
! |
3534 |
||
213 | 3535 |
nodeLabel:aLabel |
407 | 3536 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3537 |
^TreeItem new contents: ((MenuEditor::Item new label:aLabel) translateLabel:true) |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3538 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3539 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
398 | 3540 |
! |
3541 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3542 |
nodeLabel:aLabel selector:aSelector |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3543 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3544 |
^TreeItem new contents: (((MenuEditor::Item new label:aLabel) value:aSelector) translateLabel:true) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3545 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3546 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3547 |
"Created: / 23.8.1998 / 15:58:59 / cg" |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3548 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3549 |
|
557 | 3550 |
selectedNodeAdd:something |
3551 |
||
1104 | 3552 |
|node numChildren| |
557 | 3553 |
|
3554 |
something notNil ifTrue:[ |
|
3555 |
(node := self selectedNode) notNil ifTrue:[ |
|
1104 | 3556 |
numChildren := node children size. |
3557 |
||
557 | 3558 |
node parent notNil ifTrue:[ |
3559 |
node isCollapsable ifTrue:[ |
|
1104 | 3560 |
model add:something afterIndex:numChildren below:node |
557 | 3561 |
] ifFalse:[ |
3562 |
model add:something after:node |
|
3563 |
] |
|
3564 |
] ifFalse:[ |
|
1104 | 3565 |
model add:something afterIndex:numChildren below:(self root) |
557 | 3566 |
] |
3567 |
] |
|
3568 |
] |
|
3569 |
||
3570 |
||
3571 |
! |
|
3572 |
||
398 | 3573 |
setModified |
912 | 3574 |
|app| |
3575 |
||
3576 |
(app := self topView application) modified: true. |
|
3577 |
app updateChannels |
|
199 | 3578 |
! ! |
3579 |
||
3580 |
!MenuEditor class methodsFor:'documentation'! |
|
3581 |
||
3582 |
version |
|
3583 |
^ '$Header$' |
|
3584 |
! ! |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
3585 |
MenuEditor initialize! |