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