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