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