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