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