author | Claus Gittinger <cg@exept.de> |
Thu, 17 May 2001 13:09:50 +0200 | |
changeset 1468 | 94fcd912ef88 |
parent 1464 | 00fa8c2e3329 |
child 1472 | 283c85ffefe0 |
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 |
1468 | 199 |
'Add a new menu item.' |
548 | 200 |
|
201 |
#addMenuSeparator |
|
1468 | 202 |
'Add a new menu separator.' |
548 | 203 |
|
204 |
#addSubMenu |
|
1468 | 205 |
'Add a new sub menu.' |
548 | 206 |
|
207 |
#addSubMenuLink |
|
1468 | 208 |
'Add 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 |
1468 | 226 |
'Enable/disable button-like 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 |
1468 | 274 |
'Open a dialog to select and load a menu spec from a class.' |
548 | 275 |
|
276 |
#fileNew |
|
1468 | 277 |
'Create a new menu spec.' |
548 | 278 |
|
577 | 279 |
#filePickAMenu |
836 | 280 |
'Select a menu from an open view and read its specification' |
577 | 281 |
|
548 | 282 |
#fileSave |
1468 | 283 |
'Save 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 |
1468 | 286 |
'Open a dialog to save the menu spec (and the help spec, if modified).' |
943 | 287 |
|
1321 | 288 |
#hideMenuOnActivated |
1468 | 289 |
'If on, the menu hides itself after the item was activated.' |
1426 | 290 |
|
577 | 291 |
#imageImageAndLabel |
1468 | 292 |
'Toggle display of both image and textual label.' |
577 | 293 |
|
294 |
#imageImageEditor |
|
1468 | 295 |
'Open 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 |
1468 | 307 |
'Keep the linked menu after activation (do not destroy).' |
1378 | 308 |
|
1464 | 309 |
#showBusyCursorWhilePerforming |
1468 | 310 |
'If on, a busy cursor is shown while the items action is performing.' |
1464 | 311 |
|
312 |
#triggerOnDown |
|
1468 | 313 |
'If on, the items action is performed on mouse-button press (default is on button-release).' |
1464 | 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 |
|
1468 | 892 |
#activeHelpKey: #basicsSelector |
1155 | 893 |
) |
894 |
#(#InputFieldSpec |
|
895 |
#name: 'selectorField' |
|
896 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
897 |
#activeHelpKey: #basicsSelector |
|
898 |
#tabable: true |
|
899 |
#model: #label |
|
900 |
#group: #inputGroup |
|
901 |
#acceptOnReturn: true |
|
902 |
#acceptOnTab: true |
|
903 |
#acceptChannel: #acceptChannel |
|
904 |
#modifiedChannel: #modifiedChannel |
|
905 |
#acceptOnPointerLeave: false |
|
906 |
) |
|
907 |
) |
|
908 |
||
909 |
) |
|
199 | 910 |
) |
911 |
! |
|
912 |
||
218 | 913 |
basicsSeparatorSpec |
738 | 914 |
"This resource specification was automatically generated |
915 |
by the UIPainter of ST/X." |
|
916 |
||
917 |
"Do not manually edit this!! If it is corrupted, |
|
918 |
the UIPainter may not be able to read the specification." |
|
199 | 919 |
|
920 |
" |
|
218 | 921 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec |
922 |
MenuEditor new openInterface:#basicsSeparatorSpec |
|
199 | 923 |
" |
924 |
||
925 |
<resource: #canvas> |
|
926 |
||
1155 | 927 |
^ |
928 |
#(#FullSpec |
|
929 |
#name: #basicsSeparatorSpec |
|
930 |
#window: |
|
931 |
#(#WindowSpec |
|
932 |
#label: 'Basics Separator' |
|
933 |
#name: 'Basics Separator' |
|
934 |
#layout: #(#LayoutFrame 9 0 149 0 275 0 467 0) |
|
935 |
#level: 0 |
|
936 |
#min: #(#Point 10 10) |
|
937 |
#max: #(#Point 1160 870) |
|
938 |
#bounds: #(#Rectangle 9 149 276 468) |
|
939 |
#usePreferredExtent: false |
|
940 |
#returnIsOKInDialog: true |
|
941 |
#escapeIsCancelInDialog: true |
|
942 |
) |
|
943 |
#component: |
|
944 |
#(#SpecCollection |
|
945 |
#collection: #( |
|
946 |
#(#LabelSpec |
|
947 |
#label: 'Separator Type:' |
|
948 |
#name: 'separatorLabel' |
|
949 |
#layout: #(#AlignmentOrigin 127 0 26 0 1 0.5) |
|
950 |
#resizeForLabel: true |
|
951 |
#adjust: #right |
|
952 |
) |
|
953 |
#(#ComboListSpec |
|
954 |
#name: 'seperatorList' |
|
955 |
#layout: #(#LayoutFrame 132 0 15 0 -5 1.0 37 0) |
|
956 |
#activeHelpKey: #basicsSeparatorType |
|
957 |
#tabable: true |
|
958 |
#model: #seperatorSelection |
|
959 |
#useIndex: true |
|
960 |
) |
|
961 |
#(#LabelSpec |
|
962 |
#label: 'Visibility:' |
|
963 |
#name: 'visibilityLabel' |
|
964 |
#layout: #(#AlignmentOrigin 127 0 76 0 1 0.5) |
|
965 |
#resizeForLabel: true |
|
966 |
#adjust: #right |
|
967 |
) |
|
968 |
#(#InputFieldSpec |
|
969 |
#name: 'visibilityInputField' |
|
970 |
#layout: #(#LayoutFrame 132 0 65 0 -5 1.0 87 0) |
|
971 |
#activeHelpKey: #detailsVisibility |
|
972 |
#tabable: true |
|
973 |
#model: #isVisible |
|
974 |
#group: #inputGroup |
|
975 |
#type: #symbolOrNil |
|
976 |
#acceptOnReturn: true |
|
977 |
#acceptOnTab: true |
|
978 |
#acceptChannel: #acceptChannel |
|
979 |
#modifiedChannel: #modifiedChannel |
|
980 |
#acceptOnPointerLeave: false |
|
981 |
) |
|
982 |
) |
|
983 |
||
984 |
) |
|
199 | 985 |
) |
986 |
! |
|
987 |
||
988 |
detailsEditSpec |
|
738 | 989 |
"This resource specification was automatically generated |
990 |
by the UIPainter of ST/X." |
|
991 |
||
992 |
"Do not manually edit this!! If it is corrupted, |
|
993 |
the UIPainter may not be able to read the specification." |
|
199 | 994 |
|
995 |
" |
|
996 |
UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec |
|
997 |
MenuEditor new openInterface:#detailsEditSpec |
|
998 |
" |
|
999 |
||
1000 |
<resource: #canvas> |
|
1001 |
||
1155 | 1002 |
^ |
1003 |
#(#FullSpec |
|
1004 |
#name: #detailsEditSpec |
|
1005 |
#window: |
|
1006 |
#(#WindowSpec |
|
1007 |
#label: 'Details Edit' |
|
1008 |
#name: 'Details Edit' |
|
1009 |
#min: #(#Point 10 10) |
|
1010 |
#max: #(#Point 1280 1024) |
|
1365 | 1011 |
#bounds: #(#Rectangle 12 22 327 306) |
1155 | 1012 |
) |
1013 |
#component: |
|
1014 |
#(#SpecCollection |
|
1015 |
#collection: #( |
|
1016 |
#(#LabelSpec |
|
1017 |
#label: 'Accelerator:' |
|
1018 |
#name: 'shortcutKeyLabel' |
|
1019 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
1020 |
#activeHelpKey: #detailsAccelerator |
|
1021 |
#resizeForLabel: true |
|
1022 |
#adjust: #right |
|
1023 |
) |
|
1024 |
#(#InputFieldSpec |
|
1025 |
#name: 'shortcutKeyField' |
|
1026 |
#layout: #(#LayoutFrame 110 0 15 0 -5 1.0 37 0) |
|
1027 |
#activeHelpKey: #detailsAccelerator |
|
1028 |
#tabable: true |
|
1029 |
#model: #shortcutKey |
|
1244 | 1030 |
#group: #inputGroup4 |
1155 | 1031 |
#type: #symbolOrNil |
1032 |
#acceptOnReturn: true |
|
1033 |
#acceptOnTab: true |
|
1034 |
#acceptChannel: #acceptChannel |
|
1035 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1036 |
#acceptOnPointerLeave: false |
1155 | 1037 |
) |
1038 |
#(#LabelSpec |
|
1039 |
#label: 'Enabled:' |
|
1040 |
#name: 'enabledLabel' |
|
1041 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
1042 |
#activeHelpKey: #detailsEnabled |
|
1043 |
#resizeForLabel: true |
|
1044 |
#adjust: #right |
|
1045 |
) |
|
1046 |
#(#InputFieldSpec |
|
1047 |
#name: 'enabledField' |
|
1048 |
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0) |
|
1049 |
#activeHelpKey: #detailsEnabled |
|
1050 |
#tabable: true |
|
1051 |
#model: #enabled |
|
1244 | 1052 |
#group: #inputGroup4 |
1155 | 1053 |
#type: #symbolOrNil |
1054 |
#acceptOnReturn: true |
|
1055 |
#acceptOnTab: true |
|
1056 |
#acceptChannel: #acceptChannel |
|
1057 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1058 |
#acceptOnPointerLeave: false |
1155 | 1059 |
) |
1060 |
#(#LabelSpec |
|
1061 |
#label: 'Visibility:' |
|
1062 |
#name: 'visibilityLabel' |
|
1063 |
#layout: #(#AlignmentOrigin 107 0 76 0 1 0.5) |
|
1064 |
#activeHelpKey: #detailsVisibility |
|
1065 |
#resizeForLabel: true |
|
1066 |
#adjust: #right |
|
1067 |
) |
|
1068 |
#(#InputFieldSpec |
|
1069 |
#name: 'isVisibleInputField' |
|
1070 |
#layout: #(#LayoutFrame 110 0 65 0 -5 1.0 87 0) |
|
1071 |
#activeHelpKey: #detailsVisibility |
|
1072 |
#tabable: true |
|
1073 |
#model: #isVisible |
|
1244 | 1074 |
#group: #inputGroup4 |
1155 | 1075 |
#type: #symbolOrNil |
1076 |
#acceptOnReturn: true |
|
1077 |
#acceptOnTab: true |
|
1078 |
#acceptChannel: #acceptChannel |
|
1079 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1080 |
#acceptOnPointerLeave: false |
1081 |
) |
|
1082 |
#(#LabelSpec |
|
1083 |
#label: 'Aux Value' |
|
1084 |
#name: 'auxLabel' |
|
1085 |
#layout: #(#AlignmentOrigin 107 0 101 0 1 0.5) |
|
1086 |
#activeHelpKey: #detailsAuxValue |
|
1087 |
#translateLabel: true |
|
1088 |
#resizeForLabel: true |
|
1089 |
#adjust: #right |
|
1090 |
) |
|
1091 |
#(#InputFieldSpec |
|
1092 |
#name: 'auxInputField' |
|
1093 |
#layout: #(#LayoutFrame 110 0 90 0 -5 1.0 112 0) |
|
1094 |
#activeHelpKey: #detailsAuxValue |
|
1095 |
#tabable: true |
|
1096 |
#model: #auxValue |
|
1097 |
#group: #inputGroup4 |
|
1098 |
#type: #smalltalkObject |
|
1099 |
#acceptOnReturn: true |
|
1100 |
#acceptOnTab: true |
|
1101 |
#acceptChannel: #acceptChannel |
|
1102 |
#modifiedChannel: #modifiedChannel |
|
1103 |
#acceptOnPointerLeave: false |
|
1155 | 1104 |
) |
1105 |
#(#LabelSpec |
|
1106 |
#label: 'Start Group:' |
|
1107 |
#name: 'StartGroupLabel' |
|
1199 | 1108 |
#layout: #(#AlignmentOrigin 107 0 139 0 1 0.5) |
1155 | 1109 |
#activeHelpKey: #detailsStartGroup |
1110 |
#resizeForLabel: true |
|
1111 |
#adjust: #right |
|
1112 |
) |
|
1113 |
#(#PopUpListSpec |
|
1114 |
#label: 'PopUpList' |
|
1115 |
#name: 'StartGroupPopUp' |
|
1199 | 1116 |
#layout: #(#LayoutFrame 110 0 128 0 -5 1.0 150 0) |
1155 | 1117 |
#activeHelpKey: #detailsStartGroup |
1118 |
#tabable: true |
|
1119 |
#model: #startGroup |
|
1120 |
#menu: |
|
1264 | 1121 |
#(nil |
1155 | 1122 |
#right |
199 | 1123 |
) |
1155 | 1124 |
#useIndex: false |
1125 |
) |
|
1126 |
#(#LabelSpec |
|
1127 |
#label: 'Access Character Position:' |
|
1128 |
#name: 'accessCharLabel' |
|
1199 | 1129 |
#layout: #(#AlignmentOrigin 217 0 170 0 1 0.5) |
1155 | 1130 |
#activeHelpKey: #detailsAccessCharaterPosition |
1131 |
#resizeForLabel: true |
|
1132 |
#adjust: #right |
|
1133 |
) |
|
1134 |
#(#InputFieldSpec |
|
1135 |
#name: 'accessCharField' |
|
1199 | 1136 |
#layout: #(#LayoutFrame 220 0 159 0 -5 1.0 181 0) |
1155 | 1137 |
#activeHelpKey: #detailsAccessCharaterPosition |
1138 |
#tabable: true |
|
1139 |
#model: #accessCharacterPos |
|
1244 | 1140 |
#group: #inputGroup4 |
1155 | 1141 |
#type: #numberOrNil |
1142 |
#immediateAccept: false |
|
1143 |
#acceptOnReturn: true |
|
1144 |
#acceptOnTab: true |
|
1145 |
#acceptChannel: #acceptChannel |
|
1146 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1147 |
#acceptOnPointerLeave: false |
1155 | 1148 |
) |
1365 | 1149 |
#(#LabelSpec |
1150 |
#label: 'Font:' |
|
1151 |
#name: 'fontLabel' |
|
1152 |
#layout: #(#AlignmentOrigin 75 0 231 0 1 0.5) |
|
1153 |
#resizeForLabel: true |
|
1154 |
#adjust: #right |
|
1155 |
) |
|
1156 |
#(#FontMenuSpec |
|
1157 |
#attributes: |
|
1158 |
#(#tabable |
|
1159 |
true |
|
1160 |
) |
|
1161 |
#name: 'fontMenu' |
|
1162 |
#layout: #(#LayoutFrame 78 0 220 0 -5 1.0 242 0) |
|
1163 |
#activeHelpKey: #fontMenu |
|
1164 |
#model: #font |
|
1165 |
) |
|
1155 | 1166 |
) |
1167 |
||
1168 |
) |
|
199 | 1169 |
) |
1170 |
! |
|
1171 |
||
398 | 1172 |
imageEditSpec |
738 | 1173 |
"This resource specification was automatically generated |
1174 |
by the UIPainter of ST/X." |
|
1175 |
||
1176 |
"Do not manually edit this!! If it is corrupted, |
|
1177 |
the UIPainter may not be able to read the specification." |
|
199 | 1178 |
|
1179 |
" |
|
398 | 1180 |
UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec |
1181 |
MenuEditor new openInterface:#imageEditSpec |
|
199 | 1182 |
" |
1183 |
||
1184 |
<resource: #canvas> |
|
1185 |
||
1155 | 1186 |
^ |
1187 |
#(#FullSpec |
|
1188 |
#name: #imageEditSpec |
|
1189 |
#window: |
|
1190 |
#(#WindowSpec |
|
1191 |
#label: 'Image Item' |
|
1192 |
#name: 'Image Item' |
|
1193 |
#min: #(#Point 10 10) |
|
1194 |
#max: #(#Point 1280 1024) |
|
1464 | 1195 |
#bounds: #(#Rectangle 12 22 300 317) |
1155 | 1196 |
) |
1197 |
#component: |
|
1198 |
#(#SpecCollection |
|
1199 |
#collection: #( |
|
1200 |
#(#LabelSpec |
|
1201 |
#label: 'Retriever:' |
|
1202 |
#name: 'retrieverLabel' |
|
1203 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
1204 |
#activeHelpKey: #imageRetriever |
|
1205 |
#resizeForLabel: true |
|
1206 |
#adjust: #right |
|
1207 |
) |
|
1208 |
#(#ComboBoxSpec |
|
1209 |
#name: 'retrieverField' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1210 |
#layout: #(#LayoutFrame 110 0 15 0 -20 1.0 37 0) |
1155 | 1211 |
#activeHelpKey: #imageRetriever |
1212 |
#tabable: true |
|
1213 |
#model: #retriever |
|
1214 |
#type: #symbolOrNil |
|
1215 |
#acceptOnReturn: true |
|
1216 |
#acceptOnTab: true |
|
1217 |
#acceptChannel: #acceptChannel |
|
1218 |
#acceptOnPointerLeave: false |
|
1219 |
#comboList: #retrieverClassList |
|
1220 |
) |
|
1221 |
#(#LabelSpec |
|
1222 |
#label: 'Selector:' |
|
1223 |
#name: 'iconLabel' |
|
1224 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
1225 |
#activeHelpKey: #imageSelector |
|
1226 |
#resizeForLabel: true |
|
1227 |
#adjust: #right |
|
1228 |
) |
|
1229 |
#(#InputFieldSpec |
|
1230 |
#name: 'iconField' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1231 |
#layout: #(#LayoutFrame 110 0 40 0 -42 1.0 62 0) |
1155 | 1232 |
#activeHelpKey: #imageSelector |
1233 |
#tabable: true |
|
1234 |
#model: #icon |
|
1244 | 1235 |
#group: #inputGroup5 |
1155 | 1236 |
#type: #symbolOrNil |
1237 |
#acceptOnReturn: true |
|
1238 |
#acceptOnTab: true |
|
1239 |
#acceptChannel: #acceptChannel |
|
1240 |
#modifiedChannel: #modifiedChannel |
|
1241 |
#acceptOnPointerLeave: false |
|
1242 |
) |
|
1243 |
#(#ActionButtonSpec |
|
1301 | 1244 |
#label: '...' |
1245 |
#name: 'browseButton' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1246 |
#layout: #(#LayoutFrame -40 1 40 0 -20 1 62 0) |
1301 | 1247 |
#activeHelpKey: #browseResource |
1155 | 1248 |
#tabable: true |
1301 | 1249 |
#model: #doBrowseForImageResource |
1155 | 1250 |
) |
1464 | 1251 |
#(#SelectionInListModelViewSpec |
1252 |
#name: 'selectionOfImage' |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1253 |
#layout: #(#LayoutFrame 20 0.0 67 0 -20 1.0 -30 1.0) |
1155 | 1254 |
#activeHelpKey: #imageImageList |
1301 | 1255 |
#tabable: true |
1155 | 1256 |
#model: #selectionOfImage |
1257 |
#menu: #menuEditImage |
|
1258 |
#hasHorizontalScrollBar: true |
|
1259 |
#hasVerticalScrollBar: true |
|
1260 |
#miniScrollerHorizontal: true |
|
1464 | 1261 |
#listModel: #listOfImages |
1262 |
#useIndex: false |
|
1263 |
#highlightMode: #line |
|
1155 | 1264 |
#doubleClickSelector: #doEditImage |
1265 |
#valueChangeSelector: #imageSelected |
|
1266 |
) |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1267 |
#(#ViewSpec |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1268 |
#name: 'Box1' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1269 |
#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
|
1270 |
#level: 0 |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1271 |
#component: |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1272 |
#(#SpecCollection |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1273 |
#collection: #( |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1274 |
#(#CheckBoxSpec |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1275 |
#label: 'Image & Label' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1276 |
#name: 'iconAndLabelCheckBox' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1277 |
#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
|
1278 |
#activeHelpKey: #imageImageAndLabel |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1279 |
#tabable: true |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1280 |
#model: #iconAndLabel |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1281 |
) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1282 |
#(#ActionButtonSpec |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1283 |
#label: 'Image Editor' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1284 |
#name: 'imageEditorButton' |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1285 |
#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
|
1286 |
#activeHelpKey: #imageImageEditor |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1287 |
#tabable: true |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1288 |
#model: #doEditImage |
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 |
) |
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
1291 |
|
1301 | 1292 |
) |
1155 | 1293 |
) |
1294 |
) |
|
1295 |
||
1296 |
) |
|
199 | 1297 |
) |
525 | 1298 |
! |
1299 |
||
1300 |
windowSpec |
|
738 | 1301 |
"This resource specification was automatically generated |
1302 |
by the UIPainter of ST/X." |
|
1303 |
||
1304 |
"Do not manually edit this!! If it is corrupted, |
|
1305 |
the UIPainter may not be able to read the specification." |
|
525 | 1306 |
|
1307 |
" |
|
1308 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
1309 |
MenuEditor new openInterface:#windowSpec |
|
738 | 1310 |
MenuEditor open |
525 | 1311 |
" |
1312 |
||
1313 |
<resource: #canvas> |
|
1314 |
||
1244 | 1315 |
^ |
1316 |
#(#FullSpec |
|
1317 |
#name: #windowSpec |
|
1318 |
#window: |
|
1319 |
#(#WindowSpec |
|
1320 |
#label: 'Menu Editor' |
|
1321 |
#name: 'Menu Editor' |
|
1322 |
#min: #(#Point 550 440) |
|
1323 |
#max: #(#Point 1152 900) |
|
1349
47ccfd0fac75
added 'showBusyCursorWhileActive' attribute
Claus Gittinger <cg@exept.de>
parents:
1348
diff
changeset
|
1324 |
#bounds: #(#Rectangle 61 493 618 974) |
1244 | 1325 |
#menu: #menu |
1249 | 1326 |
#returnIsOKInDialog: false |
1327 |
#escapeIsCancelInDialog: false |
|
1244 | 1328 |
) |
1329 |
#component: |
|
1330 |
#(#SpecCollection |
|
1331 |
#collection: #( |
|
1332 |
#(#MenuPanelSpec |
|
1333 |
#name: 'menuToolbarView' |
|
1334 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1322 | 1335 |
#tabable: true |
1244 | 1336 |
#menu: #menuToolbar |
1337 |
#showSeparatingLines: true |
|
1338 |
) |
|
1339 |
#(#VariableHorizontalPanelSpec |
|
1340 |
#name: 'VariableHorizontalPanel' |
|
1341 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1342 |
#component: |
|
1343 |
#(#SpecCollection |
|
1344 |
#collection: #( |
|
1345 |
#(#ArbitraryComponentSpec |
|
1346 |
#name: 'TreeView' |
|
1347 |
#menu: #menuEdit |
|
1348 |
#hasHorizontalScrollBar: true |
|
1349 |
#hasVerticalScrollBar: true |
|
1350 |
#hasBorder: false |
|
1351 |
#component: #treeView |
|
1352 |
) |
|
1353 |
#(#ViewSpec |
|
1354 |
#name: 'Box' |
|
1355 |
#level: -1 |
|
703 | 1356 |
#component: |
1244 | 1357 |
#(#SpecCollection |
1358 |
#collection: #( |
|
1359 |
#(#NoteBookViewSpec |
|
1360 |
#name: 'NoteBook' |
|
1361 |
#layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
|
1362 |
#enableChannel: #hasAnySingleSelection |
|
1363 |
#tabable: true |
|
1364 |
#model: #tabModel |
|
1365 |
#menu: #tabList |
|
1366 |
#useIndex: true |
|
1367 |
#canvas: #tabCanvasHolder |
|
1368 |
#keepCanvasAlive: true |
|
1369 |
) |
|
1370 |
#(#UISubSpecification |
|
1371 |
#name: 'SubSpecification' |
|
1372 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1373 |
#majorKey: #ToolApplicationModel |
|
1374 |
#minorKey: #windowSpecForCommit |
|
525 | 1375 |
) |
1244 | 1376 |
) |
1377 |
||
525 | 1378 |
) |
1244 | 1379 |
) |
1380 |
) |
|
1381 |
||
525 | 1382 |
) |
1244 | 1383 |
#handles: #(#Any 0.346499 1.0) |
1384 |
) |
|
1385 |
#(#UISubSpecification |
|
1386 |
#name: 'InfoBarSubSpec' |
|
1387 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1388 |
#majorKey: #ToolApplicationModel |
|
1389 |
#minorKey: #windowSpecForInfoBar |
|
1390 |
) |
|
1391 |
) |
|
1392 |
||
1393 |
) |
|
525 | 1394 |
) |
1395 |
! ! |
|
1396 |
||
1397 |
!MenuEditor class methodsFor:'menu specs'! |
|
1398 |
||
1399 |
menu |
|
738 | 1400 |
"This resource specification was automatically generated |
1401 |
by the MenuEditor of ST/X." |
|
1402 |
||
1403 |
"Do not manually edit this!! If it is corrupted, |
|
1404 |
the MenuEditor may not be able to read the specification." |
|
525 | 1405 |
|
1406 |
" |
|
1407 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
1408 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
1409 |
" |
|
1410 |
||
1411 |
<resource: #menu> |
|
1412 |
||
1413 |
^ |
|
1414 |
||
1415 |
#(#Menu |
|
1416 |
||
1417 |
#( |
|
1418 |
#(#MenuItem |
|
686 | 1419 |
#label: 'About' |
836 | 1420 |
#translateLabel: true |
686 | 1421 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
1422 |
#submenuChannel: #menuAbout |
|
525 | 1423 |
) |
1424 |
#(#MenuItem |
|
686 | 1425 |
#label: 'File' |
1426 |
#activeHelpKey: #file |
|
836 | 1427 |
#translateLabel: true |
686 | 1428 |
#submenu: |
525 | 1429 |
#(#Menu |
1430 |
||
1431 |
#( |
|
1432 |
#(#MenuItem |
|
686 | 1433 |
#label: 'New' |
1434 |
#value: #doNew |
|
836 | 1435 |
#translateLabel: true |
686 | 1436 |
#activeHelpKey: #fileNew |
525 | 1437 |
) |
1438 |
#(#MenuItem |
|
686 | 1439 |
#label: '-' |
525 | 1440 |
) |
1441 |
#(#MenuItem |
|
686 | 1442 |
#label: 'Load...' |
1443 |
#translateLabel: true |
|
1444 |
#value: #doLoad |
|
1445 |
#activeHelpKey: #fileLoad |
|
525 | 1446 |
) |
1447 |
#(#MenuItem |
|
686 | 1448 |
#label: '-' |
525 | 1449 |
) |
1450 |
#(#MenuItem |
|
686 | 1451 |
#label: 'Save' |
836 | 1452 |
#translateLabel: true |
686 | 1453 |
#value: #doSave |
1454 |
#activeHelpKey: #fileSave |
|
525 | 1455 |
) |
1456 |
#(#MenuItem |
|
686 | 1457 |
#label: 'Save As...' |
836 | 1458 |
#translateLabel: true |
686 | 1459 |
#value: #doSaveAs |
1460 |
#activeHelpKey: #fileSaveAs |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1461 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1462 |
#(#MenuItem |
686 | 1463 |
#label: '-' |
525 | 1464 |
) |
1465 |
#(#MenuItem |
|
686 | 1466 |
#label: 'Pick A Menu...' |
836 | 1467 |
#translateLabel: true |
686 | 1468 |
#value: #doPickAMenu |
1469 |
#activeHelpKey: #filePickAMenu |
|
525 | 1470 |
) |
1471 |
#(#MenuItem |
|
686 | 1472 |
#label: '-' |
525 | 1473 |
) |
1474 |
#(#MenuItem |
|
686 | 1475 |
#label: 'Browse Class' |
836 | 1476 |
#translateLabel: true |
686 | 1477 |
#value: #doBrowseClass |
1478 |
#activeHelpKey: #fileBrowseClass |
|
525 | 1479 |
) |
1480 |
#(#MenuItem |
|
686 | 1481 |
#label: '-' |
525 | 1482 |
) |
1483 |
#(#MenuItem |
|
686 | 1484 |
#label: 'Exit' |
1485 |
#translateLabel: true |
|
1486 |
#value: #closeRequest |
|
1487 |
#activeHelpKey: #fileExit |
|
525 | 1488 |
) |
1489 |
) nil |
|
1490 |
nil |
|
1491 |
) |
|
1492 |
) |
|
1493 |
#(#MenuItem |
|
686 | 1494 |
#label: 'Edit' |
1495 |
#activeHelpKey: #edit |
|
836 | 1496 |
#translateLabel: true |
686 | 1497 |
#submenuChannel: #menuEdit |
525 | 1498 |
) |
1499 |
#(#MenuItem |
|
686 | 1500 |
#label: 'Add' |
1501 |
#activeHelpKey: #add |
|
836 | 1502 |
#translateLabel: true |
686 | 1503 |
#submenuChannel: #menuAdd |
525 | 1504 |
) |
1505 |
#(#MenuItem |
|
686 | 1506 |
#label: 'Test' |
1507 |
#activeHelpKey: #test |
|
836 | 1508 |
#translateLabel: true |
686 | 1509 |
#submenuChannel: #submenuTest |
525 | 1510 |
) |
1033
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1511 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1512 |
"/ #label: 'Settings' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1513 |
"/ #submenu: |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1514 |
"/ #(#Menu |
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 |
"/ #( |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1517 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1518 |
"/ #label: 'Fonts' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1519 |
"/ #translateLabel: true |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1520 |
"/ #submenuChannel: #menuFont |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1521 |
"/ ) |
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 |
"/ nil |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1524 |
"/ ) |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1525 |
"/ ) |
738 | 1526 |
#(#MenuItem |
748 | 1527 |
#label: 'History' |
1528 |
#activeHelpKey: #history |
|
836 | 1529 |
#translateLabel: true |
748 | 1530 |
#submenuChannel: #menuHistory |
1531 |
) |
|
1532 |
#(#MenuItem |
|
686 | 1533 |
#label: 'Help' |
836 | 1534 |
#translateLabel: true |
686 | 1535 |
#startGroup: #right |
748 | 1536 |
#submenu: |
1537 |
#(#Menu |
|
1538 |
||
1539 |
#( |
|
1540 |
#(#MenuItem |
|
1541 |
#label: 'Documentation' |
|
1542 |
#value: #openHTMLDocument: |
|
836 | 1543 |
#translateLabel: true |
748 | 1544 |
#activeHelpKey: #helpTutorial |
764 | 1545 |
#argument: 'tools/uipainter/MenuEditor.html' |
748 | 1546 |
) |
1547 |
#(#MenuItem |
|
1548 |
#label: '-' |
|
1549 |
) |
|
1550 |
#(#MenuItem |
|
1551 |
#label: 'Help Tool' |
|
1552 |
#value: #openHTMLDocument: |
|
836 | 1553 |
#translateLabel: true |
748 | 1554 |
#activeHelpKey: #helpHelpTool |
1555 |
#argument: 'tools/uipainter/HelpTool.html' |
|
1556 |
) |
|
1557 |
#(#MenuItem |
|
1558 |
#label: '-' |
|
1559 |
) |
|
1560 |
#(#MenuItem |
|
1561 |
#label: 'Show Help Texts' |
|
836 | 1562 |
#translateLabel: true |
748 | 1563 |
#activeHelpKey: #helpShowHelp |
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1564 |
#indication: #showingHelp: |
748 | 1565 |
) |
1566 |
) nil |
|
1567 |
nil |
|
1568 |
) |
|
525 | 1569 |
) |
1570 |
) nil |
|
1571 |
nil |
|
1572 |
) |
|
836 | 1573 |
|
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1574 |
"Modified: / 31.7.1998 / 18:19:47 / cg" |
525 | 1575 |
! |
1576 |
||
1577 |
menuAdd |
|
738 | 1578 |
"This resource specification was automatically generated |
1579 |
by the MenuEditor of ST/X." |
|
1580 |
||
1581 |
"Do not manually edit this!! If it is corrupted, |
|
1582 |
the MenuEditor may not be able to read the specification." |
|
525 | 1583 |
|
1584 |
" |
|
1585 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd |
|
1586 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp |
|
1587 |
" |
|
1588 |
||
1589 |
<resource: #menu> |
|
1590 |
||
1591 |
^ |
|
1592 |
||
1593 |
#(#Menu |
|
1594 |
||
1595 |
#( |
|
1596 |
#(#MenuItem |
|
703 | 1597 |
#label: 'Menu Item' |
836 | 1598 |
#translateLabel: true |
703 | 1599 |
#value: #doCreateItem |
1600 |
#activeHelpKey: #addMenuItem |
|
1601 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') |
|
525 | 1602 |
) |
1603 |
#(#MenuItem |
|
703 | 1604 |
#label: 'Menu Separator' |
836 | 1605 |
#translateLabel: true |
703 | 1606 |
#value: #doCreateSep |
1607 |
#activeHelpKey: #addMenuSeparator |
|
1608 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') |
|
525 | 1609 |
) |
1610 |
#(#MenuItem |
|
703 | 1611 |
#label: '-' |
525 | 1612 |
) |
1613 |
#(#MenuItem |
|
703 | 1614 |
#label: 'Submenu' |
836 | 1615 |
#translateLabel: true |
703 | 1616 |
#value: #doCreateMenu |
1617 |
#activeHelpKey: #addSubMenu |
|
1618 |
#labelImage: #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') |
|
525 | 1619 |
) |
1620 |
#(#MenuItem |
|
703 | 1621 |
#label: 'Submenu Link' |
836 | 1622 |
#translateLabel: true |
703 | 1623 |
#value: #doCreateLink |
1624 |
#activeHelpKey: #addSubMenuLink |
|
1625 |
#labelImage: #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Submenu Link') |
|
525 | 1626 |
) |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1627 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1628 |
#label: '-' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1629 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1630 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1631 |
#label: 'Standard Submenu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1632 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1633 |
#submenu: |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1634 |
#(#Menu |
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 |
#( |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1637 |
#(#MenuItem |
1425 | 1638 |
#label: 'Standard Menu: File' |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1639 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1640 |
#value: #doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1641 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1642 |
#(#MenuItem |
1425 | 1643 |
#label: 'Standard Menu: Edit' |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1644 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1645 |
#value: #doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1646 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1647 |
#(#MenuItem |
1425 | 1648 |
#label: 'Standard Menu: Help' |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1649 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1650 |
#value: #doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1651 |
) |
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 |
nil |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1654 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1655 |
) |
525 | 1656 |
) nil |
1657 |
nil |
|
1658 |
) |
|
836 | 1659 |
|
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1660 |
"Modified: / 23.8.1998 / 15:48:21 / cg" |
525 | 1661 |
! |
1662 |
||
1663 |
menuDefaultLink |
|
738 | 1664 |
"This resource specification was automatically generated |
1665 |
by the MenuEditor of ST/X." |
|
1666 |
||
1667 |
"Do not manually edit this!! If it is corrupted, |
|
1668 |
the MenuEditor may not be able to read the specification." |
|
525 | 1669 |
|
1670 |
" |
|
1671 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
1672 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
1673 |
" |
|
1674 |
||
1675 |
<resource: #menu> |
|
1676 |
||
1677 |
^ |
|
738 | 1678 |
|
525 | 1679 |
#(#Menu |
738 | 1680 |
|
525 | 1681 |
#( |
1682 |
#(#MenuItem |
|
738 | 1683 |
#'label:' '!!!! derives from application !!!!' |
525 | 1684 |
) |
1685 |
) nil |
|
1686 |
nil |
|
1687 |
) |
|
1688 |
! |
|
1689 |
||
1690 |
menuEdit |
|
738 | 1691 |
"This resource specification was automatically generated |
1692 |
by the MenuEditor of ST/X." |
|
1693 |
||
1694 |
"Do not manually edit this!! If it is corrupted, |
|
1695 |
the MenuEditor may not be able to read the specification." |
|
525 | 1696 |
|
1697 |
" |
|
1698 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit |
|
1699 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp |
|
1700 |
" |
|
1701 |
||
1702 |
<resource: #menu> |
|
1703 |
||
1704 |
^ |
|
1705 |
||
1706 |
#(#Menu |
|
1707 |
||
1708 |
#( |
|
1709 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1710 |
#label: 'Cut' |
882 | 1711 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1712 |
#value: #doCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1713 |
#activeHelpKey: #editCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1714 |
#enabled: #hasValidSelection |
525 | 1715 |
) |
1716 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1717 |
#label: 'Copy' |
882 | 1718 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1719 |
#value: #doCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1720 |
#activeHelpKey: #editCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1721 |
#enabled: #hasValidSelection |
525 | 1722 |
) |
1723 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1724 |
#label: 'Paste' |
882 | 1725 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1726 |
#value: #doPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1727 |
#activeHelpKey: #editPaste |
738 | 1728 |
#enabled: #valueOfCanPaste |
525 | 1729 |
) |
1730 |
#(#MenuItem |
|
686 | 1731 |
#label: 'Delete' |
882 | 1732 |
#translateLabel: true |
686 | 1733 |
#value: #doDelete |
1734 |
#activeHelpKey: #editDelete |
|
1735 |
#enabled: #hasValidSelection |
|
1736 |
) |
|
1737 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1738 |
#label: '-' |
525 | 1739 |
) |
1740 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1741 |
#label: 'Move Up' |
882 | 1742 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1743 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1744 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1745 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1746 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up') |
525 | 1747 |
) |
1748 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1749 |
#label: 'Move Down' |
882 | 1750 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1751 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1752 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1753 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1754 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down') |
525 | 1755 |
) |
1756 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1757 |
#label: 'Move In' |
882 | 1758 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1759 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1760 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1761 |
#enabled: #valueOfEnableMovingIn |
882 | 1762 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In') |
525 | 1763 |
) |
1764 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1765 |
#label: 'Move Out' |
882 | 1766 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1767 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1768 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1769 |
#enabled: #valueOfEnableMovingOut |
882 | 1770 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out') |
525 | 1771 |
) |
1772 |
) nil |
|
1773 |
nil |
|
1774 |
) |
|
1775 |
! |
|
1776 |
||
888 | 1777 |
menuEditImage |
1778 |
"This resource specification was automatically generated |
|
1779 |
by the MenuEditor of ST/X." |
|
1780 |
||
1781 |
"Do not manually edit this!! If it is corrupted, |
|
1782 |
the MenuEditor may not be able to read the specification." |
|
1783 |
||
1784 |
" |
|
1785 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEditImage |
|
1786 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEditImage)) startUp |
|
1787 |
" |
|
1788 |
||
1789 |
<resource: #menu> |
|
1790 |
||
1791 |
^ |
|
1792 |
||
1793 |
#(#Menu |
|
1794 |
||
1795 |
#( |
|
1796 |
#(#MenuItem |
|
1797 |
#label: 'Edit' |
|
1798 |
#translateLabel: true |
|
1799 |
#value: #doEditImage |
|
1800 |
#activeHelpKey: #editCut |
|
1801 |
#enabled: #hasValidSelection |
|
1802 |
) |
|
1803 |
#(#MenuItem |
|
1804 |
#label: 'Remove' |
|
1805 |
#translateLabel: true |
|
1806 |
#value: #doRemoveImage |
|
1807 |
#activeHelpKey: #editCopy |
|
1808 |
#enabled: #hasValidSelection |
|
1809 |
) |
|
1810 |
) nil |
|
1811 |
nil |
|
1812 |
) |
|
1813 |
! |
|
1814 |
||
525 | 1815 |
menuToolbar |
738 | 1816 |
"This resource specification was automatically generated |
1817 |
by the MenuEditor of ST/X." |
|
1818 |
||
1819 |
"Do not manually edit this!! If it is corrupted, |
|
1820 |
the MenuEditor may not be able to read the specification." |
|
525 | 1821 |
|
1822 |
" |
|
1823 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar |
|
1824 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp |
|
1825 |
" |
|
1826 |
||
1827 |
<resource: #menu> |
|
1828 |
||
1322 | 1829 |
^ |
1830 |
#(#Menu |
|
1831 |
#( |
|
1832 |
#(#MenuItem |
|
1833 |
#label: 'New' |
|
1834 |
#isButton: true |
|
1835 |
#value: #doNew |
|
1836 |
#activeHelpKey: #fileNew |
|
1837 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
|
1838 |
) |
|
1839 |
#(#MenuItem |
|
1840 |
#label: 'Load' |
|
1841 |
#isButton: true |
|
1842 |
#value: #doLoad |
|
1843 |
#activeHelpKey: #fileLoad |
|
1844 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
|
1845 |
) |
|
1846 |
#(#MenuItem |
|
1847 |
#label: 'Save' |
|
1848 |
#isButton: true |
|
1849 |
#value: #doSave |
|
1850 |
#activeHelpKey: #fileSave |
|
1851 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
|
1852 |
) |
|
1853 |
#(#MenuItem |
|
1854 |
#label: '' |
|
1855 |
) |
|
1856 |
#(#MenuItem |
|
1857 |
#label: 'Cut' |
|
1858 |
#isButton: true |
|
1859 |
#value: #doCut |
|
1860 |
#activeHelpKey: #editCut |
|
1861 |
#enabled: #hasValidSelection |
|
1862 |
#labelImage: #(#ResourceRetriever #Icon #cutIcon) |
|
1863 |
) |
|
1864 |
#(#MenuItem |
|
1865 |
#label: 'Copy' |
|
1866 |
#isButton: true |
|
1867 |
#value: #doCopy |
|
1868 |
#activeHelpKey: #editCopy |
|
1869 |
#enabled: #hasValidSelection |
|
1870 |
#labelImage: #(#ResourceRetriever #Icon #copyIcon) |
|
1871 |
) |
|
1872 |
#(#MenuItem |
|
1873 |
#label: 'Paste' |
|
1874 |
#isButton: true |
|
1875 |
#value: #doPaste |
|
1876 |
#activeHelpKey: #editPaste |
|
1877 |
#enabled: #valueOfCanPaste |
|
1878 |
#labelImage: #(#ResourceRetriever #Icon #pasteIcon) |
|
1879 |
) |
|
1880 |
#(#MenuItem |
|
1881 |
#label: 'Delete' |
|
1882 |
#isButton: true |
|
1883 |
#value: #doDelete |
|
1884 |
#activeHelpKey: #editDelete |
|
1885 |
#enabled: #hasValidSelection |
|
1886 |
#labelImage: #(#ResourceRetriever #Icon #deleteIcon) |
|
1887 |
) |
|
1888 |
#(#MenuItem |
|
1889 |
#label: '' |
|
1890 |
) |
|
1891 |
#(#MenuItem |
|
1892 |
#label: 'Add Item' |
|
1893 |
#isButton: true |
|
1894 |
#value: #doCreateItem |
|
1895 |
#activeHelpKey: #addMenuItem |
|
1896 |
#enabled: #hasAnySingleSelection |
|
1897 |
#labelImage: #(#ResourceRetriever nil #menuItemImage) |
|
1898 |
) |
|
1899 |
#(#MenuItem |
|
1900 |
#label: 'Add Separator' |
|
1901 |
#isButton: true |
|
1902 |
#value: #doCreateSep |
|
1903 |
#activeHelpKey: #addMenuSeparator |
|
1904 |
#enabled: #hasAnySingleSelection |
|
1905 |
#labelImage: #(#ResourceRetriever nil #menuSeparatorImage) |
|
1906 |
) |
|
1907 |
#(#MenuItem |
|
1908 |
#label: 'Add Submenu' |
|
1909 |
#isButton: true |
|
1910 |
#value: #doCreateMenu |
|
1911 |
#activeHelpKey: #addSubMenu |
|
1912 |
#enabled: #hasAnySingleSelection |
|
1913 |
#labelImage: #(#ResourceRetriever nil #submenuImage) |
|
1914 |
) |
|
1915 |
#(#MenuItem |
|
1916 |
#label: 'Add Linked Submenu' |
|
1917 |
#isButton: true |
|
1918 |
#value: #doCreateLink |
|
1919 |
#activeHelpKey: #addSubMenuLink |
|
1920 |
#enabled: #hasAnySingleSelection |
|
1921 |
#labelImage: #(#ResourceRetriever nil #linkSubmenuImage) |
|
1922 |
) |
|
1923 |
#(#MenuItem |
|
1924 |
#label: '' |
|
1925 |
) |
|
1926 |
#(#MenuItem |
|
1927 |
#label: 'Move Up' |
|
1928 |
#isButton: true |
|
1929 |
#value: #doStepUp |
|
1930 |
#activeHelpKey: #editMoveUp |
|
1931 |
#enabled: #valueOfEnableMovingUpOrDown |
|
1932 |
#labelImage: #(#ResourceRetriever #Icon #upIcon) |
|
1933 |
) |
|
1934 |
#(#MenuItem |
|
1935 |
#label: 'Move Down' |
|
1936 |
#isButton: true |
|
1937 |
#value: #doStepDown |
|
1938 |
#activeHelpKey: #editMoveDown |
|
1939 |
#enabled: #valueOfEnableMovingUpOrDown |
|
1940 |
#labelImage: #(#ResourceRetriever #Icon #downIcon) |
|
1941 |
) |
|
1942 |
#(#MenuItem |
|
1943 |
#label: 'Move In' |
|
1944 |
#isButton: true |
|
1945 |
#value: #doStepIn |
|
1946 |
#activeHelpKey: #editMoveIn |
|
1947 |
#enabled: #valueOfEnableMovingIn |
|
1948 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon) |
|
1949 |
) |
|
1950 |
#(#MenuItem |
|
1468 | 1951 |
#label: 'Move In Above' |
1952 |
#isButton: true |
|
1953 |
#value: #doStepInAbove |
|
1954 |
#activeHelpKey: #editMoveInAbove |
|
1955 |
#enabled: #valueOfEnableMovingInAbove |
|
1956 |
#labelImage: #(#ResourceRetriever #Icon #upRightIcon) |
|
1957 |
) |
|
1958 |
#(#MenuItem |
|
1322 | 1959 |
#label: 'Move Out' |
1960 |
#isButton: true |
|
1961 |
#value: #doStepOut |
|
1962 |
#activeHelpKey: #editMoveOut |
|
1963 |
#enabled: #valueOfEnableMovingOut |
|
1964 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon) |
|
1965 |
) |
|
1966 |
) |
|
1967 |
nil |
|
1968 |
nil |
|
525 | 1969 |
) |
1970 |
! ! |
|
1971 |
||
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1972 |
!MenuEditor class methodsFor:'queries'! |
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 |
getAllImageSelectorsFrom: aClass |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1975 |
"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
|
1976 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1977 |
|iconClass imageMethodSelectors r| |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1978 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1979 |
aClass isNil ifTrue:[ |
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 |
]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1982 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1983 |
aClass isSymbol |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1984 |
ifTrue: [iconClass := Smalltalk at: aClass] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1985 |
ifFalse: [iconClass := aClass]. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1986 |
aClass isBehavior ifFalse:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1987 |
^ #() |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1988 |
]. |
971
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 |
imageMethodSelectors := OrderedCollection new. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1991 |
|
1407 | 1992 |
iconClass withAllSuperclassesDo:[:cls | |
1372 | 1993 |
cls class selectorsAndMethodsDo:[:sel :m | |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1994 |
((r := m resourceType) == #image |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1995 |
or:[r == #programImage]) ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1996 |
imageMethodSelectors add:sel |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1997 |
] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1998 |
] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1999 |
]. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2000 |
|
1454 | 2001 |
^ imageMethodSelectors sort |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2002 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2003 |
"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
|
2004 |
"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
|
2005 |
! ! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2006 |
|
525 | 2007 |
!MenuEditor class methodsFor:'slices'! |
2008 |
||
2009 |
slicesItem |
|
2010 |
^#( |
|
2011 |
(Basics basicsItemSpec) |
|
2012 |
(Details detailsEditSpec) |
|
2013 |
(Image imageEditSpec) |
|
2014 |
) |
|
2015 |
||
2016 |
! |
|
2017 |
||
2018 |
slicesLink |
|
2019 |
^#( |
|
2020 |
(Basics basicsLinkSpec) |
|
2021 |
(Details detailsEditSpec) |
|
2022 |
(Image imageEditSpec) |
|
2023 |
) |
|
2024 |
||
2025 |
! |
|
2026 |
||
2027 |
slicesMenu |
|
2028 |
^#( |
|
2029 |
(Basics basicsMenuSpec) |
|
2030 |
(Details detailsEditSpec) |
|
2031 |
(Image imageEditSpec) |
|
2032 |
) |
|
2033 |
||
2034 |
! |
|
2035 |
||
2036 |
slicesRootMenu |
|
2037 |
^#( |
|
2038 |
(Basics basicsRootSpec) |
|
2039 |
) |
|
2040 |
||
2041 |
! |
|
2042 |
||
2043 |
slicesSeparatorMenu |
|
2044 |
^#( |
|
2045 |
(Basics basicsSeparatorSpec) |
|
2046 |
) |
|
2047 |
||
199 | 2048 |
! ! |
2049 |
||
2050 |
!MenuEditor methodsFor:'accessing'! |
|
2051 |
||
218 | 2052 |
submenuTest |
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2053 |
"return the submenu assigned to item test; |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2054 |
this is dynamically constructed, to reflect the current |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2055 |
edited menu." |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2056 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2057 |
|menu cls| |
218 | 2058 |
|
1244 | 2059 |
(menu := treeView asMenu) allItemsDo:[:anItem| |
218 | 2060 |
anItem value:nil. |
2061 |
anItem enabled:true. |
|
2062 |
]. |
|
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2063 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2064 |
cls := self resolveName:specClass. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2065 |
menu findGuiResourcesIn:cls. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
2066 |
^ menu |
287 | 2067 |
! |
2068 |
||
716 | 2069 |
useHelpTool: aHelpTool |
728 | 2070 |
"take the help dictionaries from aHelpTool into my helpTool" |
407 | 2071 |
|
748 | 2072 |
self helpTool buildFromClass: aHelpTool specClass. |
2073 |
self helpTool dictionaries: aHelpTool dictionaries. |
|
2074 |
self helpTool dictionary: aHelpTool dictionary |
|
1244 | 2075 |
|
2076 |
||
199 | 2077 |
! ! |
2078 |
||
2079 |
!MenuEditor methodsFor:'aspects'! |
|
2080 |
||
220 | 2081 |
hasAnySingleSelection |
407 | 2082 |
|
2083 |
^builder booleanValueAspectFor: #hasAnySingleSelection |
|
220 | 2084 |
! |
2085 |
||
2086 |
hasValidSelection |
|
407 | 2087 |
|
2088 |
^builder booleanValueAspectFor: #hasValidSelection |
|
220 | 2089 |
! |
2090 |
||
879 | 2091 |
listOfImages |
1244 | 2092 |
"get a list of the images |
2093 |
" |
|
2094 |
|list| |
|
2095 |
||
2096 |
(list := builder bindingAt:#listOfImages) isNil ifTrue:[ |
|
2097 |
builder aspectAt:#listOfImages put: (list := List new). |
|
879 | 2098 |
]. |
1244 | 2099 |
^ list |
2100 |
||
2101 |
||
199 | 2102 |
! |
2103 |
||
879 | 2104 |
selectionOfImage |
2105 |
"get selection of list of the images as value" |
|
2106 |
||
2107 |
|holder| |
|
2108 |
(holder := builder bindingAt:#selectionOfImage) isNil ifTrue:[ |
|
2109 |
builder aspectAt:#selectionOfImage put: (holder := nil asValue). |
|
2110 |
]. |
|
2111 |
^ holder |
|
2112 |
||
2113 |
||
2114 |
! |
|
2115 |
||
1244 | 2116 |
tabCanvasHolder |
2117 |
"keep the canvas for the current selected item or nil |
|
2118 |
" |
|
2119 |
|holder| |
|
2120 |
||
2121 |
(holder := builder bindingAt:#tabCanvasHolder) isNil ifTrue:[ |
|
1301 | 2122 |
builder aspectAt:#tabCanvasHolder put: (holder := ValueHolder new). |
1244 | 2123 |
]. |
2124 |
^ holder |
|
2125 |
||
2126 |
||
2127 |
! |
|
2128 |
||
199 | 2129 |
tabList |
728 | 2130 |
"get a value holder with the list of the attribute sections (slices)" |
199 | 2131 |
|
298 | 2132 |
|holder| |
1244 | 2133 |
|
298 | 2134 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
1244 | 2135 |
builder aspectAt:#tabList put:(holder := nil asValue). |
298 | 2136 |
]. |
2137 |
^ holder |
|
2138 |
||
2139 |
||
199 | 2140 |
! |
2141 |
||
407 | 2142 |
treeView |
728 | 2143 |
"get a tree view representing hierarchically the menu items" |
407 | 2144 |
|
1244 | 2145 |
^ treeView |
199 | 2146 |
! ! |
2147 |
||
728 | 2148 |
!MenuEditor methodsFor:'building'! |
2149 |
||
734 | 2150 |
buildFromClass:aClass andSelector:aSelector |
2151 |
||
2152 |
self isStandAlone ifTrue:[ |
|
748 | 2153 |
self helpTool buildFromClass:specClass |
734 | 2154 |
]. |
1244 | 2155 |
treeView buildFromClass: aClass andSelector: aSelector. |
734 | 2156 |
|
2157 |
self updateHistory. |
|
2158 |
self updateInfoLabel. |
|
2159 |
||
2160 |
! |
|
2161 |
||
1244 | 2162 |
buildFromResourceSpec:aResourceSpec |
2163 |
|spec| |
|
2164 |
||
2165 |
spec := aResourceSpec isCollection ifTrue:[aResourceSpec decodeAsLiteralArray] |
|
2166 |
ifFalse:[aResourceSpec]. |
|
2167 |
||
2168 |
self buildFromMenu:spec |
|
728 | 2169 |
! ! |
2170 |
||
199 | 2171 |
!MenuEditor methodsFor:'change & update'! |
2172 |
||
970 | 2173 |
update:something with:aParameter from:changedObject |
2174 |
super update:something with:aParameter from:changedObject. |
|
2175 |
||
2176 |
changedObject == (aspects at:#retriever) ifTrue:[ |
|
1244 | 2177 |
self updateImageView. |
970 | 2178 |
]. |
2179 |
||
2180 |
"Modified: / 24.8.1998 / 21:47:48 / cg" |
|
2181 |
! |
|
2182 |
||
748 | 2183 |
updateChannels |
2184 |
"update channels" |
|
407 | 2185 |
|
1468 | 2186 |
|node parent next prev state canPaste selectedNodes firstParent |
2187 |
enableMovingOut enableMovingIn indices indexOfLast| |
|
2188 |
||
2189 |
enableMovingOut := enableMovingIn := false. |
|
1244 | 2190 |
|
412 | 2191 |
state := false. |
1244 | 2192 |
node := treeView selectedNode. |
2193 |
||
2194 |
node notNil ifTrue:[ |
|
1468 | 2195 |
"/ single node selected |
220 | 2196 |
self hasAnySingleSelection value:true. |
1244 | 2197 |
canPaste := self valueOfCanPaste value. |
2198 |
||
2199 |
(parent := node parent) notNil ifTrue:[ |
|
220 | 2200 |
next := parent childAt:((parent indexOfChild:node) + 1). |
1468 | 2201 |
prev := parent childAt:((parent indexOfChild:node) - 1). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2202 |
self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
1468 | 2203 |
self valueOfEnableMovingInAbove value:(prev notNil and:[prev hasChildren]). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2204 |
self valueOfEnableMovingUpOrDown value:(parent children size > 1). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2205 |
self valueOfEnableMovingOut value:parent parent notNil. |
748 | 2206 |
self hasValidSelection value:true. |
1244 | 2207 |
self valueOfCanPaste value:canPaste. |
2208 |
^ self |
|
2209 |
]. |
|
2210 |
] ifFalse:[ |
|
1468 | 2211 |
"/ multiple nodes selected |
1244 | 2212 |
canPaste := false. |
2213 |
||
220 | 2214 |
self hasAnySingleSelection value:false. |
1244 | 2215 |
|
2216 |
treeView numberOfSelections ~~ 0 ifTrue:[ |
|
2217 |
canPaste := false. |
|
1468 | 2218 |
state := (treeView isInSelection:1) not. |
2219 |
||
2220 |
selectedNodes := treeView selectedNodes. |
|
2221 |
||
2222 |
"/ see if all selected nodes have a common parent. |
|
2223 |
firstParent := selectedNodes first parent. |
|
2224 |
(selectedNodes conform:[:eachNode | eachNode parent == firstParent]) ifTrue:[ |
|
2225 |
"/ yes - they have |
|
2226 |
"/ next := firstParent childAt:((firstParent indexOfChild:node) + 1). |
|
2227 |
"/ self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
|
2228 |
enableMovingOut := firstParent parent notNil. |
|
2229 |
"/ self halt. |
|
2230 |
||
2231 |
indexOfLast := (selectedNodes collect:[:eachNode | firstParent indexOfChild:eachNode]) max. |
|
2232 |
next := firstParent childAt:(indexOfLast + 1). |
|
2233 |
enableMovingIn := (next notNil and:[next hasChildren]). |
|
2234 |
] ifFalse:[ |
|
2235 |
"/ self halt. |
|
2236 |
]. |
|
220 | 2237 |
] |
407 | 2238 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2239 |
self valueOfEnableMovingUpOrDown value:false. |
1468 | 2240 |
self valueOfEnableMovingIn value:enableMovingIn. |
2241 |
self valueOfEnableMovingOut value:enableMovingOut. |
|
748 | 2242 |
self hasValidSelection value:state. |
1244 | 2243 |
self valueOfCanPaste value:canPaste. |
879 | 2244 |
! |
2245 |
||
1244 | 2246 |
updateImageView |
2247 |
"update the image view |
|
2248 |
" |
|
2249 |
|cls newList icon| |
|
2250 |
||
2251 |
self isImageViewSelected ifFalse:[ |
|
2252 |
^ self |
|
902 | 2253 |
]. |
1244 | 2254 |
cls := self currentImageRetrieverClass. |
2255 |
||
2256 |
lastImageRetriever == cls ifTrue:[ |
|
2257 |
newList := self listOfImages |
|
2258 |
] ifFalse:[ |
|
2259 |
cls notNil ifTrue:[ |
|
1463 | 2260 |
self withWaitCursorDo:[ |
2261 |
lastImageRetriever := cls. |
|
2262 |
||
2263 |
newList := self class getAllImageSelectorsFrom:cls. |
|
2264 |
newList := newList collect: [:sel| |img| |
|
2265 |
img := cls perform: sel. |
|
1464 | 2266 |
img height > 32 ifTrue:[ |
2267 |
img := img magnifiedBy: 32 / img extent y |
|
1463 | 2268 |
]. |
2269 |
LabelAndIcon icon:img string:sel |
|
2270 |
]. |
|
2271 |
]. |
|
1244 | 2272 |
] ifFalse:[ |
2273 |
newList := #() |
|
2274 |
]. |
|
2275 |
self listOfImages contents:newList. |
|
2276 |
]. |
|
2277 |
||
2278 |
icon := (aspects at:#icon) value. |
|
2279 |
||
2280 |
icon notNil ifTrue:[ |
|
2281 |
icon := newList detect:[:el| el string == icon] ifNone:nil. |
|
2282 |
]. |
|
2283 |
self selectionOfImage value:icon. |
|
220 | 2284 |
! ! |
2285 |
||
916 | 2286 |
!MenuEditor methodsFor:'defaults'! |
2287 |
||
2288 |
aboutImage |
|
2289 |
"the image to be displayed in my about-box; |
|
2290 |
If nil is returned, thhe ST/X default image is used." |
|
2291 |
||
2292 |
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_menus.xpm' |
|
2293 |
||
2294 |
"Created: / 25.7.1998 / 20:48:12 / cg" |
|
2295 |
"Modified: / 27.7.1998 / 10:21:55 / cg" |
|
2296 |
! ! |
|
2297 |
||
220 | 2298 |
!MenuEditor methodsFor:'event handling'! |
2299 |
||
407 | 2300 |
doesNotUnderstand: aMessage |
2301 |
"detour incoming messages to the tree view" |
|
2302 |
||
1244 | 2303 |
^ aMessage sendTo:treeView |
199 | 2304 |
! ! |
2305 |
||
287 | 2306 |
!MenuEditor methodsFor:'private'! |
2307 |
||
1244 | 2308 |
currentImageRetrieverClass |
2309 |
"returns the current class which provides the images dependent on |
|
2310 |
the retriver or the current spec. |
|
2311 |
" |
|
2312 |
|clsName| |
|
2313 |
||
2314 |
clsName := (aspects at: #retriever) value. |
|
2315 |
||
2316 |
clsName size == 0 ifTrue:[ |
|
1355 | 2317 |
clsName := specClass. |
2318 |
clsName isNil ifTrue:[^ nil]. |
|
1244 | 2319 |
]. |
2320 |
^ Smalltalk at:clsName ifAbsent:nil |
|
2321 |
! |
|
2322 |
||
287 | 2323 |
helpKey |
728 | 2324 |
"get the help key of the selected menu item" |
407 | 2325 |
|
287 | 2326 |
|node| |
1244 | 2327 |
|
2328 |
(node := treeView selectedNode) notNil ifTrue:[ |
|
287 | 2329 |
^ node contents activeHelpKey |
2330 |
]. |
|
2331 |
^ nil |
|
2332 |
! |
|
2333 |
||
2334 |
helpTool |
|
1244 | 2335 |
"get the help tool application |
2336 |
" |
|
2337 |
|helpView helpTool| |
|
2338 |
||
2339 |
helpTool := listOfCanvas at:#help ifAbsent:nil. |
|
2340 |
||
2341 |
helpTool isNil ifTrue:[ |
|
2342 |
helpTool := UIHelpTool new createBuilder. |
|
2343 |
helpTool masterApplication:self. |
|
2344 |
helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
|
1335
b80f8c8ec3d6
use an ApplicationSubView instead of a View for a UIHelpTool
ca
parents:
1330
diff
changeset
|
2345 |
helpView := ApplicationSubView new client:helpTool. |
1244 | 2346 |
helpTool builder window:helpView. |
1335
b80f8c8ec3d6
use an ApplicationSubView instead of a View for a UIHelpTool
ca
parents:
1330
diff
changeset
|
2347 |
helpTool masterApplication:self. |
1244 | 2348 |
listOfCanvas at:#help put:helpTool. |
2349 |
]. |
|
2350 |
^ helpTool |
|
2351 |
||
2352 |
||
287 | 2353 |
! ! |
2354 |
||
199 | 2355 |
!MenuEditor methodsFor:'queries'! |
2356 |
||
2357 |
isHelpToolSelected |
|
1244 | 2358 |
"return true if current selection is help tool |
2359 |
" |
|
2360 |
^ typeOfCanvas == #help |
|
2361 |
||
2362 |
! |
|
2363 |
||
2364 |
isImageViewSelected |
|
2365 |
"return true if current selection is help tool |
|
2366 |
" |
|
2367 |
^ typeOfCanvas == #imageEditSpec |
|
2368 |
||
287 | 2369 |
! |
2370 |
||
535 | 2371 |
preferredExtent |
2372 |
||
2373 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//2.5) |
|
2374 |
||
2375 |
||
199 | 2376 |
! ! |
2377 |
||
2378 |
!MenuEditor methodsFor:'selection'! |
|
2379 |
||
879 | 2380 |
imageSelected |
1078
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2381 |
|imgSel| |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2382 |
|
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2383 |
imgSel := self selectionOfImage value. |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2384 |
imgSel notNil ifTrue:[ |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2385 |
(aspects at: #icon) value: imgSel string |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2386 |
] |
879 | 2387 |
! |
2388 |
||
199 | 2389 |
menuChanged |
407 | 2390 |
|
1244 | 2391 |
|node item myClass oldLabel oldSlices newList index| |
2392 |
||
2393 |
node := treeView selectedNode. |
|
2394 |
||
2395 |
node isNil ifTrue:[ |
|
2396 |
slices := nil. |
|
2397 |
index := 0. |
|
2398 |
] ifFalse:[ |
|
2399 |
oldSlices := slices. |
|
2400 |
myClass := self class. |
|
2401 |
item := node contents. |
|
2402 |
||
218 | 2403 |
item isSeparator ifFalse:[ |
199 | 2404 |
node parent isNil ifFalse:[ |
218 | 2405 |
node hasChildren ifTrue:[ |
1244 | 2406 |
slices := #slicesMenu |
218 | 2407 |
] ifFalse:[ |
1244 | 2408 |
item submenuChannel isNil ifTrue:[slices := #slicesItem] |
2409 |
ifFalse:[slices := #slicesLink] |
|
218 | 2410 |
]. |
1244 | 2411 |
slices := listOfSlices at:slices |
2412 |
ifAbsentPut:[(myClass perform:slices) copyWith:#('Help' #help)]. |
|
199 | 2413 |
] ifTrue:[ |
1244 | 2414 |
slices := listOfSlices at:#slicesRootMenu |
2415 |
ifAbsentPut:[myClass perform:#slicesRootMenu]. |
|
287 | 2416 |
]. |
199 | 2417 |
] ifTrue:[ |
1244 | 2418 |
slices := myClass perform:#slicesSeparatorMenu. |
287 | 2419 |
]. |
1244 | 2420 |
index := tabSelection ? 0. |
2421 |
||
2422 |
slices ~~ oldSlices ifTrue:[ |
|
1322 | 2423 |
tabSelection := 0. |
2424 |
typeOfCanvas := 0. |
|
2425 |
||
2426 |
self tabCanvasHolder value:nil. |
|
2427 |
||
1244 | 2428 |
newList := slices collect:[:el| el first]. |
2429 |
||
2430 |
index ~~ 0 ifTrue:[ |
|
2431 |
oldLabel := self tabList value at:index ifAbsent:nil. |
|
2432 |
||
2433 |
oldLabel notNil ifTrue:[ |
|
2434 |
index := newList indexOf:oldLabel. |
|
2435 |
] |
|
287 | 2436 |
]. |
1244 | 2437 |
self tabList value:newList. |
2438 |
]. |
|
2439 |
index := index max:1. |
|
199 | 2440 |
]. |
1244 | 2441 |
self tabModel value:index. |
1246 | 2442 |
aspects do:[:a| a removeDependent:self]. |
2443 |
self cancel. |
|
748 | 2444 |
self updateChannels. |
1246 | 2445 |
aspects do:[:a| a addDependent:self]. |
1244 | 2446 |
|
199 | 2447 |
! |
2448 |
||
1301 | 2449 |
tabSelection:aSelection |
1244 | 2450 |
"put the section aSelection into the note book |
2451 |
" |
|
1301 | 2452 |
|view spec| |
2453 |
||
1322 | 2454 |
aSelection = tabSelection ifTrue:[^self]. |
1301 | 2455 |
|
2456 |
(tabSelection := aSelection) isNil ifTrue:[ |
|
2457 |
tabSelection == 0 ifTrue:[^ self]. |
|
2458 |
tabSelection := 0. |
|
199 | 2459 |
]. |
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2460 |
|
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2461 |
"/ before bringing up the new notebook page, |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2462 |
"/ we must disable all now invisible input fields ... |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2463 |
"/ (otherwise, those would fire on #accept. |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2464 |
|
1301 | 2465 |
(view := self tabCanvasHolder value) notNil ifTrue:[ |
2466 |
view allSubViewsDo:[:aComponent | |
|
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2467 |
aComponent isInputField ifTrue:[ |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2468 |
aComponent disableIfInvisible:true |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2469 |
] |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2470 |
] |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2471 |
]. |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2472 |
|
1301 | 2473 |
tabSelection == 0 ifTrue:[ |
2474 |
^ self tabCanvasHolder value:nil. |
|
2475 |
]. |
|
2476 |
||
2477 |
typeOfCanvas := (slices at:tabSelection) last. |
|
2478 |
||
2479 |
self isHelpToolSelected ifTrue:[ |
|
2480 |
view := self helpTool window. |
|
2481 |
] ifFalse:[ |
|
2482 |
self updateImageView. |
|
2483 |
||
2484 |
view := listOfCanvas at:typeOfCanvas |
|
2485 |
ifAbsentPut:[SimpleView new client:self spec:typeOfCanvas builder:(self builder)]. |
|
2486 |
]. |
|
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2487 |
self tabCanvasHolder value:view. |
1244 | 2488 |
|
199 | 2489 |
! ! |
2490 |
||
2491 |
!MenuEditor methodsFor:'startup / release'! |
|
2492 |
||
738 | 2493 |
initialize |
2494 |
"initialize value holders for the attributes of the menu components" |
|
2495 |
||
2496 |
|holder| |
|
2497 |
||
2498 |
super initialize. |
|
2499 |
||
2500 |
aspects at:#seperatorSelection put:(holder := SelectionInList new). |
|
2501 |
holder list: Item separatorList. |
|
872
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2502 |
holder addDependent:self. |
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2503 |
|
1244 | 2504 |
listOfCanvas := IdentityDictionary new. |
2505 |
listOfSlices := IdentityDictionary new. |
|
2506 |
||
2507 |
treeView := TreeView new. |
|
2508 |
treeView action:[:dummy| self menuChanged ]. |
|
2509 |
||
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2510 |
aspects at:#indicationEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2511 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2512 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2513 |
aspects at:#choiceEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2514 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2515 |
argument:(aspects at:#indication)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2516 |
aspects at:#choiceValueEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2517 |
with:[:a | a size > 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2518 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2519 |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
2520 |
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
|
2521 |
|
1244 | 2522 |
aspects do: [:holder| holder addDependent:self]. |
738 | 2523 |
! |
2524 |
||
728 | 2525 |
openModalOnMenu: aMenu |
734 | 2526 |
"build a tree from aMenu and open it modal" |
728 | 2527 |
|
738 | 2528 |
super openModalOnResourceSpec: aMenu |
1250 | 2529 |
! |
2530 |
||
2531 |
postOpenWith:aBuilder |
|
2532 |
"reset keyboardProcessor for menuBar |
|
2533 |
" |
|
2534 |
super postOpenWith: aBuilder. |
|
2535 |
aBuilder keyboardProcessor menuBar:nil. |
|
199 | 2536 |
! ! |
2537 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2538 |
!MenuEditor methodsFor:'user actions'! |
199 | 2539 |
|
407 | 2540 |
accept |
2541 |
"invoked by button 'OK' and by save requests of menu item changes" |
|
2542 |
||
1244 | 2543 |
|node item| |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2544 |
|
637 | 2545 |
super accept. |
2546 |
||
1244 | 2547 |
(node := treeView selectedNode) notNil ifTrue:[ |
2548 |
item := node contents. |
|
2549 |
||
1062 | 2550 |
self isHelpToolSelected ifTrue:[ |
407 | 2551 |
self helpTool accept. |
1244 | 2552 |
item activeHelpKey: self helpTool helpKey. |
686 | 2553 |
self valueOfEnablingCommitButtons value: false. |
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2554 |
self clearModifiedFlag. |
1062 | 2555 |
] ifFalse:[ |
1244 | 2556 |
item buildFromAspects:aspects. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2557 |
node changed. |
1244 | 2558 |
specSelector := treeView selectorName. |
407 | 2559 |
] |
734 | 2560 |
]. |
879 | 2561 |
self updateInfoLabel. |
1155 | 2562 |
|
407 | 2563 |
! |
2564 |
||
2565 |
cancel |
|
2566 |
"invoked by button 'Cancel'" |
|
1244 | 2567 |
|node item| |
2568 |
||
2569 |
node := treeView selectedNode. |
|
2570 |
||
2571 |
aspects keysAndValuesDo:[:aKey :anAspect| |
|
2572 |
aKey ~~ #retrieverClassList ifTrue:[ |
|
2573 |
anAspect setValue:''. "/ to clear the field. |
|
2574 |
anAspect value:'' |
|
2575 |
] |
|
407 | 2576 |
]. |
1244 | 2577 |
|
2578 |
node notNil ifTrue:[ |
|
2579 |
item := node contents. |
|
2580 |
item toAspects:aspects. |
|
2581 |
self helpTool helpKey:(item activeHelpKey). |
|
2582 |
]. |
|
2583 |
self updateImageView. |
|
2584 |
self valueOfEnablingCommitButtons value:false. |
|
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2585 |
self clearModifiedFlag. |
407 | 2586 |
! |
2587 |
||
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2588 |
doBrowseForImageResource |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2589 |
"opens a browser on image-resource methods" |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2590 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2591 |
|msg currClass w cls sel| |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2592 |
|
1244 | 2593 |
currClass := self currentImageRetrieverClass. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2594 |
msg := |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2595 |
(ResourceSelectionBrowser |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2596 |
request: 'Use Image From Class' |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2597 |
onSuperclass: nil |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2598 |
andClass: currClass |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2599 |
andSelector: (aspects at: #icon) |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2600 |
withResourceTypes: #(image fileImage programImage)). |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2601 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2602 |
msg notNil ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2603 |
(w := msg asCollectionOfWords) size == 2 ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2604 |
cls := w at:1. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2605 |
sel := w at:2. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2606 |
cls ~= currClass ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2607 |
(aspects at: #retriever) value:cls asSymbol. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2608 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2609 |
sel ~= (aspects at:#icon) ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2610 |
(aspects at: #icon) value:sel asSymbol. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2611 |
]. |
1244 | 2612 |
self updateImageView. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2613 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2614 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2615 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2616 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2617 |
! |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2618 |
|
879 | 2619 |
doEditImage |
888 | 2620 |
"opens a Image Editor on the resource retriever and the icon selector; |
2621 |
then updates the list of images and select the line of the image" |
|
879 | 2622 |
|
2623 |
super doEditImage. |
|
1244 | 2624 |
lastImageRetriever := nil. |
2625 |
self updateImageView. |
|
879 | 2626 |
! |
2627 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2628 |
doNew |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2629 |
|
748 | 2630 |
super doNew ifTrue: [self helpTool doNew] |
199 | 2631 |
! |
2632 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2633 |
doPickAMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2634 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2635 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2636 |
|
1244 | 2637 |
self askForModification ifTrue:[ |
2638 |
((view := Screen current viewFromUser) isNil or: |
|
2639 |
[view == Screen current rootView]) ifTrue:[ |
|
2640 |
^ self |
|
2641 |
]. |
|
2642 |
view specClass == MenuPanelSpec ifTrue:[ |
|
2643 |
^ treeView buildFromMenu: view asMenu |
|
2644 |
]. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2645 |
]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2646 |
^ nil |
381 | 2647 |
! |
2648 |
||
888 | 2649 |
doRemoveImage |
2650 |
"removes the image of the selected line" |
|
1244 | 2651 |
|cls sel| |
2652 |
||
2653 |
sel := self selectionOfImage value. |
|
2654 |
||
2655 |
sel size ~~ 0 ifTrue:[ |
|
2656 |
cls := self currentImageRetrieverClass. |
|
2657 |
cls notNil ifTrue:[ |
|
2658 |
cls class removeSelector:(sel string) |
|
2659 |
]. |
|
2660 |
(aspects at:#icon) value:nil. |
|
2661 |
lastImageRetriever := nil. |
|
2662 |
self updateImageView. |
|
888 | 2663 |
] |
2664 |
! |
|
2665 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2666 |
doSave |
1244 | 2667 |
|cls menu spec mthd category code excla| |
199 | 2668 |
|
642 | 2669 |
super doSave ifFalse: [^nil]. |
637 | 2670 |
|
1244 | 2671 |
cls := self resolveName: specClass. |
2672 |
menu := treeView asMenu literalArrayEncoding. |
|
199 | 2673 |
spec := WriteStream on:String new. |
2674 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
2675 |
spec := spec contents. |
|
2676 |
||
2677 |
"/ if that method already exists, do not overwrite the category |
|
2678 |
||
576 | 2679 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2680 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 2681 |
category := mthd category. |
2682 |
]. |
|
2683 |
||
764 | 2684 |
excla := Character excla asString. |
2685 |
||
2686 |
code := excla |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2687 |
, (cls name , ' class methodsFor:' , category storeString) |
764 | 2688 |
, excla , '\\' |
199 | 2689 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2690 |
, specSelector , '\' |
738 | 2691 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
2692 |
, '\\ "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2693 |
, (' 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
|
2694 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 2695 |
, ' "\'. |
2696 |
||
2697 |
code := code |
|
2698 |
, '\' |
|
2699 |
, ' <resource: #menu>\\' |
|
1083 | 2700 |
, ' ^ ' , spec |
199 | 2701 |
, '\' |
764 | 2702 |
, (excla , ' ' , excla) |
199 | 2703 |
, '\\'. |
2704 |
||
2705 |
code := code withCRs. |
|
2706 |
(ReadStream on:code) fileIn. |
|
2707 |
||
764 | 2708 |
self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. |
699 | 2709 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2710 |
self updateHistory. |
748 | 2711 |
self updateInfoLabel. |
2712 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2713 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2714 |
modified := false. |
218 | 2715 |
|
199 | 2716 |
! |
2717 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2718 |
doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2719 |
|
1244 | 2720 |
super doSaveAs ifTrue: [treeView selectorName:specSelector] |
218 | 2721 |
! |
199 | 2722 |
|
218 | 2723 |
doStepDown |
407 | 2724 |
"shift selected menu item one step down" |
2725 |
||
1244 | 2726 |
treeView selectedNodeChangeSequenceOrder:1. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2727 |
modified := true. |
398 | 2728 |
|
2729 |
||
2730 |
||
2731 |
||
218 | 2732 |
! |
2733 |
||
2734 |
doStepIn |
|
407 | 2735 |
"move selected menu item into next submenu" |
2736 |
||
1468 | 2737 |
"/ treeView selectedNodeBecomeChildOfNext. |
2738 |
treeView selectedNodesBecomeChildrenOfNext. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2739 |
modified := true. |
1468 | 2740 |
! |
2741 |
||
2742 |
doStepInAbove |
|
2743 |
"move selected menu item into previous submenu" |
|
2744 |
||
2745 |
treeView selectedNodeBecomeChildOfPrevious. |
|
2746 |
modified := true. |
|
218 | 2747 |
! |
199 | 2748 |
|
218 | 2749 |
doStepOut |
1468 | 2750 |
"move selected menu item(s) out from parent submenu" |
2751 |
||
2752 |
treeView selectedNodesBecomeSistersOfParent. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2753 |
modified := true. |
218 | 2754 |
! |
2755 |
||
2756 |
doStepUp |
|
407 | 2757 |
"shift selected menu item one step up" |
2758 |
||
1244 | 2759 |
treeView selectedNodeChangeSequenceOrder:-1. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2760 |
modified := true. |
199 | 2761 |
! ! |
2762 |
||
1454 | 2763 |
!MenuEditor::Item class methodsFor:'constants'! |
2764 |
||
2765 |
separatorList |
|
2766 |
"get the list of available separator types" |
|
2767 |
||
2768 |
^#('blank' 'single line' 'double line') |
|
2769 |
! |
|
2770 |
||
2771 |
separatorSlices |
|
2772 |
"get the list of menu spec values of the corresponding separator types" |
|
2773 |
||
2774 |
^ #( |
|
2775 |
( #blank '' ) |
|
2776 |
( #single '-' ) |
|
2777 |
( #double '=' ) |
|
2778 |
) |
|
2779 |
! ! |
|
2780 |
||
2781 |
!MenuEditor::Item class methodsFor:'documentation'! |
|
2782 |
||
2783 |
documentation |
|
2784 |
" |
|
2785 |
implements the contents assigned to a TreeItem. An instance |
|
2786 |
is associated with one item and keeps all its information |
|
2787 |
||
2788 |
[see also:] |
|
2789 |
TreeItem |
|
2790 |
MenuEditor |
|
2791 |
||
2792 |
[author:] |
|
2793 |
Claus Atzkern |
|
2794 |
" |
|
2795 |
||
2796 |
||
2797 |
! ! |
|
2798 |
||
2799 |
!MenuEditor::Item methodsFor:'accessing'! |
|
2800 |
||
2801 |
activeHelpKey |
|
2802 |
"get the help key of the menu item" |
|
2803 |
||
2804 |
^activeHelpKey |
|
2805 |
! |
|
2806 |
||
2807 |
activeHelpKey:aKey |
|
2808 |
"set the help key of the menu item" |
|
2809 |
||
2810 |
activeHelpKey := aKey |
|
2811 |
! |
|
2812 |
||
2813 |
label |
|
2814 |
"get the value of the menu item" |
|
2815 |
||
2816 |
^label |
|
2817 |
! |
|
2818 |
||
2819 |
label:something |
|
2820 |
"set the value of the menu item" |
|
2821 |
||
2822 |
label := something ? '-' |
|
2823 |
! |
|
2824 |
||
2825 |
separatorType |
|
2826 |
"get the separator type assigned to item or nil" |
|
2827 |
||
2828 |
label size > 1 |
|
2829 |
ifFalse: |
|
2830 |
[ |
|
2831 |
label size == 0 ifTrue:[^#blank]. |
|
2832 |
label first == $- ifTrue:[^#single]. |
|
2833 |
label first == $= ifTrue:[^#double]. |
|
2834 |
]. |
|
2835 |
^nil |
|
2836 |
||
2837 |
! |
|
2838 |
||
2839 |
startGroup:aSymbolOrNil |
|
2840 |
"set the startGroup attribute" |
|
2841 |
||
2842 |
startGroup := aSymbolOrNil |
|
2843 |
||
2844 |
"Created: / 23.8.1998 / 15:56:03 / cg" |
|
2845 |
! |
|
2846 |
||
2847 |
submenuChannel |
|
2848 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2849 |
||
2850 |
^submenuChannel |
|
2851 |
! |
|
2852 |
||
2853 |
submenuChannel:aChannel |
|
2854 |
"get the submenuChannel" |
|
2855 |
||
2856 |
submenuChannel := aChannel |
|
2857 |
! |
|
2858 |
||
2859 |
translateLabel:aBoolean |
|
2860 |
"set/clear the translate to national-language flag" |
|
2861 |
||
2862 |
translateLabel := aBoolean |
|
2863 |
||
2864 |
"Created: / 6.6.1998 / 17:23:33 / cg" |
|
2865 |
! |
|
2866 |
||
2867 |
value:aSymbol |
|
2868 |
"set the value attribute" |
|
2869 |
||
2870 |
value := aSymbol |
|
2871 |
||
2872 |
"Created: / 23.8.1998 / 16:02:10 / cg" |
|
2873 |
! ! |
|
2874 |
||
2875 |
!MenuEditor::Item methodsFor:'building'! |
|
2876 |
||
2877 |
buildFromAspects:aspects |
|
2878 |
"read the values of the aspects into my values" |
|
2879 |
||
2880 |
|name| |
|
2881 |
self isSeparator |
|
2882 |
ifFalse: |
|
2883 |
[ |
|
2884 |
name := label. |
|
2885 |
label := (aspects at:#label) value. |
|
2886 |
||
2887 |
(label isNil or:[self isSeparator]) ifTrue:[ |
|
2888 |
(aspects at:#label) value:(label := name) |
|
2889 |
]. |
|
2890 |
||
2891 |
enabled := (aspects at:#enabled) value. |
|
2892 |
value := (aspects at:#value) value. |
|
2893 |
nameKey := (aspects at:#nameKey) value. |
|
2894 |
indication := (aspects at:#indication) value. |
|
2895 |
choice := (aspects at:#choice) value. |
|
2896 |
choiceValue := (aspects at:#choiceValue) value. |
|
2897 |
shortcutKey := (aspects at:#shortcutKey) value. |
|
2898 |
startGroup := (aspects at:#startGroup) value. |
|
2899 |
accessCharacterPos := (aspects at:#accessCharacterPos) value. |
|
2900 |
showBusyCursorWhilePerforming := (aspects at:#showBusyCursorWhilePerforming) value. |
|
2901 |
triggerOnDown := (aspects at:#triggerOnDown) value. |
|
2902 |
keepLinkedMenu := (aspects at:#keepLinkedMenu) value ? false. |
|
2903 |
font := (aspects at:#font) value. |
|
2904 |
argument := (aspects at:#argument) value. |
|
2905 |
translateLabel := (aspects at:#translateLabel) value. |
|
2906 |
isButton := (aspects at:#isButton) value. |
|
2907 |
auxValue := (aspects at:#auxValue) value. |
|
2908 |
||
2909 |
argument isString ifTrue:[ |
|
2910 |
argument size > 1 ifTrue:[ |
|
2911 |
(argument at:1) == $# ifTrue:[ |
|
2912 |
argument := (argument copyFrom:2) asSymbol |
|
2913 |
] |
|
2914 |
] |
|
2915 |
]. |
|
2916 |
submenuChannel := (aspects at:#submenuChannel) value. |
|
2917 |
retriever := (aspects at:#retriever) value. |
|
2918 |
icon := (aspects at:#icon) value. |
|
2919 |
iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2920 |
] |
|
2921 |
ifTrue: |
|
2922 |
[ |
|
2923 |
name := (aspects at:#seperatorSelection) selectionIndex. |
|
2924 |
label := (self class separatorSlices at:name) last. |
|
2925 |
]. |
|
2926 |
isVisible := (aspects at:#isVisible) value. |
|
2927 |
hideMenuOnActivated := (aspects at:#hideMenuOnActivated) value. |
|
2928 |
||
2929 |
"Modified: / 14.8.1998 / 15:36:38 / cg" |
|
2930 |
! |
|
2931 |
||
2932 |
buildFromMenuItem:anItem |
|
2933 |
"read the attributes of anItem into my values" |
|
2934 |
||
2935 |
|rtv| |
|
2936 |
||
2937 |
self label:(anItem rawLabel). |
|
2938 |
activeHelpKey := anItem activeHelpKey. |
|
2939 |
||
2940 |
(enabled := anItem enabled) isSymbol ifFalse:[ |
|
2941 |
enabled := nil |
|
2942 |
]. |
|
2943 |
(value := anItem value) isSymbol ifFalse:[ |
|
2944 |
value := nil. |
|
2945 |
]. |
|
2946 |
(indication := anItem indication) isSymbol ifFalse:[ |
|
2947 |
indication := nil |
|
2948 |
]. |
|
2949 |
(choice := anItem choice) isSymbol ifFalse:[ |
|
2950 |
choice := nil |
|
2951 |
]. |
|
2952 |
choiceValue := anItem choiceValue. |
|
2953 |
nameKey := anItem nameKey. |
|
2954 |
shortcutKey := anItem shortcutKeyCharacter. |
|
2955 |
startGroup := anItem startGroup. |
|
2956 |
accessCharacterPos := anItem accessCharacterPosition. |
|
2957 |
showBusyCursorWhilePerforming := anItem showBusyCursorWhilePerforming. |
|
2958 |
triggerOnDown := anItem triggerOnDown. |
|
2959 |
keepLinkedMenu := anItem keepLinkedMenu. |
|
2960 |
font := anItem font. |
|
2961 |
argument := anItem argument. |
|
2962 |
||
2963 |
submenuChannel := anItem submenuChannel. |
|
2964 |
translateLabel := anItem translateLabel. |
|
2965 |
isButton := anItem isButton. |
|
2966 |
isVisible := anItem isVisible. |
|
2967 |
hideMenuOnActivated := anItem hideMenuOnActivated. |
|
2968 |
auxValue := anItem auxValue. |
|
2969 |
||
2970 |
(((rtv := anItem adornment) notNil) |
|
2971 |
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2972 |
ifTrue: |
|
2973 |
[ |
|
2974 |
retriever := rtv className. |
|
2975 |
icon := rtv selector. |
|
2976 |
(iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2977 |
label := rtv labelText. |
|
2978 |
] |
|
2979 |
] |
|
2980 |
||
2981 |
"Modified: / 29.9.1998 / 11:18:25 / cg" |
|
2982 |
! ! |
|
2983 |
||
2984 |
!MenuEditor::Item methodsFor:'conversion'! |
|
2985 |
||
2986 |
asMenuItem |
|
2987 |
"converts self to a menu item" |
|
2988 |
||
2989 |
|item rcv| |
|
2990 |
||
2991 |
item := MenuItem labeled:label. |
|
2992 |
item isVisible:isVisible. |
|
2993 |
item hideMenuOnActivated:hideMenuOnActivated. |
|
2994 |
||
2995 |
self isSeparator ifFalse:[ |
|
2996 |
item activeHelpKey:activeHelpKey. |
|
2997 |
item enabled:enabled. |
|
2998 |
item accessCharacterPosition:accessCharacterPos. |
|
2999 |
item showBusyCursorWhilePerforming:showBusyCursorWhilePerforming. |
|
3000 |
item triggerOnDown:triggerOnDown. |
|
3001 |
item keepLinkedMenu:keepLinkedMenu. |
|
3002 |
item font:font. |
|
3003 |
item argument:argument. |
|
3004 |
item submenuChannel:submenuChannel. |
|
3005 |
item nameKey:nameKey. |
|
3006 |
item shortcutKeyCharacter:shortcutKey. |
|
3007 |
item startGroup:startGroup. |
|
3008 |
item value:value. |
|
3009 |
item indication:indication. |
|
3010 |
item choice:choice. |
|
3011 |
item choiceValue:choiceValue. |
|
3012 |
item translateLabel: translateLabel. |
|
3013 |
item isButton: isButton. |
|
3014 |
item auxValue: auxValue. |
|
3015 |
||
3016 |
icon notNil ifTrue:[ |
|
3017 |
rcv := ResourceRetriever new. |
|
3018 |
rcv className:retriever. |
|
3019 |
rcv selector:icon. |
|
3020 |
iconAndLabel == true ifTrue:[ |
|
3021 |
rcv labelText:label |
|
3022 |
]. |
|
3023 |
item labelImage:rcv |
|
3024 |
] |
|
3025 |
]. |
|
3026 |
^item |
|
3027 |
||
3028 |
"Modified: / 14.8.1998 / 15:36:35 / cg" |
|
3029 |
! |
|
3030 |
||
3031 |
toAspects:aspects |
|
3032 |
"put my values into the values of aspects" |
|
3033 |
||
3034 |
|type| |
|
3035 |
(type := self separatorType) notNil ifTrue: [ |
|
3036 |
type := self class separatorSlices findFirst:[:el| el first == type ]. |
|
3037 |
(aspects at:#seperatorSelection) selectionIndex:type. |
|
3038 |
] ifFalse: [ |
|
3039 |
(aspects at:#label) value:label. |
|
3040 |
(aspects at:#enabled) value:enabled. |
|
3041 |
(aspects at:#value) value:value. |
|
3042 |
(aspects at:#nameKey) value:nameKey. |
|
3043 |
(aspects at:#indication) value:indication. |
|
3044 |
(aspects at:#choice) value:choice. |
|
3045 |
(aspects at:#choiceValue) value:choiceValue. |
|
3046 |
(aspects at:#shortcutKey) value:shortcutKey. |
|
3047 |
(aspects at:#startGroup) value:startGroup. |
|
3048 |
(aspects at:#accessCharacterPos) value:accessCharacterPos. |
|
3049 |
(aspects at:#showBusyCursorWhilePerforming) value:showBusyCursorWhilePerforming. |
|
3050 |
(aspects at:#triggerOnDown) value:triggerOnDown. |
|
3051 |
(aspects at:#keepLinkedMenu) value:(keepLinkedMenu ? false). |
|
3052 |
(aspects at:#font) value:font. |
|
3053 |
(aspects at:#translateLabel) value:translateLabel. |
|
3054 |
(aspects at:#submenuChannel) value:submenuChannel. |
|
3055 |
(aspects at:#retriever) value:retriever. |
|
3056 |
(aspects at:#icon) value:icon. |
|
3057 |
(aspects at:#iconAndLabel) value:iconAndLabel. |
|
3058 |
(aspects at:#isButton) value:isButton. |
|
3059 |
(aspects at:#auxValue) value:auxValue. |
|
3060 |
||
3061 |
(aspects at:#argument) |
|
3062 |
value:(argument isSymbol |
|
3063 |
ifTrue: ['#', argument] |
|
3064 |
ifFalse:[argument]). |
|
3065 |
]. |
|
3066 |
(aspects at:#isVisible) value:isVisible. |
|
3067 |
(aspects at:#hideMenuOnActivated) value:(hideMenuOnActivated ? true). |
|
3068 |
||
3069 |
"Modified: / 14.8.1998 / 15:37:29 / cg" |
|
3070 |
! ! |
|
3071 |
||
3072 |
!MenuEditor::Item methodsFor:'queries'! |
|
3073 |
||
3074 |
iconFor: aNode |
|
3075 |
"get the icon of the menu item for the tree view" |
|
3076 |
||
3077 |
(aNode hasChildren or: [aNode parent isNil]) |
|
3078 |
ifTrue: |
|
3079 |
[ |
|
3080 |
^MenuEditor submenuImage |
|
3081 |
] |
|
3082 |
ifFalse: |
|
3083 |
[ |
|
3084 |
submenuChannel notNil |
|
3085 |
ifTrue: |
|
3086 |
[ |
|
3087 |
^MenuEditor linkSubmenuImage |
|
3088 |
] |
|
3089 |
ifFalse: |
|
3090 |
[ |
|
3091 |
self isSeparator |
|
3092 |
ifTrue: [^MenuEditor menuSeparatorImage] |
|
3093 |
ifFalse: [^MenuEditor menuItemImage] |
|
3094 |
] |
|
3095 |
] |
|
3096 |
! |
|
3097 |
||
3098 |
isSeparator |
|
3099 |
"return true if item is a seperator" |
|
3100 |
||
3101 |
^self separatorType notNil |
|
3102 |
! |
|
3103 |
||
3104 |
treeViewLabel |
|
3105 |
"get the label of the menu item for the tree view" |
|
3106 |
||
3107 |
^label |
|
3108 |
" asBoldText, |
|
3109 |
(value notNil ifTrue: [': [', |
|
3110 |
value , |
|
3111 |
(argument isString ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']), |
|
3112 |
']'] ifFalse: ['']) |
|
3113 |
||
3114 |
||
3115 |
" |
|
3116 |
! ! |
|
3117 |
||
407 | 3118 |
!MenuEditor::TreeView class methodsFor:'documentation'! |
199 | 3119 |
|
3120 |
documentation |
|
3121 |
" |
|
734 | 3122 |
This tree view class provides a hierarchical representation |
3123 |
of the components of a menu. |
|
199 | 3124 |
|
3125 |
[see also:] |
|
3126 |
SelectionInTreeView |
|
213 | 3127 |
SelectionInTree |
3128 |
TreeItem |
|
199 | 3129 |
|
3130 |
[author:] |
|
3131 |
Claus Atzkern |
|
3132 |
" |
|
3133 |
! ! |
|
3134 |
||
407 | 3135 |
!MenuEditor::TreeView methodsFor:'accessing'! |
199 | 3136 |
|
1322 | 3137 |
canTab |
3138 |
^ true |
|
3139 |
! |
|
3140 |
||
199 | 3141 |
selectorName |
734 | 3142 |
"get the selector of the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3143 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3144 |
^(listOfNodes first contents label) asSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3145 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3146 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3147 |
selectorName: aSymbol |
734 | 3148 |
"set the selector for the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3149 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3150 |
listOfNodes first contents label: aSymbol |
199 | 3151 |
! ! |
3152 |
||
407 | 3153 |
!MenuEditor::TreeView methodsFor:'building'! |
199 | 3154 |
|
637 | 3155 |
buildFromClass:aClass andSelector:aSelector |
734 | 3156 |
"read a menu spec from aClass and aSelector and put |
3157 |
the encoded menu into the tree view" |
|
407 | 3158 |
|
728 | 3159 |
|spec cls menu firstNode firstNodeLabel| |
3160 |
||
3161 |
"if opened on a menu" |
|
3162 |
(aClass isNil and: [aSelector isNil and: [listOfNodes size > 0]]) ifTrue: [^nil]. |
|
199 | 3163 |
|
1244 | 3164 |
self selection:nil. |
3165 |
||
199 | 3166 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
340 | 3167 |
cls := self application resolveName:aClass. |
199 | 3168 |
|
3169 |
(cls respondsTo:aSelector) ifTrue:[ |
|
3170 |
spec := cls perform:aSelector |
|
3171 |
] |
|
3172 |
]. |
|
331 | 3173 |
|
199 | 3174 |
spec isNil ifFalse:[ |
298 | 3175 |
(spec isMemberOf:Menu) ifFalse:[ |
3176 |
menu := Menu new fromLiteralArrayEncoding:spec. |
|
3177 |
] ifTrue:[ |
|
3178 |
menu := spec. |
|
3179 |
]. |
|
728 | 3180 |
firstNode := self nodeLabel:(aSelector asString). |
3181 |
self subMenu:menu parent:firstNode. |
|
199 | 3182 |
] ifTrue:[ |
728 | 3183 |
(aClass notNil and: [aSelector isNil and: [listOfNodes size > 0]]) |
3184 |
ifTrue: |
|
3185 |
[ |
|
3186 |
firstNode := listOfNodes first |
|
3187 |
] |
|
3188 |
ifFalse: |
|
3189 |
[ |
|
3190 |
aSelector notNil ifTrue:[firstNodeLabel := aSelector asString] |
|
3191 |
ifFalse:[firstNodeLabel := 'menu']. |
|
3192 |
firstNode := self nodeLabel:firstNodeLabel. |
|
3193 |
] |
|
199 | 3194 |
]. |
734 | 3195 |
|
728 | 3196 |
firstNode expand. |
3197 |
model root: firstNode. |
|
3198 |
||
3199 |
firstNode hasChildren ifFalse:[ |
|
775 | 3200 |
model add:(self nodeLabel:'Item 1') below:firstNode |
199 | 3201 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3202 |
|
199 | 3203 |
|
3204 |
! |
|
3205 |
||
3206 |
buildFromMenu:aMenu |
|
734 | 3207 |
"put aMenu into the tree view" |
199 | 3208 |
|
249 | 3209 |
|node| |
199 | 3210 |
|
1244 | 3211 |
self selection:nil. |
3212 |
||
213 | 3213 |
node := self nodeLabel:'menu'. |
199 | 3214 |
self subMenu:aMenu parent:node. |
3215 |
||
3216 |
node hasChildren ifFalse:[ |
|
728 | 3217 |
node add:(self nodeLabel:'Item 1') |
199 | 3218 |
]. |
213 | 3219 |
node expand. |
199 | 3220 |
model root:node. |
3221 |
! |
|
3222 |
||
213 | 3223 |
menuItem:anItem |
199 | 3224 |
|
249 | 3225 |
|node| |
199 | 3226 |
|
407 | 3227 |
node := self nodeLabel: anItem label. |
199 | 3228 |
node contents buildFromMenuItem:anItem. |
407 | 3229 |
self subMenu: anItem submenu parent:node. |
3230 |
^node. |
|
199 | 3231 |
|
3232 |
||
3233 |
! |
|
3234 |
||
3235 |
subMenu:aMenu parent:aParent |
|
407 | 3236 |
|
213 | 3237 |
|idx grp| |
199 | 3238 |
|
3239 |
aMenu isNil ifFalse:[ |
|
3240 |
grp := aMenu groupSizes. |
|
213 | 3241 |
aMenu itemsDo:[:i| aParent add:(self menuItem:i)]. |
199 | 3242 |
|
3243 |
grp notNil ifTrue:[ |
|
213 | 3244 |
idx := 0. |
199 | 3245 |
|
3246 |
grp do:[:i| |
|
213 | 3247 |
idx := idx + i + 1. |
3248 |
aParent add:(self nodeLabel:nil) beforeIndex:idx. |
|
199 | 3249 |
] |
3250 |
] |
|
3251 |
] |
|
3252 |
! ! |
|
3253 |
||
407 | 3254 |
!MenuEditor::TreeView methodsFor:'conversion'! |
199 | 3255 |
|
3256 |
asMenu |
|
3257 |
|menu root| |
|
3258 |
||
3259 |
root := self root. |
|
3260 |
||
3261 |
root hasChildren ifTrue:[ |
|
3262 |
menu := Menu new. |
|
3263 |
root children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
3264 |
]. |
|
3265 |
^ menu |
|
3266 |
! |
|
3267 |
||
3268 |
asMenuItem:aNode |
|
3269 |
||
3270 |
|menu item| |
|
3271 |
||
3272 |
item := aNode contents asMenuItem. |
|
3273 |
||
3274 |
aNode hasChildren ifTrue:[ |
|
3275 |
menu := Menu new. |
|
3276 |
aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
3277 |
item submenu:menu |
|
3278 |
]. |
|
3279 |
^ item |
|
3280 |
||
3281 |
! ! |
|
3282 |
||
407 | 3283 |
!MenuEditor::TreeView methodsFor:'drawing basics'! |
199 | 3284 |
|
853 | 3285 |
redrawLabelAt:x y:yTop index:anIndex |
407 | 3286 |
"draw text label assigned to a node at x y( center)" |
3287 |
||
1067 | 3288 |
|isSelected y0 x0 x1 w type item| |
199 | 3289 |
|
3290 |
item := (listOfNodes at:anIndex) contents. |
|
218 | 3291 |
type := item separatorType. |
199 | 3292 |
|
218 | 3293 |
type isNil ifTrue:[ |
853 | 3294 |
^ super redrawLabelAt:x y:yTop index:anIndex |
3295 |
]. |
|
3296 |
isSelected := self isInSelection:anIndex. |
|
854 | 3297 |
x0 := x. |
853 | 3298 |
|
3299 |
highlightMode == #label ifTrue:[ |
|
3300 |
x0 := x + 4. |
|
3301 |
||
3302 |
isSelected ifTrue:[ |
|
3303 |
w := 80 + 8. |
|
3304 |
self paint:hilightBgColor. |
|
3305 |
self fillRectangleX:x y:yTop width:w height:fontHeight. |
|
3306 |
] |
|
218 | 3307 |
] ifFalse:[ |
853 | 3308 |
w := 0. |
3309 |
]. |
|
3310 |
type == #blank ifFalse:[ |
|
3311 |
isSelected ifTrue:[self paint:hilightFgColor] |
|
3312 |
ifFalse:[self paint:fgColor]. |
|
3313 |
||
3314 |
x1 := x0 + 80. |
|
3315 |
y0 := yTop - 1 + (fontHeight // 2). |
|
3316 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
3317 |
||
3318 |
type == #double ifTrue:[ |
|
3319 |
y0 := y0 + 2. |
|
3320 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
3321 |
] |
|
3322 |
]. |
|
3323 |
||
3324 |
(isSelected and:[highlightMode == #label]) ifTrue:[ |
|
3325 |
self redrawSelFrameAtX:x y:yTop toX:(x + w) |
|
3326 |
]. |
|
3327 |
||
199 | 3328 |
! ! |
3329 |
||
407 | 3330 |
!MenuEditor::TreeView methodsFor:'event handling'! |
356 | 3331 |
|
3332 |
keyPress:key x:x y:y |
|
407 | 3333 |
"invoked if any key was pressed" |
3334 |
||
412 | 3335 |
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)> |
3336 |
||
686 | 3337 |
(key == #Delete or:[key == #BackSpace]) ifTrue: [^self doDelete]. |
748 | 3338 |
key == #Cut ifTrue:[^self doCut]. |
407 | 3339 |
key == #Copy ifTrue:[^self doCopy]. |
3340 |
key == #Paste ifTrue:[^self doPaste]. |
|
356 | 3341 |
|
412 | 3342 |
super keyPress:key x:x y:y |
356 | 3343 |
|
3344 |
! ! |
|
3345 |
||
407 | 3346 |
!MenuEditor::TreeView methodsFor:'initialization'! |
199 | 3347 |
|
3348 |
initialize |
|
734 | 3349 |
"initialize the tree view of the menu components" |
407 | 3350 |
|
199 | 3351 |
super initialize. |
275 | 3352 |
|
213 | 3353 |
self multipleSelectOk:true. |
407 | 3354 |
self showDirectoryIndicator: true. |
3355 |
self showDirectoryIndicatorForRoot: false. |
|
634 | 3356 |
self selectConditionBlock: [:i|self application askForItemModification]. |
412 | 3357 |
self validateDoubleClickBlock: [:node| node ~~ listOfNodes first]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3358 |
self model iconAction: [:aNode| aNode contents iconFor: aNode]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3359 |
self model labelAction: [:aNode| aNode contents treeViewLabel] |
199 | 3360 |
! ! |
3361 |
||
407 | 3362 |
!MenuEditor::TreeView methodsFor:'menus'! |
199 | 3363 |
|
1389 | 3364 |
XXdoDeleteSelectionBuffered:aBool |
3365 |
|appl idx| |
|
3366 |
||
3367 |
appl := self topView application. |
|
3368 |
||
3369 |
(appl hasValidSelection value and: [self askForItemModification]) ifFalse:[ |
|
3370 |
^ self |
|
3371 |
]. |
|
3372 |
aBool ifTrue:[ |
|
3373 |
self doCopy |
|
3374 |
]. |
|
3375 |
||
3376 |
idx := 10000. |
|
3377 |
self selection do:[:aNumber| idx := idx min:aNumber ]. |
|
3378 |
||
3379 |
self selectedNodesRemove. |
|
3380 |
self selection:(idx min:(self list size)). |
|
3381 |
self setModified. |
|
3382 |
||
3383 |
aBool ifTrue:[ |
|
3384 |
"/ must update copy&paste indication |
|
3385 |
appl updateAllToolInstances. |
|
3386 |
] |
|
3387 |
! |
|
3388 |
||
199 | 3389 |
doCopy |
912 | 3390 |
|clip| |
398 | 3391 |
|
213 | 3392 |
self hasSelection ifTrue:[ |
912 | 3393 |
self application clipboard:(clip := OrderedCollection new). |
3394 |
self selectionDo:[:i | clip add:((listOfNodes at:i) copy)]. |
|
748 | 3395 |
self topView application updateAllToolInstances. |
213 | 3396 |
] |
199 | 3397 |
! |
3398 |
||
3399 |
doCreateItem |
|
398 | 3400 |
|
557 | 3401 |
self addElement: (self nodeLabel:'Item') |
199 | 3402 |
! |
3403 |
||
218 | 3404 |
doCreateLink |
407 | 3405 |
|
218 | 3406 |
|node item| |
3407 |
||
557 | 3408 |
node := self nodeLabel:'Submenu Link'. |
218 | 3409 |
item := node contents. |
3410 |
item submenuChannel:#menuDefaultLink. |
|
398 | 3411 |
self addElement:node. |
3412 |
self setModified. |
|
218 | 3413 |
|
3414 |
||
3415 |
! |
|
3416 |
||
199 | 3417 |
doCreateMenu |
398 | 3418 |
|
199 | 3419 |
|node| |
557 | 3420 |
node := self nodeLabel:'Submenu'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3421 |
node parent: self selectedNode. |
557 | 3422 |
node add:(self nodeLabel:'Item 1'). |
213 | 3423 |
self addElement:node |
199 | 3424 |
! |
3425 |
||
3426 |
doCreateSep |
|
398 | 3427 |
|
213 | 3428 |
self addElement:(self nodeLabel:nil) |
199 | 3429 |
! |
3430 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3431 |
doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3432 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3433 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3434 |
node := self nodeLabel:'Edit'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3435 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3436 |
node add:(self nodeLabel:'Copy' selector:#copySelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3437 |
node add:(self nodeLabel:'Cut' selector:#cutSelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3438 |
node add:(self nodeLabel:'Paste' selector:#paste). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3439 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3440 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3441 |
"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
|
3442 |
"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
|
3443 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3444 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3445 |
doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3446 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3447 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3448 |
node := self nodeLabel:'File'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3449 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3450 |
node add:(self nodeLabel:'New' selector:#menuNew). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3451 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3452 |
node add:(self nodeLabel:'Open...' selector:#menuOpen). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3453 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3454 |
node add:(self nodeLabel:'Save' selector:#menuSave). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3455 |
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
|
3456 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3457 |
node add:(self nodeLabel:'Exit' selector:#closeRequest). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3458 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3459 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3460 |
"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
|
3461 |
"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
|
3462 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3463 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3464 |
doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3465 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3466 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3467 |
node := self nodeLabel:'Help'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3468 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3469 |
node contents startGroup:#right. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3470 |
node add:(self nodeLabel:'Documentation' selector:#openDocumentation). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3471 |
node add:(self nodeLabel:'-'). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3472 |
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
|
3473 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3474 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3475 |
"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
|
3476 |
"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
|
3477 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3478 |
|
199 | 3479 |
doCut |
1389 | 3480 |
^ self doDeleteSelectionBuffered:true |
199 | 3481 |
! |
3482 |
||
686 | 3483 |
doDelete |
1389 | 3484 |
^ self doDeleteSelectionBuffered:false |
3485 |
! |
|
3486 |
||
3487 |
doDeleteSelectionBuffered:aBool |
|
3488 |
|appl nsel list item prnt| |
|
3489 |
||
3490 |
appl := self topView application. |
|
3491 |
||
3492 |
(appl hasValidSelection value and: [self askForItemModification]) ifFalse:[ |
|
3493 |
^ self |
|
3494 |
]. |
|
3495 |
aBool ifTrue:[ |
|
3496 |
self doCopy |
|
3497 |
]. |
|
3498 |
list := self list. |
|
3499 |
nsel := list size. |
|
3500 |
self selection do:[:aNumber| nsel := nsel min:aNumber ]. |
|
3501 |
||
3502 |
( (item := list at:nsel ifAbsent:nil) notNil |
|
3503 |
and:[(prnt := item parent) notNil |
|
3504 |
and:[prnt children last == item]] |
|
3505 |
) ifTrue:[ |
|
3506 |
nsel := nsel - 1 |
|
3507 |
]. |
|
3508 |
||
3509 |
self selectedNodesRemove. |
|
3510 |
self selection:(nsel min:(list size)). |
|
3511 |
self setModified. |
|
3512 |
||
3513 |
aBool ifTrue:[ |
|
3514 |
"/ must update copy&paste indication |
|
3515 |
appl updateAllToolInstances. |
|
686 | 3516 |
] |
3517 |
! |
|
3518 |
||
199 | 3519 |
doPaste |
912 | 3520 |
|clip| |
3521 |
||
3522 |
clip := self application clipboard. |
|
3523 |
(clip notNil and:[self selectedNode notNil]) ifTrue:[ |
|
3524 |
self addElement:(clip collect:[:el| el copy]) |
|
220 | 3525 |
]. |
199 | 3526 |
! ! |
3527 |
||
407 | 3528 |
!MenuEditor::TreeView methodsFor:'private'! |
199 | 3529 |
|
557 | 3530 |
addElement: aNode |
407 | 3531 |
"add something after selection" |
3532 |
||
1104 | 3533 |
|label sel| |
3534 |
||
3535 |
self askForItemModification ifTrue:[ |
|
3536 |
self selectedNodeAdd:aNode. |
|
3537 |
(aNode isCollection not |
|
3538 |
and: [aNode name = 'Item']) |
|
3539 |
ifTrue:[ |
|
3540 |
sel := self selectedNode. |
|
3541 |
label := aNode name , ' ', |
|
3542 |
(sel parent notNil |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3543 |
ifTrue: |
1104 | 3544 |
[ |
3545 |
(((sel children size = 0 |
|
3546 |
ifTrue: [sel parent children] |
|
3547 |
ifFalse: [sel children]) |
|
3548 |
select:[:node| |
|
3549 |
|lab| |
|
3550 |
lab := node contents label. |
|
3551 |
((node children size = 0) & |
|
3552 |
node contents submenuChannel isNil & |
|
3553 |
(lab ~= '-') & (lab ~= '=') & (lab ~= '')) |
|
3554 |
]) size) printString |
|
3555 |
] |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3556 |
ifFalse: ['1']). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3557 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3558 |
aNode name: label string asBoldText. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3559 |
aNode contents label: label string. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3560 |
]. |
603 | 3561 |
aNode isCollection ifFalse: [self selectNode: aNode] ifTrue: [self selection: (aNode collect: [:node| self indexOfNode: node])]. |
3562 |
self setModified. |
|
3563 |
] |
|
3564 |
! |
|
3565 |
||
634 | 3566 |
askForItemModification |
3567 |
||
3568 |
^self topView application askForItemModification |
|
199 | 3569 |
! |
3570 |
||
213 | 3571 |
nodeLabel:aLabel |
407 | 3572 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3573 |
^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
|
3574 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3575 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
398 | 3576 |
! |
3577 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3578 |
nodeLabel:aLabel selector:aSelector |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3579 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3580 |
^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
|
3581 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3582 |
"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
|
3583 |
"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
|
3584 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3585 |
|
557 | 3586 |
selectedNodeAdd:something |
3587 |
||
1104 | 3588 |
|node numChildren| |
557 | 3589 |
|
3590 |
something notNil ifTrue:[ |
|
3591 |
(node := self selectedNode) notNil ifTrue:[ |
|
1104 | 3592 |
numChildren := node children size. |
3593 |
||
557 | 3594 |
node parent notNil ifTrue:[ |
3595 |
node isCollapsable ifTrue:[ |
|
1104 | 3596 |
model add:something afterIndex:numChildren below:node |
557 | 3597 |
] ifFalse:[ |
3598 |
model add:something after:node |
|
3599 |
] |
|
3600 |
] ifFalse:[ |
|
1104 | 3601 |
model add:something afterIndex:numChildren below:(self root) |
557 | 3602 |
] |
3603 |
] |
|
3604 |
] |
|
3605 |
||
3606 |
||
3607 |
! |
|
3608 |
||
398 | 3609 |
setModified |
912 | 3610 |
|app| |
3611 |
||
3612 |
(app := self topView application) modified: true. |
|
3613 |
app updateChannels |
|
199 | 3614 |
! ! |
3615 |
||
3616 |
!MenuEditor class methodsFor:'documentation'! |
|
3617 |
||
3618 |
version |
|
3619 |
^ '$Header$' |
|
3620 |
! ! |
|
1462
02fe22d76582
change layout of image viewer, support of adding new image retriever
ca
parents:
1454
diff
changeset
|
3621 |
MenuEditor initialize! |