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