author | tz |
Wed, 08 Jul 1998 22:58:41 +0200 | |
changeset 887 | 79a6e12e1d0f |
parent 885 | 34cefb1e6dda |
child 888 | 2712edb36a3a |
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' |
885 | 895 |
#layout: #(#LayoutFrame 182 0 339 0 577 0 615 0) |
728 | 896 |
#label: 'Image Item' |
703 | 897 |
#min: #(#Point 10 10) |
898 |
#max: #(#Point 1280 1024) |
|
885 | 899 |
#bounds: #(#Rectangle 182 339 578 616) |
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' |
|
958 |
#layout: #(#LayoutFrame 110 0 66 0 0 0.6 200 0) |
|
959 |
#model: #selectionOfImage |
|
960 |
#hasHorizontalScrollBar: true |
|
961 |
#hasVerticalScrollBar: true |
|
962 |
#miniScrollerHorizontal: true |
|
885 | 963 |
#doubleClickSelector: #doEditImage |
879 | 964 |
#valueChangeSelector: #imageSelected |
965 |
#useIndex: false |
|
966 |
#sequenceList: #listOfImages |
|
199 | 967 |
) |
968 |
) |
|
969 |
) |
|
970 |
) |
|
525 | 971 |
! |
972 |
||
973 |
windowSpec |
|
738 | 974 |
"This resource specification was automatically generated |
975 |
by the UIPainter of ST/X." |
|
976 |
||
977 |
"Do not manually edit this!! If it is corrupted, |
|
978 |
the UIPainter may not be able to read the specification." |
|
525 | 979 |
|
980 |
" |
|
981 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
982 |
MenuEditor new openInterface:#windowSpec |
|
738 | 983 |
MenuEditor open |
525 | 984 |
" |
985 |
||
986 |
<resource: #canvas> |
|
987 |
||
988 |
^ |
|
989 |
||
990 |
#(#FullSpec |
|
703 | 991 |
#window: |
525 | 992 |
#(#WindowSpec |
734 | 993 |
#name: 'Menu Editor' |
875 | 994 |
#layout: #(#LayoutFrame 106 0 544 0 663 0 923 0) |
734 | 995 |
#label: 'Menu Editor' |
748 | 996 |
#min: #(#Point 510 390) |
703 | 997 |
#max: #(#Point 1152 900) |
875 | 998 |
#bounds: #(#Rectangle 106 544 664 924) |
703 | 999 |
#menu: #menu |
1000 |
#usePreferredExtent: false |
|
525 | 1001 |
) |
703 | 1002 |
#component: |
525 | 1003 |
#(#SpecCollection |
703 | 1004 |
#collection: |
525 | 1005 |
#( |
1006 |
#(#MenuPanelSpec |
|
703 | 1007 |
#name: 'menuToolbarView' |
1008 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1009 |
#menu: #menuToolbar |
|
1010 |
#showSeparatingLines: true |
|
525 | 1011 |
) |
1012 |
#(#VariableHorizontalPanelSpec |
|
734 | 1013 |
#name: 'VariableHorizontalPanel' |
703 | 1014 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
1015 |
#component: |
|
525 | 1016 |
#(#SpecCollection |
703 | 1017 |
#collection: |
525 | 1018 |
#( |
1019 |
#(#ArbitraryComponentSpec |
|
734 | 1020 |
#name: 'TreeView' |
703 | 1021 |
#menu: #menuEdit |
1022 |
#hasHorizontalScrollBar: true |
|
1023 |
#hasVerticalScrollBar: true |
|
1024 |
#component: #treeView |
|
1025 |
#hasBorder: false |
|
525 | 1026 |
) |
1027 |
#(#ViewSpec |
|
734 | 1028 |
#name: 'Box' |
703 | 1029 |
#component: |
525 | 1030 |
#(#SpecCollection |
703 | 1031 |
#collection: |
525 | 1032 |
#( |
1033 |
#(#NoteBookViewSpec |
|
734 | 1034 |
#name: 'NoteBook' |
748 | 1035 |
#layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
703 | 1036 |
#tabable: true |
1037 |
#model: #tabModel |
|
1038 |
#menu: #tabList |
|
1039 |
#useIndex: true |
|
1040 |
#canvas: #noteBookView |
|
525 | 1041 |
) |
1042 |
#(#UISubSpecification |
|
703 | 1043 |
#name: 'SubSpecification' |
1044 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1045 |
#majorKey: #ToolApplicationModel |
|
1046 |
#minorKey: #windowSpecForCommit |
|
525 | 1047 |
) |
1048 |
) |
|
1049 |
) |
|
703 | 1050 |
#level: -1 |
525 | 1051 |
) |
1052 |
) |
|
1053 |
) |
|
836 | 1054 |
#handles: #(#Any 0.30117 1.0) |
525 | 1055 |
) |
1056 |
#(#UISubSpecification |
|
734 | 1057 |
#name: 'InfoBarSubSpec' |
703 | 1058 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
1059 |
#majorKey: #ToolApplicationModel |
|
1060 |
#minorKey: #windowSpecForInfoBar |
|
525 | 1061 |
) |
1062 |
) |
|
1063 |
) |
|
1064 |
) |
|
836 | 1065 |
|
875 | 1066 |
"Modified: / 20.6.1998 / 15:41:41 / cg" |
525 | 1067 |
! ! |
1068 |
||
1069 |
!MenuEditor class methodsFor:'menu specs'! |
|
1070 |
||
1071 |
menu |
|
738 | 1072 |
"This resource specification was automatically generated |
1073 |
by the MenuEditor of ST/X." |
|
1074 |
||
1075 |
"Do not manually edit this!! If it is corrupted, |
|
1076 |
the MenuEditor may not be able to read the specification." |
|
525 | 1077 |
|
1078 |
" |
|
1079 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
1080 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
1081 |
" |
|
1082 |
||
1083 |
<resource: #menu> |
|
1084 |
||
1085 |
^ |
|
1086 |
||
1087 |
#(#Menu |
|
1088 |
||
1089 |
#( |
|
1090 |
#(#MenuItem |
|
686 | 1091 |
#label: 'About' |
836 | 1092 |
#translateLabel: true |
686 | 1093 |
#accessCharacterPosition: 1 |
1094 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
|
1095 |
#submenuChannel: #menuAbout |
|
525 | 1096 |
) |
1097 |
#(#MenuItem |
|
686 | 1098 |
#label: 'File' |
1099 |
#activeHelpKey: #file |
|
836 | 1100 |
#translateLabel: true |
686 | 1101 |
#submenu: |
525 | 1102 |
#(#Menu |
1103 |
||
1104 |
#( |
|
1105 |
#(#MenuItem |
|
686 | 1106 |
#label: 'New' |
1107 |
#value: #doNew |
|
836 | 1108 |
#translateLabel: true |
686 | 1109 |
#activeHelpKey: #fileNew |
525 | 1110 |
) |
1111 |
#(#MenuItem |
|
686 | 1112 |
#label: '-' |
525 | 1113 |
) |
1114 |
#(#MenuItem |
|
686 | 1115 |
#label: 'Load...' |
1116 |
#translateLabel: true |
|
1117 |
#value: #doLoad |
|
1118 |
#activeHelpKey: #fileLoad |
|
525 | 1119 |
) |
1120 |
#(#MenuItem |
|
686 | 1121 |
#label: '-' |
525 | 1122 |
) |
1123 |
#(#MenuItem |
|
686 | 1124 |
#label: 'Save' |
836 | 1125 |
#translateLabel: true |
686 | 1126 |
#value: #doSave |
1127 |
#activeHelpKey: #fileSave |
|
525 | 1128 |
) |
1129 |
#(#MenuItem |
|
686 | 1130 |
#label: 'Save As...' |
836 | 1131 |
#translateLabel: true |
686 | 1132 |
#value: #doSaveAs |
1133 |
#activeHelpKey: #fileSaveAs |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1134 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1135 |
#(#MenuItem |
686 | 1136 |
#label: '-' |
525 | 1137 |
) |
1138 |
#(#MenuItem |
|
686 | 1139 |
#label: 'Pick A Menu...' |
836 | 1140 |
#translateLabel: true |
686 | 1141 |
#value: #doPickAMenu |
1142 |
#activeHelpKey: #filePickAMenu |
|
525 | 1143 |
) |
1144 |
#(#MenuItem |
|
686 | 1145 |
#label: '-' |
525 | 1146 |
) |
1147 |
#(#MenuItem |
|
686 | 1148 |
#label: 'Browse Class' |
836 | 1149 |
#translateLabel: true |
686 | 1150 |
#value: #doBrowseClass |
1151 |
#activeHelpKey: #fileBrowseClass |
|
525 | 1152 |
) |
1153 |
#(#MenuItem |
|
686 | 1154 |
#label: '-' |
525 | 1155 |
) |
1156 |
#(#MenuItem |
|
686 | 1157 |
#label: 'Exit' |
1158 |
#translateLabel: true |
|
1159 |
#value: #closeRequest |
|
1160 |
#activeHelpKey: #fileExit |
|
525 | 1161 |
) |
1162 |
) nil |
|
1163 |
nil |
|
1164 |
) |
|
1165 |
) |
|
1166 |
#(#MenuItem |
|
686 | 1167 |
#label: 'Edit' |
1168 |
#activeHelpKey: #edit |
|
836 | 1169 |
#translateLabel: true |
686 | 1170 |
#submenuChannel: #menuEdit |
525 | 1171 |
) |
1172 |
#(#MenuItem |
|
686 | 1173 |
#label: 'Add' |
1174 |
#activeHelpKey: #add |
|
836 | 1175 |
#translateLabel: true |
686 | 1176 |
#submenuChannel: #menuAdd |
525 | 1177 |
) |
1178 |
#(#MenuItem |
|
686 | 1179 |
#label: 'Test' |
1180 |
#activeHelpKey: #test |
|
836 | 1181 |
#translateLabel: true |
686 | 1182 |
#submenuChannel: #submenuTest |
525 | 1183 |
) |
1184 |
#(#MenuItem |
|
738 | 1185 |
#label: 'Settings' |
1186 |
#submenu: |
|
1187 |
#(#Menu |
|
1188 |
||
1189 |
#( |
|
1190 |
#(#MenuItem |
|
1191 |
#label: 'Fonts' |
|
836 | 1192 |
#translateLabel: true |
738 | 1193 |
#submenuChannel: #menuFont |
1194 |
) |
|
1195 |
) nil |
|
1196 |
nil |
|
1197 |
) |
|
1198 |
) |
|
1199 |
#(#MenuItem |
|
748 | 1200 |
#label: 'History' |
1201 |
#activeHelpKey: #history |
|
836 | 1202 |
#translateLabel: true |
748 | 1203 |
#submenuChannel: #menuHistory |
1204 |
) |
|
1205 |
#(#MenuItem |
|
686 | 1206 |
#label: 'Help' |
836 | 1207 |
#translateLabel: true |
686 | 1208 |
#startGroup: #right |
748 | 1209 |
#submenu: |
1210 |
#(#Menu |
|
1211 |
||
1212 |
#( |
|
1213 |
#(#MenuItem |
|
1214 |
#label: 'Documentation' |
|
1215 |
#value: #openHTMLDocument: |
|
836 | 1216 |
#translateLabel: true |
748 | 1217 |
#activeHelpKey: #helpTutorial |
764 | 1218 |
#argument: 'tools/uipainter/MenuEditor.html' |
748 | 1219 |
) |
1220 |
#(#MenuItem |
|
1221 |
#label: '-' |
|
1222 |
) |
|
1223 |
#(#MenuItem |
|
1224 |
#label: 'Help Tool' |
|
1225 |
#value: #openHTMLDocument: |
|
836 | 1226 |
#translateLabel: true |
748 | 1227 |
#activeHelpKey: #helpHelpTool |
1228 |
#argument: 'tools/uipainter/HelpTool.html' |
|
1229 |
) |
|
1230 |
#(#MenuItem |
|
1231 |
#label: '-' |
|
1232 |
) |
|
1233 |
#(#MenuItem |
|
1234 |
#label: 'Show Help Texts' |
|
836 | 1235 |
#translateLabel: true |
748 | 1236 |
#activeHelpKey: #helpShowHelp |
1237 |
#indication: #showHelp: |
|
1238 |
) |
|
1239 |
) nil |
|
1240 |
nil |
|
1241 |
) |
|
525 | 1242 |
) |
1243 |
) nil |
|
1244 |
nil |
|
1245 |
) |
|
836 | 1246 |
|
1247 |
"Modified: / 20.5.1998 / 00:36:34 / cg" |
|
525 | 1248 |
! |
1249 |
||
1250 |
menuAdd |
|
738 | 1251 |
"This resource specification was automatically generated |
1252 |
by the MenuEditor of ST/X." |
|
1253 |
||
1254 |
"Do not manually edit this!! If it is corrupted, |
|
1255 |
the MenuEditor may not be able to read the specification." |
|
525 | 1256 |
|
1257 |
" |
|
1258 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd |
|
1259 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp |
|
1260 |
" |
|
1261 |
||
1262 |
<resource: #menu> |
|
1263 |
||
1264 |
^ |
|
1265 |
||
1266 |
#(#Menu |
|
1267 |
||
1268 |
#( |
|
1269 |
#(#MenuItem |
|
703 | 1270 |
#label: 'Menu Item' |
836 | 1271 |
#translateLabel: true |
703 | 1272 |
#value: #doCreateItem |
1273 |
#activeHelpKey: #addMenuItem |
|
1274 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') |
|
525 | 1275 |
) |
1276 |
#(#MenuItem |
|
703 | 1277 |
#label: 'Menu Separator' |
836 | 1278 |
#translateLabel: true |
703 | 1279 |
#value: #doCreateSep |
1280 |
#activeHelpKey: #addMenuSeparator |
|
1281 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') |
|
525 | 1282 |
) |
1283 |
#(#MenuItem |
|
703 | 1284 |
#label: '-' |
525 | 1285 |
) |
1286 |
#(#MenuItem |
|
703 | 1287 |
#label: 'Submenu' |
836 | 1288 |
#translateLabel: true |
703 | 1289 |
#value: #doCreateMenu |
1290 |
#activeHelpKey: #addSubMenu |
|
1291 |
#labelImage: #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') |
|
525 | 1292 |
) |
1293 |
#(#MenuItem |
|
703 | 1294 |
#label: 'Submenu Link' |
836 | 1295 |
#translateLabel: true |
703 | 1296 |
#value: #doCreateLink |
1297 |
#activeHelpKey: #addSubMenuLink |
|
1298 |
#labelImage: #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Submenu Link') |
|
525 | 1299 |
) |
1300 |
) nil |
|
1301 |
nil |
|
1302 |
) |
|
836 | 1303 |
|
1304 |
"Modified: / 20.5.1998 / 00:40:39 / cg" |
|
525 | 1305 |
! |
1306 |
||
1307 |
menuDefaultLink |
|
738 | 1308 |
"This resource specification was automatically generated |
1309 |
by the MenuEditor of ST/X." |
|
1310 |
||
1311 |
"Do not manually edit this!! If it is corrupted, |
|
1312 |
the MenuEditor may not be able to read the specification." |
|
525 | 1313 |
|
1314 |
" |
|
1315 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
1316 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
1317 |
" |
|
1318 |
||
1319 |
<resource: #menu> |
|
1320 |
||
1321 |
^ |
|
738 | 1322 |
|
525 | 1323 |
#(#Menu |
738 | 1324 |
|
525 | 1325 |
#( |
1326 |
#(#MenuItem |
|
738 | 1327 |
#'label:' '!!!! derives from application !!!!' |
525 | 1328 |
) |
1329 |
) nil |
|
1330 |
nil |
|
1331 |
) |
|
1332 |
! |
|
1333 |
||
1334 |
menuEdit |
|
738 | 1335 |
"This resource specification was automatically generated |
1336 |
by the MenuEditor of ST/X." |
|
1337 |
||
1338 |
"Do not manually edit this!! If it is corrupted, |
|
1339 |
the MenuEditor may not be able to read the specification." |
|
525 | 1340 |
|
1341 |
" |
|
1342 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit |
|
1343 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp |
|
1344 |
" |
|
1345 |
||
1346 |
<resource: #menu> |
|
1347 |
||
1348 |
^ |
|
1349 |
||
1350 |
#(#Menu |
|
1351 |
||
1352 |
#( |
|
1353 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1354 |
#label: 'Cut' |
882 | 1355 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1356 |
#value: #doCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1357 |
#activeHelpKey: #editCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1358 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1359 |
#shortcutKeyCharacter: #Cut |
525 | 1360 |
) |
1361 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1362 |
#label: 'Copy' |
882 | 1363 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1364 |
#value: #doCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1365 |
#activeHelpKey: #editCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1366 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1367 |
#shortcutKeyCharacter: #Copy |
525 | 1368 |
) |
1369 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1370 |
#label: 'Paste' |
882 | 1371 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1372 |
#value: #doPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1373 |
#activeHelpKey: #editPaste |
738 | 1374 |
#enabled: #valueOfCanPaste |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1375 |
#shortcutKeyCharacter: #Paste |
525 | 1376 |
) |
1377 |
#(#MenuItem |
|
686 | 1378 |
#label: 'Delete' |
882 | 1379 |
#translateLabel: true |
686 | 1380 |
#value: #doDelete |
1381 |
#activeHelpKey: #editDelete |
|
1382 |
#enabled: #hasValidSelection |
|
1383 |
#shortcutKeyCharacter: #Delete |
|
1384 |
) |
|
1385 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1386 |
#label: '-' |
525 | 1387 |
) |
1388 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1389 |
#label: 'Move Up' |
882 | 1390 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1391 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1392 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1393 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1394 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up') |
525 | 1395 |
) |
1396 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1397 |
#label: 'Move Down' |
882 | 1398 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1399 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1400 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1401 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1402 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down') |
525 | 1403 |
) |
1404 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1405 |
#label: 'Move In' |
882 | 1406 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1407 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1408 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1409 |
#enabled: #valueOfEnableMovingIn |
882 | 1410 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In') |
525 | 1411 |
) |
1412 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1413 |
#label: 'Move Out' |
882 | 1414 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1415 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1416 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1417 |
#enabled: #valueOfEnableMovingOut |
882 | 1418 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out') |
525 | 1419 |
) |
1420 |
) nil |
|
1421 |
nil |
|
1422 |
) |
|
1423 |
! |
|
1424 |
||
1425 |
menuToolbar |
|
738 | 1426 |
"This resource specification was automatically generated |
1427 |
by the MenuEditor of ST/X." |
|
1428 |
||
1429 |
"Do not manually edit this!! If it is corrupted, |
|
1430 |
the MenuEditor may not be able to read the specification." |
|
525 | 1431 |
|
1432 |
" |
|
1433 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar |
|
1434 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp |
|
1435 |
" |
|
1436 |
||
1437 |
<resource: #menu> |
|
1438 |
||
1439 |
^ |
|
1440 |
||
1441 |
#(#Menu |
|
1442 |
||
1443 |
#( |
|
1444 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1445 |
#label: 'New' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1446 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1447 |
#value: #doNew |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1448 |
#activeHelpKey: #fileNew |
879 | 1449 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
525 | 1450 |
) |
1451 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1452 |
#label: 'Load' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1453 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1454 |
#value: #doLoad |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1455 |
#activeHelpKey: #fileLoad |
879 | 1456 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
525 | 1457 |
) |
1458 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1459 |
#label: 'Save' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1460 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1461 |
#value: #doSave |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1462 |
#activeHelpKey: #fileSave |
879 | 1463 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
525 | 1464 |
) |
1465 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1466 |
#label: '' |
525 | 1467 |
) |
1468 |
#(#MenuItem |
|
686 | 1469 |
#label: 'Cut' |
1470 |
#isButton: true |
|
1471 |
#value: #doCut |
|
1472 |
#activeHelpKey: #editCut |
|
1473 |
#enabled: #hasValidSelection |
|
879 | 1474 |
#labelImage: #(#ResourceRetriever #Icon #cutIcon) |
686 | 1475 |
) |
1476 |
#(#MenuItem |
|
1477 |
#label: 'Copy' |
|
1478 |
#isButton: true |
|
1479 |
#value: #doCopy |
|
1480 |
#activeHelpKey: #editCopy |
|
1481 |
#enabled: #hasValidSelection |
|
879 | 1482 |
#labelImage: #(#ResourceRetriever #Icon #copyIcon) |
686 | 1483 |
) |
1484 |
#(#MenuItem |
|
1485 |
#label: 'Paste' |
|
1486 |
#isButton: true |
|
1487 |
#value: #doPaste |
|
1488 |
#activeHelpKey: #editPaste |
|
738 | 1489 |
#enabled: #valueOfCanPaste |
879 | 1490 |
#labelImage: #(#ResourceRetriever #Icon #pasteIcon) |
686 | 1491 |
) |
1492 |
#(#MenuItem |
|
1493 |
#label: 'Delete' |
|
1494 |
#isButton: true |
|
1495 |
#value: #doDelete |
|
1496 |
#activeHelpKey: #editDelete |
|
1497 |
#enabled: #hasValidSelection |
|
879 | 1498 |
#labelImage: #(#ResourceRetriever #Icon #deleteIcon) |
686 | 1499 |
) |
1500 |
#(#MenuItem |
|
1501 |
#label: '' |
|
1502 |
) |
|
1503 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1504 |
#label: 'Add Item' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1505 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1506 |
#value: #doCreateItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1507 |
#activeHelpKey: #addMenuItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1508 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1509 |
#labelImage: #(#ResourceRetriever nil #menuItemImage) |
525 | 1510 |
) |
1511 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1512 |
#label: 'Add Separator' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1513 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1514 |
#value: #doCreateSep |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1515 |
#activeHelpKey: #addMenuSeparator |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1516 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1517 |
#labelImage: #(#ResourceRetriever nil #menuSeparatorImage) |
525 | 1518 |
) |
1519 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1520 |
#label: 'Add Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1521 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1522 |
#value: #doCreateMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1523 |
#activeHelpKey: #addSubMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1524 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1525 |
#labelImage: #(#ResourceRetriever nil #submenuImage) |
525 | 1526 |
) |
1527 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1528 |
#label: 'Add Linked Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1529 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1530 |
#value: #doCreateLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1531 |
#activeHelpKey: #addSubMenuLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1532 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1533 |
#labelImage: #(#ResourceRetriever nil #linkSubmenuImage) |
525 | 1534 |
) |
1535 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1536 |
#label: '' |
525 | 1537 |
) |
1538 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1539 |
#label: 'Move Up' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1540 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1541 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1542 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1543 |
#enabled: #valueOfEnableMovingUpOrDown |
879 | 1544 |
#labelImage: #(#ResourceRetriever #Icon #upIcon) |
525 | 1545 |
) |
1546 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1547 |
#label: 'Move Down' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1548 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1549 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1550 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1551 |
#enabled: #valueOfEnableMovingUpOrDown |
879 | 1552 |
#labelImage: #(#ResourceRetriever #Icon #downIcon) |
525 | 1553 |
) |
1554 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1555 |
#label: 'Move In' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1556 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1557 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1558 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1559 |
#enabled: #valueOfEnableMovingIn |
879 | 1560 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon) |
525 | 1561 |
) |
1562 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1563 |
#label: 'Move Out' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1564 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1565 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1566 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1567 |
#enabled: #valueOfEnableMovingOut |
879 | 1568 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon) |
525 | 1569 |
) |
1570 |
) nil |
|
1571 |
nil |
|
1572 |
) |
|
1573 |
! ! |
|
1574 |
||
1575 |
!MenuEditor class methodsFor:'slices'! |
|
1576 |
||
1577 |
slicesItem |
|
1578 |
^#( |
|
1579 |
(Basics basicsItemSpec) |
|
1580 |
(Details detailsEditSpec) |
|
1581 |
(Image imageEditSpec) |
|
1582 |
) |
|
1583 |
||
1584 |
! |
|
1585 |
||
1586 |
slicesLink |
|
1587 |
^#( |
|
1588 |
(Basics basicsLinkSpec) |
|
1589 |
(Details detailsEditSpec) |
|
1590 |
(Image imageEditSpec) |
|
1591 |
) |
|
1592 |
||
1593 |
! |
|
1594 |
||
1595 |
slicesMenu |
|
1596 |
^#( |
|
1597 |
(Basics basicsMenuSpec) |
|
1598 |
(Details detailsEditSpec) |
|
1599 |
(Image imageEditSpec) |
|
1600 |
) |
|
1601 |
||
1602 |
! |
|
1603 |
||
1604 |
slicesRootMenu |
|
1605 |
^#( |
|
1606 |
(Basics basicsRootSpec) |
|
1607 |
) |
|
1608 |
||
1609 |
! |
|
1610 |
||
1611 |
slicesSeparatorMenu |
|
1612 |
^#( |
|
1613 |
(Basics basicsSeparatorSpec) |
|
1614 |
) |
|
1615 |
||
199 | 1616 |
! ! |
1617 |
||
1618 |
!MenuEditor methodsFor:'accessing'! |
|
1619 |
||
218 | 1620 |
submenuTest |
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1621 |
"return the submenu assigned to item test; |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1622 |
this is dynamically constructed, to reflect the current |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1623 |
edited menu." |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1624 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1625 |
|menu cls| |
218 | 1626 |
|
407 | 1627 |
(menu := self treeView asMenu) allItemsDo: |
1628 |
[:anItem| |
|
218 | 1629 |
anItem value:nil. |
1630 |
anItem enabled:true. |
|
1631 |
]. |
|
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1632 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1633 |
cls := self resolveName:specClass. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1634 |
menu findGuiResourcesIn:cls. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1635 |
^ menu |
287 | 1636 |
! |
1637 |
||
716 | 1638 |
useHelpTool: aHelpTool |
728 | 1639 |
"take the help dictionaries from aHelpTool into my helpTool" |
407 | 1640 |
|
287 | 1641 |
self noteBookView. |
716 | 1642 |
|
748 | 1643 |
self helpTool buildFromClass: aHelpTool specClass. |
1644 |
self helpTool dictionaries: aHelpTool dictionaries. |
|
1645 |
self helpTool dictionary: aHelpTool dictionary |
|
199 | 1646 |
! ! |
1647 |
||
1648 |
!MenuEditor methodsFor:'aspects'! |
|
1649 |
||
220 | 1650 |
hasAnySingleSelection |
407 | 1651 |
|
1652 |
^builder booleanValueAspectFor: #hasAnySingleSelection |
|
220 | 1653 |
! |
1654 |
||
1655 |
hasValidSelection |
|
407 | 1656 |
|
1657 |
^builder booleanValueAspectFor: #hasValidSelection |
|
220 | 1658 |
! |
1659 |
||
1660 |
hasValidSingleSelection |
|
407 | 1661 |
|
1662 |
^builder booleanValueAspectFor: #hasValidSingleSelection |
|
220 | 1663 |
! |
1664 |
||
879 | 1665 |
listOfImages |
1666 |
"get a list of the images" |
|
1667 |
||
1668 |
|holder| |
|
1669 |
(holder := builder bindingAt:#listOfImages) isNil ifTrue:[ |
|
1670 |
builder aspectAt:#listOfImages put: (holder := List new). |
|
1671 |
self updateListOfImages |
|
1672 |
]. |
|
1673 |
^ holder |
|
1674 |
||
1675 |
||
1676 |
! |
|
1677 |
||
287 | 1678 |
noteBookView |
728 | 1679 |
"create the note book view containing the attibute sections and the help tool" |
199 | 1680 |
|
287 | 1681 |
|noteBook helpTool| |
1682 |
||
1683 |
(noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[ |
|
1684 |
noteBook := View new. |
|
1685 |
helpTool := UIHelpTool new. |
|
1686 |
||
1687 |
helpTool masterApplication:self. |
|
1688 |
helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1689 |
specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1690 |
||
1691 |
helpCanvas client:helpTool. |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1692 |
helpTool masterApplication:self. |
422 | 1693 |
helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
287 | 1694 |
|
1695 |
builder aspectAt:#noteBookView put:noteBook. |
|
199 | 1696 |
]. |
287 | 1697 |
^ noteBook |
199 | 1698 |
! |
1699 |
||
879 | 1700 |
selectionOfImage |
1701 |
"get selection of list of the images as value" |
|
1702 |
||
1703 |
|holder| |
|
1704 |
(holder := builder bindingAt:#selectionOfImage) isNil ifTrue:[ |
|
1705 |
builder aspectAt:#selectionOfImage put: (holder := nil asValue). |
|
1706 |
]. |
|
1707 |
^ holder |
|
1708 |
||
1709 |
||
1710 |
! |
|
1711 |
||
199 | 1712 |
tabList |
728 | 1713 |
"get a value holder with the list of the attribute sections (slices)" |
199 | 1714 |
|
298 | 1715 |
|holder| |
1716 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
|
734 | 1717 |
builder aspectAt:#tabList put:(holder := #(Basics Details Image Help) asValue). |
298 | 1718 |
]. |
1719 |
^ holder |
|
1720 |
||
1721 |
||
199 | 1722 |
! |
1723 |
||
407 | 1724 |
treeView |
728 | 1725 |
"get a tree view representing hierarchically the menu items" |
407 | 1726 |
|
1727 |
|treeView| |
|
1728 |
(treeView := builder bindingAt:#treeView) isNil ifTrue:[ |
|
1729 |
treeView := TreeView new. |
|
1730 |
treeView action:[:dummy|self menuChanged]. |
|
1731 |
builder aspectAt: #treeView put: treeView |
|
1732 |
]. |
|
1733 |
^treeView |
|
199 | 1734 |
! ! |
1735 |
||
728 | 1736 |
!MenuEditor methodsFor:'building'! |
1737 |
||
734 | 1738 |
buildFromClass:aClass andSelector:aSelector |
1739 |
||
1740 |
self isStandAlone ifTrue:[ |
|
748 | 1741 |
self helpTool buildFromClass:specClass |
734 | 1742 |
]. |
1743 |
self treeView buildFromClass: aClass andSelector: aSelector. |
|
1744 |
||
1745 |
self updateHistory. |
|
1746 |
self updateInfoLabel. |
|
1747 |
self treeView selection: 2. |
|
1748 |
self menuChanged |
|
1749 |
||
1750 |
! |
|
1751 |
||
738 | 1752 |
buildFromResourceSpec: aResourceSpec |
728 | 1753 |
|
734 | 1754 |
self buildFromMenu: |
738 | 1755 |
(aResourceSpec class == Menu ifTrue: [aResourceSpec] ifFalse: [aResourceSpec decodeAsLiteralArray]) |
728 | 1756 |
! ! |
1757 |
||
199 | 1758 |
!MenuEditor methodsFor:'change & update'! |
1759 |
||
748 | 1760 |
updateChannels |
1761 |
"update channels" |
|
407 | 1762 |
|
1763 |
|node parent next state| |
|
1764 |
||
412 | 1765 |
state := false. |
879 | 1766 |
self updateSelectionOfImage. |
407 | 1767 |
|
1768 |
(node := self treeView selectedNode) notNil |
|
1769 |
ifTrue: |
|
1770 |
[ |
|
220 | 1771 |
self hasAnySingleSelection value:true. |
407 | 1772 |
(parent := node parent) notNil |
1773 |
ifTrue: |
|
1774 |
[ |
|
220 | 1775 |
next := parent childAt:((parent indexOfChild:node) + 1). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1776 |
self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1777 |
self valueOfEnableMovingUpOrDown value:(parent children size > 1). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1778 |
self valueOfEnableMovingOut value:parent parent notNil. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1779 |
self hasValidSingleSelection value:true. |
748 | 1780 |
self hasValidSelection value:true. |
1781 |
self valueOfCanPaste value:true & self valueOfCanPaste value. |
|
738 | 1782 |
^self |
220 | 1783 |
] |
407 | 1784 |
] |
1785 |
ifFalse: |
|
1786 |
[ |
|
220 | 1787 |
self hasAnySingleSelection value:false. |
407 | 1788 |
self treeView numberOfSelections ~~ 0 ifTrue:[ |
1789 |
state := (self treeView isInSelection:1) not |
|
220 | 1790 |
] |
407 | 1791 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1792 |
self valueOfEnableMovingUpOrDown value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1793 |
self valueOfEnableMovingIn value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1794 |
self valueOfEnableMovingOut value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1795 |
self hasValidSingleSelection value:false. |
748 | 1796 |
self hasValidSelection value:state. |
1797 |
self valueOfCanPaste value:(self hasValidSingleSelection value or: [node == self treeView root]) & self valueOfCanPaste value. |
|
879 | 1798 |
|
1799 |
! |
|
1800 |
||
1801 |
updateListAndSelectionOfImage |
|
1802 |
"updates the list and selection of image" |
|
1803 |
||
1804 |
self updateListOfImages. |
|
1805 |
self updateSelectionOfImage |
|
1806 |
! |
|
1807 |
||
1808 |
updateListOfImages |
|
1809 |
"updates the list of images" |
|
1810 |
||
1811 |
|iconClass| |
|
1812 |
iconClass := Smalltalk at: (aspects at: #retriever) value ? specClass. |
|
1813 |
self listOfImages contents: |
|
1814 |
((self class getAllImageSelectorsFrom: iconClass) |
|
1815 |
collect: [:sel| |image| image := iconClass perform: sel. LabelAndIcon icon:(image magnifiedBy: 22/image extent y ) string: sel]). |
|
1816 |
||
1817 |
||
1818 |
! |
|
1819 |
||
1820 |
updateSelectionOfImage |
|
1821 |
"updates the selection of image" |
|
1822 |
||
1823 |
self selectionOfImage value: nil. |
|
1824 |
self updateListOfImages. |
|
1825 |
self selectionOfImage value: (self listOfImages detect: [:im| im string == (aspects at: #icon) value] ifNone: nil). |
|
1826 |
||
220 | 1827 |
! ! |
1828 |
||
1829 |
!MenuEditor methodsFor:'event handling'! |
|
1830 |
||
407 | 1831 |
doesNotUnderstand: aMessage |
1832 |
"detour incoming messages to the tree view" |
|
1833 |
||
1834 |
(self treeView respondsTo: aMessage selector) |
|
1835 |
ifTrue: |
|
1836 |
[ |
|
1837 |
^aMessage sendTo: self treeView |
|
1838 |
]. |
|
1839 |
super doesNotUnderstand:aMessage |
|
220 | 1840 |
|
1841 |
||
199 | 1842 |
! ! |
1843 |
||
287 | 1844 |
!MenuEditor methodsFor:'private'! |
1845 |
||
1846 |
helpKey |
|
728 | 1847 |
"get the help key of the selected menu item" |
407 | 1848 |
|
287 | 1849 |
|node| |
407 | 1850 |
(node := self treeView selectedNode) notNil ifTrue:[ |
287 | 1851 |
^ node contents activeHelpKey |
1852 |
]. |
|
1853 |
^ nil |
|
1854 |
! |
|
1855 |
||
1856 |
helpTool |
|
728 | 1857 |
"get the help tool" |
407 | 1858 |
|
1859 |
^helpCanvas application |
|
287 | 1860 |
! ! |
1861 |
||
199 | 1862 |
!MenuEditor methodsFor:'queries'! |
1863 |
||
1864 |
isHelpToolSelected |
|
728 | 1865 |
"return true if current selection is help tool" |
407 | 1866 |
|
290 | 1867 |
(tabSelection ~~ 0 and:[slices notNil]) ifTrue:[ |
407 | 1868 |
^(slices at:tabSelection) first = UIHelpTool label |
199 | 1869 |
]. |
407 | 1870 |
^false |
287 | 1871 |
! |
1872 |
||
535 | 1873 |
preferredExtent |
1874 |
||
1875 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//2.5) |
|
1876 |
||
1877 |
||
199 | 1878 |
! ! |
1879 |
||
1880 |
!MenuEditor methodsFor:'selection'! |
|
1881 |
||
879 | 1882 |
imageSelected |
1883 |
||
1884 |
(aspects at: #icon) value: self selectionOfImage value string |
|
1885 |
||
1886 |
! |
|
1887 |
||
199 | 1888 |
menuChanged |
407 | 1889 |
|
728 | 1890 |
|node item slc sel old| |
199 | 1891 |
|
407 | 1892 |
aspects do: [:holder| holder removeDependent:self]. |
1893 |
(node := self treeView selectedNode) notNil ifTrue:[ |
|
199 | 1894 |
aspects do:[:anAspect| anAspect value:nil ]. |
1895 |
item := node contents. |
|
1896 |
item toAspects:aspects. |
|
1897 |
||
218 | 1898 |
item isSeparator ifFalse:[ |
199 | 1899 |
node parent isNil ifFalse:[ |
218 | 1900 |
node hasChildren ifTrue:[ |
1901 |
slc := #slicesMenu |
|
1902 |
] ifFalse:[ |
|
1903 |
item submenuChannel isNil ifTrue:[slc := #slicesItem] |
|
1904 |
ifFalse:[slc := #slicesLink] |
|
1905 |
]. |
|
287 | 1906 |
slc := (self class perform:slc) copyWith:#( 'Help' #dummy ). |
199 | 1907 |
] ifTrue:[ |
287 | 1908 |
slc := self class perform:#slicesRootMenu |
1909 |
]. |
|
199 | 1910 |
] ifTrue:[ |
287 | 1911 |
slc := self class perform:#slicesSeparatorMenu. |
1912 |
] |
|
199 | 1913 |
]. |
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1914 |
|
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1915 |
self helpTool helpKey: self helpKey. |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1916 |
"Next line helps me to preserve myself against unnecessary settings of |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1917 |
valueOfEnablingCommitButtons to true in the help tool." |
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1918 |
self valueOfEnablingCommitButtons value: false. |
199 | 1919 |
|
1920 |
slc ~= slices ifTrue:[ |
|
290 | 1921 |
tabSelection ~~ 0 ifTrue:[ |
287 | 1922 |
old := (slices at:tabSelection) first |
1923 |
]. |
|
1924 |
||
199 | 1925 |
(slices := slc) notNil ifTrue:[ |
287 | 1926 |
sel := slices collect:[:s| s first]. |
728 | 1927 |
tabSelection := 0. |
287 | 1928 |
self tabList value:sel. |
1929 |
||
1930 |
(old notNil and:[(sel := sel findFirst:[:n|n = old]) ~~ 0]) ifFalse:[ |
|
1931 |
sel := 1 |
|
1932 |
]. |
|
1933 |
self tabModel value:sel |
|
199 | 1934 |
] ifFalse:[ |
1935 |
self tabList value:nil. |
|
290 | 1936 |
self tabSelection:0. |
199 | 1937 |
] |
1938 |
]. |
|
748 | 1939 |
self updateChannels. |
407 | 1940 |
aspects do: [:holder| holder addDependent:self]. |
199 | 1941 |
! |
1942 |
||
407 | 1943 |
tabSelection: aSelection |
728 | 1944 |
"put the section aSelection into the note book" |
1945 |
||
287 | 1946 |
tabSelection = aSelection ifTrue:[ |
199 | 1947 |
^ self |
1948 |
]. |
|
298 | 1949 |
(aSelection ~~ 0 and:[slices isNil]) ifTrue:[ |
1950 |
^ self |
|
1951 |
]. |
|
290 | 1952 |
(tabSelection := aSelection) == 0 ifTrue:[ |
287 | 1953 |
slices isNil ifTrue:[ |
1954 |
specCanvas client:nil. |
|
1955 |
^ specCanvas raise. |
|
1956 |
]. |
|
1957 |
tabSelection == 1 ifTrue:[^ self]. |
|
1958 |
tabSelection := 1 |
|
199 | 1959 |
]. |
287 | 1960 |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
1961 |
self isHelpToolSelected ifTrue:[ |
287 | 1962 |
self helpTool helpKey:(self helpKey). |
1963 |
helpCanvas raise. |
|
728 | 1964 |
] ifFalse:[ |
407 | 1965 |
aspects do: [:holder| holder release]. |
728 | 1966 |
specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder. |
407 | 1967 |
aspects do: [:holder| holder addDependent:self]. |
738 | 1968 |
self updateFonts. |
728 | 1969 |
specCanvas raise. |
879 | 1970 |
] |
199 | 1971 |
! ! |
1972 |
||
1973 |
!MenuEditor methodsFor:'startup / release'! |
|
1974 |
||
738 | 1975 |
initialize |
1976 |
"initialize value holders for the attributes of the menu components" |
|
1977 |
||
1978 |
|holder| |
|
1979 |
||
1980 |
super initialize. |
|
1981 |
||
1982 |
aspects at:#seperatorSelection put:(holder := SelectionInList new). |
|
1983 |
holder list: Item separatorList. |
|
872
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
1984 |
holder addDependent:self. |
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
1985 |
|
873 | 1986 |
"Modified: / 20.6.1998 / 14:53:26 / cg" |
738 | 1987 |
! |
1988 |
||
728 | 1989 |
openModalOnMenu: aMenu |
734 | 1990 |
"build a tree from aMenu and open it modal" |
728 | 1991 |
|
738 | 1992 |
super openModalOnResourceSpec: aMenu |
728 | 1993 |
! |
1994 |
||
412 | 1995 |
postOpenWith:aBuilder |
1996 |
||
537 | 1997 |
super postOpenWith:aBuilder. |
1998 |
||
412 | 1999 |
self isHelpToolSelected |
2000 |
ifTrue: [helpCanvas raise] |
|
748 | 2001 |
ifFalse: [specCanvas raise] |
2002 |
||
199 | 2003 |
! ! |
2004 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2005 |
!MenuEditor methodsFor:'user actions'! |
199 | 2006 |
|
407 | 2007 |
accept |
2008 |
"invoked by button 'OK' and by save requests of menu item changes" |
|
2009 |
||
2010 |
|node| |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2011 |
|
637 | 2012 |
super accept. |
2013 |
||
642 | 2014 |
(node := self treeView selectedNode) notNil |
407 | 2015 |
ifTrue: |
2016 |
[ |
|
2017 |
self isHelpToolSelected |
|
2018 |
ifTrue: |
|
2019 |
[ |
|
2020 |
self helpTool accept. |
|
686 | 2021 |
node contents activeHelpKey: self helpTool helpKey. |
2022 |
self valueOfEnablingCommitButtons value: false. |
|
407 | 2023 |
] |
2024 |
ifFalse: |
|
2025 |
[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2026 |
node contents buildFromAspects: aspects. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2027 |
node changed. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2028 |
specSelector := self treeView selectorName. |
407 | 2029 |
] |
734 | 2030 |
]. |
879 | 2031 |
self updateInfoLabel. |
2032 |
self updateListAndSelectionOfImage |
|
407 | 2033 |
! |
2034 |
||
2035 |
cancel |
|
2036 |
"invoked by button 'Cancel'" |
|
2037 |
||
2038 |
|node| |
|
2039 |
(node := self treeView selectedNode) notNil |
|
2040 |
ifTrue: |
|
432
d35dccaa804c
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
422
diff
changeset
|
2041 |
[ |
407 | 2042 |
self helpTool helpKey:(self helpKey). |
2043 |
aspects do:[:anAspect| anAspect value:nil]. |
|
2044 |
node contents toAspects:aspects |
|
2045 |
]. |
|
422 | 2046 |
self valueOfEnablingCommitButtons value: false. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2047 |
modified := false |
407 | 2048 |
! |
2049 |
||
879 | 2050 |
doEditImage |
2051 |
||
2052 |
super doEditImage. |
|
2053 |
||
2054 |
self updateListAndSelectionOfImage |
|
2055 |
! |
|
2056 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2057 |
doNew |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2058 |
|
748 | 2059 |
super doNew ifTrue: [self helpTool doNew] |
199 | 2060 |
! |
2061 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2062 |
doPickAMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2063 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2064 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2065 |
|
642 | 2066 |
((view := Screen current viewFromUser) isNil or: |
2067 |
[view == Screen current rootView]) ifTrue:[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2068 |
^ self |
398 | 2069 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2070 |
view specClass == MenuPanelSpec ifTrue:[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2071 |
^ self treeView buildFromMenu: view asMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2072 |
]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2073 |
^ nil |
381 | 2074 |
! |
2075 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2076 |
doSave |
764 | 2077 |
|cls treeView menu spec mthd category code excla| |
199 | 2078 |
|
642 | 2079 |
super doSave ifFalse: [^nil]. |
637 | 2080 |
|
2081 |
cls := self resolveName: specClass. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2082 |
treeView := self treeView. |
407 | 2083 |
menu := treeView asMenu. |
199 | 2084 |
menu := menu literalArrayEncoding. |
2085 |
spec := WriteStream on:String new. |
|
2086 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
2087 |
spec := spec contents. |
|
2088 |
||
2089 |
"/ if that method already exists, do not overwrite the category |
|
2090 |
||
576 | 2091 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2092 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 2093 |
category := mthd category. |
2094 |
]. |
|
2095 |
||
764 | 2096 |
excla := Character excla asString. |
2097 |
||
2098 |
code := excla |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2099 |
, (cls name , ' class methodsFor:' , category storeString) |
764 | 2100 |
, excla , '\\' |
199 | 2101 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2102 |
, specSelector , '\' |
738 | 2103 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
2104 |
, '\\ "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2105 |
, (' 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
|
2106 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 2107 |
, ' "\'. |
2108 |
||
2109 |
code := code |
|
2110 |
, '\' |
|
2111 |
, ' <resource: #menu>\\' |
|
2112 |
, ' ^\' |
|
2113 |
, ' ', spec |
|
2114 |
, '\' |
|
764 | 2115 |
, (excla , ' ' , excla) |
199 | 2116 |
, '\\'. |
2117 |
||
2118 |
code := code withCRs. |
|
2119 |
(ReadStream on:code) fileIn. |
|
2120 |
||
764 | 2121 |
self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. |
699 | 2122 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2123 |
self updateHistory. |
748 | 2124 |
self updateInfoLabel. |
2125 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2126 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2127 |
modified := false. |
218 | 2128 |
|
199 | 2129 |
! |
2130 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2131 |
doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2132 |
|
637 | 2133 |
super doSaveAs ifTrue: [self treeView selectorName: specSelector] |
218 | 2134 |
! |
199 | 2135 |
|
218 | 2136 |
doStepDown |
407 | 2137 |
"shift selected menu item one step down" |
2138 |
||
2139 |
self treeView selectedNodeChangeSequenceOrder:1. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2140 |
modified := true. |
398 | 2141 |
|
2142 |
||
2143 |
||
2144 |
||
218 | 2145 |
! |
2146 |
||
2147 |
doStepIn |
|
407 | 2148 |
"move selected menu item into next submenu" |
2149 |
||
2150 |
self treeView selectedNodeBecomeChildOfNext. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2151 |
modified := true. |
398 | 2152 |
|
2153 |
||
2154 |
||
2155 |
||
199 | 2156 |
|
218 | 2157 |
! |
199 | 2158 |
|
218 | 2159 |
doStepOut |
407 | 2160 |
"move selected menu item out from parent submenu" |
2161 |
||
2162 |
self treeView selectedNodeBecomeSisterOfParent. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2163 |
modified := true. |
218 | 2164 |
! |
2165 |
||
2166 |
doStepUp |
|
407 | 2167 |
"shift selected menu item one step up" |
2168 |
||
2169 |
self treeView selectedNodeChangeSequenceOrder:-1. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2170 |
modified := true. |
199 | 2171 |
! ! |
2172 |
||
218 | 2173 |
!MenuEditor::Item class methodsFor:'constants'! |
2174 |
||
2175 |
separatorList |
|
734 | 2176 |
"get the list of available separator types" |
407 | 2177 |
|
2178 |
^#('blank' 'single line' 'double line') |
|
218 | 2179 |
! |
2180 |
||
2181 |
separatorSlices |
|
734 | 2182 |
"get the list of menu spec values of the corresponding separator types" |
2183 |
||
218 | 2184 |
^ #( |
2185 |
( #blank '' ) |
|
2186 |
( #single '-' ) |
|
2187 |
( #double '=' ) |
|
2188 |
) |
|
2189 |
! ! |
|
2190 |
||
199 | 2191 |
!MenuEditor::Item class methodsFor:'documentation'! |
2192 |
||
2193 |
documentation |
|
2194 |
" |
|
213 | 2195 |
implements the contents assigned to a TreeItem. An instance |
199 | 2196 |
is associated with one item and keeps all its information |
2197 |
||
2198 |
[see also:] |
|
213 | 2199 |
TreeItem |
199 | 2200 |
MenuEditor |
2201 |
||
2202 |
[author:] |
|
2203 |
Claus Atzkern |
|
2204 |
" |
|
2205 |
||
2206 |
||
2207 |
! ! |
|
2208 |
||
2209 |
!MenuEditor::Item methodsFor:'accessing'! |
|
2210 |
||
287 | 2211 |
activeHelpKey |
734 | 2212 |
"get the help key of the menu item" |
407 | 2213 |
|
2214 |
^activeHelpKey |
|
287 | 2215 |
! |
2216 |
||
2217 |
activeHelpKey:aKey |
|
734 | 2218 |
"set the help key of the menu item" |
407 | 2219 |
|
287 | 2220 |
activeHelpKey := aKey |
2221 |
! |
|
2222 |
||
199 | 2223 |
label |
734 | 2224 |
"get the value of the menu item" |
199 | 2225 |
|
407 | 2226 |
^label |
2227 |
! |
|
199 | 2228 |
|
2229 |
label:something |
|
734 | 2230 |
"set the value of the menu item" |
199 | 2231 |
|
407 | 2232 |
label := something ? '-' |
218 | 2233 |
! |
2234 |
||
2235 |
separatorType |
|
734 | 2236 |
"get the separator type assigned to item or nil" |
407 | 2237 |
|
2238 |
label size > 1 |
|
2239 |
ifFalse: |
|
2240 |
[ |
|
2241 |
label size == 0 ifTrue:[^#blank]. |
|
2242 |
label first == $- ifTrue:[^#single]. |
|
2243 |
label first == $= ifTrue:[^#double]. |
|
218 | 2244 |
]. |
407 | 2245 |
^nil |
218 | 2246 |
|
2247 |
! |
|
2248 |
||
2249 |
submenuChannel |
|
2250 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2251 |
||
407 | 2252 |
^submenuChannel |
218 | 2253 |
! |
2254 |
||
2255 |
submenuChannel:aChannel |
|
734 | 2256 |
"get the submenuChannel" |
218 | 2257 |
|
2258 |
submenuChannel := aChannel |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2259 |
! |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2260 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2261 |
translateLabel:aBoolean |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2262 |
"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
|
2263 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2264 |
translateLabel := aBoolean |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2265 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2266 |
"Created: / 6.6.1998 / 17:23:33 / cg" |
218 | 2267 |
! ! |
199 | 2268 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2269 |
!MenuEditor::Item methodsFor:'building'! |
199 | 2270 |
|
2271 |
buildFromAspects:aspects |
|
734 | 2272 |
"read the values of the aspects into my values" |
407 | 2273 |
|
249 | 2274 |
|name| |
407 | 2275 |
self isSeparator |
2276 |
ifFalse: |
|
2277 |
[ |
|
199 | 2278 |
name := label. |
2279 |
label := (aspects at:#label) value. |
|
2280 |
||
218 | 2281 |
(label isNil or:[self isSeparator]) ifTrue:[ |
199 | 2282 |
(aspects at:#label) value:(label := name) |
2283 |
]. |
|
2284 |
||
407 | 2285 |
enabled := (aspects at:#enabled) value. |
2286 |
value := (aspects at:#value) value. |
|
2287 |
nameKey := (aspects at:#nameKey) value. |
|
2288 |
indication := (aspects at:#indication) value. |
|
2289 |
shortcutKey := (aspects at:#shortcutKey) value. |
|
532 | 2290 |
startGroup := (aspects at:#startGroup) value. |
407 | 2291 |
accessCharacterPos := (aspects at:#accessCharacterPos) value. |
2292 |
argument := (aspects at:#argument) value. |
|
2293 |
translateLabel := (aspects at:#translateLabel) value. |
|
2294 |
isButton := (aspects at:#isButton) value. |
|
298 | 2295 |
|
2296 |
argument isString ifTrue:[ |
|
2297 |
argument size > 1 ifTrue:[ |
|
2298 |
(argument at:1) == $# ifTrue:[ |
|
2299 |
argument := (argument copyFrom:2) asSymbol |
|
2300 |
] |
|
2301 |
] |
|
2302 |
]. |
|
407 | 2303 |
submenuChannel := (aspects at:#submenuChannel) value. |
2304 |
retriever := (aspects at:#retriever) value. |
|
2305 |
icon := (aspects at:#icon) value. |
|
2306 |
iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2307 |
] |
|
2308 |
ifTrue: |
|
2309 |
[ |
|
218 | 2310 |
name := (aspects at:#seperatorSelection) selectionIndex. |
2311 |
label := (self class separatorSlices at:name) last. |
|
606 | 2312 |
]. |
2313 |
isVisible := (aspects at:#isVisible) value. |
|
2314 |
||
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2315 |
"Modified: / 6.6.1998 / 17:20:59 / cg" |
199 | 2316 |
! |
2317 |
||
2318 |
buildFromMenuItem:anItem |
|
734 | 2319 |
"read the attributes of anItem into my values" |
407 | 2320 |
|
199 | 2321 |
|rtv| |
2322 |
||
218 | 2323 |
self label:(anItem label). |
2324 |
activeHelpKey := anItem activeHelpKey. |
|
199 | 2325 |
|
2326 |
(enabled := anItem enabled) isSymbol ifFalse:[ |
|
2327 |
enabled := nil |
|
2328 |
]. |
|
2329 |
||
2330 |
(value := anItem value) isSymbol ifFalse:[ |
|
2331 |
value := nil. |
|
2332 |
]. |
|
2333 |
||
2334 |
(indication := anItem indication) isSymbol ifFalse:[ |
|
2335 |
indication := nil |
|
2336 |
]. |
|
2337 |
||
407 | 2338 |
nameKey := anItem nameKey. |
2339 |
shortcutKey := anItem shortcutKeyCharacter. |
|
532 | 2340 |
startGroup := anItem startGroup. |
407 | 2341 |
accessCharacterPos := anItem accessCharacterPosition. |
2342 |
argument := anItem argument. |
|
537 | 2343 |
|
407 | 2344 |
submenuChannel := anItem submenuChannel. |
2345 |
translateLabel := anItem translateLabel. |
|
2346 |
isButton := anItem isButton. |
|
539 | 2347 |
isVisible := anItem isVisible. |
407 | 2348 |
|
2349 |
(((rtv := anItem adornment) notNil) |
|
2350 |
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2351 |
ifTrue: |
|
2352 |
[ |
|
199 | 2353 |
retriever := rtv className. |
2354 |
icon := rtv selector. |
|
2355 |
(iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2356 |
label := rtv labelText. |
|
2357 |
] |
|
2358 |
] |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2359 |
! ! |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2360 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2361 |
!MenuEditor::Item methodsFor:'conversion'! |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2362 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2363 |
asMenuItem |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2364 |
"converts self to a menu item" |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2365 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2366 |
|item rcv| |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2367 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2368 |
item := MenuItem labeled:label. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2369 |
item isVisible:isVisible. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2370 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2371 |
self isSeparator ifFalse:[ |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2372 |
item activeHelpKey:activeHelpKey. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2373 |
item enabled:enabled. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2374 |
item accessCharacterPosition:accessCharacterPos. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2375 |
item argument:argument. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2376 |
item submenuChannel:submenuChannel. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2377 |
item nameKey:nameKey. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2378 |
item shortcutKeyCharacter:shortcutKey. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2379 |
item startGroup:startGroup. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2380 |
item value:value. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2381 |
item indication:indication. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2382 |
item translateLabel: translateLabel. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2383 |
item isButton: isButton. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2384 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2385 |
icon notNil ifTrue:[ |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2386 |
rcv := ResourceRetriever new. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2387 |
rcv className:retriever. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2388 |
rcv selector:icon. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2389 |
iconAndLabel == true ifTrue:[ |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2390 |
rcv labelText:label |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2391 |
]. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2392 |
item labelImage:rcv |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2393 |
] |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2394 |
]. |
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2395 |
^item |
199 | 2396 |
! |
2397 |
||
2398 |
toAspects:aspects |
|
734 | 2399 |
"put my values into the values of aspects" |
407 | 2400 |
|
249 | 2401 |
|type| |
407 | 2402 |
(type := self separatorType) notNil |
2403 |
ifTrue: |
|
2404 |
[ |
|
218 | 2405 |
type := self class separatorSlices findFirst:[:el| el first == type ]. |
2406 |
(aspects at:#seperatorSelection) selectionIndex:type. |
|
407 | 2407 |
] |
2408 |
ifFalse: |
|
2409 |
[ |
|
2410 |
(aspects at:#label) value:label. |
|
2411 |
(aspects at:#enabled) value:enabled. |
|
2412 |
(aspects at:#value) value:value. |
|
2413 |
(aspects at:#nameKey) value:nameKey. |
|
2414 |
(aspects at:#indication) value:indication. |
|
2415 |
(aspects at:#shortcutKey) value:shortcutKey. |
|
532 | 2416 |
(aspects at:#startGroup) value:startGroup. |
407 | 2417 |
(aspects at:#accessCharacterPos) value:accessCharacterPos. |
2418 |
(aspects at:#translateLabel) value:translateLabel. |
|
2419 |
(aspects at:#submenuChannel) value:submenuChannel. |
|
2420 |
(aspects at:#retriever) value:retriever. |
|
2421 |
(aspects at:#icon) value:icon. |
|
2422 |
(aspects at:#iconAndLabel) value:iconAndLabel. |
|
539 | 2423 |
(aspects at:#isButton) value:isButton. |
537 | 2424 |
|
407 | 2425 |
argument isSymbol |
2426 |
ifTrue: [(aspects at:#argument)value:'#', argument] |
|
2427 |
ifFalse:[(aspects at:#argument)value:argument]. |
|
606 | 2428 |
]. |
2429 |
(aspects at:#isVisible) value:isVisible. |
|
2430 |
||
199 | 2431 |
! ! |
2432 |
||
2433 |
!MenuEditor::Item methodsFor:'queries'! |
|
2434 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2435 |
iconFor: aNode |
734 | 2436 |
"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
|
2437 |
|
686 | 2438 |
(aNode hasChildren or: [aNode parent isNil]) |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2439 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2440 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2441 |
^MenuEditor submenuImage |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2442 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2443 |
ifFalse: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2444 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2445 |
submenuChannel notNil |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2446 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2447 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2448 |
^MenuEditor linkSubmenuImage |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2449 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2450 |
ifFalse: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2451 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2452 |
self isSeparator |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2453 |
ifTrue: [^MenuEditor menuSeparatorImage] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2454 |
ifFalse: [^MenuEditor menuItemImage] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2455 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2456 |
] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2457 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2458 |
|
218 | 2459 |
isSeparator |
734 | 2460 |
"return true if item is a seperator" |
407 | 2461 |
|
2462 |
^self separatorType notNil |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2463 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2464 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2465 |
treeViewLabel |
734 | 2466 |
"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
|
2467 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2468 |
^label asBoldText, |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2469 |
(value notNil ifTrue: [': [', |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2470 |
value , |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2471 |
(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
|
2472 |
']'] ifFalse: ['']) |
199 | 2473 |
! ! |
2474 |
||
407 | 2475 |
!MenuEditor::TreeView class methodsFor:'documentation'! |
199 | 2476 |
|
2477 |
documentation |
|
2478 |
" |
|
734 | 2479 |
This tree view class provides a hierarchical representation |
2480 |
of the components of a menu. |
|
199 | 2481 |
|
2482 |
[see also:] |
|
2483 |
SelectionInTreeView |
|
213 | 2484 |
SelectionInTree |
2485 |
TreeItem |
|
199 | 2486 |
|
2487 |
[author:] |
|
2488 |
Claus Atzkern |
|
2489 |
" |
|
2490 |
! ! |
|
2491 |
||
407 | 2492 |
!MenuEditor::TreeView methodsFor:'accessing'! |
199 | 2493 |
|
2494 |
selectorName |
|
734 | 2495 |
"get the selector of the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2496 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2497 |
^(listOfNodes first contents label) asSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2498 |
! |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2499 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2500 |
selectorName: aSymbol |
734 | 2501 |
"set the selector for the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2502 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2503 |
listOfNodes first contents label: aSymbol |
199 | 2504 |
! ! |
2505 |
||
407 | 2506 |
!MenuEditor::TreeView methodsFor:'building'! |
199 | 2507 |
|
637 | 2508 |
buildFromClass:aClass andSelector:aSelector |
734 | 2509 |
"read a menu spec from aClass and aSelector and put |
2510 |
the encoded menu into the tree view" |
|
407 | 2511 |
|
728 | 2512 |
|spec cls menu firstNode firstNodeLabel| |
2513 |
||
2514 |
"if opened on a menu" |
|
2515 |
(aClass isNil and: [aSelector isNil and: [listOfNodes size > 0]]) ifTrue: [^nil]. |
|
199 | 2516 |
|
2517 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
|
340 | 2518 |
cls := self application resolveName:aClass. |
199 | 2519 |
|
2520 |
(cls respondsTo:aSelector) ifTrue:[ |
|
2521 |
spec := cls perform:aSelector |
|
2522 |
] |
|
2523 |
]. |
|
331 | 2524 |
|
199 | 2525 |
spec isNil ifFalse:[ |
298 | 2526 |
(spec isMemberOf:Menu) ifFalse:[ |
2527 |
menu := Menu new fromLiteralArrayEncoding:spec. |
|
2528 |
] ifTrue:[ |
|
2529 |
menu := spec. |
|
2530 |
]. |
|
728 | 2531 |
firstNode := self nodeLabel:(aSelector asString). |
2532 |
self subMenu:menu parent:firstNode. |
|
199 | 2533 |
] ifTrue:[ |
728 | 2534 |
(aClass notNil and: [aSelector isNil and: [listOfNodes size > 0]]) |
2535 |
ifTrue: |
|
2536 |
[ |
|
2537 |
firstNode := listOfNodes first |
|
2538 |
] |
|
2539 |
ifFalse: |
|
2540 |
[ |
|
2541 |
aSelector notNil ifTrue:[firstNodeLabel := aSelector asString] |
|
2542 |
ifFalse:[firstNodeLabel := 'menu']. |
|
2543 |
firstNode := self nodeLabel:firstNodeLabel. |
|
2544 |
] |
|
199 | 2545 |
]. |
734 | 2546 |
|
728 | 2547 |
firstNode expand. |
2548 |
model root: firstNode. |
|
2549 |
||
2550 |
firstNode hasChildren ifFalse:[ |
|
775 | 2551 |
model add:(self nodeLabel:'Item 1') below:firstNode |
199 | 2552 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2553 |
|
199 | 2554 |
|
2555 |
! |
|
2556 |
||
2557 |
buildFromMenu:aMenu |
|
734 | 2558 |
"put aMenu into the tree view" |
199 | 2559 |
|
249 | 2560 |
|node| |
199 | 2561 |
|
213 | 2562 |
node := self nodeLabel:'menu'. |
199 | 2563 |
self subMenu:aMenu parent:node. |
2564 |
||
2565 |
node hasChildren ifFalse:[ |
|
728 | 2566 |
node add:(self nodeLabel:'Item 1') |
199 | 2567 |
]. |
213 | 2568 |
node expand. |
199 | 2569 |
model root:node. |
2570 |
! |
|
2571 |
||
213 | 2572 |
menuItem:anItem |
199 | 2573 |
|
249 | 2574 |
|node| |
199 | 2575 |
|
407 | 2576 |
node := self nodeLabel: anItem label. |
199 | 2577 |
node contents buildFromMenuItem:anItem. |
407 | 2578 |
self subMenu: anItem submenu parent:node. |
2579 |
^node. |
|
199 | 2580 |
|
2581 |
||
2582 |
! |
|
2583 |
||
2584 |
subMenu:aMenu parent:aParent |
|
407 | 2585 |
|
213 | 2586 |
|idx grp| |
199 | 2587 |
|
2588 |
aMenu isNil ifFalse:[ |
|
2589 |
grp := aMenu groupSizes. |
|
213 | 2590 |
aMenu itemsDo:[:i| aParent add:(self menuItem:i)]. |
199 | 2591 |
|
2592 |
grp notNil ifTrue:[ |
|
213 | 2593 |
idx := 0. |
199 | 2594 |
|
2595 |
grp do:[:i| |
|
213 | 2596 |
idx := idx + i + 1. |
2597 |
aParent add:(self nodeLabel:nil) beforeIndex:idx. |
|
199 | 2598 |
] |
2599 |
] |
|
2600 |
] |
|
2601 |
! ! |
|
2602 |
||
407 | 2603 |
!MenuEditor::TreeView methodsFor:'conversion'! |
199 | 2604 |
|
2605 |
asMenu |
|
2606 |
|menu root| |
|
2607 |
||
2608 |
root := self root. |
|
2609 |
||
2610 |
root hasChildren ifTrue:[ |
|
2611 |
menu := Menu new. |
|
2612 |
root children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
2613 |
]. |
|
2614 |
^ menu |
|
2615 |
! |
|
2616 |
||
2617 |
asMenuItem:aNode |
|
2618 |
||
2619 |
|menu item| |
|
2620 |
||
2621 |
item := aNode contents asMenuItem. |
|
2622 |
||
2623 |
aNode hasChildren ifTrue:[ |
|
2624 |
menu := Menu new. |
|
2625 |
aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
2626 |
item submenu:menu |
|
2627 |
]. |
|
2628 |
^ item |
|
2629 |
||
2630 |
! ! |
|
2631 |
||
407 | 2632 |
!MenuEditor::TreeView methodsFor:'drawing basics'! |
199 | 2633 |
|
853 | 2634 |
redrawLabelAt:x y:yTop index:anIndex |
407 | 2635 |
"draw text label assigned to a node at x y( center)" |
2636 |
||
853 | 2637 |
|isSelected y0 x0 x1 maxX w label type item| |
199 | 2638 |
|
2639 |
item := (listOfNodes at:anIndex) contents. |
|
218 | 2640 |
type := item separatorType. |
199 | 2641 |
|
218 | 2642 |
type isNil ifTrue:[ |
853 | 2643 |
^ super redrawLabelAt:x y:yTop index:anIndex |
2644 |
]. |
|
2645 |
isSelected := self isInSelection:anIndex. |
|
854 | 2646 |
x0 := x. |
853 | 2647 |
|
2648 |
highlightMode == #label ifTrue:[ |
|
2649 |
x0 := x + 4. |
|
2650 |
||
2651 |
isSelected ifTrue:[ |
|
2652 |
w := 80 + 8. |
|
2653 |
self paint:hilightBgColor. |
|
2654 |
self fillRectangleX:x y:yTop width:w height:fontHeight. |
|
2655 |
] |
|
218 | 2656 |
] ifFalse:[ |
853 | 2657 |
w := 0. |
2658 |
]. |
|
2659 |
type == #blank ifFalse:[ |
|
2660 |
isSelected ifTrue:[self paint:hilightFgColor] |
|
2661 |
ifFalse:[self paint:fgColor]. |
|
2662 |
||
2663 |
x1 := x0 + 80. |
|
2664 |
y0 := yTop - 1 + (fontHeight // 2). |
|
2665 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
2666 |
||
2667 |
type == #double ifTrue:[ |
|
2668 |
y0 := y0 + 2. |
|
2669 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
2670 |
] |
|
2671 |
]. |
|
2672 |
||
2673 |
(isSelected and:[highlightMode == #label]) ifTrue:[ |
|
2674 |
self redrawSelFrameAtX:x y:yTop toX:(x + w) |
|
2675 |
]. |
|
2676 |
||
199 | 2677 |
! ! |
2678 |
||
407 | 2679 |
!MenuEditor::TreeView methodsFor:'event handling'! |
356 | 2680 |
|
2681 |
keyPress:key x:x y:y |
|
407 | 2682 |
"invoked if any key was pressed" |
2683 |
||
412 | 2684 |
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)> |
2685 |
||
686 | 2686 |
(key == #Delete or:[key == #BackSpace]) ifTrue: [^self doDelete]. |
748 | 2687 |
key == #Cut ifTrue:[^self doCut]. |
407 | 2688 |
key == #Copy ifTrue:[^self doCopy]. |
2689 |
key == #Paste ifTrue:[^self doPaste]. |
|
356 | 2690 |
|
412 | 2691 |
super keyPress:key x:x y:y |
356 | 2692 |
|
2693 |
! ! |
|
2694 |
||
407 | 2695 |
!MenuEditor::TreeView methodsFor:'initialization'! |
199 | 2696 |
|
2697 |
initialize |
|
734 | 2698 |
"initialize the tree view of the menu components" |
407 | 2699 |
|
199 | 2700 |
super initialize. |
275 | 2701 |
|
213 | 2702 |
self multipleSelectOk:true. |
407 | 2703 |
self showDirectoryIndicator: true. |
2704 |
self showDirectoryIndicatorForRoot: false. |
|
634 | 2705 |
self selectConditionBlock: [:i|self application askForItemModification]. |
412 | 2706 |
self validateDoubleClickBlock: [:node| node ~~ listOfNodes first]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2707 |
self model iconAction: [:aNode| aNode contents iconFor: aNode]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2708 |
self model labelAction: [:aNode| aNode contents treeViewLabel] |
199 | 2709 |
! ! |
2710 |
||
407 | 2711 |
!MenuEditor::TreeView methodsFor:'menus'! |
199 | 2712 |
|
2713 |
doCopy |
|
398 | 2714 |
|
213 | 2715 |
self hasSelection ifTrue:[ |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2716 |
self application clipboard: OrderedCollection new. |
748 | 2717 |
self selectionDo:[:i| self application clipboard add:((listOfNodes at:i) copy)]. |
2718 |
self topView application updateAllToolInstances. |
|
213 | 2719 |
] |
199 | 2720 |
! |
2721 |
||
2722 |
doCreateItem |
|
398 | 2723 |
|
557 | 2724 |
self addElement: (self nodeLabel:'Item') |
199 | 2725 |
! |
2726 |
||
218 | 2727 |
doCreateLink |
407 | 2728 |
|
218 | 2729 |
|node item| |
2730 |
||
557 | 2731 |
node := self nodeLabel:'Submenu Link'. |
218 | 2732 |
item := node contents. |
2733 |
item submenuChannel:#menuDefaultLink. |
|
398 | 2734 |
self addElement:node. |
2735 |
self setModified. |
|
218 | 2736 |
|
2737 |
||
2738 |
! |
|
2739 |
||
199 | 2740 |
doCreateMenu |
398 | 2741 |
|
199 | 2742 |
|node| |
557 | 2743 |
node := self nodeLabel:'Submenu'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2744 |
node parent: self selectedNode. |
557 | 2745 |
node add:(self nodeLabel:'Item 1'). |
213 | 2746 |
self addElement:node |
199 | 2747 |
! |
2748 |
||
2749 |
doCreateSep |
|
398 | 2750 |
|
213 | 2751 |
self addElement:(self nodeLabel:nil) |
199 | 2752 |
! |
2753 |
||
2754 |
doCut |
|
398 | 2755 |
|
686 | 2756 |
(self topView application hasValidSelection value and: [self askForItemModification]) |
603 | 2757 |
ifTrue: |
2758 |
[ |
|
2759 |
|selectedNodes| |
|
2760 |
self doCopy. |
|
2761 |
selectedNodes := self selection asSortedCollection. |
|
2762 |
self selectedNodesRemove. |
|
2763 |
self selection: selectedNodes first - 1. |
|
2764 |
self setModified. |
|
748 | 2765 |
self topView application updateAllToolInstances. |
603 | 2766 |
] |
398 | 2767 |
|
199 | 2768 |
! |
2769 |
||
686 | 2770 |
doDelete |
2771 |
||
2772 |
(self topView application hasValidSelection value and: [self askForItemModification]) |
|
2773 |
ifTrue: |
|
2774 |
[ |
|
2775 |
|selectedNodes| |
|
2776 |
selectedNodes := self selection asSortedCollection. |
|
2777 |
self selectedNodesRemove. |
|
2778 |
self selection: selectedNodes first - 1. |
|
2779 |
self setModified. |
|
2780 |
] |
|
2781 |
||
2782 |
! |
|
2783 |
||
199 | 2784 |
doPaste |
213 | 2785 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2786 |
(self application clipboard notNil and:[self selectedNode notNil]) ifTrue:[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2787 |
self addElement:(self application clipboard collect:[:el| el copy]) |
220 | 2788 |
]. |
199 | 2789 |
! ! |
2790 |
||
407 | 2791 |
!MenuEditor::TreeView methodsFor:'private'! |
199 | 2792 |
|
557 | 2793 |
addElement: aNode |
407 | 2794 |
"add something after selection" |
2795 |
||
634 | 2796 |
self askForItemModification |
603 | 2797 |
ifTrue: |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2798 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2799 |
self selectedNodeAdd: aNode. |
603 | 2800 |
(aNode isCollection not and: [aNode name = 'Item']) |
2801 |
ifTrue: |
|
2802 |
[ |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2803 |
|label| |
603 | 2804 |
label := aNode name, ' ', |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2805 |
(self selectedNode parent notNil |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2806 |
ifTrue: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2807 |
[ |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2808 |
(((self selectedNode children size = 0 |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2809 |
ifTrue: [self selectedNode parent children] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2810 |
ifFalse: [self selectedNode children]) select: |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2811 |
[:node| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2812 |
|lab| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2813 |
lab := node contents label. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2814 |
((node children size = 0) & |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2815 |
node contents submenuChannel isNil & |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2816 |
(lab ~= '-') & (lab ~= '=') & (lab ~= '')) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2817 |
]) size) printString] |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2818 |
ifFalse: ['1']). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2819 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2820 |
aNode name: label string asBoldText. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2821 |
aNode contents label: label string. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2822 |
]. |
603 | 2823 |
aNode isCollection ifFalse: [self selectNode: aNode] ifTrue: [self selection: (aNode collect: [:node| self indexOfNode: node])]. |
2824 |
self setModified. |
|
2825 |
] |
|
2826 |
! |
|
2827 |
||
634 | 2828 |
askForItemModification |
2829 |
||
2830 |
^self topView application askForItemModification |
|
199 | 2831 |
! |
2832 |
||
213 | 2833 |
nodeLabel:aLabel |
407 | 2834 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2835 |
^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
|
2836 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
2837 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
398 | 2838 |
! |
2839 |
||
557 | 2840 |
selectedNodeAdd:something |
2841 |
||
2842 |
|node| |
|
2843 |
||
2844 |
something notNil ifTrue:[ |
|
2845 |
(node := self selectedNode) notNil ifTrue:[ |
|
2846 |
node parent notNil ifTrue:[ |
|
2847 |
node isCollapsable ifTrue:[ |
|
2848 |
model add:something afterIndex:node children size below:node |
|
2849 |
] ifFalse:[ |
|
2850 |
model add:something after:node |
|
2851 |
] |
|
2852 |
] ifFalse:[ |
|
2853 |
model add:something afterIndex:node children size below:(self root) |
|
2854 |
] |
|
2855 |
] |
|
2856 |
] |
|
2857 |
||
2858 |
||
2859 |
! |
|
2860 |
||
398 | 2861 |
setModified |
2862 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2863 |
self topView application modified: true. |
508 | 2864 |
|
748 | 2865 |
self topView application updateChannels |
199 | 2866 |
! ! |
2867 |
||
2868 |
!MenuEditor class methodsFor:'documentation'! |
|
2869 |
||
2870 |
version |
|
2871 |
^ '$Header$' |
|
2872 |
! ! |