author | Claus Gittinger <cg@exept.de> |
Wed, 01 Dec 1999 21:36:30 +0100 | |
changeset 1270 | 8e1a2c6db256 |
parent 1264 | a8588e94d16f |
child 1299 | 2e9c6d67fed8 |
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) |
|
1264 | 926 |
#bounds: #(#Rectangle 670 329 985 613) |
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: |
|
1264 | 1036 |
#(nil |
1155 | 1037 |
#right |
199 | 1038 |
) |
1155 | 1039 |
#useIndex: false |
1040 |
) |
|
1041 |
#(#LabelSpec |
|
1042 |
#label: 'Access Character Position:' |
|
1043 |
#name: 'accessCharLabel' |
|
1199 | 1044 |
#layout: #(#AlignmentOrigin 217 0 170 0 1 0.5) |
1155 | 1045 |
#activeHelpKey: #detailsAccessCharaterPosition |
1046 |
#resizeForLabel: true |
|
1047 |
#adjust: #right |
|
1048 |
) |
|
1049 |
#(#InputFieldSpec |
|
1050 |
#name: 'accessCharField' |
|
1199 | 1051 |
#layout: #(#LayoutFrame 220 0 159 0 -5 1.0 181 0) |
1155 | 1052 |
#activeHelpKey: #detailsAccessCharaterPosition |
1053 |
#tabable: true |
|
1054 |
#model: #accessCharacterPos |
|
1244 | 1055 |
#group: #inputGroup4 |
1155 | 1056 |
#type: #numberOrNil |
1057 |
#immediateAccept: false |
|
1058 |
#acceptOnReturn: true |
|
1059 |
#acceptOnTab: true |
|
1060 |
#acceptChannel: #acceptChannel |
|
1061 |
#modifiedChannel: #modifiedChannel |
|
1244 | 1062 |
#acceptOnPointerLeave: false |
1155 | 1063 |
) |
1064 |
) |
|
1065 |
||
1066 |
) |
|
199 | 1067 |
) |
1068 |
! |
|
1069 |
||
398 | 1070 |
imageEditSpec |
738 | 1071 |
"This resource specification was automatically generated |
1072 |
by the UIPainter of ST/X." |
|
1073 |
||
1074 |
"Do not manually edit this!! If it is corrupted, |
|
1075 |
the UIPainter may not be able to read the specification." |
|
199 | 1076 |
|
1077 |
" |
|
398 | 1078 |
UIPainter new openOnClass:MenuEditor andSelector:#imageEditSpec |
1079 |
MenuEditor new openInterface:#imageEditSpec |
|
199 | 1080 |
" |
1081 |
||
1082 |
<resource: #canvas> |
|
1083 |
||
1155 | 1084 |
^ |
1085 |
#(#FullSpec |
|
1086 |
#name: #imageEditSpec |
|
1087 |
#window: |
|
1088 |
#(#WindowSpec |
|
1089 |
#label: 'Image Item' |
|
1090 |
#name: 'Image Item' |
|
1091 |
#min: #(#Point 10 10) |
|
1092 |
#max: #(#Point 1280 1024) |
|
1244 | 1093 |
#bounds: #(#Rectangle 11 177 407 454) |
1155 | 1094 |
) |
1095 |
#component: |
|
1096 |
#(#SpecCollection |
|
1097 |
#collection: #( |
|
1098 |
#(#CheckBoxSpec |
|
1099 |
#label: 'Image & Label' |
|
1100 |
#name: 'iconAndLabelCheckBox' |
|
1101 |
#layout: #(#LayoutOrigin 20 0 215 0) |
|
1102 |
#activeHelpKey: #imageImageAndLabel |
|
1103 |
#tabable: true |
|
1104 |
#model: #iconAndLabel |
|
1105 |
) |
|
1106 |
#(#LabelSpec |
|
1107 |
#label: 'Retriever:' |
|
1108 |
#name: 'retrieverLabel' |
|
1109 |
#layout: #(#AlignmentOrigin 107 0 26 0 1 0.5) |
|
1110 |
#activeHelpKey: #imageRetriever |
|
1111 |
#resizeForLabel: true |
|
1112 |
#adjust: #right |
|
1113 |
) |
|
1114 |
#(#ComboBoxSpec |
|
1115 |
#name: 'retrieverField' |
|
1116 |
#layout: #(#LayoutFrame 110 0 15 0 0 1.0 37 0) |
|
1117 |
#activeHelpKey: #imageRetriever |
|
1118 |
#tabable: true |
|
1119 |
#model: #retriever |
|
1120 |
#type: #symbolOrNil |
|
1121 |
#acceptOnReturn: true |
|
1122 |
#acceptOnTab: true |
|
1123 |
#acceptChannel: #acceptChannel |
|
1124 |
#acceptOnPointerLeave: false |
|
1125 |
#comboList: #retrieverClassList |
|
1126 |
) |
|
1127 |
#(#LabelSpec |
|
1128 |
#label: 'Selector:' |
|
1129 |
#name: 'iconLabel' |
|
1130 |
#layout: #(#AlignmentOrigin 107 0 51 0 1 0.5) |
|
1131 |
#activeHelpKey: #imageSelector |
|
1132 |
#resizeForLabel: true |
|
1133 |
#adjust: #right |
|
1134 |
) |
|
1135 |
#(#InputFieldSpec |
|
1136 |
#name: 'iconField' |
|
1137 |
#layout: #(#LayoutFrame 110 0 40 0 -31 1.0 62 0) |
|
1138 |
#activeHelpKey: #imageSelector |
|
1139 |
#tabable: true |
|
1140 |
#model: #icon |
|
1244 | 1141 |
#group: #inputGroup5 |
1155 | 1142 |
#type: #symbolOrNil |
1143 |
#acceptOnReturn: true |
|
1144 |
#acceptOnTab: true |
|
1145 |
#acceptChannel: #acceptChannel |
|
1146 |
#modifiedChannel: #modifiedChannel |
|
1147 |
#acceptOnPointerLeave: false |
|
1148 |
) |
|
1149 |
#(#ActionButtonSpec |
|
1150 |
#label: 'Image Editor' |
|
1151 |
#name: 'imageEditorButton' |
|
1152 |
#layout: #(#LayoutFrame 19 0.6 128 0 -5 1 152 0) |
|
1153 |
#activeHelpKey: #imageImageEditor |
|
1154 |
#tabable: true |
|
1155 |
#model: #doEditImage |
|
1156 |
) |
|
1157 |
#(#SequenceViewSpec |
|
1158 |
#name: 'systemOrUserImagesList' |
|
1159 |
#layout: #(#LayoutFrame 22 0 67 0 11 0.6 200 0) |
|
1160 |
#activeHelpKey: #imageImageList |
|
1161 |
#model: #selectionOfImage |
|
1162 |
#menu: #menuEditImage |
|
1163 |
#hasHorizontalScrollBar: true |
|
1164 |
#hasVerticalScrollBar: true |
|
1165 |
#miniScrollerHorizontal: true |
|
1166 |
#doubleClickSelector: #doEditImage |
|
1167 |
#valueChangeSelector: #imageSelected |
|
1168 |
#useIndex: false |
|
1169 |
#sequenceList: #listOfImages |
|
1170 |
) |
|
1171 |
#(#ActionButtonSpec |
|
1172 |
#label: '...' |
|
1173 |
#name: 'browseButton' |
|
1174 |
#layout: #(#LayoutFrame -26 1 41 0 -2 1 63 0) |
|
1175 |
#activeHelpKey: #browseResource |
|
1176 |
#model: #doBrowseForImageResource |
|
1177 |
) |
|
1178 |
) |
|
1179 |
||
1180 |
) |
|
199 | 1181 |
) |
525 | 1182 |
! |
1183 |
||
1184 |
windowSpec |
|
738 | 1185 |
"This resource specification was automatically generated |
1186 |
by the UIPainter of ST/X." |
|
1187 |
||
1188 |
"Do not manually edit this!! If it is corrupted, |
|
1189 |
the UIPainter may not be able to read the specification." |
|
525 | 1190 |
|
1191 |
" |
|
1192 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
1193 |
MenuEditor new openInterface:#windowSpec |
|
738 | 1194 |
MenuEditor open |
525 | 1195 |
" |
1196 |
||
1197 |
<resource: #canvas> |
|
1198 |
||
1244 | 1199 |
^ |
1200 |
#(#FullSpec |
|
1201 |
#name: #windowSpec |
|
1202 |
#window: |
|
1203 |
#(#WindowSpec |
|
1204 |
#label: 'Menu Editor' |
|
1205 |
#name: 'Menu Editor' |
|
1206 |
#min: #(#Point 550 440) |
|
1207 |
#max: #(#Point 1152 900) |
|
1249 | 1208 |
#bounds: #(#Rectangle 37 413 594 853) |
1244 | 1209 |
#menu: #menu |
1249 | 1210 |
#returnIsOKInDialog: false |
1211 |
#escapeIsCancelInDialog: false |
|
1244 | 1212 |
) |
1213 |
#component: |
|
1214 |
#(#SpecCollection |
|
1215 |
#collection: #( |
|
1216 |
#(#MenuPanelSpec |
|
1217 |
#name: 'menuToolbarView' |
|
1218 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
|
1219 |
#menu: #menuToolbar |
|
1220 |
#showSeparatingLines: true |
|
1221 |
) |
|
1222 |
#(#VariableHorizontalPanelSpec |
|
1223 |
#name: 'VariableHorizontalPanel' |
|
1224 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
1225 |
#component: |
|
1226 |
#(#SpecCollection |
|
1227 |
#collection: #( |
|
1228 |
#(#ArbitraryComponentSpec |
|
1229 |
#name: 'TreeView' |
|
1230 |
#menu: #menuEdit |
|
1231 |
#hasHorizontalScrollBar: true |
|
1232 |
#hasVerticalScrollBar: true |
|
1233 |
#hasBorder: false |
|
1234 |
#component: #treeView |
|
1235 |
) |
|
1236 |
#(#ViewSpec |
|
1237 |
#name: 'Box' |
|
1238 |
#level: -1 |
|
703 | 1239 |
#component: |
1244 | 1240 |
#(#SpecCollection |
1241 |
#collection: #( |
|
1242 |
#(#NoteBookViewSpec |
|
1243 |
#name: 'NoteBook' |
|
1244 |
#layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) |
|
1245 |
#enableChannel: #hasAnySingleSelection |
|
1246 |
#tabable: true |
|
1247 |
#model: #tabModel |
|
1248 |
#menu: #tabList |
|
1249 |
#useIndex: true |
|
1250 |
#canvas: #tabCanvasHolder |
|
1251 |
#keepCanvasAlive: true |
|
1252 |
) |
|
1253 |
#(#UISubSpecification |
|
1254 |
#name: 'SubSpecification' |
|
1255 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1256 |
#majorKey: #ToolApplicationModel |
|
1257 |
#minorKey: #windowSpecForCommit |
|
525 | 1258 |
) |
1244 | 1259 |
) |
1260 |
||
525 | 1261 |
) |
1244 | 1262 |
) |
1263 |
) |
|
1264 |
||
525 | 1265 |
) |
1244 | 1266 |
#handles: #(#Any 0.346499 1.0) |
1267 |
) |
|
1268 |
#(#UISubSpecification |
|
1269 |
#name: 'InfoBarSubSpec' |
|
1270 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1271 |
#majorKey: #ToolApplicationModel |
|
1272 |
#minorKey: #windowSpecForInfoBar |
|
1273 |
) |
|
1274 |
) |
|
1275 |
||
1276 |
) |
|
525 | 1277 |
) |
1278 |
! ! |
|
1279 |
||
1280 |
!MenuEditor class methodsFor:'menu specs'! |
|
1281 |
||
1282 |
menu |
|
738 | 1283 |
"This resource specification was automatically generated |
1284 |
by the MenuEditor of ST/X." |
|
1285 |
||
1286 |
"Do not manually edit this!! If it is corrupted, |
|
1287 |
the MenuEditor may not be able to read the specification." |
|
525 | 1288 |
|
1289 |
" |
|
1290 |
MenuEditor new openOnClass:MenuEditor andSelector:#menu |
|
1291 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp |
|
1292 |
" |
|
1293 |
||
1294 |
<resource: #menu> |
|
1295 |
||
1296 |
^ |
|
1297 |
||
1298 |
#(#Menu |
|
1299 |
||
1300 |
#( |
|
1301 |
#(#MenuItem |
|
686 | 1302 |
#label: 'About' |
836 | 1303 |
#translateLabel: true |
686 | 1304 |
#accessCharacterPosition: 1 |
1305 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
|
1306 |
#submenuChannel: #menuAbout |
|
525 | 1307 |
) |
1308 |
#(#MenuItem |
|
686 | 1309 |
#label: 'File' |
1310 |
#activeHelpKey: #file |
|
836 | 1311 |
#translateLabel: true |
686 | 1312 |
#submenu: |
525 | 1313 |
#(#Menu |
1314 |
||
1315 |
#( |
|
1316 |
#(#MenuItem |
|
686 | 1317 |
#label: 'New' |
1318 |
#value: #doNew |
|
836 | 1319 |
#translateLabel: true |
686 | 1320 |
#activeHelpKey: #fileNew |
525 | 1321 |
) |
1322 |
#(#MenuItem |
|
686 | 1323 |
#label: '-' |
525 | 1324 |
) |
1325 |
#(#MenuItem |
|
686 | 1326 |
#label: 'Load...' |
1327 |
#translateLabel: true |
|
1328 |
#value: #doLoad |
|
1329 |
#activeHelpKey: #fileLoad |
|
525 | 1330 |
) |
1331 |
#(#MenuItem |
|
686 | 1332 |
#label: '-' |
525 | 1333 |
) |
1334 |
#(#MenuItem |
|
686 | 1335 |
#label: 'Save' |
836 | 1336 |
#translateLabel: true |
686 | 1337 |
#value: #doSave |
1338 |
#activeHelpKey: #fileSave |
|
525 | 1339 |
) |
1340 |
#(#MenuItem |
|
686 | 1341 |
#label: 'Save As...' |
836 | 1342 |
#translateLabel: true |
686 | 1343 |
#value: #doSaveAs |
1344 |
#activeHelpKey: #fileSaveAs |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1345 |
) |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
1346 |
#(#MenuItem |
686 | 1347 |
#label: '-' |
525 | 1348 |
) |
1349 |
#(#MenuItem |
|
686 | 1350 |
#label: 'Pick A Menu...' |
836 | 1351 |
#translateLabel: true |
686 | 1352 |
#value: #doPickAMenu |
1353 |
#activeHelpKey: #filePickAMenu |
|
525 | 1354 |
) |
1355 |
#(#MenuItem |
|
686 | 1356 |
#label: '-' |
525 | 1357 |
) |
1358 |
#(#MenuItem |
|
686 | 1359 |
#label: 'Browse Class' |
836 | 1360 |
#translateLabel: true |
686 | 1361 |
#value: #doBrowseClass |
1362 |
#activeHelpKey: #fileBrowseClass |
|
525 | 1363 |
) |
1364 |
#(#MenuItem |
|
686 | 1365 |
#label: '-' |
525 | 1366 |
) |
1367 |
#(#MenuItem |
|
686 | 1368 |
#label: 'Exit' |
1369 |
#translateLabel: true |
|
1370 |
#value: #closeRequest |
|
1371 |
#activeHelpKey: #fileExit |
|
525 | 1372 |
) |
1373 |
) nil |
|
1374 |
nil |
|
1375 |
) |
|
1376 |
) |
|
1377 |
#(#MenuItem |
|
686 | 1378 |
#label: 'Edit' |
1379 |
#activeHelpKey: #edit |
|
836 | 1380 |
#translateLabel: true |
686 | 1381 |
#submenuChannel: #menuEdit |
525 | 1382 |
) |
1383 |
#(#MenuItem |
|
686 | 1384 |
#label: 'Add' |
1385 |
#activeHelpKey: #add |
|
836 | 1386 |
#translateLabel: true |
686 | 1387 |
#submenuChannel: #menuAdd |
525 | 1388 |
) |
1389 |
#(#MenuItem |
|
686 | 1390 |
#label: 'Test' |
1391 |
#activeHelpKey: #test |
|
836 | 1392 |
#translateLabel: true |
686 | 1393 |
#submenuChannel: #submenuTest |
525 | 1394 |
) |
1033
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1395 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1396 |
"/ #label: 'Settings' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1397 |
"/ #submenu: |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1398 |
"/ #(#Menu |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1399 |
"/ |
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 |
"/ #(#MenuItem |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1402 |
"/ #label: 'Fonts' |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1403 |
"/ #translateLabel: true |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1404 |
"/ #submenuChannel: #menuFont |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1405 |
"/ ) |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1406 |
"/ ) nil |
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 |
"/ ) |
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1409 |
"/ ) |
738 | 1410 |
#(#MenuItem |
748 | 1411 |
#label: 'History' |
1412 |
#activeHelpKey: #history |
|
836 | 1413 |
#translateLabel: true |
748 | 1414 |
#submenuChannel: #menuHistory |
1415 |
) |
|
1416 |
#(#MenuItem |
|
686 | 1417 |
#label: 'Help' |
836 | 1418 |
#translateLabel: true |
686 | 1419 |
#startGroup: #right |
748 | 1420 |
#submenu: |
1421 |
#(#Menu |
|
1422 |
||
1423 |
#( |
|
1424 |
#(#MenuItem |
|
1425 |
#label: 'Documentation' |
|
1426 |
#value: #openHTMLDocument: |
|
836 | 1427 |
#translateLabel: true |
748 | 1428 |
#activeHelpKey: #helpTutorial |
764 | 1429 |
#argument: 'tools/uipainter/MenuEditor.html' |
748 | 1430 |
) |
1431 |
#(#MenuItem |
|
1432 |
#label: '-' |
|
1433 |
) |
|
1434 |
#(#MenuItem |
|
1435 |
#label: 'Help Tool' |
|
1436 |
#value: #openHTMLDocument: |
|
836 | 1437 |
#translateLabel: true |
748 | 1438 |
#activeHelpKey: #helpHelpTool |
1439 |
#argument: 'tools/uipainter/HelpTool.html' |
|
1440 |
) |
|
1441 |
#(#MenuItem |
|
1442 |
#label: '-' |
|
1443 |
) |
|
1444 |
#(#MenuItem |
|
1445 |
#label: 'Show Help Texts' |
|
836 | 1446 |
#translateLabel: true |
748 | 1447 |
#activeHelpKey: #helpShowHelp |
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1448 |
#indication: #showingHelp: |
748 | 1449 |
) |
1450 |
) nil |
|
1451 |
nil |
|
1452 |
) |
|
525 | 1453 |
) |
1454 |
) nil |
|
1455 |
nil |
|
1456 |
) |
|
836 | 1457 |
|
936
f3db8359547a
method rename: #showHelp -> #showingHelp
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1458 |
"Modified: / 31.7.1998 / 18:19:47 / cg" |
525 | 1459 |
! |
1460 |
||
1461 |
menuAdd |
|
738 | 1462 |
"This resource specification was automatically generated |
1463 |
by the MenuEditor of ST/X." |
|
1464 |
||
1465 |
"Do not manually edit this!! If it is corrupted, |
|
1466 |
the MenuEditor may not be able to read the specification." |
|
525 | 1467 |
|
1468 |
" |
|
1469 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuAdd |
|
1470 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuAdd)) startUp |
|
1471 |
" |
|
1472 |
||
1473 |
<resource: #menu> |
|
1474 |
||
1475 |
^ |
|
1476 |
||
1477 |
#(#Menu |
|
1478 |
||
1479 |
#( |
|
1480 |
#(#MenuItem |
|
703 | 1481 |
#label: 'Menu Item' |
836 | 1482 |
#translateLabel: true |
703 | 1483 |
#value: #doCreateItem |
1484 |
#activeHelpKey: #addMenuItem |
|
1485 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') |
|
525 | 1486 |
) |
1487 |
#(#MenuItem |
|
703 | 1488 |
#label: 'Menu Separator' |
836 | 1489 |
#translateLabel: true |
703 | 1490 |
#value: #doCreateSep |
1491 |
#activeHelpKey: #addMenuSeparator |
|
1492 |
#labelImage: #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') |
|
525 | 1493 |
) |
1494 |
#(#MenuItem |
|
703 | 1495 |
#label: '-' |
525 | 1496 |
) |
1497 |
#(#MenuItem |
|
703 | 1498 |
#label: 'Submenu' |
836 | 1499 |
#translateLabel: true |
703 | 1500 |
#value: #doCreateMenu |
1501 |
#activeHelpKey: #addSubMenu |
|
1502 |
#labelImage: #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') |
|
525 | 1503 |
) |
1504 |
#(#MenuItem |
|
703 | 1505 |
#label: 'Submenu Link' |
836 | 1506 |
#translateLabel: true |
703 | 1507 |
#value: #doCreateLink |
1508 |
#activeHelpKey: #addSubMenuLink |
|
1509 |
#labelImage: #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Submenu Link') |
|
525 | 1510 |
) |
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1511 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1512 |
#label: '-' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1513 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1514 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1515 |
#label: 'Standard Submenu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1516 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1517 |
#submenu: |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1518 |
#(#Menu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1519 |
|
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 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1522 |
#label: 'Standard File Menu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1523 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1524 |
#value: #doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1525 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1526 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1527 |
#label: 'Standard Edit Menu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1528 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1529 |
#value: #doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1530 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1531 |
#(#MenuItem |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1532 |
#label: 'Standard Help Menu' |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1533 |
#translateLabel: true |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1534 |
#value: #doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1535 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1536 |
) nil |
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 |
) |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1539 |
) |
525 | 1540 |
) nil |
1541 |
nil |
|
1542 |
) |
|
836 | 1543 |
|
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
1544 |
"Modified: / 23.8.1998 / 15:48:21 / cg" |
525 | 1545 |
! |
1546 |
||
1547 |
menuDefaultLink |
|
738 | 1548 |
"This resource specification was automatically generated |
1549 |
by the MenuEditor of ST/X." |
|
1550 |
||
1551 |
"Do not manually edit this!! If it is corrupted, |
|
1552 |
the MenuEditor may not be able to read the specification." |
|
525 | 1553 |
|
1554 |
" |
|
1555 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
1556 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
1557 |
" |
|
1558 |
||
1559 |
<resource: #menu> |
|
1560 |
||
1561 |
^ |
|
738 | 1562 |
|
525 | 1563 |
#(#Menu |
738 | 1564 |
|
525 | 1565 |
#( |
1566 |
#(#MenuItem |
|
738 | 1567 |
#'label:' '!!!! derives from application !!!!' |
525 | 1568 |
) |
1569 |
) nil |
|
1570 |
nil |
|
1571 |
) |
|
1572 |
! |
|
1573 |
||
1574 |
menuEdit |
|
738 | 1575 |
"This resource specification was automatically generated |
1576 |
by the MenuEditor of ST/X." |
|
1577 |
||
1578 |
"Do not manually edit this!! If it is corrupted, |
|
1579 |
the MenuEditor may not be able to read the specification." |
|
525 | 1580 |
|
1581 |
" |
|
1582 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit |
|
1583 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp |
|
1584 |
" |
|
1585 |
||
1586 |
<resource: #menu> |
|
1587 |
||
1588 |
^ |
|
1589 |
||
1590 |
#(#Menu |
|
1591 |
||
1592 |
#( |
|
1593 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1594 |
#label: 'Cut' |
882 | 1595 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1596 |
#value: #doCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1597 |
#activeHelpKey: #editCut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1598 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1599 |
#shortcutKeyCharacter: #Cut |
525 | 1600 |
) |
1601 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1602 |
#label: 'Copy' |
882 | 1603 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1604 |
#value: #doCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1605 |
#activeHelpKey: #editCopy |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1606 |
#enabled: #hasValidSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1607 |
#shortcutKeyCharacter: #Copy |
525 | 1608 |
) |
1609 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1610 |
#label: 'Paste' |
882 | 1611 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1612 |
#value: #doPaste |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1613 |
#activeHelpKey: #editPaste |
738 | 1614 |
#enabled: #valueOfCanPaste |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1615 |
#shortcutKeyCharacter: #Paste |
525 | 1616 |
) |
1617 |
#(#MenuItem |
|
686 | 1618 |
#label: 'Delete' |
882 | 1619 |
#translateLabel: true |
686 | 1620 |
#value: #doDelete |
1621 |
#activeHelpKey: #editDelete |
|
1622 |
#enabled: #hasValidSelection |
|
1623 |
#shortcutKeyCharacter: #Delete |
|
1624 |
) |
|
1625 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1626 |
#label: '-' |
525 | 1627 |
) |
1628 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1629 |
#label: 'Move Up' |
882 | 1630 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1631 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1632 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1633 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1634 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Move Up') |
525 | 1635 |
) |
1636 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1637 |
#label: 'Move Down' |
882 | 1638 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1639 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1640 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1641 |
#enabled: #valueOfEnableMovingUpOrDown |
882 | 1642 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Move Down') |
525 | 1643 |
) |
1644 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1645 |
#label: 'Move In' |
882 | 1646 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1647 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1648 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1649 |
#enabled: #valueOfEnableMovingIn |
882 | 1650 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Move In') |
525 | 1651 |
) |
1652 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1653 |
#label: 'Move Out' |
882 | 1654 |
#translateLabel: true |
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1655 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1656 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1657 |
#enabled: #valueOfEnableMovingOut |
882 | 1658 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Move Out') |
525 | 1659 |
) |
1660 |
) nil |
|
1661 |
nil |
|
1662 |
) |
|
1663 |
! |
|
1664 |
||
888 | 1665 |
menuEditImage |
1666 |
"This resource specification was automatically generated |
|
1667 |
by the MenuEditor of ST/X." |
|
1668 |
||
1669 |
"Do not manually edit this!! If it is corrupted, |
|
1670 |
the MenuEditor may not be able to read the specification." |
|
1671 |
||
1672 |
" |
|
1673 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuEditImage |
|
1674 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuEditImage)) startUp |
|
1675 |
" |
|
1676 |
||
1677 |
<resource: #menu> |
|
1678 |
||
1679 |
^ |
|
1680 |
||
1681 |
#(#Menu |
|
1682 |
||
1683 |
#( |
|
1684 |
#(#MenuItem |
|
1685 |
#label: 'Edit' |
|
1686 |
#translateLabel: true |
|
1687 |
#value: #doEditImage |
|
1688 |
#activeHelpKey: #editCut |
|
1689 |
#enabled: #hasValidSelection |
|
1690 |
#shortcutKeyCharacter: #Cut |
|
1691 |
) |
|
1692 |
#(#MenuItem |
|
1693 |
#label: 'Remove' |
|
1694 |
#translateLabel: true |
|
1695 |
#value: #doRemoveImage |
|
1696 |
#activeHelpKey: #editCopy |
|
1697 |
#enabled: #hasValidSelection |
|
1698 |
#shortcutKeyCharacter: #Copy |
|
1699 |
) |
|
1700 |
) nil |
|
1701 |
nil |
|
1702 |
) |
|
1703 |
! |
|
1704 |
||
525 | 1705 |
menuToolbar |
738 | 1706 |
"This resource specification was automatically generated |
1707 |
by the MenuEditor of ST/X." |
|
1708 |
||
1709 |
"Do not manually edit this!! If it is corrupted, |
|
1710 |
the MenuEditor may not be able to read the specification." |
|
525 | 1711 |
|
1712 |
" |
|
1713 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuToolbar |
|
1714 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuToolbar)) startUp |
|
1715 |
" |
|
1716 |
||
1717 |
<resource: #menu> |
|
1718 |
||
1719 |
^ |
|
1720 |
||
1721 |
#(#Menu |
|
1722 |
||
1723 |
#( |
|
1724 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1725 |
#label: 'New' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1726 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1727 |
#value: #doNew |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1728 |
#activeHelpKey: #fileNew |
879 | 1729 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
525 | 1730 |
) |
1731 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1732 |
#label: 'Load' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1733 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1734 |
#value: #doLoad |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1735 |
#activeHelpKey: #fileLoad |
879 | 1736 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
525 | 1737 |
) |
1738 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1739 |
#label: 'Save' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1740 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1741 |
#value: #doSave |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1742 |
#activeHelpKey: #fileSave |
879 | 1743 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
525 | 1744 |
) |
1745 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1746 |
#label: '' |
525 | 1747 |
) |
1748 |
#(#MenuItem |
|
686 | 1749 |
#label: 'Cut' |
1750 |
#isButton: true |
|
1751 |
#value: #doCut |
|
1752 |
#activeHelpKey: #editCut |
|
1753 |
#enabled: #hasValidSelection |
|
879 | 1754 |
#labelImage: #(#ResourceRetriever #Icon #cutIcon) |
686 | 1755 |
) |
1756 |
#(#MenuItem |
|
1757 |
#label: 'Copy' |
|
1758 |
#isButton: true |
|
1759 |
#value: #doCopy |
|
1760 |
#activeHelpKey: #editCopy |
|
1761 |
#enabled: #hasValidSelection |
|
879 | 1762 |
#labelImage: #(#ResourceRetriever #Icon #copyIcon) |
686 | 1763 |
) |
1764 |
#(#MenuItem |
|
1765 |
#label: 'Paste' |
|
1766 |
#isButton: true |
|
1767 |
#value: #doPaste |
|
1768 |
#activeHelpKey: #editPaste |
|
738 | 1769 |
#enabled: #valueOfCanPaste |
879 | 1770 |
#labelImage: #(#ResourceRetriever #Icon #pasteIcon) |
686 | 1771 |
) |
1772 |
#(#MenuItem |
|
1773 |
#label: 'Delete' |
|
1774 |
#isButton: true |
|
1775 |
#value: #doDelete |
|
1776 |
#activeHelpKey: #editDelete |
|
1777 |
#enabled: #hasValidSelection |
|
879 | 1778 |
#labelImage: #(#ResourceRetriever #Icon #deleteIcon) |
686 | 1779 |
) |
1780 |
#(#MenuItem |
|
1781 |
#label: '' |
|
1782 |
) |
|
1783 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1784 |
#label: 'Add Item' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1785 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1786 |
#value: #doCreateItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1787 |
#activeHelpKey: #addMenuItem |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1788 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1789 |
#labelImage: #(#ResourceRetriever nil #menuItemImage) |
525 | 1790 |
) |
1791 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1792 |
#label: 'Add Separator' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1793 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1794 |
#value: #doCreateSep |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1795 |
#activeHelpKey: #addMenuSeparator |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1796 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1797 |
#labelImage: #(#ResourceRetriever nil #menuSeparatorImage) |
525 | 1798 |
) |
1799 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1800 |
#label: 'Add Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1801 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1802 |
#value: #doCreateMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1803 |
#activeHelpKey: #addSubMenu |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1804 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1805 |
#labelImage: #(#ResourceRetriever nil #submenuImage) |
525 | 1806 |
) |
1807 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1808 |
#label: 'Add Linked Submenu' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1809 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1810 |
#value: #doCreateLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1811 |
#activeHelpKey: #addSubMenuLink |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1812 |
#enabled: #hasAnySingleSelection |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1813 |
#labelImage: #(#ResourceRetriever nil #linkSubmenuImage) |
525 | 1814 |
) |
1815 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1816 |
#label: '' |
525 | 1817 |
) |
1818 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1819 |
#label: 'Move Up' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1820 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1821 |
#value: #doStepUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1822 |
#activeHelpKey: #editMoveUp |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1823 |
#enabled: #valueOfEnableMovingUpOrDown |
879 | 1824 |
#labelImage: #(#ResourceRetriever #Icon #upIcon) |
525 | 1825 |
) |
1826 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1827 |
#label: 'Move Down' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1828 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1829 |
#value: #doStepDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1830 |
#activeHelpKey: #editMoveDown |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1831 |
#enabled: #valueOfEnableMovingUpOrDown |
879 | 1832 |
#labelImage: #(#ResourceRetriever #Icon #downIcon) |
525 | 1833 |
) |
1834 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1835 |
#label: 'Move In' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1836 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1837 |
#value: #doStepIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1838 |
#activeHelpKey: #editMoveIn |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1839 |
#enabled: #valueOfEnableMovingIn |
879 | 1840 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon) |
525 | 1841 |
) |
1842 |
#(#MenuItem |
|
669
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1843 |
#label: 'Move Out' |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1844 |
#isButton: true |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1845 |
#value: #doStepOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1846 |
#activeHelpKey: #editMoveOut |
1f5b2d936bcf
disable move down/up buttons while selecting multiple items
tz
parents:
667
diff
changeset
|
1847 |
#enabled: #valueOfEnableMovingOut |
879 | 1848 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon) |
525 | 1849 |
) |
1850 |
) nil |
|
1851 |
nil |
|
1852 |
) |
|
1853 |
! ! |
|
1854 |
||
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1855 |
!MenuEditor class methodsFor:'queries'! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1856 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1857 |
getAllImageSelectorsFrom: aClass |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1858 |
"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
|
1859 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1860 |
|iconClass imageMethodSelectors r| |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1861 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1862 |
aClass isNil ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1863 |
^ #() |
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 |
aClass isSymbol |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1867 |
ifTrue: [iconClass := Smalltalk at: aClass] |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1868 |
ifFalse: [iconClass := aClass]. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1869 |
aClass isBehavior ifFalse:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1870 |
^ #() |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1871 |
]. |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1872 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1873 |
imageMethodSelectors := OrderedCollection new. |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1874 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1875 |
iconClass withAllSuperclasses do:[:cls | |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1876 |
cls class methodDictionary keysAndValuesDo: [:sel :m | |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
1877 |
((r := m resourceType) == #image |
971
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1878 |
or:[r == #programImage]) ifTrue:[ |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1879 |
imageMethodSelectors add:sel |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1880 |
] |
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 |
^ imageMethodSelectors asSortedCollection asOrderedCollection |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1885 |
|
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1886 |
"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
|
1887 |
"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
|
1888 |
! ! |
f3b1476f5006
find all images in getAllImageSelectorsFrom: (walk superclass chain)
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
1889 |
|
525 | 1890 |
!MenuEditor class methodsFor:'slices'! |
1891 |
||
1892 |
slicesItem |
|
1893 |
^#( |
|
1894 |
(Basics basicsItemSpec) |
|
1895 |
(Details detailsEditSpec) |
|
1896 |
(Image imageEditSpec) |
|
1897 |
) |
|
1898 |
||
1899 |
! |
|
1900 |
||
1901 |
slicesLink |
|
1902 |
^#( |
|
1903 |
(Basics basicsLinkSpec) |
|
1904 |
(Details detailsEditSpec) |
|
1905 |
(Image imageEditSpec) |
|
1906 |
) |
|
1907 |
||
1908 |
! |
|
1909 |
||
1910 |
slicesMenu |
|
1911 |
^#( |
|
1912 |
(Basics basicsMenuSpec) |
|
1913 |
(Details detailsEditSpec) |
|
1914 |
(Image imageEditSpec) |
|
1915 |
) |
|
1916 |
||
1917 |
! |
|
1918 |
||
1919 |
slicesRootMenu |
|
1920 |
^#( |
|
1921 |
(Basics basicsRootSpec) |
|
1922 |
) |
|
1923 |
||
1924 |
! |
|
1925 |
||
1926 |
slicesSeparatorMenu |
|
1927 |
^#( |
|
1928 |
(Basics basicsSeparatorSpec) |
|
1929 |
) |
|
1930 |
||
199 | 1931 |
! ! |
1932 |
||
1933 |
!MenuEditor methodsFor:'accessing'! |
|
1934 |
||
218 | 1935 |
submenuTest |
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1936 |
"return the submenu assigned to item test; |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1937 |
this is dynamically constructed, to reflect the current |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1938 |
edited menu." |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1939 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1940 |
|menu cls| |
218 | 1941 |
|
1244 | 1942 |
(menu := treeView asMenu) allItemsDo:[:anItem| |
218 | 1943 |
anItem value:nil. |
1944 |
anItem enabled:true. |
|
1945 |
]. |
|
849
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1946 |
|
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1947 |
cls := self resolveName:specClass. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1948 |
menu findGuiResourcesIn:cls. |
0001a9185d99
translate labels in the test-menu.
Claus Gittinger <cg@exept.de>
parents:
836
diff
changeset
|
1949 |
^ menu |
287 | 1950 |
! |
1951 |
||
716 | 1952 |
useHelpTool: aHelpTool |
728 | 1953 |
"take the help dictionaries from aHelpTool into my helpTool" |
407 | 1954 |
|
748 | 1955 |
self helpTool buildFromClass: aHelpTool specClass. |
1956 |
self helpTool dictionaries: aHelpTool dictionaries. |
|
1957 |
self helpTool dictionary: aHelpTool dictionary |
|
1244 | 1958 |
|
1959 |
||
199 | 1960 |
! ! |
1961 |
||
1962 |
!MenuEditor methodsFor:'aspects'! |
|
1963 |
||
220 | 1964 |
hasAnySingleSelection |
407 | 1965 |
|
1966 |
^builder booleanValueAspectFor: #hasAnySingleSelection |
|
220 | 1967 |
! |
1968 |
||
1969 |
hasValidSelection |
|
407 | 1970 |
|
1971 |
^builder booleanValueAspectFor: #hasValidSelection |
|
220 | 1972 |
! |
1973 |
||
879 | 1974 |
listOfImages |
1244 | 1975 |
"get a list of the images |
1976 |
" |
|
1977 |
|list| |
|
1978 |
||
1979 |
(list := builder bindingAt:#listOfImages) isNil ifTrue:[ |
|
1980 |
builder aspectAt:#listOfImages put: (list := List new). |
|
879 | 1981 |
]. |
1244 | 1982 |
^ list |
1983 |
||
1984 |
||
199 | 1985 |
! |
1986 |
||
879 | 1987 |
selectionOfImage |
1988 |
"get selection of list of the images as value" |
|
1989 |
||
1990 |
|holder| |
|
1991 |
(holder := builder bindingAt:#selectionOfImage) isNil ifTrue:[ |
|
1992 |
builder aspectAt:#selectionOfImage put: (holder := nil asValue). |
|
1993 |
]. |
|
1994 |
^ holder |
|
1995 |
||
1996 |
||
1997 |
! |
|
1998 |
||
1244 | 1999 |
tabCanvasHolder |
2000 |
"keep the canvas for the current selected item or nil |
|
2001 |
" |
|
2002 |
|holder| |
|
2003 |
||
2004 |
(holder := builder bindingAt:#tabCanvasHolder) isNil ifTrue:[ |
|
2005 |
builder aspectAt:#tabCanvasHolder put: (holder := nil asValue). |
|
2006 |
]. |
|
2007 |
^ holder |
|
2008 |
||
2009 |
||
2010 |
! |
|
2011 |
||
199 | 2012 |
tabList |
728 | 2013 |
"get a value holder with the list of the attribute sections (slices)" |
199 | 2014 |
|
298 | 2015 |
|holder| |
1244 | 2016 |
|
298 | 2017 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
1244 | 2018 |
builder aspectAt:#tabList put:(holder := nil asValue). |
298 | 2019 |
]. |
2020 |
^ holder |
|
2021 |
||
2022 |
||
199 | 2023 |
! |
2024 |
||
407 | 2025 |
treeView |
728 | 2026 |
"get a tree view representing hierarchically the menu items" |
407 | 2027 |
|
1244 | 2028 |
^ treeView |
199 | 2029 |
! ! |
2030 |
||
728 | 2031 |
!MenuEditor methodsFor:'building'! |
2032 |
||
734 | 2033 |
buildFromClass:aClass andSelector:aSelector |
2034 |
||
2035 |
self isStandAlone ifTrue:[ |
|
748 | 2036 |
self helpTool buildFromClass:specClass |
734 | 2037 |
]. |
1244 | 2038 |
treeView buildFromClass: aClass andSelector: aSelector. |
734 | 2039 |
|
2040 |
self updateHistory. |
|
2041 |
self updateInfoLabel. |
|
2042 |
||
2043 |
! |
|
2044 |
||
1244 | 2045 |
buildFromResourceSpec:aResourceSpec |
2046 |
|spec| |
|
2047 |
||
2048 |
spec := aResourceSpec isCollection ifTrue:[aResourceSpec decodeAsLiteralArray] |
|
2049 |
ifFalse:[aResourceSpec]. |
|
2050 |
||
2051 |
self buildFromMenu:spec |
|
728 | 2052 |
! ! |
2053 |
||
199 | 2054 |
!MenuEditor methodsFor:'change & update'! |
2055 |
||
970 | 2056 |
update:something with:aParameter from:changedObject |
2057 |
super update:something with:aParameter from:changedObject. |
|
2058 |
||
2059 |
changedObject == (aspects at:#retriever) ifTrue:[ |
|
1244 | 2060 |
self updateImageView. |
970 | 2061 |
]. |
2062 |
||
2063 |
"Modified: / 24.8.1998 / 21:47:48 / cg" |
|
2064 |
! |
|
2065 |
||
748 | 2066 |
updateChannels |
2067 |
"update channels" |
|
407 | 2068 |
|
1244 | 2069 |
|node parent next state canPaste| |
2070 |
||
412 | 2071 |
state := false. |
1244 | 2072 |
node := treeView selectedNode. |
2073 |
||
2074 |
node notNil ifTrue:[ |
|
220 | 2075 |
self hasAnySingleSelection value:true. |
1244 | 2076 |
canPaste := self valueOfCanPaste value. |
2077 |
||
2078 |
(parent := node parent) notNil ifTrue:[ |
|
220 | 2079 |
next := parent childAt:((parent indexOfChild:node) + 1). |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2080 |
self valueOfEnableMovingIn value:(next notNil and:[next hasChildren]). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2081 |
self valueOfEnableMovingUpOrDown value:(parent children size > 1). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2082 |
self valueOfEnableMovingOut value:parent parent notNil. |
748 | 2083 |
self hasValidSelection value:true. |
1244 | 2084 |
self valueOfCanPaste value:canPaste. |
2085 |
^ self |
|
2086 |
]. |
|
2087 |
] ifFalse:[ |
|
2088 |
canPaste := false. |
|
2089 |
||
220 | 2090 |
self hasAnySingleSelection value:false. |
1244 | 2091 |
|
2092 |
treeView numberOfSelections ~~ 0 ifTrue:[ |
|
2093 |
canPaste := false. |
|
2094 |
state := (treeView isInSelection:1) not |
|
220 | 2095 |
] |
407 | 2096 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2097 |
self valueOfEnableMovingUpOrDown value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2098 |
self valueOfEnableMovingIn value:false. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2099 |
self valueOfEnableMovingOut value:false. |
748 | 2100 |
self hasValidSelection value:state. |
1244 | 2101 |
self valueOfCanPaste value:canPaste. |
879 | 2102 |
|
2103 |
! |
|
2104 |
||
1244 | 2105 |
updateImageView |
2106 |
"update the image view |
|
2107 |
" |
|
2108 |
|cls newList icon| |
|
2109 |
||
2110 |
self isImageViewSelected ifFalse:[ |
|
2111 |
^ self |
|
902 | 2112 |
]. |
1244 | 2113 |
cls := self currentImageRetrieverClass. |
2114 |
||
2115 |
lastImageRetriever == cls ifTrue:[ |
|
2116 |
newList := self listOfImages |
|
2117 |
] ifFalse:[ |
|
2118 |
cls notNil ifTrue:[ |
|
2119 |
lastImageRetriever := cls. |
|
2120 |
||
2121 |
newList := self class getAllImageSelectorsFrom:cls. |
|
2122 |
newList := newList collect: [:sel| |img| |
|
2123 |
img := cls perform: sel. |
|
2124 |
img height > 22 ifTrue:[ |
|
2125 |
img := img magnifiedBy: 22 / img extent y |
|
2126 |
]. |
|
2127 |
LabelAndIcon icon:img string:sel |
|
2128 |
]. |
|
2129 |
] ifFalse:[ |
|
2130 |
newList := #() |
|
2131 |
]. |
|
2132 |
self listOfImages contents:newList. |
|
2133 |
]. |
|
2134 |
||
2135 |
icon := (aspects at:#icon) value. |
|
2136 |
||
2137 |
icon notNil ifTrue:[ |
|
2138 |
icon := newList detect:[:el| el string == icon] ifNone:nil. |
|
2139 |
]. |
|
2140 |
self selectionOfImage value:icon. |
|
2141 |
||
879 | 2142 |
|
220 | 2143 |
! ! |
2144 |
||
916 | 2145 |
!MenuEditor methodsFor:'defaults'! |
2146 |
||
2147 |
aboutImage |
|
2148 |
"the image to be displayed in my about-box; |
|
2149 |
If nil is returned, thhe ST/X default image is used." |
|
2150 |
||
2151 |
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_menus.xpm' |
|
2152 |
||
2153 |
"Created: / 25.7.1998 / 20:48:12 / cg" |
|
2154 |
"Modified: / 27.7.1998 / 10:21:55 / cg" |
|
2155 |
! ! |
|
2156 |
||
220 | 2157 |
!MenuEditor methodsFor:'event handling'! |
2158 |
||
407 | 2159 |
doesNotUnderstand: aMessage |
2160 |
"detour incoming messages to the tree view" |
|
2161 |
||
1244 | 2162 |
^ aMessage sendTo:treeView |
199 | 2163 |
! ! |
2164 |
||
287 | 2165 |
!MenuEditor methodsFor:'private'! |
2166 |
||
1244 | 2167 |
currentImageRetrieverClass |
2168 |
"returns the current class which provides the images dependent on |
|
2169 |
the retriver or the current spec. |
|
2170 |
" |
|
2171 |
|clsName| |
|
2172 |
||
2173 |
clsName := (aspects at: #retriever) value. |
|
2174 |
||
2175 |
clsName size == 0 ifTrue:[ |
|
2176 |
clsName := specClass |
|
2177 |
]. |
|
2178 |
^ Smalltalk at:clsName ifAbsent:nil |
|
2179 |
! |
|
2180 |
||
287 | 2181 |
helpKey |
728 | 2182 |
"get the help key of the selected menu item" |
407 | 2183 |
|
287 | 2184 |
|node| |
1244 | 2185 |
|
2186 |
(node := treeView selectedNode) notNil ifTrue:[ |
|
287 | 2187 |
^ node contents activeHelpKey |
2188 |
]. |
|
2189 |
^ nil |
|
2190 |
! |
|
2191 |
||
2192 |
helpTool |
|
1244 | 2193 |
"get the help tool application |
2194 |
" |
|
2195 |
|helpView helpTool| |
|
2196 |
||
2197 |
helpTool := listOfCanvas at:#help ifAbsent:nil. |
|
2198 |
||
2199 |
helpTool isNil ifTrue:[ |
|
2200 |
helpTool := UIHelpTool new createBuilder. |
|
2201 |
helpTool masterApplication:self. |
|
2202 |
helpTool modifiedHolder: self valueOfEnablingCommitButtons. |
|
2203 |
helpView := View new client:helpTool. |
|
2204 |
helpTool builder window:helpView. |
|
2205 |
listOfCanvas at:#help put:helpTool. |
|
2206 |
]. |
|
2207 |
^ helpTool |
|
2208 |
||
2209 |
||
287 | 2210 |
! ! |
2211 |
||
199 | 2212 |
!MenuEditor methodsFor:'queries'! |
2213 |
||
2214 |
isHelpToolSelected |
|
1244 | 2215 |
"return true if current selection is help tool |
2216 |
" |
|
2217 |
^ typeOfCanvas == #help |
|
2218 |
||
2219 |
! |
|
2220 |
||
2221 |
isImageViewSelected |
|
2222 |
"return true if current selection is help tool |
|
2223 |
" |
|
2224 |
^ typeOfCanvas == #imageEditSpec |
|
2225 |
||
287 | 2226 |
! |
2227 |
||
535 | 2228 |
preferredExtent |
2229 |
||
2230 |
^super preferredExtent max: (Screen current width//3)@(Screen current height//2.5) |
|
2231 |
||
2232 |
||
199 | 2233 |
! ! |
2234 |
||
2235 |
!MenuEditor methodsFor:'selection'! |
|
2236 |
||
1244 | 2237 |
clearSelection |
2238 |
tabSelection := 0. |
|
2239 |
typeOfCanvas := nil. |
|
2240 |
! |
|
2241 |
||
879 | 2242 |
imageSelected |
1078
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2243 |
|imgSel| |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2244 |
|
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2245 |
imgSel := self selectionOfImage value. |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2246 |
imgSel notNil ifTrue:[ |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2247 |
(aspects at: #icon) value: imgSel string |
84683b5a6979
oops - care for non-existing selection
Claus Gittinger <cg@exept.de>
parents:
1069
diff
changeset
|
2248 |
] |
879 | 2249 |
! |
2250 |
||
199 | 2251 |
menuChanged |
407 | 2252 |
|
1244 | 2253 |
|node item myClass oldLabel oldSlices newList index| |
2254 |
||
2255 |
node := treeView selectedNode. |
|
2256 |
||
2257 |
node isNil ifTrue:[ |
|
2258 |
slices := nil. |
|
2259 |
index := 0. |
|
2260 |
] ifFalse:[ |
|
2261 |
oldSlices := slices. |
|
2262 |
myClass := self class. |
|
2263 |
item := node contents. |
|
2264 |
||
218 | 2265 |
item isSeparator ifFalse:[ |
199 | 2266 |
node parent isNil ifFalse:[ |
218 | 2267 |
node hasChildren ifTrue:[ |
1244 | 2268 |
slices := #slicesMenu |
218 | 2269 |
] ifFalse:[ |
1244 | 2270 |
item submenuChannel isNil ifTrue:[slices := #slicesItem] |
2271 |
ifFalse:[slices := #slicesLink] |
|
218 | 2272 |
]. |
1244 | 2273 |
slices := listOfSlices at:slices |
2274 |
ifAbsentPut:[(myClass perform:slices) copyWith:#('Help' #help)]. |
|
199 | 2275 |
] ifTrue:[ |
1244 | 2276 |
slices := listOfSlices at:#slicesRootMenu |
2277 |
ifAbsentPut:[myClass perform:#slicesRootMenu]. |
|
287 | 2278 |
]. |
199 | 2279 |
] ifTrue:[ |
1244 | 2280 |
slices := myClass perform:#slicesSeparatorMenu. |
287 | 2281 |
]. |
1244 | 2282 |
index := tabSelection ? 0. |
2283 |
self clearSelection. |
|
2284 |
||
2285 |
slices ~~ oldSlices ifTrue:[ |
|
2286 |
newList := slices collect:[:el| el first]. |
|
2287 |
||
2288 |
index ~~ 0 ifTrue:[ |
|
2289 |
oldLabel := self tabList value at:index ifAbsent:nil. |
|
2290 |
||
2291 |
oldLabel notNil ifTrue:[ |
|
2292 |
index := newList indexOf:oldLabel. |
|
2293 |
] |
|
287 | 2294 |
]. |
1244 | 2295 |
self tabList value:newList. |
2296 |
]. |
|
2297 |
index := index max:1. |
|
199 | 2298 |
]. |
1244 | 2299 |
self tabModel value:index. |
1246 | 2300 |
aspects do:[:a| a removeDependent:self]. |
2301 |
self cancel. |
|
748 | 2302 |
self updateChannels. |
1246 | 2303 |
aspects do:[:a| a addDependent:self]. |
1244 | 2304 |
|
199 | 2305 |
! |
2306 |
||
407 | 2307 |
tabSelection: aSelection |
1244 | 2308 |
"put the section aSelection into the note book |
2309 |
" |
|
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2310 |
|view canvasView| |
728 | 2311 |
|
287 | 2312 |
tabSelection = aSelection ifTrue:[ |
199 | 2313 |
^ self |
2314 |
]. |
|
1244 | 2315 |
typeOfCanvas := nil. |
2316 |
||
2317 |
(tabSelection := aSelection) ~~ 0 ifTrue:[ |
|
2318 |
typeOfCanvas := (slices at:tabSelection) last. |
|
2319 |
||
2320 |
self isHelpToolSelected ifTrue:[ |
|
2321 |
view := self helpTool window. |
|
2322 |
] ifFalse:[ |
|
2323 |
self updateImageView. |
|
2324 |
view := listOfCanvas at:typeOfCanvas ifAbsentPut:[View new client:self spec:typeOfCanvas]. |
|
2325 |
] |
|
199 | 2326 |
]. |
1256
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2327 |
|
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2328 |
"/ before bringing up the new notebook page, |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2329 |
"/ we must disable all now invisible input fields ... |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2330 |
"/ (otherwise, those would fire on #accept. |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2331 |
|
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2332 |
canvasView := self tabCanvasHolder value. |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2333 |
canvasView notNil ifTrue:[ |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2334 |
canvasView allSubViewsDo:[:aComponent | |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2335 |
aComponent isInputField ifTrue:[ |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2336 |
aComponent disableIfInvisible:true |
38ff328f119b
care for hidden editFields with acceptChannel
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
2337 |
] |
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 |
self tabCanvasHolder value:view. |
1244 | 2342 |
|
199 | 2343 |
! ! |
2344 |
||
2345 |
!MenuEditor methodsFor:'startup / release'! |
|
2346 |
||
738 | 2347 |
initialize |
2348 |
"initialize value holders for the attributes of the menu components" |
|
2349 |
||
2350 |
|holder| |
|
2351 |
||
2352 |
super initialize. |
|
2353 |
||
2354 |
aspects at:#seperatorSelection put:(holder := SelectionInList new). |
|
2355 |
holder list: Item separatorList. |
|
872
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2356 |
holder addDependent:self. |
eb3bd8e609f1
must create builder early - req'd.
Claus Gittinger <cg@exept.de>
parents:
860
diff
changeset
|
2357 |
|
1244 | 2358 |
listOfCanvas := IdentityDictionary new. |
2359 |
listOfSlices := IdentityDictionary new. |
|
2360 |
||
2361 |
treeView := TreeView new. |
|
2362 |
treeView action:[:dummy| self menuChanged ]. |
|
2363 |
||
953
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2364 |
aspects at:#indicationEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2365 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2366 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2367 |
aspects at:#choiceEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2368 |
with:[:a | a size == 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2369 |
argument:(aspects at:#indication)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2370 |
aspects at:#choiceValueEnabled put:(BlockValue |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2371 |
with:[:a | a size > 0] |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2372 |
argument:(aspects at:#choice)). |
1aecad8bf33a
added choice type menu items (i.e. radioButton behavior)
Claus Gittinger <cg@exept.de>
parents:
943
diff
changeset
|
2373 |
|
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2374 |
aspects at:#retrieverClassList put:self class defaultRetrieverClassList asValue. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2375 |
|
1244 | 2376 |
aspects do: [:holder| holder addDependent:self]. |
2377 |
||
738 | 2378 |
! |
2379 |
||
728 | 2380 |
openModalOnMenu: aMenu |
734 | 2381 |
"build a tree from aMenu and open it modal" |
728 | 2382 |
|
738 | 2383 |
super openModalOnResourceSpec: aMenu |
1250 | 2384 |
! |
2385 |
||
2386 |
postOpenWith:aBuilder |
|
2387 |
"reset keyboardProcessor for menuBar |
|
2388 |
" |
|
2389 |
super postOpenWith: aBuilder. |
|
2390 |
aBuilder keyboardProcessor menuBar:nil. |
|
199 | 2391 |
! ! |
2392 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2393 |
!MenuEditor methodsFor:'user actions'! |
199 | 2394 |
|
407 | 2395 |
accept |
2396 |
"invoked by button 'OK' and by save requests of menu item changes" |
|
2397 |
||
1244 | 2398 |
|node item| |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2399 |
|
637 | 2400 |
super accept. |
2401 |
||
1244 | 2402 |
(node := treeView selectedNode) notNil ifTrue:[ |
2403 |
item := node contents. |
|
2404 |
||
1062 | 2405 |
self isHelpToolSelected ifTrue:[ |
407 | 2406 |
self helpTool accept. |
1244 | 2407 |
item activeHelpKey: self helpTool helpKey. |
686 | 2408 |
self valueOfEnablingCommitButtons value: false. |
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2409 |
self clearModifiedFlag. |
1062 | 2410 |
] ifFalse:[ |
1244 | 2411 |
item buildFromAspects:aspects. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2412 |
node changed. |
1244 | 2413 |
specSelector := treeView selectorName. |
407 | 2414 |
] |
734 | 2415 |
]. |
879 | 2416 |
self updateInfoLabel. |
1155 | 2417 |
|
407 | 2418 |
! |
2419 |
||
2420 |
cancel |
|
2421 |
"invoked by button 'Cancel'" |
|
1244 | 2422 |
|node item| |
2423 |
||
2424 |
node := treeView selectedNode. |
|
2425 |
||
2426 |
aspects keysAndValuesDo:[:aKey :anAspect| |
|
2427 |
aKey ~~ #retrieverClassList ifTrue:[ |
|
2428 |
anAspect setValue:''. "/ to clear the field. |
|
2429 |
anAspect value:'' |
|
2430 |
] |
|
407 | 2431 |
]. |
1244 | 2432 |
|
2433 |
node notNil ifTrue:[ |
|
2434 |
item := node contents. |
|
2435 |
item toAspects:aspects. |
|
2436 |
self helpTool helpKey:(item activeHelpKey). |
|
2437 |
]. |
|
2438 |
self updateImageView. |
|
2439 |
self valueOfEnablingCommitButtons value:false. |
|
1189
0e7e286f864c
code cleanup; care for non-string argument
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
2440 |
self clearModifiedFlag. |
407 | 2441 |
! |
2442 |
||
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2443 |
doBrowseForImageResource |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2444 |
"opens a browser on image-resource methods" |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2445 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2446 |
|msg currClass w cls sel| |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2447 |
|
1244 | 2448 |
currClass := self currentImageRetrieverClass. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2449 |
msg := |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2450 |
(ResourceSelectionBrowser |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2451 |
request: 'Use Image From Class' |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2452 |
onSuperclass: nil |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2453 |
andClass: currClass |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2454 |
andSelector: (aspects at: #icon) |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2455 |
withResourceTypes: #(image fileImage programImage)). |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2456 |
|
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2457 |
msg notNil ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2458 |
(w := msg asCollectionOfWords) size == 2 ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2459 |
cls := w at:1. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2460 |
sel := w at:2. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2461 |
cls ~= currClass ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2462 |
(aspects at: #retriever) value:cls asSymbol. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2463 |
]. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2464 |
sel ~= (aspects at:#icon) ifTrue:[ |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2465 |
(aspects at: #icon) value:sel asSymbol. |
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2466 |
]. |
1244 | 2467 |
self updateImageView. |
1020
dcfbf3acb037
added browsing capability to image section.
Claus Gittinger <cg@exept.de>
parents:
1007
diff
changeset
|
2468 |
]. |
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 |
|
879 | 2474 |
doEditImage |
888 | 2475 |
"opens a Image Editor on the resource retriever and the icon selector; |
2476 |
then updates the list of images and select the line of the image" |
|
879 | 2477 |
|
2478 |
super doEditImage. |
|
1244 | 2479 |
lastImageRetriever := nil. |
2480 |
self updateImageView. |
|
879 | 2481 |
! |
2482 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2483 |
doNew |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2484 |
|
748 | 2485 |
super doNew ifTrue: [self helpTool doNew] |
199 | 2486 |
! |
2487 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2488 |
doPickAMenu |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2489 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2490 |
|view| |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2491 |
|
1244 | 2492 |
self askForModification ifTrue:[ |
2493 |
((view := Screen current viewFromUser) isNil or: |
|
2494 |
[view == Screen current rootView]) ifTrue:[ |
|
2495 |
^ self |
|
2496 |
]. |
|
2497 |
view specClass == MenuPanelSpec ifTrue:[ |
|
2498 |
^ treeView buildFromMenu: view asMenu |
|
2499 |
]. |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2500 |
]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2501 |
^ nil |
381 | 2502 |
! |
2503 |
||
888 | 2504 |
doRemoveImage |
2505 |
"removes the image of the selected line" |
|
1244 | 2506 |
|cls sel| |
2507 |
||
2508 |
sel := self selectionOfImage value. |
|
2509 |
||
2510 |
sel size ~~ 0 ifTrue:[ |
|
2511 |
cls := self currentImageRetrieverClass. |
|
2512 |
cls notNil ifTrue:[ |
|
2513 |
cls class removeSelector:(sel string) |
|
2514 |
]. |
|
2515 |
(aspects at:#icon) value:nil. |
|
2516 |
lastImageRetriever := nil. |
|
2517 |
self updateImageView. |
|
888 | 2518 |
] |
2519 |
! |
|
2520 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2521 |
doSave |
1244 | 2522 |
|cls menu spec mthd category code excla| |
199 | 2523 |
|
642 | 2524 |
super doSave ifFalse: [^nil]. |
637 | 2525 |
|
1244 | 2526 |
cls := self resolveName: specClass. |
2527 |
menu := treeView asMenu literalArrayEncoding. |
|
199 | 2528 |
spec := WriteStream on:String new. |
2529 |
UISpecification prettyPrintSpecArray:menu on:spec indent:5. |
|
2530 |
spec := spec contents. |
|
2531 |
||
2532 |
"/ if that method already exists, do not overwrite the category |
|
2533 |
||
576 | 2534 |
category := 'menu specs'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2535 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
199 | 2536 |
category := mthd category. |
2537 |
]. |
|
2538 |
||
764 | 2539 |
excla := Character excla asString. |
2540 |
||
2541 |
code := excla |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2542 |
, (cls name , ' class methodsFor:' , category storeString) |
764 | 2543 |
, excla , '\\' |
199 | 2544 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2545 |
, specSelector , '\' |
738 | 2546 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
2547 |
, '\\ "\' |
|
654
45cc74ba1113
simplified comma-expression to make microsoft-cc happy
Claus Gittinger <cg@exept.de>
parents:
642
diff
changeset
|
2548 |
, (' 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
|
2549 |
, (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') |
199 | 2550 |
, ' "\'. |
2551 |
||
2552 |
code := code |
|
2553 |
, '\' |
|
2554 |
, ' <resource: #menu>\\' |
|
1083 | 2555 |
, ' ^ ' , spec |
199 | 2556 |
, '\' |
764 | 2557 |
, (excla , ' ' , excla) |
199 | 2558 |
, '\\'. |
2559 |
||
2560 |
code := code withCRs. |
|
2561 |
(ReadStream on:code) fileIn. |
|
2562 |
||
764 | 2563 |
self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. |
699 | 2564 |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2565 |
self updateHistory. |
748 | 2566 |
self updateInfoLabel. |
2567 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2568 |
hasSaved := true. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2569 |
modified := false. |
218 | 2570 |
|
199 | 2571 |
! |
2572 |
||
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2573 |
doSaveAs |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2574 |
|
1244 | 2575 |
super doSaveAs ifTrue: [treeView selectorName:specSelector] |
218 | 2576 |
! |
199 | 2577 |
|
218 | 2578 |
doStepDown |
407 | 2579 |
"shift selected menu item one step down" |
2580 |
||
1244 | 2581 |
treeView selectedNodeChangeSequenceOrder:1. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2582 |
modified := true. |
398 | 2583 |
|
2584 |
||
2585 |
||
2586 |
||
218 | 2587 |
! |
2588 |
||
2589 |
doStepIn |
|
407 | 2590 |
"move selected menu item into next submenu" |
2591 |
||
1244 | 2592 |
treeView selectedNodeBecomeChildOfNext. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2593 |
modified := true. |
398 | 2594 |
|
2595 |
||
2596 |
||
2597 |
||
199 | 2598 |
|
218 | 2599 |
! |
199 | 2600 |
|
218 | 2601 |
doStepOut |
407 | 2602 |
"move selected menu item out from parent submenu" |
2603 |
||
1244 | 2604 |
treeView selectedNodeBecomeSisterOfParent. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2605 |
modified := true. |
218 | 2606 |
! |
2607 |
||
2608 |
doStepUp |
|
407 | 2609 |
"shift selected menu item one step up" |
2610 |
||
1244 | 2611 |
treeView selectedNodeChangeSequenceOrder:-1. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2612 |
modified := true. |
199 | 2613 |
! ! |
2614 |
||
1249 | 2615 |
!MenuEditor::Item class methodsFor:'constants'! |
2616 |
||
2617 |
separatorList |
|
2618 |
"get the list of available separator types" |
|
2619 |
||
2620 |
^#('blank' 'single line' 'double line') |
|
2621 |
! |
|
2622 |
||
2623 |
separatorSlices |
|
2624 |
"get the list of menu spec values of the corresponding separator types" |
|
2625 |
||
2626 |
^ #( |
|
2627 |
( #blank '' ) |
|
2628 |
( #single '-' ) |
|
2629 |
( #double '=' ) |
|
2630 |
) |
|
2631 |
! ! |
|
2632 |
||
2633 |
!MenuEditor::Item class methodsFor:'documentation'! |
|
2634 |
||
2635 |
documentation |
|
2636 |
" |
|
2637 |
implements the contents assigned to a TreeItem. An instance |
|
2638 |
is associated with one item and keeps all its information |
|
2639 |
||
2640 |
[see also:] |
|
2641 |
TreeItem |
|
2642 |
MenuEditor |
|
2643 |
||
2644 |
[author:] |
|
2645 |
Claus Atzkern |
|
2646 |
" |
|
2647 |
||
2648 |
||
2649 |
! ! |
|
2650 |
||
2651 |
!MenuEditor::Item methodsFor:'accessing'! |
|
2652 |
||
2653 |
activeHelpKey |
|
2654 |
"get the help key of the menu item" |
|
2655 |
||
2656 |
^activeHelpKey |
|
2657 |
! |
|
2658 |
||
2659 |
activeHelpKey:aKey |
|
2660 |
"set the help key of the menu item" |
|
2661 |
||
2662 |
activeHelpKey := aKey |
|
2663 |
! |
|
2664 |
||
2665 |
label |
|
2666 |
"get the value of the menu item" |
|
2667 |
||
2668 |
^label |
|
2669 |
! |
|
2670 |
||
2671 |
label:something |
|
2672 |
"set the value of the menu item" |
|
2673 |
||
2674 |
label := something ? '-' |
|
2675 |
! |
|
2676 |
||
2677 |
separatorType |
|
2678 |
"get the separator type assigned to item or nil" |
|
2679 |
||
2680 |
label size > 1 |
|
2681 |
ifFalse: |
|
2682 |
[ |
|
2683 |
label size == 0 ifTrue:[^#blank]. |
|
2684 |
label first == $- ifTrue:[^#single]. |
|
2685 |
label first == $= ifTrue:[^#double]. |
|
2686 |
]. |
|
2687 |
^nil |
|
2688 |
||
2689 |
! |
|
2690 |
||
2691 |
startGroup:aSymbolOrNil |
|
2692 |
"set the startGroup attribute" |
|
2693 |
||
2694 |
startGroup := aSymbolOrNil |
|
2695 |
||
2696 |
"Created: / 23.8.1998 / 15:56:03 / cg" |
|
2697 |
! |
|
2698 |
||
2699 |
submenuChannel |
|
2700 |
"return the value of the instance variable 'submenuChannel' (automatically generated)" |
|
2701 |
||
2702 |
^submenuChannel |
|
2703 |
! |
|
2704 |
||
2705 |
submenuChannel:aChannel |
|
2706 |
"get the submenuChannel" |
|
2707 |
||
2708 |
submenuChannel := aChannel |
|
2709 |
! |
|
2710 |
||
2711 |
translateLabel:aBoolean |
|
2712 |
"set/clear the translate to national-language flag" |
|
2713 |
||
2714 |
translateLabel := aBoolean |
|
2715 |
||
2716 |
"Created: / 6.6.1998 / 17:23:33 / cg" |
|
2717 |
! |
|
2718 |
||
2719 |
value:aSymbol |
|
2720 |
"set the value attribute" |
|
2721 |
||
2722 |
value := aSymbol |
|
2723 |
||
2724 |
"Created: / 23.8.1998 / 16:02:10 / cg" |
|
2725 |
! ! |
|
2726 |
||
2727 |
!MenuEditor::Item methodsFor:'building'! |
|
2728 |
||
2729 |
buildFromAspects:aspects |
|
2730 |
"read the values of the aspects into my values" |
|
2731 |
||
2732 |
|name| |
|
2733 |
self isSeparator |
|
2734 |
ifFalse: |
|
2735 |
[ |
|
2736 |
name := label. |
|
2737 |
label := (aspects at:#label) value. |
|
2738 |
||
2739 |
(label isNil or:[self isSeparator]) ifTrue:[ |
|
2740 |
(aspects at:#label) value:(label := name) |
|
2741 |
]. |
|
2742 |
||
2743 |
enabled := (aspects at:#enabled) value. |
|
2744 |
value := (aspects at:#value) value. |
|
2745 |
nameKey := (aspects at:#nameKey) value. |
|
2746 |
indication := (aspects at:#indication) value. |
|
2747 |
choice := (aspects at:#choice) value. |
|
2748 |
choiceValue := (aspects at:#choiceValue) value. |
|
2749 |
shortcutKey := (aspects at:#shortcutKey) value. |
|
2750 |
startGroup := (aspects at:#startGroup) value. |
|
2751 |
accessCharacterPos := (aspects at:#accessCharacterPos) value. |
|
2752 |
argument := (aspects at:#argument) value. |
|
2753 |
translateLabel := (aspects at:#translateLabel) value. |
|
2754 |
isButton := (aspects at:#isButton) value. |
|
2755 |
auxValue := (aspects at:#auxValue) value. |
|
2756 |
||
2757 |
argument isString ifTrue:[ |
|
2758 |
argument size > 1 ifTrue:[ |
|
2759 |
(argument at:1) == $# ifTrue:[ |
|
2760 |
argument := (argument copyFrom:2) asSymbol |
|
2761 |
] |
|
2762 |
] |
|
2763 |
]. |
|
2764 |
submenuChannel := (aspects at:#submenuChannel) value. |
|
2765 |
retriever := (aspects at:#retriever) value. |
|
2766 |
icon := (aspects at:#icon) value. |
|
2767 |
iconAndLabel := (aspects at:#iconAndLabel) value. |
|
2768 |
] |
|
2769 |
ifTrue: |
|
2770 |
[ |
|
2771 |
name := (aspects at:#seperatorSelection) selectionIndex. |
|
2772 |
label := (self class separatorSlices at:name) last. |
|
2773 |
]. |
|
2774 |
isVisible := (aspects at:#isVisible) value. |
|
2775 |
||
2776 |
"Modified: / 14.8.1998 / 15:36:38 / cg" |
|
2777 |
! |
|
2778 |
||
2779 |
buildFromMenuItem:anItem |
|
2780 |
"read the attributes of anItem into my values" |
|
2781 |
||
2782 |
|rtv| |
|
2783 |
||
2784 |
self label:(anItem rawLabel). |
|
2785 |
activeHelpKey := anItem activeHelpKey. |
|
2786 |
||
2787 |
(enabled := anItem enabled) isSymbol ifFalse:[ |
|
2788 |
enabled := nil |
|
2789 |
]. |
|
2790 |
(value := anItem value) isSymbol ifFalse:[ |
|
2791 |
value := nil. |
|
2792 |
]. |
|
2793 |
(indication := anItem indication) isSymbol ifFalse:[ |
|
2794 |
indication := nil |
|
2795 |
]. |
|
2796 |
(choice := anItem choice) isSymbol ifFalse:[ |
|
2797 |
choice := nil |
|
2798 |
]. |
|
2799 |
choiceValue := anItem choiceValue. |
|
2800 |
||
2801 |
nameKey := anItem nameKey. |
|
2802 |
shortcutKey := anItem shortcutKeyCharacter. |
|
2803 |
startGroup := anItem startGroup. |
|
2804 |
accessCharacterPos := anItem accessCharacterPosition. |
|
2805 |
argument := anItem argument. |
|
2806 |
||
2807 |
submenuChannel := anItem submenuChannel. |
|
2808 |
translateLabel := anItem translateLabel. |
|
2809 |
isButton := anItem isButton. |
|
2810 |
isVisible := anItem isVisible. |
|
2811 |
auxValue := anItem auxValue. |
|
2812 |
||
2813 |
(((rtv := anItem adornment) notNil) |
|
2814 |
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]) |
|
2815 |
ifTrue: |
|
2816 |
[ |
|
2817 |
retriever := rtv className. |
|
2818 |
icon := rtv selector. |
|
2819 |
(iconAndLabel := rtv labelText notNil) ifTrue:[ |
|
2820 |
label := rtv labelText. |
|
2821 |
] |
|
2822 |
] |
|
2823 |
||
2824 |
"Modified: / 29.9.1998 / 11:18:25 / cg" |
|
2825 |
! ! |
|
2826 |
||
2827 |
!MenuEditor::Item methodsFor:'conversion'! |
|
2828 |
||
2829 |
asMenuItem |
|
2830 |
"converts self to a menu item" |
|
2831 |
||
2832 |
|item rcv| |
|
2833 |
||
2834 |
item := MenuItem labeled:label. |
|
2835 |
item isVisible:isVisible. |
|
2836 |
||
2837 |
self isSeparator ifFalse:[ |
|
2838 |
item activeHelpKey:activeHelpKey. |
|
2839 |
item enabled:enabled. |
|
2840 |
item accessCharacterPosition:accessCharacterPos. |
|
2841 |
item argument:argument. |
|
2842 |
item submenuChannel:submenuChannel. |
|
2843 |
item nameKey:nameKey. |
|
2844 |
item shortcutKeyCharacter:shortcutKey. |
|
2845 |
item startGroup:startGroup. |
|
2846 |
item value:value. |
|
2847 |
item indication:indication. |
|
2848 |
item choice:choice. |
|
2849 |
item choiceValue:choiceValue. |
|
2850 |
item translateLabel: translateLabel. |
|
2851 |
item isButton: isButton. |
|
2852 |
item auxValue: auxValue. |
|
2853 |
||
2854 |
icon notNil ifTrue:[ |
|
2855 |
rcv := ResourceRetriever new. |
|
2856 |
rcv className:retriever. |
|
2857 |
rcv selector:icon. |
|
2858 |
iconAndLabel == true ifTrue:[ |
|
2859 |
rcv labelText:label |
|
2860 |
]. |
|
2861 |
item labelImage:rcv |
|
2862 |
] |
|
2863 |
]. |
|
2864 |
^item |
|
2865 |
||
2866 |
"Modified: / 14.8.1998 / 15:36:35 / cg" |
|
2867 |
! |
|
2868 |
||
2869 |
toAspects:aspects |
|
2870 |
"put my values into the values of aspects" |
|
2871 |
||
2872 |
|type| |
|
2873 |
(type := self separatorType) notNil ifTrue: [ |
|
2874 |
type := self class separatorSlices findFirst:[:el| el first == type ]. |
|
2875 |
(aspects at:#seperatorSelection) selectionIndex:type. |
|
2876 |
] ifFalse: [ |
|
2877 |
(aspects at:#label) value:label. |
|
2878 |
(aspects at:#enabled) value:enabled. |
|
2879 |
(aspects at:#value) value:value. |
|
2880 |
(aspects at:#nameKey) value:nameKey. |
|
2881 |
(aspects at:#indication) value:indication. |
|
2882 |
(aspects at:#choice) value:choice. |
|
2883 |
(aspects at:#choiceValue) value:choiceValue. |
|
2884 |
(aspects at:#shortcutKey) value:shortcutKey. |
|
2885 |
(aspects at:#startGroup) value:startGroup. |
|
2886 |
(aspects at:#accessCharacterPos) value:accessCharacterPos. |
|
2887 |
(aspects at:#translateLabel) value:translateLabel. |
|
2888 |
(aspects at:#submenuChannel) value:submenuChannel. |
|
2889 |
(aspects at:#retriever) value:retriever. |
|
2890 |
(aspects at:#icon) value:icon. |
|
2891 |
(aspects at:#iconAndLabel) value:iconAndLabel. |
|
2892 |
(aspects at:#isButton) value:isButton. |
|
2893 |
(aspects at:#auxValue) value:auxValue. |
|
2894 |
||
2895 |
(aspects at:#argument) |
|
2896 |
value:(argument isSymbol |
|
2897 |
ifTrue: ['#', argument] |
|
2898 |
ifFalse:[argument]). |
|
2899 |
]. |
|
2900 |
(aspects at:#isVisible) value:isVisible. |
|
2901 |
||
2902 |
"Modified: / 14.8.1998 / 15:37:29 / cg" |
|
2903 |
! ! |
|
2904 |
||
2905 |
!MenuEditor::Item methodsFor:'queries'! |
|
2906 |
||
2907 |
iconFor: aNode |
|
2908 |
"get the icon of the menu item for the tree view" |
|
2909 |
||
2910 |
(aNode hasChildren or: [aNode parent isNil]) |
|
2911 |
ifTrue: |
|
2912 |
[ |
|
2913 |
^MenuEditor submenuImage |
|
2914 |
] |
|
2915 |
ifFalse: |
|
2916 |
[ |
|
2917 |
submenuChannel notNil |
|
2918 |
ifTrue: |
|
2919 |
[ |
|
2920 |
^MenuEditor linkSubmenuImage |
|
2921 |
] |
|
2922 |
ifFalse: |
|
2923 |
[ |
|
2924 |
self isSeparator |
|
2925 |
ifTrue: [^MenuEditor menuSeparatorImage] |
|
2926 |
ifFalse: [^MenuEditor menuItemImage] |
|
2927 |
] |
|
2928 |
] |
|
2929 |
! |
|
2930 |
||
2931 |
isSeparator |
|
2932 |
"return true if item is a seperator" |
|
2933 |
||
2934 |
^self separatorType notNil |
|
2935 |
! |
|
2936 |
||
2937 |
treeViewLabel |
|
2938 |
"get the label of the menu item for the tree view" |
|
2939 |
||
2940 |
^label |
|
2941 |
" asBoldText, |
|
2942 |
(value notNil ifTrue: [': [', |
|
2943 |
value , |
|
2944 |
(argument isString ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']), |
|
2945 |
']'] ifFalse: ['']) |
|
2946 |
||
2947 |
||
2948 |
" |
|
2949 |
! ! |
|
2950 |
||
407 | 2951 |
!MenuEditor::TreeView class methodsFor:'documentation'! |
199 | 2952 |
|
2953 |
documentation |
|
2954 |
" |
|
734 | 2955 |
This tree view class provides a hierarchical representation |
2956 |
of the components of a menu. |
|
199 | 2957 |
|
2958 |
[see also:] |
|
2959 |
SelectionInTreeView |
|
213 | 2960 |
SelectionInTree |
2961 |
TreeItem |
|
199 | 2962 |
|
2963 |
[author:] |
|
2964 |
Claus Atzkern |
|
2965 |
" |
|
2966 |
! ! |
|
2967 |
||
407 | 2968 |
!MenuEditor::TreeView methodsFor:'accessing'! |
199 | 2969 |
|
2970 |
selectorName |
|
734 | 2971 |
"get the selector of the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2972 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2973 |
^(listOfNodes first contents label) asSymbol |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2974 |
! |
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 |
selectorName: aSymbol |
734 | 2977 |
"set the selector for the menu spec" |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2978 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
2979 |
listOfNodes first contents label: aSymbol |
199 | 2980 |
! ! |
2981 |
||
407 | 2982 |
!MenuEditor::TreeView methodsFor:'building'! |
199 | 2983 |
|
637 | 2984 |
buildFromClass:aClass andSelector:aSelector |
734 | 2985 |
"read a menu spec from aClass and aSelector and put |
2986 |
the encoded menu into the tree view" |
|
407 | 2987 |
|
728 | 2988 |
|spec cls menu firstNode firstNodeLabel| |
2989 |
||
2990 |
"if opened on a menu" |
|
2991 |
(aClass isNil and: [aSelector isNil and: [listOfNodes size > 0]]) ifTrue: [^nil]. |
|
199 | 2992 |
|
1244 | 2993 |
self selection:nil. |
2994 |
||
199 | 2995 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
340 | 2996 |
cls := self application resolveName:aClass. |
199 | 2997 |
|
2998 |
(cls respondsTo:aSelector) ifTrue:[ |
|
2999 |
spec := cls perform:aSelector |
|
3000 |
] |
|
3001 |
]. |
|
331 | 3002 |
|
199 | 3003 |
spec isNil ifFalse:[ |
298 | 3004 |
(spec isMemberOf:Menu) ifFalse:[ |
3005 |
menu := Menu new fromLiteralArrayEncoding:spec. |
|
3006 |
] ifTrue:[ |
|
3007 |
menu := spec. |
|
3008 |
]. |
|
728 | 3009 |
firstNode := self nodeLabel:(aSelector asString). |
3010 |
self subMenu:menu parent:firstNode. |
|
199 | 3011 |
] ifTrue:[ |
728 | 3012 |
(aClass notNil and: [aSelector isNil and: [listOfNodes size > 0]]) |
3013 |
ifTrue: |
|
3014 |
[ |
|
3015 |
firstNode := listOfNodes first |
|
3016 |
] |
|
3017 |
ifFalse: |
|
3018 |
[ |
|
3019 |
aSelector notNil ifTrue:[firstNodeLabel := aSelector asString] |
|
3020 |
ifFalse:[firstNodeLabel := 'menu']. |
|
3021 |
firstNode := self nodeLabel:firstNodeLabel. |
|
3022 |
] |
|
199 | 3023 |
]. |
734 | 3024 |
|
728 | 3025 |
firstNode expand. |
3026 |
model root: firstNode. |
|
3027 |
||
3028 |
firstNode hasChildren ifFalse:[ |
|
775 | 3029 |
model add:(self nodeLabel:'Item 1') below:firstNode |
199 | 3030 |
]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3031 |
|
199 | 3032 |
|
3033 |
! |
|
3034 |
||
3035 |
buildFromMenu:aMenu |
|
734 | 3036 |
"put aMenu into the tree view" |
199 | 3037 |
|
249 | 3038 |
|node| |
199 | 3039 |
|
1244 | 3040 |
self selection:nil. |
3041 |
||
213 | 3042 |
node := self nodeLabel:'menu'. |
199 | 3043 |
self subMenu:aMenu parent:node. |
3044 |
||
3045 |
node hasChildren ifFalse:[ |
|
728 | 3046 |
node add:(self nodeLabel:'Item 1') |
199 | 3047 |
]. |
213 | 3048 |
node expand. |
199 | 3049 |
model root:node. |
3050 |
! |
|
3051 |
||
213 | 3052 |
menuItem:anItem |
199 | 3053 |
|
249 | 3054 |
|node| |
199 | 3055 |
|
407 | 3056 |
node := self nodeLabel: anItem label. |
199 | 3057 |
node contents buildFromMenuItem:anItem. |
407 | 3058 |
self subMenu: anItem submenu parent:node. |
3059 |
^node. |
|
199 | 3060 |
|
3061 |
||
3062 |
! |
|
3063 |
||
3064 |
subMenu:aMenu parent:aParent |
|
407 | 3065 |
|
213 | 3066 |
|idx grp| |
199 | 3067 |
|
3068 |
aMenu isNil ifFalse:[ |
|
3069 |
grp := aMenu groupSizes. |
|
213 | 3070 |
aMenu itemsDo:[:i| aParent add:(self menuItem:i)]. |
199 | 3071 |
|
3072 |
grp notNil ifTrue:[ |
|
213 | 3073 |
idx := 0. |
199 | 3074 |
|
3075 |
grp do:[:i| |
|
213 | 3076 |
idx := idx + i + 1. |
3077 |
aParent add:(self nodeLabel:nil) beforeIndex:idx. |
|
199 | 3078 |
] |
3079 |
] |
|
3080 |
] |
|
3081 |
! ! |
|
3082 |
||
407 | 3083 |
!MenuEditor::TreeView methodsFor:'conversion'! |
199 | 3084 |
|
3085 |
asMenu |
|
3086 |
|menu root| |
|
3087 |
||
3088 |
root := self root. |
|
3089 |
||
3090 |
root hasChildren ifTrue:[ |
|
3091 |
menu := Menu new. |
|
3092 |
root children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
3093 |
]. |
|
3094 |
^ menu |
|
3095 |
! |
|
3096 |
||
3097 |
asMenuItem:aNode |
|
3098 |
||
3099 |
|menu item| |
|
3100 |
||
3101 |
item := aNode contents asMenuItem. |
|
3102 |
||
3103 |
aNode hasChildren ifTrue:[ |
|
3104 |
menu := Menu new. |
|
3105 |
aNode children do:[:aChild| menu addItem:(self asMenuItem:aChild)]. |
|
3106 |
item submenu:menu |
|
3107 |
]. |
|
3108 |
^ item |
|
3109 |
||
3110 |
! ! |
|
3111 |
||
407 | 3112 |
!MenuEditor::TreeView methodsFor:'drawing basics'! |
199 | 3113 |
|
853 | 3114 |
redrawLabelAt:x y:yTop index:anIndex |
407 | 3115 |
"draw text label assigned to a node at x y( center)" |
3116 |
||
1067 | 3117 |
|isSelected y0 x0 x1 w type item| |
199 | 3118 |
|
3119 |
item := (listOfNodes at:anIndex) contents. |
|
218 | 3120 |
type := item separatorType. |
199 | 3121 |
|
218 | 3122 |
type isNil ifTrue:[ |
853 | 3123 |
^ super redrawLabelAt:x y:yTop index:anIndex |
3124 |
]. |
|
3125 |
isSelected := self isInSelection:anIndex. |
|
854 | 3126 |
x0 := x. |
853 | 3127 |
|
3128 |
highlightMode == #label ifTrue:[ |
|
3129 |
x0 := x + 4. |
|
3130 |
||
3131 |
isSelected ifTrue:[ |
|
3132 |
w := 80 + 8. |
|
3133 |
self paint:hilightBgColor. |
|
3134 |
self fillRectangleX:x y:yTop width:w height:fontHeight. |
|
3135 |
] |
|
218 | 3136 |
] ifFalse:[ |
853 | 3137 |
w := 0. |
3138 |
]. |
|
3139 |
type == #blank ifFalse:[ |
|
3140 |
isSelected ifTrue:[self paint:hilightFgColor] |
|
3141 |
ifFalse:[self paint:fgColor]. |
|
3142 |
||
3143 |
x1 := x0 + 80. |
|
3144 |
y0 := yTop - 1 + (fontHeight // 2). |
|
3145 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
3146 |
||
3147 |
type == #double ifTrue:[ |
|
3148 |
y0 := y0 + 2. |
|
3149 |
self displayLineFromX:x0 y:y0 toX:x1 y:y0. |
|
3150 |
] |
|
3151 |
]. |
|
3152 |
||
3153 |
(isSelected and:[highlightMode == #label]) ifTrue:[ |
|
3154 |
self redrawSelFrameAtX:x y:yTop toX:(x + w) |
|
3155 |
]. |
|
3156 |
||
199 | 3157 |
! ! |
3158 |
||
407 | 3159 |
!MenuEditor::TreeView methodsFor:'event handling'! |
356 | 3160 |
|
3161 |
keyPress:key x:x y:y |
|
407 | 3162 |
"invoked if any key was pressed" |
3163 |
||
412 | 3164 |
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)> |
3165 |
||
686 | 3166 |
(key == #Delete or:[key == #BackSpace]) ifTrue: [^self doDelete]. |
748 | 3167 |
key == #Cut ifTrue:[^self doCut]. |
407 | 3168 |
key == #Copy ifTrue:[^self doCopy]. |
3169 |
key == #Paste ifTrue:[^self doPaste]. |
|
356 | 3170 |
|
412 | 3171 |
super keyPress:key x:x y:y |
356 | 3172 |
|
3173 |
! ! |
|
3174 |
||
407 | 3175 |
!MenuEditor::TreeView methodsFor:'initialization'! |
199 | 3176 |
|
3177 |
initialize |
|
734 | 3178 |
"initialize the tree view of the menu components" |
407 | 3179 |
|
199 | 3180 |
super initialize. |
275 | 3181 |
|
213 | 3182 |
self multipleSelectOk:true. |
407 | 3183 |
self showDirectoryIndicator: true. |
3184 |
self showDirectoryIndicatorForRoot: false. |
|
634 | 3185 |
self selectConditionBlock: [:i|self application askForItemModification]. |
412 | 3186 |
self validateDoubleClickBlock: [:node| node ~~ listOfNodes first]. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3187 |
self model iconAction: [:aNode| aNode contents iconFor: aNode]. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3188 |
self model labelAction: [:aNode| aNode contents treeViewLabel] |
199 | 3189 |
! ! |
3190 |
||
407 | 3191 |
!MenuEditor::TreeView methodsFor:'menus'! |
199 | 3192 |
|
3193 |
doCopy |
|
912 | 3194 |
|clip| |
398 | 3195 |
|
213 | 3196 |
self hasSelection ifTrue:[ |
912 | 3197 |
self application clipboard:(clip := OrderedCollection new). |
3198 |
self selectionDo:[:i | clip add:((listOfNodes at:i) copy)]. |
|
748 | 3199 |
self topView application updateAllToolInstances. |
213 | 3200 |
] |
199 | 3201 |
! |
3202 |
||
3203 |
doCreateItem |
|
398 | 3204 |
|
557 | 3205 |
self addElement: (self nodeLabel:'Item') |
199 | 3206 |
! |
3207 |
||
218 | 3208 |
doCreateLink |
407 | 3209 |
|
218 | 3210 |
|node item| |
3211 |
||
557 | 3212 |
node := self nodeLabel:'Submenu Link'. |
218 | 3213 |
item := node contents. |
3214 |
item submenuChannel:#menuDefaultLink. |
|
398 | 3215 |
self addElement:node. |
3216 |
self setModified. |
|
218 | 3217 |
|
3218 |
||
3219 |
! |
|
3220 |
||
199 | 3221 |
doCreateMenu |
398 | 3222 |
|
199 | 3223 |
|node| |
557 | 3224 |
node := self nodeLabel:'Submenu'. |
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3225 |
node parent: self selectedNode. |
557 | 3226 |
node add:(self nodeLabel:'Item 1'). |
213 | 3227 |
self addElement:node |
199 | 3228 |
! |
3229 |
||
3230 |
doCreateSep |
|
398 | 3231 |
|
213 | 3232 |
self addElement:(self nodeLabel:nil) |
199 | 3233 |
! |
3234 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3235 |
doCreateStandardEditMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3236 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3237 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3238 |
node := self nodeLabel:'Edit'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3239 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3240 |
node add:(self nodeLabel:'Copy' selector:#copySelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3241 |
node add:(self nodeLabel:'Cut' selector:#cutSelection). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3242 |
node add:(self nodeLabel:'Paste' selector:#paste). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3243 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3244 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3245 |
"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
|
3246 |
"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
|
3247 |
! |
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 |
doCreateStandardFileMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3250 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3251 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3252 |
node := self nodeLabel:'File'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3253 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3254 |
node add:(self nodeLabel:'New' selector:#menuNew). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3255 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3256 |
node add:(self nodeLabel:'Open...' selector:#menuOpen). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3257 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3258 |
node add:(self nodeLabel:'Save' selector:#menuSave). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3259 |
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
|
3260 |
node add:(self nodeLabel:'-' ). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3261 |
node add:(self nodeLabel:'Exit' selector:#closeRequest). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3262 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3263 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3264 |
"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
|
3265 |
"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
|
3266 |
! |
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 |
doCreateStandardHelpMenu |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3269 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3270 |
|node| |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3271 |
node := self nodeLabel:'Help'. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3272 |
node parent: self selectedNode. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3273 |
node contents startGroup:#right. |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3274 |
node add:(self nodeLabel:'Documentation' selector:#openDocumentation). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3275 |
node add:(self nodeLabel:'-'). |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3276 |
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
|
3277 |
self addElement:node |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3278 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3279 |
"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
|
3280 |
"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
|
3281 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3282 |
|
199 | 3283 |
doCut |
912 | 3284 |
|app| |
3285 |
||
3286 |
app := self topView application. |
|
3287 |
(app hasValidSelection value and: [self askForItemModification]) |
|
603 | 3288 |
ifTrue: |
3289 |
[ |
|
3290 |
|selectedNodes| |
|
3291 |
self doCopy. |
|
3292 |
selectedNodes := self selection asSortedCollection. |
|
3293 |
self selectedNodesRemove. |
|
3294 |
self selection: selectedNodes first - 1. |
|
3295 |
self setModified. |
|
912 | 3296 |
app updateAllToolInstances. |
603 | 3297 |
] |
398 | 3298 |
|
199 | 3299 |
! |
3300 |
||
686 | 3301 |
doDelete |
3302 |
||
3303 |
(self topView application hasValidSelection value and: [self askForItemModification]) |
|
3304 |
ifTrue: |
|
3305 |
[ |
|
3306 |
|selectedNodes| |
|
3307 |
selectedNodes := self selection asSortedCollection. |
|
3308 |
self selectedNodesRemove. |
|
3309 |
self selection: selectedNodes first - 1. |
|
3310 |
self setModified. |
|
3311 |
] |
|
3312 |
||
3313 |
! |
|
3314 |
||
199 | 3315 |
doPaste |
912 | 3316 |
|clip| |
3317 |
||
3318 |
clip := self application clipboard. |
|
3319 |
(clip notNil and:[self selectedNode notNil]) ifTrue:[ |
|
3320 |
self addElement:(clip collect:[:el| el copy]) |
|
220 | 3321 |
]. |
199 | 3322 |
! ! |
3323 |
||
407 | 3324 |
!MenuEditor::TreeView methodsFor:'private'! |
199 | 3325 |
|
557 | 3326 |
addElement: aNode |
407 | 3327 |
"add something after selection" |
3328 |
||
1104 | 3329 |
|label sel| |
3330 |
||
3331 |
self askForItemModification ifTrue:[ |
|
3332 |
self selectedNodeAdd:aNode. |
|
3333 |
(aNode isCollection not |
|
3334 |
and: [aNode name = 'Item']) |
|
3335 |
ifTrue:[ |
|
3336 |
sel := self selectedNode. |
|
3337 |
label := aNode name , ' ', |
|
3338 |
(sel parent notNil |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3339 |
ifTrue: |
1104 | 3340 |
[ |
3341 |
(((sel children size = 0 |
|
3342 |
ifTrue: [sel parent children] |
|
3343 |
ifFalse: [sel children]) |
|
3344 |
select:[:node| |
|
3345 |
|lab| |
|
3346 |
lab := node contents label. |
|
3347 |
((node children size = 0) & |
|
3348 |
node contents submenuChannel isNil & |
|
3349 |
(lab ~= '-') & (lab ~= '=') & (lab ~= '')) |
|
3350 |
]) size) printString |
|
3351 |
] |
|
633
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3352 |
ifFalse: ['1']). |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3353 |
|
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3354 |
aNode name: label string asBoldText. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3355 |
aNode contents label: label string. |
11bbf4599843
uses dynamic tree items and needs ListSpecEditor as superclass (-> libview2)
tz
parents:
627
diff
changeset
|
3356 |
]. |
603 | 3357 |
aNode isCollection ifFalse: [self selectNode: aNode] ifTrue: [self selection: (aNode collect: [:node| self indexOfNode: node])]. |
3358 |
self setModified. |
|
3359 |
] |
|
3360 |
! |
|
3361 |
||
634 | 3362 |
askForItemModification |
3363 |
||
3364 |
^self topView application askForItemModification |
|
199 | 3365 |
! |
3366 |
||
213 | 3367 |
nodeLabel:aLabel |
407 | 3368 |
|
860
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3369 |
^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
|
3370 |
|
3e5171aad09f
new items have translateLabel on by default.
Claus Gittinger <cg@exept.de>
parents:
854
diff
changeset
|
3371 |
"Modified: / 6.6.1998 / 17:22:35 / cg" |
398 | 3372 |
! |
3373 |
||
968
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3374 |
nodeLabel:aLabel selector:aSelector |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3375 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3376 |
^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
|
3377 |
|
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3378 |
"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
|
3379 |
"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
|
3380 |
! |
f52b5744063b
added standard-submenu generators (in item menu)
Claus Gittinger <cg@exept.de>
parents:
959
diff
changeset
|
3381 |
|
557 | 3382 |
selectedNodeAdd:something |
3383 |
||
1104 | 3384 |
|node numChildren| |
557 | 3385 |
|
3386 |
something notNil ifTrue:[ |
|
3387 |
(node := self selectedNode) notNil ifTrue:[ |
|
1104 | 3388 |
numChildren := node children size. |
3389 |
||
557 | 3390 |
node parent notNil ifTrue:[ |
3391 |
node isCollapsable ifTrue:[ |
|
1104 | 3392 |
model add:something afterIndex:numChildren below:node |
557 | 3393 |
] ifFalse:[ |
3394 |
model add:something after:node |
|
3395 |
] |
|
3396 |
] ifFalse:[ |
|
1104 | 3397 |
model add:something afterIndex:numChildren below:(self root) |
557 | 3398 |
] |
3399 |
] |
|
3400 |
] |
|
3401 |
||
3402 |
||
3403 |
! |
|
3404 |
||
398 | 3405 |
setModified |
912 | 3406 |
|app| |
3407 |
||
3408 |
(app := self topView application) modified: true. |
|
3409 |
app updateChannels |
|
199 | 3410 |
! ! |
3411 |
||
3412 |
!MenuEditor class methodsFor:'documentation'! |
|
3413 |
||
3414 |
version |
|
3415 |
^ '$Header$' |
|
3416 |
! ! |