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