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