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