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