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