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