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