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