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