author | Claus Gittinger <cg@exept.de> |
Fri, 31 Jul 1998 19:25:12 +0200 | |
changeset 934 | b32cfce56571 |
parent 924 | 0416d7cbae92 |
child 935 | 43e8ce3b62ca |
permissions | -rw-r--r-- |
156 | 1 |
" |
765 | 2 |
COPYRIGHT (c) 1995-1998 by eXept Software AG |
156 | 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 |
|
7 |
inclusion of the above copyright notice. This software may not |
|
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 |
||
368 | 13 |
|
446 | 14 |
ToolApplicationModel subclass:#UIPainter |
765 | 15 |
instanceVariableNames:'specClass specSelector specSuperclass aspects treeView specCanvas |
16 |
selectionPanel tabSelection layoutCanvas helpCanvas modified' |
|
446 | 17 |
classVariableNames:'' |
60 | 18 |
poolDictionaries:'' |
19 |
category:'Interface-UIPainter' |
|
20 |
! |
|
21 |
||
222 | 22 |
SelectionInTreeView subclass:#TreeView |
491
c3af7854dbe8
image instance variables removed + release all widget icons while snap shoting
tz
parents:
490
diff
changeset
|
23 |
instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec' |
564 | 24 |
classVariableNames:'' |
222 | 25 |
poolDictionaries:'' |
26 |
privateIn:UIPainter |
|
27 |
! |
|
28 |
||
60 | 29 |
!UIPainter class methodsFor:'documentation'! |
30 |
||
156 | 31 |
copyright |
32 |
" |
|
765 | 33 |
COPYRIGHT (c) 1995-1998 by eXept Software AG |
156 | 34 |
All Rights Reserved |
35 |
||
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
43 |
||
44 |
! |
|
45 |
||
60 | 46 |
documentation |
47 |
" |
|
765 | 48 |
The GUI Painter provides the user with a graphical user interface for building own |
49 |
interfaces by interactively assembling widgets and defining the behavior of the widgets. |
|
50 |
The resulting interface specifications can be saved as methods on the application |
|
51 |
classes, typically subclasses of the class ApplicationModel. These specifications |
|
52 |
are used by the UIBuilder to generate the application window and its widgets when |
|
53 |
opening the application. |
|
60 | 54 |
|
55 |
[start with:] |
|
56 |
UIPainter open |
|
127 | 57 |
|
156 | 58 |
[author:] |
542 | 59 |
Claus Gittinger, eXept Software AG |
60 |
Claus Atzkern, eXept Software AG |
|
765 | 61 |
Thomas Zwick, eXept Software AG |
156 | 62 |
|
127 | 63 |
[see also:] |
64 |
UIBuilder |
|
65 |
ApplicationModel |
|
66 |
UISpecification |
|
60 | 67 |
" |
109 | 68 |
|
69 |
! ! |
|
70 |
||
71 |
!UIPainter class methodsFor:'instance creation'! |
|
72 |
||
195
350f95af5d9d
check before sending selector to class
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
73 |
openOnClass:aClass andSelector:aSelector |
743 | 74 |
"open a GUI Painter on aClass and (windowSpec) aSelector |
282 | 75 |
" |
195
350f95af5d9d
check before sending selector to class
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
76 |
^ self new openOnClass:aClass andSelector:aSelector |
60 | 77 |
! ! |
78 |
||
87 | 79 |
!UIPainter class methodsFor:'ST-80 queries'! |
80 |
||
81 |
preferenceFor:aSymbol |
|
282 | 82 |
"ST-80 compatible; always returns false |
83 |
" |
|
87 | 84 |
^ false |
109 | 85 |
|
86 |
||
87 |
! ! |
|
88 |
||
765 | 89 |
!UIPainter class methodsFor:'accessing'! |
713 | 90 |
|
91 |
defaultNameOfCanvas |
|
765 | 92 |
"returns the default name of the application" |
93 |
||
713 | 94 |
^'NewApplication' |
95 |
||
96 |
! ! |
|
97 |
||
193 | 98 |
!UIPainter class methodsFor:'help specs'! |
99 |
||
100 |
helpSpec |
|
743 | 101 |
"This resource specification was automatically generated |
102 |
by the UIHelpTool of ST/X." |
|
103 |
||
104 |
"Do not manually edit this!! If it is corrupted, |
|
105 |
the UIHelpTool may not be able to read the specification." |
|
295 | 106 |
|
193 | 107 |
" |
743 | 108 |
UIHelpTool openOnClass:UIPainter |
295 | 109 |
" |
110 |
||
743 | 111 |
<resource: #help> |
112 |
||
113 |
^super helpSpec addPairsFrom:#( |
|
193 | 114 |
|
934 | 115 |
#align |
116 |
'Widget alignment functions.' |
|
117 |
||
466 | 118 |
#alignSelectionBottom |
924 | 119 |
'Aligns the selected widgets bottom edges with the bottom of the dominant widget.' |
466 | 120 |
|
121 |
#alignSelectionCenterHor |
|
924 | 122 |
'Aligns the selected widgets centers vertically with the center of the dominant widget.' |
466 | 123 |
|
124 |
#alignSelectionCenterVer |
|
924 | 125 |
'Aligns the selected widgets centers horizontally with the center of the dominant widget.' |
466 | 126 |
|
127 |
#alignSelectionLeft |
|
924 | 128 |
'Aligns the selected widgets left edges with the left edge of the dominant widget.' |
466 | 129 |
|
130 |
#alignSelectionLeftAndRight |
|
924 | 131 |
'Aligns the selected widgets left & right edges with the dominant widget.' |
466 | 132 |
|
133 |
#alignSelectionRight |
|
924 | 134 |
'Aligns the selected widgets right edges with the right edge of the dominant widget.' |
466 | 135 |
|
136 |
#alignSelectionTop |
|
934 | 137 |
'Aligns the selected widgets top edgegs with the top edge of the dominant widget.' |
466 | 138 |
|
139 |
#alignSelectionTopAndBottom |
|
924 | 140 |
'Aligns the selected widgets top and bottom edges with the dominant widget.' |
466 | 141 |
|
142 |
#centerSelectionHor |
|
924 | 143 |
'Centers the selected widgets horizontally within their containing widget.' |
466 | 144 |
|
145 |
#centerSelectionVer |
|
924 | 146 |
'Centers the selected widgets vertically within their containing widget.' |
713 | 147 |
|
148 |
#changePositionDown |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
149 |
'Moves the selected widget(s) towards the bottom.' |
713 | 150 |
|
151 |
#changePositionLeft |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
152 |
'Moves the selected widget(s) towards the left.' |
713 | 153 |
|
154 |
#changePositionRight |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
155 |
'Moves the selected widget(s) towards the right.' |
713 | 156 |
|
157 |
#changePositionUp |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
158 |
'Moves the selected widget(s) towards the top.' |
713 | 159 |
|
160 |
#editDimensionCopyExtent |
|
924 | 161 |
'Copies the extent of the selected widget.' |
713 | 162 |
|
163 |
#editDimensionCopyLayout |
|
924 | 164 |
'Copies the layout of the selected widget.' |
713 | 165 |
|
166 |
#editDimensionDefaultExtent |
|
924 | 167 |
'Sets the selected widget(s) extent to their default.' |
713 | 168 |
|
169 |
#editDimensionDefaultHeight |
|
924 | 170 |
'Sets the selected widget(s) height to their default.' |
713 | 171 |
|
172 |
#editDimensionDefaultWidth |
|
924 | 173 |
'Sets the selected widget(s) width to their default.' |
713 | 174 |
|
175 |
#editDimensionPasteExtent |
|
924 | 176 |
'Sets the extent of the selected widget(s) to the last copied extent.' |
713 | 177 |
|
178 |
#editDimensionPasteHeight |
|
924 | 179 |
'Sets the height of the selected widget(s) to the height of the last copied layout/extent.' |
713 | 180 |
|
181 |
#editDimensionPasteLayout |
|
924 | 182 |
'Sets the layout of the selected widget(s) to the last copied layout.' |
713 | 183 |
|
184 |
#editDimensionPasteWidth |
|
924 | 185 |
'Sets the width of the selected widget(s) to the width of the last copied layout/extent.' |
713 | 186 |
|
724 | 187 |
#editInspectSpec |
188 |
'Opens an inspector on the spec of the selected widget.' |
|
189 |
||
755 | 190 |
#editInspectView |
191 |
'Opens an inspector on the view of the selected widget.' |
|
192 |
||
743 | 193 |
#editOpenSpecDocumentation |
194 |
'Opens the documentation of the selected widget.' |
|
195 |
||
713 | 196 |
#fileBrowseAspectMethods |
934 | 197 |
'Opens a System Browser on the aspect methods.' |
498 | 198 |
|
199 |
#fileLoad |
|
924 | 200 |
'Opens a dialog to load a window specification from a classes windowSpec method.' |
498 | 201 |
|
533 | 202 |
#fileLoadSubspec |
924 | 203 |
'Opens a dialog to load a sub specification from a classes windowSpec method.' |
533 | 204 |
|
498 | 205 |
#fileNew |
713 | 206 |
'Creates a new window spec.' |
498 | 207 |
|
208 |
#filePickAnInterface |
|
924 | 209 |
'Select a view on the screen, generate a window spec for it and edit this spec.' |
498 | 210 |
|
211 |
#fileSave |
|
924 | 212 |
'Saves the window spec in the current class (as spec method).' |
713 | 213 |
|
214 |
#fileSaveAs |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
215 |
'Opens a dialog to select class and selector for saving the window spec.' |
713 | 216 |
|
217 |
#fileShowWindowSpec |
|
218 |
'Opens a Workspace showing the current window spec.' |
|
219 |
||
220 |
#generateAspectMethods |
|
221 |
'Generates aspect methods for defined aspect selectors of the widgets.' |
|
222 |
||
223 |
#generateHookMethods |
|
224 |
'Generates startup/release methods. (#closeRequest, #postBuildWith:, #postOpenWith:)' |
|
225 |
||
755 | 226 |
#helpExamples |
227 |
'Opens a HTML-Browser on the documentation file with some examples of the GUI Painter.' |
|
228 |
||
229 |
#helpFunctions |
|
230 |
'Opens a HTML-Browser on the documentation file with the functions of the GUI Painter.' |
|
231 |
||
232 |
#helpLayoutTool |
|
233 |
'Opens a HTML-Browser on the documentation file of the Layout Tool.' |
|
234 |
||
235 |
#helpSelectedWidget |
|
236 |
'Opens a HTML-Browser on the documentation file of the selected widget.' |
|
237 |
||
924 | 238 |
#historyMenuItem |
239 |
'Edit this windowSpec.' |
|
240 |
||
713 | 241 |
#moveWidgetDown |
242 |
'Moves the selected widget one step down.' |
|
243 |
||
244 |
#moveWidgetInto |
|
245 |
'Moves the selected widget into next widget as child widget.' |
|
246 |
||
247 |
#moveWidgetOut |
|
248 |
'Moves the selected widget out of its parent widget.' |
|
249 |
||
250 |
#moveWidgetUp |
|
251 |
'Moves the selected widget one step up.' |
|
287 | 252 |
|
466 | 253 |
#pasteBuffer |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
254 |
'Pastes the widgets of the clipboard at the current mouse position.' |
466 | 255 |
|
256 |
#pasteWithLayout |
|
713 | 257 |
'Pastes the widgets of the clipboard without a changing of their layouts.' |
258 |
||
259 |
#settingsCanvas |
|
260 |
'Shows or hides the canvas window.' |
|
261 |
||
262 |
#settingsGallery |
|
263 |
'Shows or hides the gallery window.' |
|
264 |
||
265 |
#settingsGridManager |
|
266 |
'Opens a dialog to show/hide the grid points or to change the distances between them.' |
|
267 |
||
268 |
#settingsRedefineAspectMethods |
|
924 | 269 |
'Toggles the permission to overwrite existing aspect methods.' |
270 |
||
271 |
#settingsAspectsAsInstances |
|
272 |
'Genrate aspects as instance variables (or bindings, if off).' |
|
713 | 273 |
|
743 | 274 |
#settingsTranscriptHelp |
924 | 275 |
'Toggles display of help texts (after opening a new GUI Painter).' |
743 | 276 |
|
713 | 277 |
#settingsUndoManager |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
278 |
'Opens a dialog to undo modifications.' |
287 | 279 |
|
280 |
#spreadSelectionHor |
|
713 | 281 |
'Sets the horizontal spaces between the selected widgets as the same.' |
287 | 282 |
|
466 | 283 |
#spreadSelectionVer |
713 | 284 |
'Sets the vertical spaces between the selected widgets as the same.' |
285 |
||
286 |
#testGeometryTestMode |
|
924 | 287 |
'Toggles geometry test mode (to define ratios of variable panels and top-window dimension).' |
498 | 288 |
|
289 |
#testStartApplication |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
290 |
'Starts the application with the current window spec.' |
194 | 291 |
|
193 | 292 |
) |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
293 |
|
934 | 294 |
"Modified: / 31.7.1998 / 19:24:19 / cg" |
193 | 295 |
! ! |
296 |
||
297 | 297 |
!UIPainter class methodsFor:'helpers'! |
298 |
||
368 | 299 |
convertString:aString maxLineSize:maxCharactersPerLine skipLineFeed:skipLineFeed |
297 | 300 |
"converts a string to a string collection with maximum characters |
301 |
per line |
|
302 |
" |
|
303 |
|stream |
|
304 |
max "{ Class:SmallInteger }" |
|
305 |
size "{ Class:SmallInteger }" |
|
306 |
start "{ Class:SmallInteger }" |
|
307 |
stop "{ Class:SmallInteger }" |
|
308 |
cpySz "{ Class:SmallInteger }" |
|
542 | 309 |
lnSz "{ Class:SmallInteger }" |
310 |
atBeginOfLine| |
|
297 | 311 |
|
312 |
maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1] |
|
313 |
ifTrue:[max := 20]. |
|
314 |
||
315 |
(size := aString size) <= max ifTrue:[ |
|
316 |
^ aString |
|
317 |
]. |
|
318 |
start := 1. |
|
319 |
lnSz := 0. |
|
320 |
stream := (String new:size) writeStream. |
|
321 |
||
542 | 322 |
atBeginOfLine := true. |
323 |
||
297 | 324 |
[start <= size] whileTrue:[ |
325 |
(start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ |
|
326 |
^ stream contents |
|
327 |
]. |
|
368 | 328 |
(aString at:start) == $\ ifTrue:[ |
329 |
skipLineFeed ifFalse:[ |
|
330 |
stream nextPut:$\ |
|
331 |
]. |
|
332 |
start := start + 1. |
|
333 |
stream cr. |
|
334 |
start := start + 1. |
|
335 |
lnSz := 0. |
|
336 |
] ifFalse:[ |
|
337 |
(stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ |
|
542 | 338 |
stop := size + 1 |
368 | 339 |
]. |
340 |
(aString at:(stop - 1)) == $\ ifTrue:[ |
|
341 |
stop := stop - 1 |
|
342 |
]. |
|
343 |
cpySz := stop - start. |
|
344 |
||
345 |
lnSz == 0 ifFalse:[ |
|
542 | 346 |
(lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz. atBeginOfLine := true. ] |
368 | 347 |
ifFalse:[stream space. lnSz := lnSz + 1] |
348 |
] ifTrue:[ |
|
349 |
lnSz := cpySz |
|
350 |
]. |
|
351 |
stream nextPutAll:aString startingAt:start to:(stop - 1). |
|
352 |
start := stop. |
|
353 |
] |
|
297 | 354 |
]. |
355 |
^ stream contents |
|
542 | 356 |
|
357 |
"Modified: / 1.2.1998 / 14:42:56 / cg" |
|
297 | 358 |
! ! |
359 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
360 |
!UIPainter class methodsFor:'image specs'! |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
361 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
362 |
iconAlignB |
743 | 363 |
"This resource specification was automatically generated |
364 |
by the ImageEditor of ST/X." |
|
365 |
||
778 | 366 |
"Do not manually edit this!! If it is corrupted, |
743 | 367 |
the ImageEditor may not be able to read the specification." |
368 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
369 |
" |
743 | 370 |
ImageEditor openOnClass:self andSelector:#iconAlignB |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
371 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
372 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
373 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
374 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
375 |
^Icon |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
376 |
constantNamed:#'UIPainter iconAlignB' |
778 | 377 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@@@@@@G@@@@@@@G@E@@@@@G@G@@@@@G@G@@@@@G@G@@@E@G@G@@@G@G@G@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@G C@G @@G'' @G'' @G'' @G'' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' G'''' O??0O??0@@@@@@@C@@@@') ; yourself); yourself] |
378 |
! |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
379 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
380 |
iconAlignL |
743 | 381 |
"This resource specification was automatically generated |
382 |
by the ImageEditor of ST/X." |
|
383 |
||
778 | 384 |
"Do not manually edit this!! If it is corrupted, |
743 | 385 |
the ImageEditor may not be able to read the specification." |
386 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
387 |
" |
743 | 388 |
ImageEditor openOnClass:self andSelector:#iconAlignL |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
389 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
390 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
391 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
392 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
393 |
^Icon |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
394 |
constantNamed:#'UIPainter iconAlignL' |
778 | 395 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@@@@@(@@@@@@@(UUUP@I@(_??0@@@(@@@@@@@(@@@@@@@(@@@@@@@(@@@@@@@(UUUU@@@(_???@@@(@@@@@E@(@@@@@@@(@@@@@@@(@@@@@@@(UU@@@@@(_?@@@@@(@@@@@@@(@@@@@@@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@@@G?>@G?>@G?>@G?>@F@@@F@@@G?? G?? G?? G?? F@@@F@@@G? @G? @G? @G? @F@@@@@@@@@@@') ; yourself); yourself] |
396 |
! |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
397 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
398 |
iconAlignLR |
743 | 399 |
"This resource specification was automatically generated |
400 |
by the ImageEditor of ST/X." |
|
401 |
||
785 | 402 |
"Do not manually edit this!! If it is corrupted, |
743 | 403 |
the ImageEditor may not be able to read the specification." |
404 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
405 |
" |
743 | 406 |
ImageEditor openOnClass:self andSelector:#iconAlignLR |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
407 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
408 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
409 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
410 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
411 |
^Icon |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
412 |
constantNamed:#'UIPainter iconAlignLR' |
785 | 413 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@(@@@B @@(@@@B @@(UUUR I@(_??2 @@(@@@B @@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??2 @@(@@@B E@(@@@B @@(@@@B @@(@@@B @@(UUUR @@(_??B @@(@@@B @@(@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@F@A G?? G?? G?? G?? F@A F@A G?? G?? G?? G?? F@A F@A G?? G?? G?; G?? F@A @@@@@@@@') ; yourself); yourself] |
414 |
! |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
415 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
416 |
iconAlignR |
743 | 417 |
"This resource specification was automatically generated |
418 |
by the ImageEditor of ST/X." |
|
419 |
||
778 | 420 |
"Do not manually edit this!! If it is corrupted, |
743 | 421 |
the ImageEditor may not be able to read the specification." |
422 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
423 |
" |
743 | 424 |
ImageEditor openOnClass:self andSelector:#iconAlignR |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
425 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
426 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
427 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
428 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
429 |
^Icon |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
430 |
constantNamed:#'UIPainter iconAlignR' |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
431 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@B @@@@@@B @@@UUUR I@@_??2 @@@@@@B @@@@@@B @@@@@@B @@@@@@B @@EUUUR @@G???2 @@@@@@B E@@@@@B @@@@@@B @@@@@@B @@@@EUR @@@@G?2 @@@@@@B @@@@@@B @@@@@@@@E@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@A A?? A?? A?? A?? @@A @@A G?? G?? G?? G?? @@A @@A @G? @G? @G? @G? @@A @@@@@@@@') ; yourself); yourself]! |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
432 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
433 |
iconAlignT |
743 | 434 |
"This resource specification was automatically generated |
435 |
by the ImageEditor of ST/X." |
|
436 |
||
778 | 437 |
"Do not manually edit this!! If it is corrupted, |
743 | 438 |
the ImageEditor may not be able to read the specification." |
439 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
440 |
" |
743 | 441 |
ImageEditor openOnClass:self andSelector:#iconAlignT |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
442 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
443 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
444 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
445 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
446 |
^Icon |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
447 |
constantNamed:#'UIPainter iconAlignT' |
778 | 448 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@K@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@K@G@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@G@@@@@G@@@@@@@G@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G'''' G'''' G'''' G''''!!G'''' G'''' G'''' @G'' @G'' @G'' @G'' @G @@G C@@@@@@@@@@@@') ; yourself); yourself] |
449 |
! |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
450 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
451 |
iconAlignTB |
743 | 452 |
"This resource specification was automatically generated |
453 |
by the ImageEditor of ST/X." |
|
454 |
||
778 | 455 |
"Do not manually edit this!! If it is corrupted, |
743 | 456 |
the ImageEditor may not be able to read the specification." |
457 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
458 |
" |
743 | 459 |
ImageEditor openOnClass:self andSelector:#iconAlignTB |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
460 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
461 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
462 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
463 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
464 |
^Icon |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
465 |
constantNamed:#'UIPainter iconAlignTB' |
778 | 466 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@B*****(@B*****(@@@@@@@@@@E@E@E@G@G@G@G@@@G@G@G@@@G@G@G@@@G@G@G@H@G@G@G@@@G@G@G@A@G@G@G@@@G@G@G@@@G@G@D@@@@@@@@@@B*****(@B*****(@@@@@@@@@@@@@@@@H@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 0 0 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@C@@@@O??0O??0G'''' G''''!!G'''' G'''' G'''' G'''' G'''' G'''' G''''!!G''''!!G''& G'''' O??0O??2@@@@@@@@@@@@') ; yourself); yourself] |
467 |
! ! |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
468 |
|
60 | 469 |
!UIPainter class methodsFor:'interface specs'! |
470 |
||
743 | 471 |
dialogSpecForDefiningClassAndSelector |
472 |
"This resource specification was automatically generated |
|
473 |
by the UIPainter of ST/X." |
|
474 |
||
765 | 475 |
"Do not manually edit this!! If it is corrupted, |
743 | 476 |
the UIPainter may not be able to read the specification." |
366 | 477 |
|
478 |
" |
|
743 | 479 |
UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningClassAndSelector |
480 |
UIPainter new openInterface:#dialogSpecForDefiningClassAndSelector |
|
366 | 481 |
" |
482 |
||
483 |
<resource: #canvas> |
|
484 |
||
485 |
^ |
|
446 | 486 |
|
366 | 487 |
#(#FullSpec |
713 | 488 |
#window: |
366 | 489 |
#(#WindowSpec |
713 | 490 |
#name: 'GUI Painter' |
765 | 491 |
#layout: #(#LayoutFrame 240 0 345 0 586 0 504 0) |
743 | 492 |
#label: 'GUI Painter' |
765 | 493 |
#min: #(#Point 350 160) |
494 |
#max: #(#Point 500 160) |
|
495 |
#bounds: #(#Rectangle 240 345 587 505) |
|
743 | 496 |
#usePreferredExtent: false |
497 |
) |
|
498 |
#component: |
|
499 |
#(#SpecCollection |
|
500 |
#collection: |
|
501 |
#( |
|
502 |
#(#FramedBoxSpec |
|
503 |
#name: 'FramedBox' |
|
504 |
#layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) |
|
505 |
#component: |
|
506 |
#(#SpecCollection |
|
507 |
#collection: |
|
508 |
#( |
|
509 |
#(#LabelSpec |
|
510 |
#name: 'selectorLabel' |
|
511 |
#layout: #(#AlignmentOrigin 77 0.11 39 0 1 0.5) |
|
512 |
#label: 'Selector:' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
513 |
#translateLabel: true |
743 | 514 |
#adjust: #right |
515 |
#resizeForLabel: true |
|
516 |
) |
|
517 |
#(#InputFieldSpec |
|
518 |
#name: 'methodNameField' |
|
519 |
#layout: #(#LayoutFrame 80 0.11 28 0 14 1.0 50 0) |
|
520 |
#tabable: true |
|
521 |
#model: #methodNameChannel |
|
522 |
) |
|
523 |
#(#LabelSpec |
|
524 |
#name: 'classLabel' |
|
525 |
#layout: #(#AlignmentOrigin 77 0.11 64 0 1 0.5) |
|
526 |
#label: 'Class:' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
527 |
#translateLabel: true |
743 | 528 |
#adjust: #right |
529 |
#resizeForLabel: true |
|
530 |
) |
|
531 |
#(#InputFieldSpec |
|
532 |
#name: 'classNameField' |
|
533 |
#layout: #(#LayoutFrame 80 0.11 53 0 14 1.0 75 0) |
|
534 |
#tabable: true |
|
535 |
#model: #classNameChannel |
|
536 |
) |
|
537 |
#(#LabelSpec |
|
538 |
#name: 'superClassLabel' |
|
539 |
#layout: #(#AlignmentOrigin 77 0.11 89 0 1 0.5) |
|
540 |
#label: 'Superclass:' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
541 |
#translateLabel: true |
743 | 542 |
#adjust: #right |
543 |
#resizeForLabel: true |
|
544 |
) |
|
545 |
#(#ComboBoxSpec |
|
546 |
#name: 'superclassNameComboBox' |
|
547 |
#layout: #(#LayoutFrame 80 0.11 78 0 14 1.0 100 0) |
|
548 |
#tabable: true |
|
549 |
#model: #superclassNameChannel |
|
550 |
#comboList: #superclassNameDefaults |
|
551 |
) |
|
552 |
) |
|
553 |
) |
|
554 |
#label: 'Define Class And Selector' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
555 |
#translateLabel: true |
743 | 556 |
#labelPosition: #topLeft |
557 |
) |
|
558 |
#(#UISubSpecification |
|
559 |
#name: 'subSpec' |
|
560 |
#layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
|
561 |
#majorKey: #ToolApplicationModel |
|
562 |
#minorKey: #windowSpecForCommitWithoutChannels |
|
563 |
) |
|
564 |
) |
|
565 |
) |
|
566 |
) |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
567 |
|
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
568 |
"Modified: / 20.5.1998 / 02:18:19 / cg" |
743 | 569 |
! |
570 |
||
571 |
dialogSpecForDefiningGridParameters |
|
572 |
"This resource specification was automatically generated |
|
573 |
by the UIPainter of ST/X." |
|
574 |
||
765 | 575 |
"Do not manually edit this!! If it is corrupted, |
743 | 576 |
the UIPainter may not be able to read the specification." |
577 |
||
578 |
" |
|
579 |
UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningGridParameters |
|
580 |
UIPainter new openInterface:#dialogSpecForDefiningGridParameters |
|
581 |
" |
|
582 |
||
583 |
<resource: #canvas> |
|
584 |
||
585 |
^ |
|
586 |
||
587 |
#(#FullSpec |
|
588 |
#window: |
|
589 |
#(#WindowSpec |
|
590 |
#name: 'GUI Painter' |
|
765 | 591 |
#layout: #(#LayoutFrame 240 0 345 0 521 0 542 0) |
713 | 592 |
#label: 'GUI Painter' |
765 | 593 |
#min: #(#Point 300 200) |
594 |
#max: #(#Point 300 200) |
|
595 |
#bounds: #(#Rectangle 240 345 522 543) |
|
713 | 596 |
#usePreferredExtent: false |
366 | 597 |
) |
713 | 598 |
#component: |
366 | 599 |
#(#SpecCollection |
713 | 600 |
#collection: |
366 | 601 |
#( |
527 | 602 |
#(#FramedBoxSpec |
713 | 603 |
#name: 'FramedBox' |
604 |
#layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) |
|
605 |
#component: |
|
527 | 606 |
#(#SpecCollection |
713 | 607 |
#collection: |
527 | 608 |
#( |
609 |
#(#CheckBoxSpec |
|
713 | 610 |
#name: 'ShowGridCheckBox' |
611 |
#layout: #(#Point 23 24) |
|
612 |
#model: #showGrid |
|
613 |
#label: 'Show Grid' |
|
527 | 614 |
) |
615 |
#(#CheckBoxSpec |
|
713 | 616 |
#name: 'AlignCheckBox' |
617 |
#layout: #(#Point 23 52) |
|
618 |
#model: #alignToGrid |
|
755 | 619 |
#label: 'Align To Grid' |
527 | 620 |
) |
621 |
#(#LabelSpec |
|
713 | 622 |
#name: 'HorizontalPixelsLabel' |
623 |
#layout: #(#AlignmentOrigin 148 0 99 0 1 0.5) |
|
624 |
#label: 'Horizontal Pixels:' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
625 |
#translateLabel: true |
713 | 626 |
#adjust: #right |
627 |
#resizeForLabel: true |
|
527 | 628 |
) |
629 |
#(#InputFieldSpec |
|
713 | 630 |
#name: 'HorizontalPixelsField' |
631 |
#layout: #(#LayoutFrame 154 0 87 0 207 0 109 0) |
|
632 |
#model: #hspace |
|
633 |
#type: #numberOrNil |
|
527 | 634 |
) |
635 |
#(#LabelSpec |
|
713 | 636 |
#name: 'VerticalPixelsLabel' |
637 |
#layout: #(#AlignmentOrigin 149 0 124 0 1 0.5) |
|
638 |
#label: 'Vertical Pixels:' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
639 |
#translateLabel: true |
713 | 640 |
#adjust: #right |
641 |
#resizeForLabel: true |
|
527 | 642 |
) |
643 |
#(#InputFieldSpec |
|
713 | 644 |
#name: 'VerticalPixelsField' |
645 |
#layout: #(#LayoutFrame 154 0 112 0 207 0 134 0) |
|
646 |
#model: #vspace |
|
647 |
#type: #numberOrNil |
|
527 | 648 |
) |
649 |
) |
|
650 |
) |
|
713 | 651 |
#label: 'Grid Parameter' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
652 |
#translateLabel: true |
713 | 653 |
#labelPosition: #topLeft |
366 | 654 |
) |
446 | 655 |
#(#UISubSpecification |
743 | 656 |
#name: 'subSpec' |
713 | 657 |
#layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
658 |
#majorKey: #ToolApplicationModel |
|
659 |
#minorKey: #windowSpecForCommitWithoutChannels |
|
366 | 660 |
) |
661 |
) |
|
662 |
) |
|
663 |
) |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
664 |
|
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
665 |
"Modified: / 20.5.1998 / 02:12:26 / cg" |
366 | 666 |
! |
667 |
||
743 | 668 |
windowSpec |
669 |
"This resource specification was automatically generated |
|
670 |
by the UIPainter of ST/X." |
|
671 |
||
672 |
"Do not manually edit this!! If it is corrupted, |
|
673 |
the UIPainter may not be able to read the specification." |
|
222 | 674 |
|
675 |
" |
|
743 | 676 |
UIPainter new openOnClass:UIPainter andSelector:#windowSpec |
677 |
UIPainter new openInterface:#windowSpec |
|
678 |
UIPainter open |
|
222 | 679 |
" |
680 |
||
681 |
<resource: #canvas> |
|
682 |
||
683 |
^ |
|
724 | 684 |
|
222 | 685 |
#(#FullSpec |
724 | 686 |
#window: |
222 | 687 |
#(#WindowSpec |
724 | 688 |
#name: 'GUI Painter' |
787 | 689 |
#layout: #(#LayoutFrame 218 0 175 0 737 0 676 0) |
724 | 690 |
#label: 'GUI Painter' |
765 | 691 |
#min: #(#Point 560 460) |
743 | 692 |
#max: #(#Point 1160 870) |
787 | 693 |
#bounds: #(#Rectangle 218 175 738 677) |
743 | 694 |
#menu: #menu |
724 | 695 |
#usePreferredExtent: false |
222 | 696 |
) |
724 | 697 |
#component: |
222 | 698 |
#(#SpecCollection |
724 | 699 |
#collection: |
222 | 700 |
#( |
743 | 701 |
#(#MenuPanelSpec |
702 |
#name: 'menuToolbarView' |
|
703 |
#layout: #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0) |
|
704 |
#tabable: true |
|
705 |
#menu: #menuToolbar |
|
706 |
) |
|
707 |
#(#VariableHorizontalPanelSpec |
|
708 |
#name: 'hpanel' |
|
709 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) |
|
724 | 710 |
#component: |
527 | 711 |
#(#SpecCollection |
724 | 712 |
#collection: |
527 | 713 |
#( |
743 | 714 |
#(#ArbitraryComponentSpec |
715 |
#name: 'treeView' |
|
724 | 716 |
#tabable: true |
743 | 717 |
#menu: #menuEdit |
718 |
#hasHorizontalScrollBar: true |
|
719 |
#hasVerticalScrollBar: true |
|
720 |
#miniScrollerHorizontal: true |
|
721 |
#miniScrollerVertical: true |
|
722 |
#component: #treeView |
|
723 |
#hasBorder: false |
|
527 | 724 |
) |
743 | 725 |
#(#ViewSpec |
726 |
#name: 'specHolderView' |
|
727 |
#component: |
|
728 |
#(#SpecCollection |
|
729 |
#collection: |
|
730 |
#( |
|
731 |
#(#MenuPanelSpec |
|
732 |
#name: 'menuToolbar2View' |
|
733 |
#layout: #(#LayoutFrame -1 0.0 -2 0 -1 1.0 30 0) |
|
734 |
#enableChannel: #canMoveOrAlignSelection |
|
735 |
#tabable: true |
|
736 |
#menu: #menuToolbar2 |
|
737 |
) |
|
738 |
#(#NoteBookViewSpec |
|
739 |
#name: 'noteBook' |
|
740 |
#layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -30 1.0) |
|
741 |
#enableChannel: #enableChannel |
|
742 |
#tabable: true |
|
743 |
#model: #tabModel |
|
744 |
#menu: #tabList |
|
745 |
#style: #(#FontDescription #helvetica #medium #roman 10) |
|
746 |
#canvas: #noteBookView |
|
747 |
) |
|
748 |
#(#HorizontalPanelViewSpec |
|
749 |
#name: 'horizontalPanelView1' |
|
750 |
#layout: #(#LayoutFrame -163 1 -1 0 -35 1.0 31 0) |
|
751 |
#component: |
|
752 |
#(#SpecCollection |
|
753 |
#collection: |
|
754 |
#( |
|
755 |
#(#ArrowButtonSpec |
|
756 |
#name: 'MoveLeftButton' |
|
757 |
#activeHelpKey: #changePositionLeft |
|
758 |
#tabable: true |
|
759 |
#model: #moveSelectionLeft |
|
760 |
#enableChannel: #canMoveOrAlignSelection |
|
761 |
#isTriggerOnDown: true |
|
762 |
#direction: #left |
|
763 |
#extent: #(#Point 32 32) |
|
764 |
) |
|
765 |
#(#ArrowButtonSpec |
|
766 |
#name: 'MoveRightButton' |
|
767 |
#activeHelpKey: #changePositionRight |
|
768 |
#model: #moveSelectionRight |
|
769 |
#enableChannel: #canMoveOrAlignSelection |
|
770 |
#isTriggerOnDown: true |
|
771 |
#direction: #right |
|
772 |
#extent: #(#Point 32 32) |
|
773 |
) |
|
774 |
#(#ArrowButtonSpec |
|
775 |
#name: 'MoveDownButton' |
|
776 |
#activeHelpKey: #changePositionDown |
|
777 |
#model: #moveSelectionDown |
|
778 |
#enableChannel: #canMoveOrAlignSelection |
|
779 |
#isTriggerOnDown: true |
|
780 |
#direction: #down |
|
781 |
#extent: #(#Point 32 32) |
|
782 |
) |
|
783 |
#(#ArrowButtonSpec |
|
784 |
#name: 'MoveUpButton' |
|
785 |
#activeHelpKey: #changePositionUp |
|
786 |
#model: #moveSelectionUp |
|
787 |
#enableChannel: #canMoveOrAlignSelection |
|
788 |
#isTriggerOnDown: true |
|
789 |
#direction: #up |
|
790 |
#extent: #(#Point 32 32) |
|
791 |
) |
|
792 |
) |
|
793 |
) |
|
794 |
#horizontalLayout: #fit |
|
795 |
#verticalLayout: #fit |
|
796 |
#horizontalSpace: 0 |
|
797 |
#verticalSpace: 0 |
|
798 |
) |
|
799 |
#(#ActionButtonSpec |
|
755 | 800 |
#name: 'openWidgetDocumentationButton' |
743 | 801 |
#layout: #(#LayoutFrame -32 1 -1 0 0 1 31 0) |
802 |
#activeHelpKey: #editOpenSpecDocumentation |
|
803 |
#hasCharacterOrientedLabel: false |
|
804 |
#label: 'helpIcon' |
|
765 | 805 |
#model: #doOpenWidgetDocumentation |
743 | 806 |
) |
807 |
#(#ActionButtonSpec |
|
808 |
#name: 'cancelButton' |
|
809 |
#layout: #(#LayoutFrame 2 0 -26 1 -1 0.5 -2 1) |
|
755 | 810 |
#activeHelpKey: #commitCancel |
743 | 811 |
#label: 'Cancel' |
812 |
#tabable: true |
|
813 |
#model: #cancel |
|
814 |
#enableChannel: #modifiedChannel |
|
815 |
) |
|
816 |
#(#ActionButtonSpec |
|
817 |
#name: 'acceptButton' |
|
818 |
#layout: #(#LayoutFrame 1 0.5 -26 1 -2 1 -2 1) |
|
755 | 819 |
#activeHelpKey: #commitOK |
743 | 820 |
#label: 'OK' |
821 |
#tabable: true |
|
822 |
#model: #accept |
|
823 |
#enableChannel: #modifiedChannel |
|
824 |
) |
|
825 |
) |
|
826 |
) |
|
827 |
#borderWidth: 1 |
|
527 | 828 |
) |
829 |
) |
|
830 |
) |
|
743 | 831 |
#level: 1 |
832 |
#handles: #(#Any 0.318868 1.0) |
|
222 | 833 |
) |
446 | 834 |
#(#UISubSpecification |
743 | 835 |
#name: 'infoBarSubSpec' |
836 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
724 | 837 |
#majorKey: #ToolApplicationModel |
743 | 838 |
#minorKey: #windowSpecForInfoBar |
222 | 839 |
) |
840 |
) |
|
841 |
) |
|
842 |
) |
|
843 |
! ! |
|
844 |
||
845 |
!UIPainter class methodsFor:'menu specs'! |
|
846 |
||
446 | 847 |
menu |
743 | 848 |
"This resource specification was automatically generated |
849 |
by the MenuEditor of ST/X." |
|
850 |
||
851 |
"Do not manually edit this!! If it is corrupted, |
|
852 |
the MenuEditor may not be able to read the specification." |
|
217 | 853 |
|
854 |
" |
|
446 | 855 |
MenuEditor new openOnClass:UIPainter andSelector:#menu |
856 |
(Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp |
|
857 |
" |
|
858 |
||
859 |
<resource: #menu> |
|
860 |
||
861 |
^ |
|
862 |
||
863 |
#(#Menu |
|
864 |
||
865 |
#( |
|
866 |
#(#MenuItem |
|
692 | 867 |
#label: 'About' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
868 |
#translateLabel: true |
692 | 869 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
934 | 870 |
#activeHelpKey: #about |
692 | 871 |
#submenuChannel: #menuAbout |
446 | 872 |
) |
873 |
#(#MenuItem |
|
692 | 874 |
#label: 'File' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
875 |
#translateLabel: true |
692 | 876 |
#enabled: #enableChannel |
934 | 877 |
#activeHelpKey: #file |
692 | 878 |
#submenu: |
446 | 879 |
#(#Menu |
880 |
||
881 |
#( |
|
882 |
#(#MenuItem |
|
692 | 883 |
#label: 'New' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
884 |
#translateLabel: true |
692 | 885 |
#value: #doNew |
886 |
#activeHelpKey: #fileNew |
|
446 | 887 |
) |
888 |
#(#MenuItem |
|
692 | 889 |
#label: '-' |
446 | 890 |
) |
891 |
#(#MenuItem |
|
692 | 892 |
#label: 'Load...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
893 |
#translateLabel: true |
713 | 894 |
#value: #doLoad |
692 | 895 |
#activeHelpKey: #fileLoad |
446 | 896 |
) |
897 |
#(#MenuItem |
|
692 | 898 |
#label: 'Load Subspec...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
899 |
#translateLabel: true |
713 | 900 |
#value: #doLoadSubspec |
692 | 901 |
#activeHelpKey: #fileLoadSubspec |
533 | 902 |
) |
903 |
#(#MenuItem |
|
692 | 904 |
#label: '-' |
446 | 905 |
) |
906 |
#(#MenuItem |
|
692 | 907 |
#label: 'Save' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
908 |
#translateLabel: true |
713 | 909 |
#value: #doSave |
692 | 910 |
#activeHelpKey: #fileSave |
446 | 911 |
) |
912 |
#(#MenuItem |
|
713 | 913 |
#label: 'Save As...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
914 |
#translateLabel: true |
713 | 915 |
#value: #doSaveAs |
916 |
#activeHelpKey: #fileSaveAs |
|
446 | 917 |
) |
918 |
#(#MenuItem |
|
692 | 919 |
#label: 'Define Class And Selector...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
920 |
#translateLabel: true |
755 | 921 |
#value: #doDefineClassAndSelector |
713 | 922 |
#activeHelpKey: #fileSaveAs |
446 | 923 |
) |
924 |
#(#MenuItem |
|
692 | 925 |
#label: '-' |
446 | 926 |
) |
927 |
#(#MenuItem |
|
713 | 928 |
#label: 'Pick A Window Spec...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
929 |
#translateLabel: true |
692 | 930 |
#value: #doPickAView |
931 |
#activeHelpKey: #filePickAnInterface |
|
498 | 932 |
) |
933 |
#(#MenuItem |
|
692 | 934 |
#label: '-' |
498 | 935 |
) |
936 |
#(#MenuItem |
|
713 | 937 |
#label: 'Show Window Spec' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
938 |
#translateLabel: true |
692 | 939 |
#value: #doWindowSpec |
713 | 940 |
#activeHelpKey: #fileShowWindowSpec |
446 | 941 |
) |
942 |
#(#MenuItem |
|
713 | 943 |
#label: 'Browse Class' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
944 |
#translateLabel: true |
713 | 945 |
#value: #doBrowseClass |
946 |
#activeHelpKey: #fileBrowseClass |
|
692 | 947 |
#enabled: #hasSpecClass |
446 | 948 |
) |
949 |
#(#MenuItem |
|
692 | 950 |
#label: 'Browse Aspect Methods' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
951 |
#translateLabel: true |
692 | 952 |
#value: #doBrowseAspectMethods |
713 | 953 |
#activeHelpKey: #fileBrowseAspectMethods |
692 | 954 |
#enabled: #hasSpecClass |
446 | 955 |
) |
956 |
#(#MenuItem |
|
692 | 957 |
#label: '-' |
446 | 958 |
) |
959 |
#(#MenuItem |
|
692 | 960 |
#label: 'Exit' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
961 |
#translateLabel: true |
692 | 962 |
#value: #closeRequest |
963 |
#activeHelpKey: #fileExit |
|
446 | 964 |
) |
965 |
) nil |
|
966 |
nil |
|
967 |
) |
|
968 |
) |
|
969 |
#(#MenuItem |
|
692 | 970 |
#label: 'Edit' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
971 |
#translateLabel: true |
692 | 972 |
#submenuChannel: #menuEdit |
934 | 973 |
#activeHelpKey: #edit |
446 | 974 |
) |
975 |
#(#MenuItem |
|
692 | 976 |
#label: 'Align' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
977 |
#translateLabel: true |
692 | 978 |
#submenuChannel: #menuAlign |
934 | 979 |
#activeHelpKey: #align |
564 | 980 |
) |
981 |
#(#MenuItem |
|
713 | 982 |
#label: 'Generate' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
983 |
#translateLabel: true |
934 | 984 |
#activeHelpKey: #generate |
713 | 985 |
#submenu: |
986 |
#(#Menu |
|
987 |
||
988 |
#( |
|
989 |
#(#MenuItem |
|
990 |
#label: 'Aspect Methods' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
991 |
#translateLabel: true |
743 | 992 |
#value: #doGenerateAspectMethods |
713 | 993 |
#activeHelpKey: #generateAspectMethods |
994 |
#enabled: #hasSpecClass |
|
995 |
) |
|
996 |
#(#MenuItem |
|
997 |
#label: '-' |
|
998 |
) |
|
999 |
#(#MenuItem |
|
1000 |
#label: 'Hook Methods' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1001 |
#translateLabel: true |
743 | 1002 |
#value: #doGenerateHookMethods |
713 | 1003 |
#activeHelpKey: #generateHookMethods |
1004 |
#enabled: #hasSpecClass |
|
1005 |
) |
|
1006 |
) nil |
|
1007 |
nil |
|
1008 |
) |
|
1009 |
) |
|
1010 |
#(#MenuItem |
|
692 | 1011 |
#label: 'Test' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1012 |
#translateLabel: true |
934 | 1013 |
#activeHelpKey: #test |
692 | 1014 |
#submenu: |
446 | 1015 |
#(#Menu |
1016 |
||
1017 |
#( |
|
1018 |
#(#MenuItem |
|
692 | 1019 |
#label: 'Start Application' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1020 |
#translateLabel: true |
692 | 1021 |
#value: #doStartApplication |
1022 |
#activeHelpKey: #testStartApplication |
|
466 | 1023 |
) |
1024 |
#(#MenuItem |
|
692 | 1025 |
#label: '-' |
466 | 1026 |
) |
1027 |
#(#MenuItem |
|
692 | 1028 |
#label: 'Geometry Test Mode' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1029 |
#translateLabel: true |
713 | 1030 |
#activeHelpKey: #testGeometryTestMode |
692 | 1031 |
#indication: #testMode: |
446 | 1032 |
) |
1033 |
) nil |
|
1034 |
nil |
|
1035 |
) |
|
1036 |
) |
|
1037 |
#(#MenuItem |
|
692 | 1038 |
#label: 'Settings' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1039 |
#translateLabel: true |
934 | 1040 |
#activeHelpKey: #settings |
692 | 1041 |
#submenu: |
446 | 1042 |
#(#Menu |
1043 |
||
1044 |
#( |
|
1045 |
#(#MenuItem |
|
713 | 1046 |
#label: 'Canvas' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1047 |
#translateLabel: true |
713 | 1048 |
#activeHelpKey: #settingsCanvas |
1049 |
#indication: #painterShown |
|
1050 |
) |
|
1051 |
#(#MenuItem |
|
1052 |
#label: 'Gallery' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1053 |
#translateLabel: true |
713 | 1054 |
#activeHelpKey: #settingsGallery |
1055 |
#indication: #galleryShown |
|
446 | 1056 |
) |
1057 |
#(#MenuItem |
|
692 | 1058 |
#label: '-' |
446 | 1059 |
) |
1060 |
#(#MenuItem |
|
743 | 1061 |
#label: 'Redefine Aspect Methods' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1062 |
#translateLabel: true |
743 | 1063 |
#activeHelpKey: #settingsRedefineAspectMethods |
1064 |
#enabled: #hasSpecClass |
|
1065 |
#indication: #redefineAspectMethods: |
|
1066 |
) |
|
1067 |
#(#MenuItem |
|
924 | 1068 |
#label: 'Aspects As Instances' |
1069 |
#translateLabel: true |
|
1070 |
#activeHelpKey: #settingsAspectsAsInstances |
|
1071 |
#enabled: #hasSpecClass |
|
1072 |
#indication: #generateAspectsAsInstanceVariables: |
|
1073 |
) |
|
1074 |
#(#MenuItem |
|
743 | 1075 |
#label: '-' |
1076 |
) |
|
1077 |
#(#MenuItem |
|
1078 |
#label: 'Fonts' |
|
1079 |
#submenuChannel: #menuFont |
|
1080 |
) |
|
1081 |
#(#MenuItem |
|
1082 |
#label: '-' |
|
1083 |
) |
|
1084 |
#(#MenuItem |
|
713 | 1085 |
#label: 'Undo Manager...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1086 |
#translateLabel: true |
713 | 1087 |
#value: #openUndoMenu |
1088 |
#activeHelpKey: #settingsUndoManager |
|
755 | 1089 |
#enabled: #hasUndoHistory |
713 | 1090 |
) |
1091 |
#(#MenuItem |
|
692 | 1092 |
#label: 'Grid Manager...' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1093 |
#translateLabel: true |
755 | 1094 |
#value: #doDefineGrid |
713 | 1095 |
#activeHelpKey: #settingsGridManager |
1096 |
) |
|
446 | 1097 |
) nil |
1098 |
nil |
|
1099 |
) |
|
1100 |
) |
|
1101 |
#(#MenuItem |
|
692 | 1102 |
#label: 'History' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1103 |
#translateLabel: true |
934 | 1104 |
#activeHelpKey: #history |
692 | 1105 |
#submenuChannel: #menuHistory |
446 | 1106 |
) |
1107 |
#(#MenuItem |
|
692 | 1108 |
#label: 'Help' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1109 |
#translateLabel: true |
692 | 1110 |
#startGroup: #right |
934 | 1111 |
#activeHelpKey: #help |
713 | 1112 |
#submenu: |
564 | 1113 |
#(#Menu |
1114 |
||
1115 |
#( |
|
1116 |
#(#MenuItem |
|
724 | 1117 |
#label: 'Tutorial' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1118 |
#translateLabel: true |
724 | 1119 |
#value: #openHTMLDocument: |
713 | 1120 |
#activeHelpKey: #helpTutorial |
724 | 1121 |
#argument: 'tools/uipainter/TOP.html' |
1122 |
) |
|
1123 |
#(#MenuItem |
|
1124 |
#label: '-' |
|
1125 |
) |
|
1126 |
#(#MenuItem |
|
1127 |
#label: 'Functions' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1128 |
#translateLabel: true |
724 | 1129 |
#value: #openHTMLDocument: |
755 | 1130 |
#activeHelpKey: #helpFunctions |
724 | 1131 |
#argument: 'tools/uipainter/Functions.html' |
564 | 1132 |
) |
1133 |
#(#MenuItem |
|
713 | 1134 |
#label: 'Examples' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1135 |
#translateLabel: true |
724 | 1136 |
#value: #openHTMLDocument: |
755 | 1137 |
#activeHelpKey: #helpExamples |
724 | 1138 |
#argument: 'tools/uipainter/Examples.html' |
564 | 1139 |
) |
1140 |
#(#MenuItem |
|
713 | 1141 |
#label: '-' |
564 | 1142 |
) |
1143 |
#(#MenuItem |
|
755 | 1144 |
#label: 'Help Tool' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1145 |
#translateLabel: true |
755 | 1146 |
#value: #openHTMLDocument: |
1147 |
#activeHelpKey: #helpHelpTool |
|
1148 |
#argument: 'tools/uipainter/HelpTool.html' |
|
1149 |
) |
|
1150 |
#(#MenuItem |
|
1151 |
#label: 'Layout Tool' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1152 |
#translateLabel: true |
755 | 1153 |
#value: #openHTMLDocument: |
1154 |
#activeHelpKey: #helpLayoutTool |
|
785 | 1155 |
#argument: 'tools/uipainter/LayoutTool.html' |
755 | 1156 |
) |
1157 |
#(#MenuItem |
|
1158 |
#label: '-' |
|
1159 |
) |
|
1160 |
#(#MenuItem |
|
1161 |
#label: 'Selected Widget' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1162 |
#translateLabel: true |
785 | 1163 |
#value: #doOpenWidgetDocumentation |
755 | 1164 |
#activeHelpKey: #helpSelectedWidget |
1165 |
) |
|
1166 |
#(#MenuItem |
|
1167 |
#label: '-' |
|
1168 |
) |
|
1169 |
#(#MenuItem |
|
713 | 1170 |
#label: 'Show Help Texts' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1171 |
#translateLabel: true |
713 | 1172 |
#activeHelpKey: #helpShowHelp |
934 | 1173 |
#indication: #showingHelp: |
564 | 1174 |
) |
1175 |
) nil |
|
1176 |
nil |
|
1177 |
) |
|
1178 |
) |
|
1179 |
) nil |
|
1180 |
nil |
|
1181 |
) |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1182 |
|
934 | 1183 |
"Modified: / 31.7.1998 / 19:23:26 / cg" |
564 | 1184 |
! |
1185 |
||
446 | 1186 |
menuAlign |
743 | 1187 |
"This resource specification was automatically generated |
1188 |
by the MenuEditor of ST/X." |
|
1189 |
||
778 | 1190 |
"Do not manually edit this!! If it is corrupted, |
743 | 1191 |
the MenuEditor may not be able to read the specification." |
446 | 1192 |
|
1193 |
" |
|
1194 |
MenuEditor new openOnClass:UIPainter andSelector:#menuAlign |
|
1195 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp |
|
217 | 1196 |
" |
1197 |
||
1198 |
<resource: #menu> |
|
1199 |
||
1200 |
^ |
|
1201 |
||
1202 |
#(#Menu |
|
1203 |
||
1204 |
#( |
|
1205 |
#(#MenuItem |
|
713 | 1206 |
#label: 'Left' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1207 |
#translateLabel: true |
713 | 1208 |
#value: #alignSelectionLeft |
1209 |
#activeHelpKey: #alignSelectionLeft |
|
1210 |
#enabled: #canMoveOrAlignSelection |
|
1211 |
#labelImage: #(#ResourceRetriever #UIPainter #iconAlignL 'Left') |
|
446 | 1212 |
) |
1213 |
#(#MenuItem |
|
713 | 1214 |
#label: 'Right' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1215 |
#translateLabel: true |
713 | 1216 |
#value: #alignSelectionRight |
1217 |
#activeHelpKey: #alignSelectionRight |
|
1218 |
#enabled: #canMoveOrAlignSelection |
|
1219 |
#labelImage: #(#ResourceRetriever #UIPainter #iconAlignR 'Right') |
|
446 | 1220 |
) |
1221 |
#(#MenuItem |
|
713 | 1222 |
#label: 'Left & Right' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1223 |
#translateLabel: true |
713 | 1224 |
#value: #alignSelectionLeftAndRight |
1225 |
#activeHelpKey: #alignSelectionLeftAndRight |
|
1226 |
#enabled: #canMoveOrAlignSelection |
|
1227 |
#labelImage: #(#ResourceRetriever #UIPainter #iconAlignLR 'Left & Right') |
|
446 | 1228 |
) |
1229 |
#(#MenuItem |
|
713 | 1230 |
#label: 'Top' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1231 |
#translateLabel: true |
713 | 1232 |
#value: #alignSelectionTop |
1233 |
#activeHelpKey: #alignSelectionTop |
|
1234 |
#enabled: #canMoveOrAlignSelection |
|
1235 |
#labelImage: #(#ResourceRetriever #UIPainter #iconAlignT 'Top') |
|
446 | 1236 |
) |
1237 |
#(#MenuItem |
|
713 | 1238 |
#label: 'Bottom' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1239 |
#translateLabel: true |
713 | 1240 |
#value: #alignSelectionBottom |
1241 |
#activeHelpKey: #alignSelectionBottom |
|
1242 |
#enabled: #canMoveOrAlignSelection |
|
1243 |
#labelImage: #(#ResourceRetriever #UIPainter #iconAlignB 'Bottom') |
|
446 | 1244 |
) |
1245 |
#(#MenuItem |
|
713 | 1246 |
#label: 'Top & Bottom' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1247 |
#translateLabel: true |
713 | 1248 |
#value: #alignSelectionTopAndBottom |
1249 |
#activeHelpKey: #alignSelectionTopAndBottom |
|
1250 |
#enabled: #canMoveOrAlignSelection |
|
1251 |
#labelImage: #(#ResourceRetriever #UIPainter #iconAlignTB 'Top & Bottom') |
|
446 | 1252 |
) |
1253 |
#(#MenuItem |
|
713 | 1254 |
#label: '-' |
446 | 1255 |
) |
1256 |
#(#MenuItem |
|
713 | 1257 |
#label: 'Centered Horizontal' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1258 |
#translateLabel: true |
713 | 1259 |
#value: #alignSelectionCenterHor |
1260 |
#activeHelpKey: #alignSelectionCenterHor |
|
1261 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1262 |
) |
1263 |
#(#MenuItem |
|
713 | 1264 |
#label: 'Centered Vertical' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1265 |
#translateLabel: true |
713 | 1266 |
#value: #alignSelectionCenterVer |
1267 |
#activeHelpKey: #alignSelectionCenterVer |
|
1268 |
#enabled: #canMoveOrAlignSelection |
|
1269 |
) |
|
1270 |
#(#MenuItem |
|
1271 |
#label: '-' |
|
446 | 1272 |
) |
1273 |
#(#MenuItem |
|
713 | 1274 |
#label: 'Center Horizontal In Frame' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1275 |
#translateLabel: true |
713 | 1276 |
#value: #centerSelectionHor |
1277 |
#activeHelpKey: #centerSelectionHor |
|
1278 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1279 |
) |
1280 |
#(#MenuItem |
|
713 | 1281 |
#label: 'Center Vertical In Frame' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1282 |
#translateLabel: true |
713 | 1283 |
#value: #centerSelectionVer |
1284 |
#activeHelpKey: #centerSelectionVer |
|
1285 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1286 |
) |
1287 |
#(#MenuItem |
|
713 | 1288 |
#label: '-' |
446 | 1289 |
) |
1290 |
#(#MenuItem |
|
713 | 1291 |
#label: 'Spread Horizontal' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1292 |
#translateLabel: true |
713 | 1293 |
#value: #spreadSelectionHor |
1294 |
#activeHelpKey: #spreadSelectionHor |
|
1295 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1296 |
) |
1297 |
#(#MenuItem |
|
713 | 1298 |
#label: 'Spread Vertical' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1299 |
#translateLabel: true |
713 | 1300 |
#value: #spreadSelectionVer |
1301 |
#activeHelpKey: #spreadSelectionVer |
|
1302 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1303 |
) |
1304 |
) nil |
|
1305 |
nil |
|
1306 |
) |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1307 |
|
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1308 |
"Modified: / 20.5.1998 / 01:42:57 / cg" |
446 | 1309 |
! |
1310 |
||
1311 |
menuEdit |
|
743 | 1312 |
"This resource specification was automatically generated |
1313 |
by the MenuEditor of ST/X." |
|
1314 |
||
755 | 1315 |
"Do not manually edit this!! If it is corrupted, |
743 | 1316 |
the MenuEditor may not be able to read the specification." |
446 | 1317 |
|
1318 |
" |
|
1319 |
MenuEditor new openOnClass:UIPainter andSelector:#menuEdit |
|
1320 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp |
|
1321 |
" |
|
1322 |
||
1323 |
<resource: #menu> |
|
1324 |
||
1325 |
^ |
|
1326 |
||
1327 |
#(#Menu |
|
1328 |
||
1329 |
#( |
|
1330 |
#(#MenuItem |
|
713 | 1331 |
#label: 'Undo' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1332 |
#translateLabel: true |
713 | 1333 |
#nameKey: #undo |
1334 |
#value: #undoLast |
|
1335 |
#activeHelpKey: #editUndo |
|
1336 |
#enabled: #hasUndoHistory |
|
1337 |
#shortcutKeyCharacter: #Cmdu |
|
1338 |
) |
|
1339 |
#(#MenuItem |
|
1340 |
#label: '-' |
|
1341 |
) |
|
1342 |
#(#MenuItem |
|
1343 |
#label: 'Cut' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1344 |
#translateLabel: true |
724 | 1345 |
#value: #deleteSelection |
713 | 1346 |
#activeHelpKey: #editCut |
1347 |
#enabled: #valueOfCanCut |
|
1348 |
#shortcutKeyCharacter: #Cut |
|
1349 |
) |
|
1350 |
#(#MenuItem |
|
1351 |
#label: 'Copy' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1352 |
#translateLabel: true |
713 | 1353 |
#value: #copySelection |
1354 |
#activeHelpKey: #editCopy |
|
1355 |
#enabled: #valueOfCanCopy |
|
1356 |
#shortcutKeyCharacter: #Copy |
|
446 | 1357 |
) |
1358 |
#(#MenuItem |
|
713 | 1359 |
#label: 'Paste' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1360 |
#translateLabel: true |
713 | 1361 |
#value: #pasteBuffer |
1362 |
#activeHelpKey: #pasteBuffer |
|
1363 |
#enabled: #valueOfCanPaste |
|
1364 |
#shortcutKeyCharacter: #Paste |
|
1365 |
) |
|
1366 |
#(#MenuItem |
|
1367 |
#label: 'Delete' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1368 |
#translateLabel: true |
724 | 1369 |
#value: #deleteTotalSelection |
1370 |
#activeHelpKey: #editDelete |
|
713 | 1371 |
#enabled: #valueOfCanCut |
1372 |
#shortcutKeyCharacter: #Delete |
|
1373 |
) |
|
1374 |
#(#MenuItem |
|
1375 |
#label: '-' |
|
446 | 1376 |
) |
1377 |
#(#MenuItem |
|
713 | 1378 |
#label: 'Paste With Layout' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1379 |
#translateLabel: true |
713 | 1380 |
#value: #pasteWithLayout |
1381 |
#activeHelpKey: #pasteWithLayout |
|
729 | 1382 |
#enabled: #valueOfCanPasteWithKeepingLayout |
713 | 1383 |
) |
1384 |
#(#MenuItem |
|
1385 |
#label: '-' |
|
1386 |
) |
|
1387 |
#(#MenuItem |
|
1388 |
#label: 'Move' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1389 |
#translateLabel: true |
755 | 1390 |
#enabled: #canMoveSelection |
713 | 1391 |
#submenuChannel: #menuMove |
1392 |
) |
|
1393 |
#(#MenuItem |
|
1394 |
#label: 'Dimension' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1395 |
#translateLabel: true |
713 | 1396 |
#enabled: #hasSelection |
1397 |
#submenu: |
|
446 | 1398 |
#(#Menu |
1399 |
||
1400 |
#( |
|
1401 |
#(#MenuItem |
|
713 | 1402 |
#label: 'Default Extent' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1403 |
#translateLabel: true |
713 | 1404 |
#value: #setToDefaultExtent |
1405 |
#activeHelpKey: #editDimensionDefaultExtent |
|
1406 |
#enabled: #canMoveOrAlignSelection |
|
1407 |
) |
|
1408 |
#(#MenuItem |
|
1409 |
#label: 'Default Width' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1410 |
#translateLabel: true |
713 | 1411 |
#value: #setToDefaultWidth |
1412 |
#activeHelpKey: #editDimensionDefaultWidth |
|
1413 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1414 |
) |
1415 |
#(#MenuItem |
|
713 | 1416 |
#label: 'Default Height' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1417 |
#translateLabel: true |
713 | 1418 |
#value: #setToDefaultHeight |
1419 |
#activeHelpKey: #editDimensionDefaultHeight |
|
1420 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1421 |
) |
713 | 1422 |
#(#MenuItem |
1423 |
#label: '-' |
|
1424 |
) |
|
446 | 1425 |
#(#MenuItem |
713 | 1426 |
#label: 'Copy Layout' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1427 |
#translateLabel: true |
713 | 1428 |
#value: #copyLayout |
1429 |
#activeHelpKey: #editDimensionCopyLayout |
|
1430 |
#enabled: #hasSingleSelection |
|
446 | 1431 |
) |
1432 |
#(#MenuItem |
|
713 | 1433 |
#label: 'Copy Extent' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1434 |
#translateLabel: true |
713 | 1435 |
#value: #copyExtent |
1436 |
#activeHelpKey: #editDimensionCopyExtent |
|
1437 |
#enabled: #hasSingleSelection |
|
446 | 1438 |
) |
1439 |
#(#MenuItem |
|
713 | 1440 |
#label: '-' |
446 | 1441 |
) |
1442 |
#(#MenuItem |
|
713 | 1443 |
#label: 'Paste Layout' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1444 |
#translateLabel: true |
713 | 1445 |
#value: #pasteLayout |
1446 |
#activeHelpKey: #editDimensionPasteLayout |
|
1447 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1448 |
) |
1449 |
#(#MenuItem |
|
713 | 1450 |
#label: 'Paste Extent' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1451 |
#translateLabel: true |
713 | 1452 |
#value: #pasteExtent |
1453 |
#activeHelpKey: #editDimensionPasteExtent |
|
1454 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1455 |
) |
1456 |
#(#MenuItem |
|
713 | 1457 |
#label: 'Paste Width' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1458 |
#translateLabel: true |
713 | 1459 |
#value: #pasteWidth |
1460 |
#activeHelpKey: #editDimensionPasteWidth |
|
1461 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1462 |
) |
1463 |
#(#MenuItem |
|
713 | 1464 |
#label: 'Paste Height' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1465 |
#translateLabel: true |
713 | 1466 |
#value: #pasteHeight |
1467 |
#activeHelpKey: #editDimensionPasteHeight |
|
1468 |
#enabled: #canMoveOrAlignSelection |
|
446 | 1469 |
) |
1470 |
) nil |
|
1471 |
nil |
|
1472 |
) |
|
1473 |
) |
|
721
325eba9f37b7
Add menu entry to inspect selected specification
Stefan Vogel <sv@exept.de>
parents:
713
diff
changeset
|
1474 |
#(#MenuItem |
325eba9f37b7
Add menu entry to inspect selected specification
Stefan Vogel <sv@exept.de>
parents:
713
diff
changeset
|
1475 |
#label: '-' |
325eba9f37b7
Add menu entry to inspect selected specification
Stefan Vogel <sv@exept.de>
parents:
713
diff
changeset
|
1476 |
) |
325eba9f37b7
Add menu entry to inspect selected specification
Stefan Vogel <sv@exept.de>
parents:
713
diff
changeset
|
1477 |
#(#MenuItem |
755 | 1478 |
#label: 'Open Widget Documentation' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1479 |
#translateLabel: true |
765 | 1480 |
#value: #doOpenWidgetDocumentation |
743 | 1481 |
#activeHelpKey: #editOpenSpecDocumentation |
1482 |
) |
|
1483 |
#(#MenuItem |
|
755 | 1484 |
#label: '-' |
1485 |
) |
|
1486 |
#(#MenuItem |
|
1487 |
#label: 'Inspect View' |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1488 |
#translateLabel: true |
765 | 1489 |
#value: #doInspectView |
755 | 1490 |
#activeHelpKey: #editInspectView |
1491 |
#enabled: #hasOneSelectionOtherThanCanvas |
|
1492 |
) |
|
1493 |
#(#MenuItem |
|
721
325eba9f37b7
Add menu entry to inspect selected specification
Stefan Vogel <sv@exept.de>
parents:
713
diff
changeset
|
1494 |
#label: 'Inspect Spec' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1495 |
#translateLabel: true |
765 | 1496 |
#value: #doInspectSpec |
724 | 1497 |
#activeHelpKey: #editInspectSpec |
721
325eba9f37b7
Add menu entry to inspect selected specification
Stefan Vogel <sv@exept.de>
parents:
713
diff
changeset
|
1498 |
) |
498 | 1499 |
) nil |
1500 |
nil |
|
1501 |
) |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1502 |
|
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1503 |
"Modified: / 20.5.1998 / 01:46:00 / cg" |
498 | 1504 |
! |
1505 |
||
1506 |
menuMove |
|
743 | 1507 |
"This resource specification was automatically generated |
1508 |
by the MenuEditor of ST/X." |
|
1509 |
||
755 | 1510 |
"Do not manually edit this!! If it is corrupted, |
743 | 1511 |
the MenuEditor may not be able to read the specification." |
498 | 1512 |
|
1513 |
" |
|
1514 |
MenuEditor new openOnClass:UIPainter andSelector:#menuMove |
|
1515 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp |
|
1516 |
" |
|
1517 |
||
1518 |
<resource: #menu> |
|
1519 |
||
1520 |
^ |
|
1521 |
||
1522 |
#(#Menu |
|
1523 |
||
1524 |
#( |
|
446 | 1525 |
#(#MenuItem |
713 | 1526 |
#label: 'Up' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1527 |
#translateLabel: true |
713 | 1528 |
#value: #doStepUp |
1529 |
#activeHelpKey: #moveWidgetUp |
|
755 | 1530 |
#enabled: #canChangeOrderInContainer |
884 | 1531 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Up') |
498 | 1532 |
) |
1533 |
#(#MenuItem |
|
713 | 1534 |
#label: 'Down' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1535 |
#translateLabel: true |
713 | 1536 |
#value: #doStepDown |
1537 |
#activeHelpKey: #moveWidgetDown |
|
755 | 1538 |
#enabled: #canChangeOrderInContainer |
884 | 1539 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Down') |
498 | 1540 |
) |
1541 |
#(#MenuItem |
|
713 | 1542 |
#label: 'Into' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1543 |
#translateLabel: true |
713 | 1544 |
#value: #doStepIn |
1545 |
#activeHelpKey: #moveWidgetInto |
|
1546 |
#enabled: #canMoveSelectionIntoContainer |
|
884 | 1547 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into') |
498 | 1548 |
) |
1549 |
#(#MenuItem |
|
713 | 1550 |
#label: 'Out' |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1551 |
#translateLabel: true |
713 | 1552 |
#value: #doStepOut |
1553 |
#activeHelpKey: #moveWidgetOut |
|
1554 |
#enabled: #canMoveSelectionOutOfContainer |
|
884 | 1555 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out') |
446 | 1556 |
) |
1557 |
) nil |
|
1558 |
nil |
|
1559 |
) |
|
1560 |
! |
|
1561 |
||
1562 |
menuToolbar |
|
743 | 1563 |
"This resource specification was automatically generated |
1564 |
by the MenuEditor of ST/X." |
|
1565 |
||
778 | 1566 |
"Do not manually edit this!! If it is corrupted, |
743 | 1567 |
the MenuEditor may not be able to read the specification." |
446 | 1568 |
|
1569 |
" |
|
1570 |
MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar |
|
1571 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp |
|
1572 |
" |
|
1573 |
||
1574 |
<resource: #menu> |
|
1575 |
||
1576 |
^ |
|
1577 |
||
1578 |
#(#Menu |
|
1579 |
||
1580 |
#( |
|
1581 |
#(#MenuItem |
|
713 | 1582 |
#label: 'Start' |
1583 |
#isButton: true |
|
1584 |
#value: #doStartApplication |
|
1585 |
#activeHelpKey: #testStartApplication |
|
884 | 1586 |
#labelImage: #(#ResourceRetriever #Icon #startIcon) |
446 | 1587 |
) |
1588 |
#(#MenuItem |
|
713 | 1589 |
#label: '' |
1590 |
) |
|
1591 |
#(#MenuItem |
|
1592 |
#label: 'New' |
|
1593 |
#isButton: true |
|
1594 |
#value: #doNew |
|
1595 |
#activeHelpKey: #fileNew |
|
884 | 1596 |
#labelImage: #(#ResourceRetriever #Icon #newIcon) |
446 | 1597 |
) |
1598 |
#(#MenuItem |
|
713 | 1599 |
#label: 'Load' |
1600 |
#isButton: true |
|
1601 |
#value: #doLoad |
|
1602 |
#activeHelpKey: #fileLoad |
|
884 | 1603 |
#labelImage: #(#ResourceRetriever #Icon #loadIcon) |
446 | 1604 |
) |
1605 |
#(#MenuItem |
|
713 | 1606 |
#label: 'Save' |
1607 |
#isButton: true |
|
1608 |
#value: #doSave |
|
1609 |
#activeHelpKey: #fileSave |
|
884 | 1610 |
#labelImage: #(#ResourceRetriever #Icon #saveIcon) |
713 | 1611 |
) |
1612 |
#(#MenuItem |
|
1613 |
#label: '' |
|
1614 |
) |
|
1615 |
#(#MenuItem |
|
1616 |
#label: 'Cut' |
|
1617 |
#isButton: true |
|
724 | 1618 |
#value: #deleteSelection |
713 | 1619 |
#activeHelpKey: #editCut |
1620 |
#enabled: #valueOfCanCut |
|
884 | 1621 |
#labelImage: #(#ResourceRetriever #Icon #cutIcon) |
446 | 1622 |
) |
1623 |
#(#MenuItem |
|
713 | 1624 |
#label: 'Copy' |
1625 |
#isButton: true |
|
1626 |
#value: #copySelection |
|
1627 |
#activeHelpKey: #editCopy |
|
1628 |
#enabled: #valueOfCanCopy |
|
884 | 1629 |
#labelImage: #(#ResourceRetriever #Icon #copyIcon) |
446 | 1630 |
) |
1631 |
#(#MenuItem |
|
729 | 1632 |
#label: 'Paste With Layout' |
713 | 1633 |
#isButton: true |
729 | 1634 |
#value: #pasteWithLayout |
713 | 1635 |
#activeHelpKey: #editPaste |
729 | 1636 |
#enabled: #valueOfCanPasteWithKeepingLayout |
884 | 1637 |
#labelImage: #(#ResourceRetriever #Icon #pasteIcon) |
446 | 1638 |
) |
1639 |
#(#MenuItem |
|
713 | 1640 |
#label: 'Delete' |
1641 |
#isButton: true |
|
724 | 1642 |
#value: #deleteTotalSelection |
713 | 1643 |
#activeHelpKey: #editDelete |
1644 |
#enabled: #valueOfCanCut |
|
884 | 1645 |
#labelImage: #(#ResourceRetriever #Icon #deleteIcon) |
713 | 1646 |
) |
1647 |
#(#MenuItem |
|
1648 |
#label: '' |
|
446 | 1649 |
) |
1650 |
#(#MenuItem |
|
713 | 1651 |
#label: 'Move Up' |
1652 |
#isButton: true |
|
1653 |
#value: #doStepUp |
|
1654 |
#activeHelpKey: #moveWidgetUp |
|
1655 |
#enabled: #canChangeOrderInContainer |
|
884 | 1656 |
#labelImage: #(#ResourceRetriever #Icon #upIcon) |
446 | 1657 |
) |
1658 |
#(#MenuItem |
|
713 | 1659 |
#label: 'Move Down' |
1660 |
#isButton: true |
|
1661 |
#value: #doStepDown |
|
1662 |
#activeHelpKey: #moveWidgetDown |
|
1663 |
#enabled: #canChangeOrderInContainer |
|
884 | 1664 |
#labelImage: #(#ResourceRetriever #Icon #downIcon) |
446 | 1665 |
) |
1666 |
#(#MenuItem |
|
713 | 1667 |
#label: 'Move Into' |
1668 |
#isButton: true |
|
1669 |
#value: #doStepIn |
|
1670 |
#activeHelpKey: #moveWidgetInto |
|
1671 |
#enabled: #canMoveSelectionIntoContainer |
|
884 | 1672 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon) |
446 | 1673 |
) |
1674 |
#(#MenuItem |
|
713 | 1675 |
#label: 'Move Out' |
1676 |
#isButton: true |
|
1677 |
#value: #doStepOut |
|
1678 |
#activeHelpKey: #moveWidgetOut |
|
1679 |
#enabled: #canMoveSelectionOutOfContainer |
|
884 | 1680 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon) |
217 | 1681 |
) |
1682 |
#(#MenuItem |
|
713 | 1683 |
#label: '' |
217 | 1684 |
) |
1685 |
#(#MenuItem |
|
713 | 1686 |
#label: 'Canvas' |
1687 |
#activeHelpKey: #settingsCanvas |
|
1688 |
#indication: #painterShown |
|
437 | 1689 |
) |
1690 |
#(#MenuItem |
|
713 | 1691 |
#label: 'Gallery' |
1692 |
#activeHelpKey: #settingsGallery |
|
1693 |
#indication: #galleryShown |
|
217 | 1694 |
) |
713 | 1695 |
) nil |
1696 |
nil |
|
1697 |
) |
|
1698 |
! |
|
1699 |
||
1700 |
menuToolbar2 |
|
743 | 1701 |
"This resource specification was automatically generated |
1702 |
by the MenuEditor of ST/X." |
|
1703 |
||
778 | 1704 |
"Do not manually edit this!! If it is corrupted, |
743 | 1705 |
the MenuEditor may not be able to read the specification." |
713 | 1706 |
|
1707 |
" |
|
1708 |
MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar2 |
|
1709 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar2)) startUp |
|
1710 |
" |
|
1711 |
||
1712 |
<resource: #menu> |
|
1713 |
||
1714 |
^ |
|
1715 |
||
1716 |
#(#Menu |
|
1717 |
||
1718 |
#( |
|
217 | 1719 |
#(#MenuItem |
713 | 1720 |
#label: 'Align Left' |
1721 |
#isButton: true |
|
1722 |
#value: #alignSelectionLeft |
|
1723 |
#activeHelpKey: #alignSelectionLeft |
|
1724 |
#labelImage: #(#ResourceRetriever nil #iconAlignL) |
|
217 | 1725 |
) |
1726 |
#(#MenuItem |
|
713 | 1727 |
#label: 'Align Right' |
1728 |
#isButton: true |
|
1729 |
#value: #alignSelectionRight |
|
1730 |
#activeHelpKey: #alignSelectionRight |
|
1731 |
#labelImage: #(#ResourceRetriever nil #iconAlignR) |
|
437 | 1732 |
) |
1733 |
#(#MenuItem |
|
713 | 1734 |
#label: 'Align Left & Right' |
1735 |
#isButton: true |
|
1736 |
#value: #alignSelectionLeftAndRight |
|
1737 |
#activeHelpKey: #alignSelectionLeftAndRight |
|
1738 |
#labelImage: #(#ResourceRetriever nil #iconAlignLR) |
|
1739 |
) |
|
1740 |
#(#MenuItem |
|
1741 |
#label: '' |
|
217 | 1742 |
) |
1743 |
#(#MenuItem |
|
713 | 1744 |
#label: 'Align Top' |
1745 |
#isButton: true |
|
1746 |
#value: #alignSelectionTop |
|
1747 |
#activeHelpKey: #alignSelectionTop |
|
1748 |
#labelImage: #(#ResourceRetriever nil #iconAlignT) |
|
217 | 1749 |
) |
1750 |
#(#MenuItem |
|
713 | 1751 |
#label: 'Align Bottom' |
1752 |
#isButton: true |
|
1753 |
#value: #alignSelectionBottom |
|
1754 |
#activeHelpKey: #alignSelectionBottom |
|
1755 |
#labelImage: #(#ResourceRetriever nil #iconAlignB) |
|
1756 |
) |
|
1757 |
#(#MenuItem |
|
1758 |
#label: 'Align Top & Bottom' |
|
1759 |
#isButton: true |
|
1760 |
#value: #alignSelectionTopAndBottom |
|
1761 |
#activeHelpKey: #alignSelectionTopAndBottom |
|
1762 |
#labelImage: #(#ResourceRetriever nil #iconAlignTB) |
|
217 | 1763 |
) |
437 | 1764 |
) nil |
217 | 1765 |
nil |
1766 |
) |
|
446 | 1767 |
! ! |
1768 |
||
60 | 1769 |
!UIPainter methodsFor:'aspects'! |
1770 |
||
724 | 1771 |
aspectFor:aKey |
765 | 1772 |
"returns the aspect for aKey" |
1773 |
||
1774 |
^aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
|
724 | 1775 |
! |
1776 |
||
565 | 1777 |
canChangeOrderInContainer |
765 | 1778 |
"returns a boolean value holder which is true if the widget order can be changed |
1779 |
within their container" |
|
1780 |
||
565 | 1781 |
^ builder booleanValueAspectFor:#canChangeOrderInContainer |
1782 |
! |
|
1783 |
||
282 | 1784 |
canMoveOrAlignSelection |
1785 |
"returns a boolean value holder which is true in case that any selection exists |
|
1786 |
and all widgets in the selection can change its layout through to a move or |
|
765 | 1787 |
align operation" |
1788 |
||
282 | 1789 |
^ builder booleanValueAspectFor:#canMoveOrAlignSelection |
222 | 1790 |
! |
1791 |
||
755 | 1792 |
canMoveSelection |
1793 |
||
765 | 1794 |
^self canChangeOrderInContainer value or: [ |
1795 |
self canMoveSelectionOutOfContainer value or: [ |
|
1796 |
self canMoveSelectionOutOfContainer value]] |
|
755 | 1797 |
! |
1798 |
||
282 | 1799 |
canMoveSelectionIntoContainer |
765 | 1800 |
"returns a boolean value holder which is true in case that one widget is selected |
282 | 1801 |
and can change its container widget to the next element in the list which will have |
765 | 1802 |
the same container" |
1803 |
||
282 | 1804 |
^ builder booleanValueAspectFor:#canMoveSelectionIntoContainer |
1805 |
! |
|
1806 |
||
1807 |
canMoveSelectionOutOfContainer |
|
765 | 1808 |
"returns a boolean value holder which is true in case that one widget is selected |
1809 |
which is contained within another component" |
|
1810 |
||
282 | 1811 |
^ builder booleanValueAspectFor:#canMoveSelectionOutOfContainer |
222 | 1812 |
! |
1813 |
||
118 | 1814 |
enableChannel |
765 | 1815 |
"true if modifications are allowed otherwise running test" |
1816 |
||
1817 |
^ self painter enableChannel |
|
109 | 1818 |
! |
1819 |
||
173 | 1820 |
galleryShown |
765 | 1821 |
"returns a boolean value holder which is set to true if the gallery is shown" |
1822 |
||
173 | 1823 |
|holder| |
1824 |
||
1825 |
(holder := builder bindingAt:#galleryShown) isNil ifTrue:[ |
|
1826 |
builder aspectAt:#galleryShown put:(holder := true asValue). |
|
1827 |
holder addDependent:self |
|
1828 |
]. |
|
1829 |
^ holder |
|
1830 |
||
1831 |
! |
|
1832 |
||
282 | 1833 |
hasOneSelectionOtherThanCanvas |
765 | 1834 |
"returns a value holder which is true in case that one widget is selected |
1835 |
other than the root" |
|
1836 |
||
282 | 1837 |
^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas |
222 | 1838 |
! |
1839 |
||
884 | 1840 |
helpIcon |
1841 |
||
1842 |
^Icon helpIcon |
|
1843 |
! |
|
1844 |
||
109 | 1845 |
modifiedChannel |
282 | 1846 |
"returns a boolean value holder which is set to true if something is modified |
765 | 1847 |
and not accepted" |
1848 |
||
256 | 1849 |
^ builder booleanValueAspectFor:#modifiedChannel |
109 | 1850 |
! |
1851 |
||
1852 |
noteBookView |
|
765 | 1853 |
"returns the notebook view; initialize the tools embedded in the notebook" |
1854 |
||
287 | 1855 |
|noteBook channel helpTool layoutTool specTool| |
109 | 1856 |
|
1857 |
(noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[ |
|
166 | 1858 |
noteBook := View new. |
1859 |
layoutTool := UILayoutTool new. |
|
287 | 1860 |
helpTool := UIHelpTool new. |
755 | 1861 |
helpTool buildFromClass:specClass. |
166 | 1862 |
specTool := UISpecificationTool new. |
144 | 1863 |
channel := self modifiedChannel. |
166 | 1864 |
|
152 | 1865 |
layoutTool masterApplication:self. |
166 | 1866 |
specTool masterApplication:self. |
287 | 1867 |
helpTool masterApplication:self. |
1868 |
||
1869 |
layoutCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1870 |
helpCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1871 |
specCanvas := SubCanvas origin:0.0@0.0 corner:1.0@1.0 in:noteBook. |
|
1872 |
||
1873 |
layoutCanvas client:layoutTool. |
|
1874 |
helpCanvas client:helpTool. |
|
1875 |
specTool builder:(specCanvas client:specTool). |
|
166 | 1876 |
|
1877 |
layoutTool masterApplication:self. |
|
1878 |
specTool masterApplication:self. |
|
287 | 1879 |
helpTool masterApplication:self. |
1880 |
||
109 | 1881 |
layoutTool modifiedHolder:channel. |
287 | 1882 |
helpTool modifiedHolder:channel. |
166 | 1883 |
specTool modifiedHolder:channel. |
287 | 1884 |
|
109 | 1885 |
builder aspectAt:#noteBookView put:noteBook. |
1886 |
]. |
|
1887 |
^ noteBook |
|
1888 |
! |
|
1889 |
||
282 | 1890 |
painterShown |
765 | 1891 |
"returns a boolean value holder which is set to true if the painter is shown" |
1892 |
||
173 | 1893 |
|holder| |
1894 |
||
1895 |
(holder := builder bindingAt:#painterShown) isNil ifTrue:[ |
|
1896 |
builder aspectAt:#painterShown put:(holder := true asValue). |
|
1897 |
holder addDependent:self |
|
1898 |
]. |
|
1899 |
^ holder |
|
1900 |
||
1901 |
! |
|
1902 |
||
109 | 1903 |
tabList |
765 | 1904 |
"returns a value holder which keeps a list of the section labels in the notebook" |
1905 |
||
109 | 1906 |
|holder| |
1907 |
||
1908 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
|
755 | 1909 |
builder aspectAt:#tabList put:(holder := #(Basics Details Layout) asValue). |
109 | 1910 |
]. |
1911 |
^ holder |
|
1912 |
! |
|
1913 |
||
1914 |
tabModel |
|
765 | 1915 |
"returns a value holder which keeps the label of the current section in the notebook" |
1916 |
||
109 | 1917 |
|holder| |
1918 |
||
1919 |
(holder := builder bindingAt:#tabModel) isNil ifTrue:[ |
|
1920 |
holder := AspectAdaptor new subject:self; forAspect:#tabSelection. |
|
1921 |
builder aspectAt:#tabModel put:holder. |
|
1922 |
]. |
|
1923 |
^ holder |
|
222 | 1924 |
! |
1925 |
||
1926 |
treeView |
|
765 | 1927 |
"returns the tree view which holds all widget" |
1928 |
||
222 | 1929 |
^ treeView |
729 | 1930 |
! |
1931 |
||
1932 |
valueOfCanPasteWithKeepingLayout |
|
1933 |
||
1934 |
|holder| |
|
1935 |
(holder := builder bindingAt:#valueOfCanPasteWithKeepingLayout) isNil ifTrue:[ |
|
1936 |
builder aspectAt:#valueOfCanPasteWithKeepingLayout put:(holder := false asValue). |
|
1937 |
]. |
|
1938 |
^ holder |
|
1939 |
||
1940 |
||
1941 |
||
60 | 1942 |
! ! |
1943 |
||
587
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
1944 |
!UIPainter methodsFor:'building editors'! |
513 | 1945 |
|
1946 |
openDataSetColumnEditor |
|
765 | 1947 |
"opens a Table Column Editor on current widget" |
1948 |
||
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1949 |
|cls loadedFromClass loadedFromSpec editor tableColumnsOrSelector| |
824
1d5adf147721
change mechanism for opening the dataset builder (step 2)
tz
parents:
819
diff
changeset
|
1950 |
|
1d5adf147721
change mechanism for opening the dataset builder (step 2)
tz
parents:
819
diff
changeset
|
1951 |
(cls := self resolveName:specClass) isNil ifTrue:[ |
913
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
1952 |
self askForSaving ifFalse: [^self]. |
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
1953 |
cls := self resolveName:specClass. |
513 | 1954 |
]. |
743 | 1955 |
|
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1956 |
loadedFromSpec := loadedFromClass := false. |
513 | 1957 |
editor := DataSetBuilder new. |
1958 |
editor masterApplication:self. |
|
824
1d5adf147721
change mechanism for opening the dataset builder (step 2)
tz
parents:
819
diff
changeset
|
1959 |
editor specClass: cls. |
513 | 1960 |
editor rowClassName:(self specTool specification rowClassName). |
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1961 |
((tableColumnsOrSelector := self specTool specification columnHolder) notNil and: |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1962 |
[cls class implements: tableColumnsOrSelector]) ifTrue: [ |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1963 |
editor openModalOnClass: cls andSelector: tableColumnsOrSelector. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1964 |
loadedFromClass := true. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1965 |
] ifFalse: [ |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1966 |
(tableColumnsOrSelector := self specTool specification columns) isNil ifTrue: [ |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1967 |
editor openModal |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1968 |
] ifFalse: [ |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1969 |
editor openModalOnResourceSpec:tableColumnsOrSelector. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1970 |
loadedFromSpec := true |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1971 |
]. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1972 |
]. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1973 |
|
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1974 |
loadedFromClass ifTrue: [ |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1975 |
self specTool specification columns:nil. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1976 |
self specTool specification rowClassName:nil. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1977 |
self modifiedChannel value:true. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1978 |
self accept. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1979 |
]. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1980 |
|
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1981 |
(loadedFromSpec not and: [editor hasSaved and:[editor specSelector ~= tableColumnsOrSelector]]) ifTrue:[ |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1982 |
self specTool specification columnHolder:editor specSelector. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1983 |
self modifiedChannel value:true. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1984 |
self accept. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1985 |
^self |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1986 |
]. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1987 |
loadedFromClass ifFalse: [ |
513 | 1988 |
self specTool specification columns:(editor columns). |
1989 |
self specTool specification rowClassName:(editor rowClassName). |
|
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1990 |
self modifiedChannel value: editor modified. |
513 | 1991 |
]. |
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
1992 |
|
824
1d5adf147721
change mechanism for opening the dataset builder (step 2)
tz
parents:
819
diff
changeset
|
1993 |
|
513 | 1994 |
! |
1995 |
||
1996 |
openEditMenu |
|
765 | 1997 |
"opens a Menu Editor on current widget" |
1998 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
1999 |
|cls selectorOrMenu editor selectedSpec spec| |
513 | 2000 |
|
765 | 2001 |
(cls := self resolveName:specClass) isNil ifTrue:[ |
913
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2002 |
self askForSaving ifFalse: [^self]. |
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2003 |
cls := self resolveName:specClass. |
513 | 2004 |
]. |
2005 |
||
2006 |
cls notNil ifTrue:[ |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2007 |
spec := self specTool specification. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2008 |
(selectorOrMenu := spec menuSelector) notNil ifTrue:[ |
729 | 2009 |
selectorOrMenu := selectorOrMenu asSymbol |
513 | 2010 |
] ifFalse:[ |
2011 |
"/ cg: q&d hack ... |
|
2012 |
||
729 | 2013 |
(selectedSpec := treeView propertySelected) notNil ifTrue:[ |
513 | 2014 |
Object errorSignal handle:[:ex | |
729 | 2015 |
selectorOrMenu := nil. |
513 | 2016 |
] do:[ |
729 | 2017 |
selectorOrMenu := selectedSpec view asMenu. |
513 | 2018 |
] |
2019 |
]. |
|
2020 |
]. |
|
729 | 2021 |
|
513 | 2022 |
editor := MenuEditor new. |
2023 |
editor masterApplication:self. |
|
713 | 2024 |
editor specClass: cls. |
729 | 2025 |
editor useHelpTool: self helpTool. |
2026 |
selectorOrMenu class ~~ Menu |
|
2027 |
ifTrue: [editor openModalOnClass:cls andSelector:selectorOrMenu] |
|
2028 |
ifFalse: [editor openModalOnMenu:selectorOrMenu]. |
|
513 | 2029 |
self helpTool updateList. |
2030 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
2031 |
editor specSelector ~= selectorOrMenu ifTrue:[ |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
2032 |
editor hasSaved ifTrue:[ |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2033 |
spec menuSelector:editor specSelector. |
513 | 2034 |
self modifiedChannel value:true. |
2035 |
self accept |
|
2036 |
] |
|
2037 |
]. |
|
2038 |
] |
|
2039 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2040 |
"Modified: / 16.7.1998 / 18:16:42 / cg" |
513 | 2041 |
! |
2042 |
||
2043 |
openHierarchicalListEditor |
|
765 | 2044 |
"opens a Hierarchical List Editor on current widget" |
2045 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2046 |
|selector editor spec| |
765 | 2047 |
|
2048 |
(self resolveName:specClass) isNil ifTrue:[ |
|
808 | 2049 |
self askForSaving ifFalse: [^self] |
513 | 2050 |
]. |
2051 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2052 |
spec := self specTool specification. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2053 |
(selector := spec hierarchicalList) notNil ifTrue:[ |
765 | 2054 |
selector := selector asSymbol |
513 | 2055 |
]. |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
2056 |
|
513 | 2057 |
editor := HierarchicalListEditor new. |
2058 |
editor masterApplication:self. |
|
765 | 2059 |
editor openModalOnClass:specClass andSelector:selector. |
2060 |
||
2061 |
editor specSelector ~= selector ifTrue:[ |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
2062 |
editor hasSaved ifTrue:[ |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2063 |
spec hierarchicalList:editor specSelector. |
513 | 2064 |
self modifiedChannel value:true. |
2065 |
self accept |
|
2066 |
] |
|
2067 |
] |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2068 |
|
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2069 |
"Modified: / 16.7.1998 / 18:15:46 / cg" |
513 | 2070 |
! |
2071 |
||
729 | 2072 |
openSubSpecGUIPainter |
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2073 |
"opens a GUI Painter on the current subspecification" |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2074 |
|
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2075 |
|spec cls meta sel| |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2076 |
|
913
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2077 |
(self resolveName:specClass) isNil ifTrue:[ |
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2078 |
self askForSaving ifFalse: [^self] |
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2079 |
]. |
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2080 |
|
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2081 |
spec := self specTool specification. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2082 |
cls := spec majorKey. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2083 |
cls isNil ifTrue:[ |
729 | 2084 |
cls := specClass. |
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2085 |
]. |
913
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2086 |
(cls := self resolveName:cls inClass:(Smalltalk at: specClass asSymbol)) isNil ifTrue:[ |
628 | 2087 |
spec majorKey isNil ifTrue:[ |
2088 |
^ self warn:'Cannot find class (no majorKey specified)'. |
|
2089 |
]. |
|
657
34728d455e7b
error of opening a GUI Painter on a sub spec with empty fields fixed
tz
parents:
656
diff
changeset
|
2090 |
^ self warn:'Cannot find class ', spec majorKey asBoldText, '!!'. |
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2091 |
]. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2092 |
sel := spec minorKey. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2093 |
meta := cls class whichClassIncludesSelector:sel. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2094 |
meta isNil ifTrue:[ |
657
34728d455e7b
error of opening a GUI Painter on a sub spec with empty fields fixed
tz
parents:
656
diff
changeset
|
2095 |
^ self warn:'Cannot find selector #', (sel ? '') asBoldText, ' in class ', cls name asBoldText, '!!' |
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2096 |
]. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2097 |
|
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2098 |
self class openOnClass:meta soleInstance andSelector:spec minorKey. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2099 |
|
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2100 |
! |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2101 |
|
743 | 2102 |
openTabListEditor |
765 | 2103 |
"opens a Tab List Editor on current widget" |
2104 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2105 |
|selector editor spec| |
765 | 2106 |
|
2107 |
(self resolveName:specClass) isNil ifTrue:[ |
|
808 | 2108 |
self askForSaving ifFalse: [^self] |
513 | 2109 |
]. |
765 | 2110 |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2111 |
spec := self specTool specification. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2112 |
(selector := spec listSelector) isArray |
785 | 2113 |
ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!']. |
743 | 2114 |
|
2115 |
editor := TabListEditor new. |
|
513 | 2116 |
editor masterApplication:self. |
765 | 2117 |
editor openModalOnClass:specClass andSelector:selector. |
2118 |
||
2119 |
editor specSelector ~= selector ifTrue:[ |
|
743 | 2120 |
editor hasSaved ifTrue:[ |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2121 |
spec listSelector:editor specSelector. |
513 | 2122 |
self modifiedChannel value:true. |
2123 |
self accept. |
|
2124 |
] |
|
2125 |
] |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2126 |
|
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2127 |
"Modified: / 16.7.1998 / 18:15:14 / cg" |
513 | 2128 |
! ! |
2129 |
||
109 | 2130 |
!UIPainter methodsFor:'change & update'! |
2131 |
||
222 | 2132 |
layoutChanged |
282 | 2133 |
"called by the painter/canvas whenever the layout of the current selected |
765 | 2134 |
widget has changed" |
2135 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2136 |
self isModified ifFalse:[ |
287 | 2137 |
self layoutTool update. |
222 | 2138 |
self modifiedChannel value:false |
2139 |
] |
|
2140 |
! |
|
2141 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2142 |
propertyChanged |
282 | 2143 |
"called by the painter/canvas whenever the property of the current selected |
765 | 2144 |
widget has changed" |
2145 |
||
2146 |
|property| |
|
2147 |
||
2148 |
(property := treeView propertySelected) notNil ifTrue:[ |
|
2149 |
self specTool specification:(property spec copy). |
|
2150 |
self setViewInLayoutTool:(property view). |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2151 |
self modifiedChannel value:false |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2152 |
] ifFalse:[ |
287 | 2153 |
self layoutTool layoutView notNil ifTrue:[ |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2154 |
self modifiedChannel value:false. |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2155 |
self treeSelection |
222 | 2156 |
] |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2157 |
] |
222 | 2158 |
! |
2159 |
||
2160 |
update:something with:aParameter from:someObject |
|
765 | 2161 |
"catches change notifications" |
2162 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2163 |
|window| |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2164 |
|
222 | 2165 |
someObject == treeView model ifTrue:[ |
362 | 2166 |
(something == #selection |
2167 |
or:[something == #selectionIndex]) ifTrue:[self treeSelection]. |
|
222 | 2168 |
^ self |
173 | 2169 |
]. |
2170 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2171 |
someObject == self galleryShown ifTrue:[ |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2172 |
"/ galleryShown toggle changed |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2173 |
window := selectionPanel window. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2174 |
(someObject value) ifTrue:[ |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2175 |
self raiseUIView:window |
173 | 2176 |
] ifFalse:[ |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2177 |
self hideUIView:window |
173 | 2178 |
]. |
2179 |
^ self |
|
2180 |
]. |
|
2181 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2182 |
someObject == self painterShown ifTrue:[ |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2183 |
"/ canvasShown toggle changed |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2184 |
window := self painter topView. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2185 |
(someObject value) ifTrue:[ |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2186 |
self raiseUIView:window |
173 | 2187 |
] ifFalse:[ |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2188 |
self hideUIView:window |
173 | 2189 |
]. |
2190 |
^ self |
|
2191 |
]. |
|
2192 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2193 |
"Modified: / 16.7.1998 / 19:09:57 / cg" |
884 | 2194 |
! |
2195 |
||
2196 |
updateChannels |
|
2197 |
"updates the channels" |
|
2198 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2199 |
|canCutOrCopy canPaste clipboard sel treeSelection| |
884 | 2200 |
|
2201 |
self canMoveOrAlignSelection value:(treeView canMoveOrAlignSelection). |
|
2202 |
self canChangeOrderInContainer value:(treeView canChangeOrderInContainer). |
|
2203 |
self canMoveSelectionIntoContainer value:(treeView canMoveSelectionIntoContainer). |
|
2204 |
self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer). |
|
2205 |
self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas). |
|
2206 |
||
2207 |
treeView notNil |
|
2208 |
ifTrue: |
|
2209 |
[ |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2210 |
treeSelection := treeView selection. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2211 |
"/ the top-node cannot be cut, copied or pasted. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2212 |
canCutOrCopy := treeSelection size >= 1 and:[treeSelection first ~~ 1]. |
884 | 2213 |
clipboard := self getSelection. |
2214 |
||
2215 |
clipboard isCollection ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]] |
|
2216 |
ifFalse:[sel := clipboard]. |
|
2217 |
||
2218 |
canPaste := (sel isKindOf:UISpecification) and: |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2219 |
[treeSelection size = 1 |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2220 |
and:[treeSelection first == 1 |
884 | 2221 |
or: [self canPasteInto: treeView selectedNode contents view]]] |
2222 |
]. |
|
2223 |
||
2224 |
self valueOfCanCut value: canCutOrCopy. |
|
2225 |
self valueOfCanCopy value: canCutOrCopy. |
|
2226 |
self valueOfCanPaste value: canPaste. |
|
2227 |
self valueOfCanPasteWithKeepingLayout value: (canPaste "& self canKeepLayoutInSelection"). |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2228 |
|
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2229 |
"Modified: / 16.7.1998 / 19:13:30 / cg" |
109 | 2230 |
! ! |
2231 |
||
2232 |
!UIPainter methodsFor:'event handling'! |
|
2233 |
||
2234 |
doesNotUnderstand:aMessage |
|
765 | 2235 |
"if does not understand incoming messages, detour them to painter" |
282 | 2236 |
|
2237 |
|painter| |
|
2238 |
||
2239 |
painter := self painter. |
|
2240 |
||
2241 |
(painter respondsTo:(aMessage selector)) ifTrue:[ |
|
109 | 2242 |
^ aMessage sendTo:painter |
282 | 2243 |
]. |
2244 |
super doesNotUnderstand:aMessage |
|
2245 |
||
2246 |
! ! |
|
2247 |
||
547 | 2248 |
!UIPainter methodsFor:'help'! |
2249 |
||
572 | 2250 |
defaultInfoLabel |
765 | 2251 |
"returns the default info label" |
572 | 2252 |
|
743 | 2253 |
specClass isNil ifTrue: [^'No class and selector defined.']. |
877 | 2254 |
specSelector isNil ifTrue: [^'No selector defined.']. |
572 | 2255 |
^specClass printString, ' >> ', specSelector |
877 | 2256 |
|
2257 |
"Modified: / 20.6.1998 / 16:49:16 / cg" |
|
297 | 2258 |
! ! |
2259 |
||
109 | 2260 |
!UIPainter methodsFor:'private'! |
2261 |
||
729 | 2262 |
askForModification |
765 | 2263 |
"asks for window spec modification" |
2264 |
||
2265 |
self askForSectionModification. |
|
729 | 2266 |
|
743 | 2267 |
(modified or: [self painter isModified or: [self helpTool modified]]) |
729 | 2268 |
ifTrue: |
2269 |
[ |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2270 |
((YesNoBox title:(resources string:'Window Spec was modified !!')) |
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2271 |
noText:(resources string:'Cancel'); |
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2272 |
yesText:(resources string:'Forget it and proceed'); |
729 | 2273 |
showAtPointer; |
2274 |
accepted) ifFalse: [^false]. |
|
2275 |
modified := false. |
|
2276 |
self painter resetModification |
|
2277 |
]. |
|
2278 |
^true |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2279 |
|
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2280 |
"Modified: / 20.5.1998 / 02:03:16 / cg" |
729 | 2281 |
! |
2282 |
||
808 | 2283 |
askForSaving |
2284 |
"asks for defining an application class" |
|
2285 |
||
2286 |
self askForSectionModification. |
|
2287 |
||
2288 |
((YesNoBox title:'No application class defined yet!!') |
|
2289 |
noText:'Cancel'; |
|
2290 |
yesText:'Define'; |
|
2291 |
showAtPointer; |
|
2292 |
accepted) ifFalse: [^false]. |
|
2293 |
||
2294 |
self doSave. |
|
2295 |
||
2296 |
^true |
|
2297 |
! |
|
2298 |
||
765 | 2299 |
askForSectionModification |
2300 |
"asks for section modification in the notebook" |
|
2301 |
||
2302 |
self isModified ifTrue:[ |
|
2303 |
(self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ |
|
2304 |
self accept |
|
2305 |
] ifFalse: [ |
|
2306 |
self cancel |
|
2307 |
] |
|
2308 |
] |
|
2309 |
! |
|
2310 |
||
743 | 2311 |
checkClassAndSelector |
765 | 2312 |
"checks for class & superclass" |
743 | 2313 |
|
2314 |
|superclass cls| |
|
2315 |
||
2316 |
specClass isNil ifTrue:[^ false]. |
|
2317 |
||
2318 |
cls := self resolveName:specClass. |
|
2319 |
||
2320 |
cls isNil ifTrue:[ |
|
2321 |
superclass := self resolveName:specSuperclass. |
|
2322 |
||
2323 |
superclass isNil ifTrue:[ |
|
2324 |
self warn:'No class named ' , specSuperclass , ' exists!!'. |
|
2325 |
^ false. |
|
2326 |
]. |
|
2327 |
(self confirm:'Create class ' , specClass asBoldText, '?') ifTrue:[ |
|
2328 |
superclass subclass:(specClass asSymbol) |
|
2329 |
instanceVariableNames:'' |
|
2330 |
classVariableNames:'' |
|
2331 |
poolDictionaries:'' |
|
2332 |
category:'Applications'. |
|
2333 |
^ true. |
|
2334 |
]. |
|
2335 |
^ false. |
|
2336 |
]. |
|
2337 |
cls isBehavior ifFalse:[ |
|
2338 |
self warn:'A global named ' , specClass , ' exists, but it is no class.'. |
|
2339 |
^ false. |
|
2340 |
]. |
|
2341 |
||
2342 |
specSuperclass isBehavior ifFalse:[ |
|
2343 |
specSuperclass isEmpty ifFalse:[ |
|
2344 |
superclass := self resolveName:specSuperclass |
|
2345 |
] ifTrue:[ |
|
2346 |
specSuperclass := nil. |
|
2347 |
] |
|
2348 |
] ifTrue:[ |
|
2349 |
superclass := specSuperclass |
|
2350 |
]. |
|
2351 |
||
2352 |
specSuperclass notNil ifTrue:[ |
|
2353 |
superclass isNil ifTrue:[ |
|
2354 |
self warn:'No class named ' , specSuperclass , ' exists!!'. |
|
2355 |
^ false. |
|
2356 |
]. |
|
2357 |
||
2358 |
(cls isSubclassOf:superclass) ifFalse:[ |
|
2359 |
self information:('A global named ' , specClass , ' exists,\' , |
|
2360 |
'but is not a subclass of ' , superclass name , '.\\' , |
|
2361 |
'Check and try again if that is not what you want.') withCRs. |
|
2362 |
] |
|
2363 |
]. |
|
2364 |
||
2365 |
superclass isNil ifTrue:[ |
|
2366 |
cls notNil ifTrue:[ |
|
2367 |
specSuperclass := cls superclass name |
|
2368 |
] |
|
2369 |
]. |
|
2370 |
||
2371 |
^ true |
|
2372 |
||
2373 |
"Modified: 12.8.1997 / 23:39:10 / cg" |
|
2374 |
! |
|
2375 |
||
173 | 2376 |
hideUIView:aView |
765 | 2377 |
"hides the view which is an application or top view" |
2378 |
||
173 | 2379 |
aView beIndependent. |
2380 |
aView unmap. |
|
2381 |
! |
|
2382 |
||
287 | 2383 |
raiseTabView |
2384 |
||
2385 |
self isLayoutToolSelected ifTrue:[ |
|
2386 |
layoutCanvas raise |
|
2387 |
] ifFalse:[ |
|
2388 |
self isHelpToolSelected ifTrue:[ |
|
2389 |
helpCanvas raise |
|
2390 |
] ifFalse:[ |
|
2391 |
self specTool selection:tabSelection. |
|
2392 |
specCanvas raise |
|
2393 |
] |
|
2394 |
] |
|
173 | 2395 |
! |
2396 |
||
2397 |
raiseUIView:aView |
|
765 | 2398 |
"raise the view which is an application or top view" |
2399 |
||
173 | 2400 |
aView map. |
2401 |
aView bePartner. |
|
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2402 |
! |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2403 |
|
713 | 2404 |
resourceMessage: aString |
765 | 2405 |
"reads the specClass and the specSelector by evaluating aString" |
713 | 2406 |
|
729 | 2407 |
(aString notNil and: [self askForModification]) |
713 | 2408 |
ifTrue: |
2409 |
[ |
|
2410 |
|msg cls sel| |
|
2411 |
msg := aString asCollectionOfWords. |
|
2412 |
(msg size == 2 and: |
|
2413 |
[(cls := self resolveName:(msg at:1)) notNil]) |
|
2414 |
ifTrue: |
|
2415 |
[ |
|
755 | 2416 |
self specClass:cls. |
713 | 2417 |
specSuperclass := cls superclass name. |
2418 |
specSelector := (msg at: 2) asSymbol. |
|
2419 |
^true |
|
2420 |
] |
|
2421 |
]. |
|
2422 |
^false |
|
2423 |
! |
|
2424 |
||
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2425 |
setClass:cls selector:selector |
765 | 2426 |
"sets the specClass and the specSelector under which the window spec should be saved" |
2427 |
||
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2428 |
|clsName superClassName| |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2429 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2430 |
clsName := cls name. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2431 |
superClassName := cls superclass name. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2432 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2433 |
(self aspectFor:#classNameChannel) value:clsName. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2434 |
(self aspectFor:#methodNameChannel) value:(selector ? ''). |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2435 |
(self aspectFor:#superclassNameChannel) value:superClassName. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2436 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2437 |
self painter |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2438 |
className:clsName |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2439 |
superclassName:superClassName |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2440 |
selector:(selector ? ''). |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2441 |
|
287 | 2442 |
self specClass:clsName. |
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2443 |
specSelector := (selector ? ''). |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2444 |
specSuperclass := superClassName. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
2445 |
|
587
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2446 |
specClass notNil & selector notNil ifTrue:[ |
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2447 |
self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. |
572 | 2448 |
self updateInfoLabel |
446 | 2449 |
]. |
587
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2450 |
|
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2451 |
"Modified: / 5.2.1998 / 09:44:58 / stefan" |
282 | 2452 |
! |
2453 |
||
2454 |
setViewInLayoutTool:aView |
|
765 | 2455 |
"sets view for layout tool" |
2456 |
||
287 | 2457 |
|type| |
2458 |
||
2459 |
self painter topView == aView ifTrue:[ |
|
2460 |
type := #Extent |
|
2461 |
]. |
|
2462 |
self layoutTool layoutView:aView type:type |
|
2463 |
||
2464 |
! |
|
2465 |
||
2466 |
specClass:aClass |
|
765 | 2467 |
"sets the specClass and updates the Help Tool" |
587
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2468 |
|
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2469 |
specClass := aClass isBehavior ifTrue:[aClass name] |
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2470 |
ifFalse:[aClass]. |
755 | 2471 |
|
2472 |
self helpTool buildFromClass:specClass. |
|
2473 |
self helpTool updateList. |
|
2474 |
self modifiedChannel value: false. |
|
2475 |
||
287 | 2476 |
! ! |
2477 |
||
2478 |
!UIPainter methodsFor:'private tools'! |
|
2479 |
||
2480 |
helpTool |
|
765 | 2481 |
"returns the help tool" |
2482 |
||
287 | 2483 |
helpCanvas isNil ifTrue:[ |
2484 |
self noteBookView |
|
282 | 2485 |
]. |
287 | 2486 |
^ helpCanvas application |
2487 |
! |
|
2488 |
||
2489 |
layoutTool |
|
765 | 2490 |
"returns the layout tool" |
2491 |
||
287 | 2492 |
layoutCanvas isNil ifTrue:[ |
2493 |
self noteBookView |
|
2494 |
]. |
|
2495 |
^ layoutCanvas application |
|
2496 |
! |
|
2497 |
||
2498 |
painter |
|
765 | 2499 |
"returns the canvas view" |
2500 |
||
287 | 2501 |
^ treeView canvas |
2502 |
! |
|
2503 |
||
2504 |
specTool |
|
765 | 2505 |
"returns the spec tool" |
2506 |
||
287 | 2507 |
specCanvas isNil ifTrue:[ |
2508 |
self noteBookView |
|
2509 |
]. |
|
2510 |
^ specCanvas application |
|
109 | 2511 |
! ! |
2512 |
||
166 | 2513 |
!UIPainter methodsFor:'queries'! |
2514 |
||
217 | 2515 |
hasSpecClass |
765 | 2516 |
"answers whether an application class is defined" |
2517 |
||
328 | 2518 |
^ (self resolveName:specClass) notNil |
217 | 2519 |
! |
2520 |
||
2521 |
hasSpecClassAndSelector |
|
765 | 2522 |
"answers whether an application class and a selector under which |
2523 |
the window spec is stored is defined" |
|
2524 |
||
217 | 2525 |
specSelector size > 1 ifTrue:[ |
2526 |
^ self hasSpecClass |
|
2527 |
]. |
|
765 | 2528 |
^ false |
217 | 2529 |
! |
2530 |
||
166 | 2531 |
isHelpToolSelected |
765 | 2532 |
"answers whether the current selected section in the noteBook is the Help Tool" |
2533 |
||
287 | 2534 |
^ tabSelection = UIHelpTool label |
166 | 2535 |
! |
2536 |
||
2537 |
isLayoutToolSelected |
|
765 | 2538 |
"answers whether the current selected section in the noteBook is the Layout Tool" |
2539 |
||
287 | 2540 |
^ tabSelection = UILayoutTool label |
217 | 2541 |
! |
2542 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2543 |
isModified |
765 | 2544 |
"answers whether the current window spec or a layout is modified" |
2545 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2546 |
^ self modifiedChannel value |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2547 |
! |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2548 |
|
217 | 2549 |
isPainterEnabled |
765 | 2550 |
"answers whether I am running in test mode" |
2551 |
||
217 | 2552 |
^ self painter enabled |
166 | 2553 |
! ! |
2554 |
||
109 | 2555 |
!UIPainter methodsFor:'selection'! |
2556 |
||
2557 |
tabSelection |
|
765 | 2558 |
"returns the label of the current section in the notebook" |
2559 |
||
109 | 2560 |
^ tabSelection |
2561 |
! |
|
2562 |
||
2563 |
tabSelection:something |
|
765 | 2564 |
"called whenever the section of the notebook has changed" |
351 | 2565 |
|
2566 |
|whatToDo| |
|
2567 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2568 |
(something isNil or:[tabSelection = something]) ifTrue:[ |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2569 |
^ self |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2570 |
]. |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2571 |
|
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2572 |
self isModified ifTrue:[ |
351 | 2573 |
whatToDo := DialogBox |
765 | 2574 |
confirmWithCancel:'Accept modifications in section ' , tabSelection printString asBoldText, '?' |
446 | 2575 |
labels:#('Cancel' 'Ignore' 'Accept') |
351 | 2576 |
default:3. |
2577 |
whatToDo isNil ifTrue:[^self]. |
|
2578 |
whatToDo == true ifTrue:[ |
|
2579 |
self accept |
|
2580 |
] ifFalse:[ |
|
2581 |
self cancel |
|
2582 |
] |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2583 |
]. |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2584 |
|
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2585 |
tabSelection := something. |
287 | 2586 |
self raiseTabView. |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2587 |
self cancel. |
351 | 2588 |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2589 |
! |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2590 |
|
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2591 |
treeSelection |
765 | 2592 |
"called whenever the selection of the treeview has changed" |
2593 |
||
890 | 2594 |
|view list spec slices size property tabComponent| |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2595 |
|
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2596 |
self isModified ifTrue:[ |
713 | 2597 |
(self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2598 |
self accept |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2599 |
] |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2600 |
]. |
713 | 2601 |
|
281 | 2602 |
treeView isCanvasSelected ifTrue:[ |
282 | 2603 |
spec := treeView canvasSpec. |
2604 |
view := self painter topView. |
|
2605 |
] ifFalse:[ |
|
2606 |
(property := treeView propertySelected) notNil ifTrue:[ |
|
301 | 2607 |
treeView canResizeSelectedWidget ifTrue:[ |
2608 |
view := property view. |
|
2609 |
]. |
|
282 | 2610 |
spec := property spec copy. |
2611 |
] |
|
281 | 2612 |
]. |
282 | 2613 |
tabComponent := builder componentAt:#noteBook. |
2614 |
self setViewInLayoutTool:view. |
|
287 | 2615 |
self specTool specification:spec. |
282 | 2616 |
|
2617 |
spec notNil ifTrue:[ |
|
287 | 2618 |
self helpTool helpKey:(spec activeHelpKey). |
295 | 2619 |
slices := spec class slices. |
2620 |
size := slices size. |
|
301 | 2621 |
|
2622 |
view notNil ifTrue:[ |
|
755 | 2623 |
self treeView isCanvasSelected |
2624 |
ifFalse: |
|
2625 |
[ |
|
2626 |
list := Array new:(size + 2). |
|
2627 |
list at:(size + 2) put:(UILayoutTool label). |
|
2628 |
] |
|
2629 |
ifTrue: |
|
2630 |
[ |
|
2631 |
list := Array new:(size + 1). |
|
2632 |
list at:(size + 1) put:(UILayoutTool label). |
|
2633 |
]. |
|
301 | 2634 |
] ifFalse:[ |
2635 |
list := Array new:(size + 1). |
|
2636 |
]. |
|
755 | 2637 |
|
295 | 2638 |
1 to:size do:[:i| list at:i put:((slices at:i) first asString)]. |
755 | 2639 |
self treeView isCanvasSelected ifFalse: [list at:(size + 1) put:(UIHelpTool label)]. |
301 | 2640 |
|
282 | 2641 |
self tabList value:list. |
765 | 2642 |
self showHelp:spec class name for:self. |
282 | 2643 |
tabComponent enabled:true. |
2644 |
||
2645 |
(tabSelection := tabComponent selection) isNil ifTrue:[ |
|
2646 |
tabComponent setSelection:(tabSelection := list first) |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2647 |
]. |
287 | 2648 |
self raiseTabView |
282 | 2649 |
] ifFalse:[ |
287 | 2650 |
self helpTool helpKey:nil. |
282 | 2651 |
tabComponent enabled:false. |
765 | 2652 |
self defaultInfoLabel. |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2653 |
]. |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2654 |
self modifiedChannel value:false. |
713 | 2655 |
|
884 | 2656 |
self updateChannels |
60 | 2657 |
! ! |
2658 |
||
765 | 2659 |
!UIPainter methodsFor:'settings'! |
2660 |
||
924 | 2661 |
generateAspectsAsInstanceVariables |
2662 |
"if on, aspects are held as instance variables; |
|
2663 |
if off (the default), they are kept in the bindings dictionary. |
|
2664 |
" |
|
2665 |
^ UIPainterView generateAspectsAsInstanceVariables |
|
2666 |
||
2667 |
"Created: / 29.7.1998 / 11:17:59 / cg" |
|
2668 |
! |
|
2669 |
||
2670 |
generateAspectsAsInstanceVariables:aBoolean |
|
2671 |
"if on, aspects are held as instance variables; |
|
2672 |
if off (the default), they are kept in the bindings dictionary. |
|
2673 |
" |
|
2674 |
^ UIPainterView generateAspectsAsInstanceVariables:aBoolean |
|
2675 |
||
2676 |
"Created: / 29.7.1998 / 11:18:20 / cg" |
|
2677 |
! |
|
2678 |
||
765 | 2679 |
redefineAspectMethods |
2680 |
"redefine methods yes or no. If a method is defined in super class |
|
2681 |
should the message be reinstalled ? |
|
2682 |
" |
|
2683 |
^ UIPainterView redefineAspectMethods |
|
2684 |
||
2685 |
||
2686 |
! |
|
2687 |
||
2688 |
redefineAspectMethods:aBoolean |
|
2689 |
"redefine methods yes or no. If a method is defined in super class |
|
2690 |
should the message be reinstalled ? |
|
2691 |
" |
|
2692 |
UIPainterView redefineAspectMethods:aBoolean |
|
2693 |
||
2694 |
||
2695 |
! ! |
|
2696 |
||
109 | 2697 |
!UIPainter methodsFor:'startup / release'! |
2698 |
||
2699 |
closeRequest |
|
765 | 2700 |
"close request" |
713 | 2701 |
|
729 | 2702 |
self askForModification ifFalse:[^self]. |
133 | 2703 |
|
222 | 2704 |
treeView model removeDependent:self. |
2705 |
self painter release. |
|
60 | 2706 |
|
109 | 2707 |
selectionPanel notNil ifTrue:[ |
183 | 2708 |
selectionPanel masterApplication:nil. |
109 | 2709 |
selectionPanel closeRequest |
2710 |
]. |
|
149 | 2711 |
selectionPanel := nil. |
222 | 2712 |
treeView := nil. |
149 | 2713 |
|
109 | 2714 |
super closeRequest. |
2715 |
||
2716 |
! |
|
2717 |
||
2718 |
closeRequestFor:aTopView |
|
765 | 2719 |
"handles a close request for a specific view" |
2720 |
||
173 | 2721 |
|topView| |
60 | 2722 |
|
765 | 2723 |
(topView := self window) == aTopView ifTrue:[ |
109 | 2724 |
super closeRequestFor:aTopView |
2725 |
] ifFalse:[ |
|
173 | 2726 |
aTopView = selectionPanel window ifTrue:[ |
2727 |
self galleryShown value:false |
|
2728 |
] ifFalse:[ |
|
513 | 2729 |
aTopView == (self painter topView) ifTrue:[ |
2730 |
self painterShown value:false |
|
2731 |
] ifFalse:[ |
|
2732 |
aTopView closeRequest |
|
2733 |
] |
|
173 | 2734 |
]. |
133 | 2735 |
topView raise. |
109 | 2736 |
]. |
60 | 2737 |
! |
2738 |
||
743 | 2739 |
loadFromMessage: aMessage |
765 | 2740 |
"loads a window spec by evaluating aMessage" |
743 | 2741 |
|
2742 |
((aMessage size > 0) and: [self askForModification]) |
|
2743 |
ifTrue: |
|
2744 |
[ |
|
2745 |
|readStream aClass aSelector| |
|
2746 |
readStream := aMessage readStream. |
|
2747 |
(aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil |
|
2748 |
ifTrue: |
|
2749 |
[ |
|
2750 |
aSelector := readStream upToEnd asSymbol. |
|
755 | 2751 |
self setClass: aClass selector: aSelector. |
743 | 2752 |
(aClass respondsTo:aSelector) |
2753 |
ifTrue: |
|
785 | 2754 |
[ |
2755 |
self painter setupFromSpec:(aClass perform:aSelector) |
|
743 | 2756 |
] |
2757 |
] |
|
2758 |
] |
|
2759 |
! |
|
2760 |
||
345 | 2761 |
openInterface:aSymbol |
765 | 2762 |
"opens the interface on the selector aSymbol" |
2763 |
||
2764 |
|cls painterView painter topView| |
|
60 | 2765 |
|
729 | 2766 |
modified := false. |
2767 |
||
60 | 2768 |
aspects := IdentityDictionary new. |
2769 |
||
2770 |
aspects at:#classNameChannel put:( |
|
2771 |
(specClass notNil ifTrue:[specClass] |
|
2772 |
ifFalse:['NewApplication']) asValue |
|
2773 |
). |
|
2774 |
specSuperclass isNil ifTrue:[ |
|
2775 |
specClass notNil ifTrue:[ |
|
328 | 2776 |
(cls := self resolveName:specClass) notNil ifTrue:[ |
60 | 2777 |
specSuperclass := cls superclass name. |
2778 |
] |
|
2779 |
] |
|
2780 |
]. |
|
2781 |
aspects at:#superclassNameChannel put:( |
|
2782 |
(specSuperclass notNil ifTrue:[specSuperclass] |
|
2783 |
ifFalse:['ApplicationModel']) asValue |
|
2784 |
). |
|
157
ce974dce3dd4
enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents:
156
diff
changeset
|
2785 |
aspects at:#superclassNameDefaults put:#('ApplicationModel' 'SimpleDialog') asValue. |
60 | 2786 |
aspects at:#methodNameChannel put:( |
161 | 2787 |
(specSelector notNil ifTrue:[specSelector asValue] |
60 | 2788 |
ifFalse:[#windowSpec]) asValue |
2789 |
). |
|
136 | 2790 |
|
222 | 2791 |
treeView := TreeView new. |
136 | 2792 |
painterView := StandardSystemView new. |
713 | 2793 |
painterView name: self class defaultNameOfCanvas. |
2794 |
painterView label: self class defaultNameOfCanvas. |
|
136 | 2795 |
painterView extent:300@300. |
2796 |
||
2797 |
painter := UIPainterView in:painterView. |
|
109 | 2798 |
painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout. |
136 | 2799 |
|
222 | 2800 |
treeView := treeView canvas:painter. |
2801 |
painter treeView:treeView. |
|
2802 |
treeView model addDependent:self. |
|
136 | 2803 |
|
765 | 2804 |
super openInterface:aSymbol. |
743 | 2805 |
|
136 | 2806 |
topView := self window. |
713 | 2807 |
|
345 | 2808 |
topView label:'GUI Painter'. |
136 | 2809 |
|
785 | 2810 |
painterView openInGroup:(topView windowGroup). |
2811 |
painterView application:self. |
|
794 | 2812 |
|
785 | 2813 |
selectionPanel := UISelectionPanel new. |
2814 |
selectionPanel allButOpenInterface:#windowSpec. |
|
2815 |
selectionPanel window openInGroup:(topView windowGroup). |
|
2816 |
selectionPanel openWindow. |
|
2817 |
selectionPanel masterApplication:self. |
|
2818 |
||
2819 |
topView iconLabel:'GUI Painter'. |
|
2820 |
topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
|
2821 |
||
2822 |
painterView iconLabel:'GUI Painter'. |
|
2823 |
painterView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
|
2824 |
||
2825 |
topView bePartner. |
|
2826 |
painterView bePartner. |
|
2827 |
selectionPanel window bePartner. |
|
2828 |
||
2829 |
selectionPanel window iconLabel:'GUI Painter'. |
|
2830 |
selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100). |
|
60 | 2831 |
! |
2832 |
||
109 | 2833 |
openOnClass:aClass |
765 | 2834 |
"opens the GUI Painter on aClass and #windowSpec" |
2835 |
||
109 | 2836 |
self openOnClass:aClass andSelector:#windowSpec |
2837 |
! |
|
2838 |
||
60 | 2839 |
openOnClass:aClass andSelector:aSelector |
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2840 |
"opens the GUI Painter on aClass and aSelector |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2841 |
" |
157
ce974dce3dd4
enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents:
156
diff
changeset
|
2842 |
aClass isNil ifTrue:[ |
713 | 2843 |
(self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs) |
351 | 2844 |
ifFalse:[^ nil]. |
157
ce974dce3dd4
enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents:
156
diff
changeset
|
2845 |
]. |
109 | 2846 |
self openInterface. |
60 | 2847 |
|
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2848 |
specSelector := aSelector. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2849 |
specClass := aClass. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2850 |
|
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2851 |
|
713 | 2852 |
! |
2853 |
||
2854 |
postOpenWith: aBuilder |
|
765 | 2855 |
"sets the root of the tree view as first selection; |
2856 |
sets the grid parameters, if defined" |
|
713 | 2857 |
|
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2858 |
|painter settings gridPara hspace vspace cls sel| |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2859 |
|
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2860 |
super postOpenWith:aBuilder. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2861 |
|
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2862 |
cls := specClass. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2863 |
sel := specSelector. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2864 |
specSelector := nil. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2865 |
specClass := nil. |
785 | 2866 |
|
2867 |
painter := self painter. |
|
2868 |
settings := self class settings. |
|
2869 |
gridPara := painter gridParameters copy. |
|
2870 |
hspace := settings at: #HGridSpace ifAbsent: [10]. |
|
2871 |
vspace := settings at: #VGridSpace ifAbsent: [10]. |
|
2872 |
gridPara at:1 put:hspace; at:2 put:vspace; at:5 put:hspace; at:6 put:vspace. |
|
2873 |
painter gridParameters:gridPara. |
|
2874 |
painter gridShown: (settings at: #GridShown ifAbsent: [false]). |
|
2875 |
painter gridAlign: (settings at: #GridAlign ifAbsent: [false]). |
|
2876 |
painter clear. |
|
743 | 2877 |
|
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2878 |
cls notNil ifTrue:[ |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2879 |
self setClass:cls selector:sel. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2880 |
|
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2881 |
(cls respondsTo:sel) ifTrue:[ |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2882 |
painter setupFromSpec:(cls perform:sel). |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2883 |
] |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2884 |
]. |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2885 |
treeView selection: #(1). |
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
2886 |
|
60 | 2887 |
! ! |
2888 |
||
743 | 2889 |
!UIPainter methodsFor:'user actions'! |
446 | 2890 |
|
765 | 2891 |
accept |
2892 |
"accepts all modifications done to the attributes of the current section" |
|
2893 |
||
2894 |
|painter layout spec prop key layoutTool| |
|
2895 |
||
788 | 2896 |
self modifiedChannel value:false. |
2897 |
modified := true. |
|
2898 |
||
765 | 2899 |
painter := self painter. |
2900 |
||
2901 |
self isLayoutToolSelected ifTrue:[ |
|
2902 |
layoutTool := self layoutTool. |
|
2903 |
||
2904 |
(layout := layoutTool layout) notNil ifTrue:[ |
|
2905 |
layoutTool layoutType == #Extent ifTrue:[ |
|
2906 |
layoutTool layoutView == painter topView ifTrue:[ |
|
2907 |
layoutTool layoutView extent:layout |
|
2908 |
] ifFalse:[ |
|
2909 |
painter setExtent:layout |
|
2910 |
] |
|
2911 |
] ifFalse:[ |
|
2912 |
painter setLayout:layout |
|
2913 |
] |
|
2914 |
] |
|
2915 |
] ifFalse:[ |
|
2916 |
spec := self specTool specification. |
|
2917 |
||
2918 |
self isHelpToolSelected ifTrue:[ |
|
2919 |
self helpTool accept. |
|
2920 |
key := self helpTool helpKey. |
|
2921 |
prop := treeView propertySelected. |
|
2922 |
||
2923 |
prop notNil ifTrue:[ |
|
2924 |
prop spec activeHelpKey:key |
|
2925 |
]. |
|
2926 |
spec activeHelpKey:key. |
|
2927 |
] ifFalse:[ |
|
788 | 2928 |
painter updateFromSpec:spec |
765 | 2929 |
] |
788 | 2930 |
] |
2931 |
||
765 | 2932 |
! |
2933 |
||
2934 |
addWidget: aSpecClass |
|
2935 |
"adds a widget from aSpecClass to the current widget" |
|
2936 |
||
2937 |
self addWidgetOfSpec: (Array with: (Smalltalk at: aSpecClass) new) |
|
2938 |
||
2939 |
! |
|
2940 |
||
2941 |
addWidgetOfSpec: aSpec |
|
2942 |
"adds a widget from aSpec to the current widget" |
|
2943 |
||
2944 |
|newSel| |
|
2945 |
(newSel := self pasteSpecifications:aSpec keepLayout:false at:0@0) notNil |
|
2946 |
ifTrue: |
|
2947 |
[ |
|
2948 |
self select: newSel |
|
2949 |
] |
|
2950 |
ifFalse: |
|
2951 |
[ |
|
2952 |
((treeView selection size = 0) or: [treeView selectedNode isNil]) |
|
2953 |
ifTrue: |
|
2954 |
[ |
|
2955 |
treeView selection: #(1). |
|
2956 |
] |
|
2957 |
ifFalse: |
|
2958 |
[ |
|
2959 |
treeView selectNode: (treeView detectNode: [:n| n = treeView selectedNode parent]) |
|
2960 |
]. |
|
2961 |
self addWidgetOfSpec: aSpec |
|
2962 |
] |
|
2963 |
||
2964 |
! |
|
2965 |
||
2966 |
cancel |
|
2967 |
"cancels all modifications done to the attributes of the current section; |
|
2968 |
reread the old attributes" |
|
2969 |
||
2970 |
|spec key view| |
|
2971 |
||
2972 |
self isModified ifTrue:[ |
|
2973 |
(spec := self painter specForSelection) notNil ifTrue:[ |
|
2974 |
key := spec activeHelpKey. |
|
2975 |
]. |
|
2976 |
self helpTool helpKey:key. |
|
2977 |
||
2978 |
treeView isCanvasSelected ifTrue: [ |
|
2979 |
spec := treeView canvasSpec. |
|
2980 |
]. |
|
2981 |
self specTool specification:spec. |
|
2982 |
view := self layoutTool layoutView. |
|
2983 |
||
2984 |
self setViewInLayoutTool:view. |
|
2985 |
spec class == DataSetSpec ifTrue:[ |
|
2986 |
view columnDescriptors:(spec columns) |
|
2987 |
]. |
|
2988 |
self modifiedChannel value:false. |
|
2989 |
modified := false |
|
2990 |
] |
|
2991 |
! |
|
2992 |
||
446 | 2993 |
doBrowseAspectMethods |
765 | 2994 |
"opens a browser on the aspect methods" |
2995 |
||
2996 |
|methods| |
|
446 | 2997 |
|
2998 |
self painter isModified ifTrue:[ |
|
713 | 2999 |
self warn:'The current window spec has not yet been saved!!\\The System Browser may show the code of the old aspect methods.' withCRs. |
446 | 3000 |
]. |
765 | 3001 |
|
3002 |
(methods := self painter aspectMethods) isEmpty ifTrue:[ |
|
3003 |
self warn:'No aspect methods found!!'. |
|
3004 |
^ self. |
|
446 | 3005 |
]. |
765 | 3006 |
SystemBrowser browseMethods:methods title:'Aspect methods'. |
3007 |
||
446 | 3008 |
! |
3009 |
||
713 | 3010 |
doBrowseClass |
765 | 3011 |
"opens a System Browser on the specClass" |
713 | 3012 |
|
3013 |
self painter isModified ifTrue:[ |
|
3014 |
self warn:'The current window spec has not yet been saved!!\\The System Browser will show the code of the old window spec.' withCRs. |
|
3015 |
]. |
|
765 | 3016 |
|
3017 |
SystemBrowser openInClass:(self resolveName:specClass) |
|
3018 |
||
743 | 3019 |
! |
3020 |
||
755 | 3021 |
doDefineClassAndSelector |
765 | 3022 |
"launches a dialog for defining class, superclass, and selector of the application" |
755 | 3023 |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3024 |
|again tmp helpDict helpKey helpTool| |
755 | 3025 |
|
3026 |
[ |
|
3027 |
again := false. |
|
3028 |
||
3029 |
(tmp := specClass) isNil ifTrue:[tmp := 'NewApplication']. |
|
3030 |
aspects at:#classNameChannel put:tmp asValue. |
|
3031 |
||
3032 |
(tmp := specSelector) isNil ifTrue:[tmp := 'windowSpec']. |
|
3033 |
aspects at:#methodNameChannel put:tmp asValue. |
|
3034 |
||
3035 |
(tmp := specSuperclass) isNil ifTrue:[tmp := 'ApplicationModel']. |
|
3036 |
aspects at:#superclassNameChannel put:tmp asValue. |
|
3037 |
||
3038 |
(self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[ |
|
3039 |
||
3040 |
specClass := (self aspectFor:#classNameChannel) value. |
|
3041 |
specSelector := (self aspectFor:#methodNameChannel) value. |
|
3042 |
specSelector notNil ifTrue:[specSelector := specSelector asSymbol]. |
|
3043 |
specSuperclass := (self aspectFor:#superclassNameChannel) value. |
|
3044 |
||
3045 |
(again := self checkClassAndSelector not) ifFalse:[ |
|
3046 |
self painter className:specClass |
|
3047 |
superclassName:specSuperclass |
|
3048 |
selector:specSelector. |
|
3049 |
] |
|
3050 |
] |
|
3051 |
ifFalse: |
|
3052 |
[ |
|
3053 |
^nil |
|
3054 |
] |
|
3055 |
||
3056 |
] doWhile:[again]. |
|
3057 |
||
3058 |
specClass := specClass isBehavior ifTrue:[specClass name] |
|
3059 |
ifFalse:[specClass]. |
|
3060 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3061 |
helpTool := self helpTool. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3062 |
helpDict := helpTool dictionary. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3063 |
helpKey := helpTool helpKey. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3064 |
helpTool buildFromClass:specClass. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3065 |
helpTool dictionary declareAllFrom: helpDict. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3066 |
helpTool updateList. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3067 |
helpTool helpKey: helpKey. |
755 | 3068 |
self modifiedChannel value: false. |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3069 |
helpTool modified: true. |
765 | 3070 |
|
3071 |
self updateInfoLabel |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3072 |
|
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3073 |
"Modified: / 16.7.1998 / 18:26:33 / cg" |
755 | 3074 |
! |
3075 |
||
3076 |
doDefineGrid |
|
765 | 3077 |
"opens a dialog for the grid parameters" |
3078 |
||
755 | 3079 |
|hspace vspace bindings painter gridPara settings| |
3080 |
||
3081 |
painter := self painter. |
|
3082 |
bindings := IdentityDictionary new. |
|
3083 |
gridPara := painter gridParameters copy. |
|
3084 |
||
3085 |
bindings at:#showGrid put:((self class settings at: #GridShown ifAbsent: [painter gridShown]) asValue). |
|
3086 |
bindings at:#alignToGrid put:((self class settings at: #GridAlign ifAbsent: [painter gridAlign]) asValue). |
|
3087 |
bindings at:#hspace put:((gridPara at:1) asValue). |
|
3088 |
bindings at:#vspace put:((gridPara at:2) asValue). |
|
3089 |
||
3090 |
(self openDialogInterface:#dialogSpecForDefiningGridParameters withBindings:bindings) ifFalse:[ |
|
3091 |
^ self |
|
3092 |
]. |
|
3093 |
||
3094 |
hspace := (bindings at:#hspace) value ? 5. |
|
3095 |
vspace := (bindings at:#vspace) value ? 5. |
|
3096 |
||
3097 |
gridPara at:1 put:hspace. |
|
3098 |
gridPara at:2 put:vspace. |
|
3099 |
gridPara at:5 put:hspace. |
|
3100 |
gridPara at:6 put:vspace. |
|
3101 |
||
3102 |
painter gridShown:false. |
|
3103 |
painter gridAlign:false. |
|
3104 |
painter gridParameters:gridPara. |
|
3105 |
painter gridAlign:(bindings at:#alignToGrid) value. |
|
3106 |
painter gridShown:(bindings at:#showGrid) value. |
|
3107 |
settings := self class settings. |
|
3108 |
settings at: #GridShown put: (bindings at:#showGrid) value. |
|
3109 |
settings at: #GridAlign put: (bindings at:#alignToGrid) value. |
|
3110 |
settings at: #HGridSpace put: hspace. |
|
3111 |
settings at: #VGridSpace put: vspace. |
|
3112 |
painter clear. |
|
3113 |
||
3114 |
! |
|
3115 |
||
743 | 3116 |
doGenerateAspectMethods |
765 | 3117 |
"generates aspect and action methods for the application class" |
3118 |
||
3119 |
self askForSectionModification. |
|
3120 |
||
3121 |
(ReadStream on:self painter generateAspectMethods) fileIn. |
|
446 | 3122 |
|
3123 |
! |
|
3124 |
||
743 | 3125 |
doGenerateHookMethods |
765 | 3126 |
"generates hook methods for the application class" |
3127 |
||
3128 |
self askForSectionModification. |
|
3129 |
||
3130 |
(ReadStream on:self painter generateHookMethods) fileIn. |
|
3131 |
||
3132 |
! |
|
3133 |
||
3134 |
doInspectSpec |
|
3135 |
"opens an inspector on the spec of the selected widget" |
|
3136 |
||
3137 |
|spec| |
|
3138 |
||
3139 |
(spec := self specForSelection) isNil ifTrue:[ |
|
3140 |
treeView isCanvasSelected ifTrue:[ |
|
3141 |
spec := treeView canvasSpec. |
|
3142 |
] |
|
446 | 3143 |
]. |
765 | 3144 |
spec notNil ifTrue:[ |
3145 |
spec inspect |
|
3146 |
] |
|
3147 |
||
3148 |
||
3149 |
! |
|
3150 |
||
3151 |
doInspectView |
|
3152 |
"opens an inspector on the view of the selected widget" |
|
3153 |
||
3154 |
|selection| |
|
3155 |
||
3156 |
((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[ |
|
3157 |
selection first inspect |
|
3158 |
] ifFalse: [ |
|
3159 |
selection inspect |
|
3160 |
] |
|
3161 |
||
446 | 3162 |
! |
3163 |
||
713 | 3164 |
doLoad |
765 | 3165 |
"opens a ResourceSelectionBrowser for loading a window spec from a class" |
713 | 3166 |
|
729 | 3167 |
self askForModification ifFalse: [^nil]. |
3168 |
||
713 | 3169 |
self loadFromMessage: |
3170 |
(ResourceSelectionBrowser |
|
3171 |
request: 'Load Window Spec From Class' |
|
3172 |
onSuperclass: nil |
|
3173 |
andClass: specClass |
|
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
3174 |
andSelector: specSelector ? #windowSpec |
713 | 3175 |
withResourceTypes: #(canvas)) |
3176 |
! |
|
3177 |
||
3178 |
doLoadSubspec |
|
765 | 3179 |
"opens a ResourceSelectionBrowser for loading a sub spec from a class" |
713 | 3180 |
|
3181 |
|subSpecMessage| |
|
729 | 3182 |
|
765 | 3183 |
self askForSectionModification. |
729 | 3184 |
|
713 | 3185 |
(subSpecMessage := ResourceSelectionBrowser |
3186 |
request: 'Load Subspec From Class' |
|
3187 |
onSuperclass: nil |
|
3188 |
andClass: specClass |
|
3189 |
andSelector: specSelector |
|
3190 |
withResourceTypes: #(canvas)) notNil |
|
3191 |
ifTrue: |
|
3192 |
[ |
|
3193 |
|readStream aClass aSelector| |
|
3194 |
readStream := subSpecMessage readStream. |
|
3195 |
(aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil |
|
3196 |
ifTrue: |
|
3197 |
[ |
|
3198 |
aSelector := readStream upToEnd asSymbol. |
|
3199 |
(aClass name == specClass and: [aSelector == specSelector]) ifTrue: [^self warn: 'Current interface as subspec not allowed!!']. |
|
3200 |
(aClass respondsTo:aSelector) |
|
3201 |
ifTrue: |
|
3202 |
[ |
|
3203 |
self addWidgetOfSpec: (Array with: (UISubSpecification new majorKey: aClass name; minorKey: aSelector)) |
|
446 | 3204 |
] |
3205 |
] |
|
713 | 3206 |
] |
446 | 3207 |
! |
3208 |
||
3209 |
doNew |
|
765 | 3210 |
"removes all widgets, specClass, and specSelector" |
729 | 3211 |
|
3212 |
self askForModification ifFalse: [^nil]. |
|
3213 |
specClass := specSelector := nil. |
|
572 | 3214 |
self painter removeAll. |
729 | 3215 |
treeView canvas topView name: UIPainter defaultNameOfCanvas. |
3216 |
treeView canvas topView label: UIPainter defaultNameOfCanvas. |
|
755 | 3217 |
self helpTool doNew. |
785 | 3218 |
self treeSelection. |
3219 |
treeView selectedNode changed. |
|
3220 |
self tabModel value: self tabList value first. |
|
729 | 3221 |
self updateInfoLabel. |
446 | 3222 |
! |
3223 |
||
765 | 3224 |
doOpenWidgetDocumentation |
3225 |
"opens documentation for the selected widget" |
|
3226 |
||
3227 |
|spec document| |
|
3228 |
||
3229 |
(spec := self specForSelection) isNil ifTrue:[ |
|
3230 |
treeView isCanvasSelected ifTrue:[ |
|
3231 |
spec := nil |
|
3232 |
] |
|
3233 |
]. |
|
3234 |
spec notNil ifTrue:[ |
|
3235 |
document := 'tools/uipainter/', spec userFriendlyName,'.html' |
|
3236 |
] ifFalse: [ |
|
785 | 3237 |
document := 'tools/uipainter/WindowSpec.html' |
765 | 3238 |
]. |
3239 |
HTMLDocumentView openFullOnDocumentationFile: document |
|
3240 |
||
3241 |
||
3242 |
! |
|
3243 |
||
446 | 3244 |
doPickAView |
765 | 3245 |
"changes the cursor for picking a view and builds a window spec from it" |
3246 |
||
3247 |
|view| |
|
446 | 3248 |
|
729 | 3249 |
self askForModification ifFalse: [^nil]. |
446 | 3250 |
|
3251 |
(view := Screen current viewFromUser) notNil ifTrue:[ |
|
3252 |
view == Screen current rootView ifFalse:[ |
|
765 | 3253 |
self painter setupFromSpec:(UISpecification fromView:view topView). |
446 | 3254 |
] |
729 | 3255 |
]. |
3256 |
||
3257 |
self updateInfoLabel |
|
3258 |
||
446 | 3259 |
! |
3260 |
||
713 | 3261 |
doSave |
765 | 3262 |
"saves the window spec" |
3263 |
||
713 | 3264 |
|code painter| |
3265 |
||
765 | 3266 |
self askForSectionModification. |
729 | 3267 |
|
713 | 3268 |
self hasSpecClassAndSelector ifFalse:[ |
765 | 3269 |
self doDefineClassAndSelector isNil ifTrue: [^nil] |
713 | 3270 |
]. |
3271 |
||
3272 |
(specClass notNil and: [(Smalltalk at: specClass asSymbol) isClass]) |
|
3273 |
ifFalse: |
|
3274 |
[ |
|
3275 |
^nil |
|
3276 |
]. |
|
3277 |
||
3278 |
painter := self painter. |
|
3279 |
||
3280 |
painter className:specClass |
|
3281 |
superclassName:specSuperclass |
|
3282 |
selector:specSelector. |
|
3283 |
||
3284 |
code := painter generateWindowSpecMethodSource withCRs. |
|
755 | 3285 |
|
713 | 3286 |
(ReadStream on:code) fileIn. |
3287 |
||
724 | 3288 |
self helpTool installHelpSpecsOnClass:specClass. |
713 | 3289 |
|
3290 |
self updateInfoLabel. |
|
729 | 3291 |
modified := false. |
713 | 3292 |
self painter resetModification. |
3293 |
||
3294 |
((Smalltalk at: specClass asSymbol) class implements: specSelector) |
|
3295 |
ifTrue: |
|
3296 |
[ |
|
3297 |
self addToHistory: (specClass, ' ', specSelector) -> #loadFromMessage:. |
|
3298 |
]. |
|
3299 |
||
3300 |
||
3301 |
! |
|
3302 |
||
3303 |
doSaveAs |
|
765 | 3304 |
"opens a ResourceSelectionBrowser for saving the window spec on a class" |
713 | 3305 |
|
3306 |
|resourceMessage| |
|
3307 |
||
765 | 3308 |
self askForSectionModification. |
729 | 3309 |
|
713 | 3310 |
(resourceMessage := ResourceSelectionBrowser |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
3311 |
request: 'Save Window Spec In Class' |
713 | 3312 |
onSuperclass: #Object |
743 | 3313 |
andClass: (specClass ? #ApplicationModel) asSymbol |
713 | 3314 |
andSelector: specSelector ? #windowSpec |
3315 |
withResourceTypes: #(canvas)) notNil |
|
3316 |
ifTrue: |
|
3317 |
[ |
|
743 | 3318 |
modified := false. |
3319 |
self painter resetModification. |
|
713 | 3320 |
(self resourceMessage: resourceMessage) |
3321 |
ifTrue: |
|
3322 |
[ |
|
3323 |
self doSave. |
|
3324 |
^true |
|
3325 |
] |
|
3326 |
] |
|
3327 |
||
3328 |
! |
|
3329 |
||
446 | 3330 |
doStartApplication |
765 | 3331 |
"starts the application on the editing window spec" |
3332 |
||
3333 |
|application| |
|
3334 |
||
3335 |
self hasSpecClassAndSelector ifFalse:[ |
|
3336 |
self doSave isNil ifTrue: [^nil]. |
|
3337 |
] ifTrue: [ |
|
3338 |
self askForSectionModification. |
|
3339 |
(modified or: [self painter isModified or: [self helpTool modified]]) |
|
3340 |
ifTrue: |
|
3341 |
[ |
|
3342 |
((YesNoBox title:'Window Spec was modified!!') |
|
3343 |
noText:'Cancel'; |
|
3344 |
yesText:'Save it and start'; |
|
3345 |
showAtPointer; |
|
3346 |
accepted) ifFalse: [^nil]. |
|
3347 |
self doSave isNil ifTrue: [^nil] |
|
446 | 3348 |
] |
3349 |
]. |
|
3350 |
||
765 | 3351 |
((application := (self resolveName:specClass) new) respondsTo:#openInterface:) ifFalse:[ |
446 | 3352 |
^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. |
3353 |
]. |
|
765 | 3354 |
application openInterface:specSelector |
446 | 3355 |
! |
3356 |
||
222 | 3357 |
doStepDown |
765 | 3358 |
"moves the selected widget one step down in the hierarchy" |
3359 |
||
222 | 3360 |
treeView doStepOver:1 |
3361 |
! |
|
3362 |
||
3363 |
doStepIn |
|
765 | 3364 |
"moves the selected widget into the next widget as child" |
3365 |
||
222 | 3366 |
treeView doStepIn |
3367 |
! |
|
3368 |
||
3369 |
doStepOut |
|
765 | 3370 |
"moves the selected widget out of the parent widget" |
3371 |
||
222 | 3372 |
treeView doStepOut |
3373 |
! |
|
3374 |
||
3375 |
doStepUp |
|
765 | 3376 |
"moves the selected widget one step up in the hierarchy" |
3377 |
||
222 | 3378 |
treeView doStepOver:-1 |
743 | 3379 |
! |
3380 |
||
3381 |
doWindowSpec |
|
765 | 3382 |
"opens a code view with the contents of the window spec" |
3383 |
||
3384 |
self askForSectionModification. |
|
3385 |
||
3386 |
CodeView |
|
3387 |
openWith: self painter generateWindowSpecMethodSource |
|
3388 |
title: 'Window Spec' |
|
743 | 3389 |
|
222 | 3390 |
! ! |
3391 |
||
3392 |
!UIPainter::TreeView class methodsFor:'documentation'! |
|
3393 |
||
3394 |
documentation |
|
3395 |
" |
|
3396 |
selection in tree view; only used by the UIPainter |
|
3397 |
||
3398 |
[see also:] |
|
3399 |
SelectionInTreeView |
|
3400 |
SelectionInTree |
|
3401 |
TreeItem |
|
3402 |
UIPainter |
|
3403 |
||
3404 |
[author:] |
|
3405 |
Claus Atzkern |
|
3406 |
" |
|
3407 |
||
3408 |
||
3409 |
! ! |
|
3410 |
||
3411 |
!UIPainter::TreeView methodsFor:'accessing'! |
|
3412 |
||
3413 |
canvas |
|
765 | 3414 |
"returns the canvas (UIPainterView)" |
3415 |
||
3416 |
^ model root contents view |
|
222 | 3417 |
|
3418 |
||
3419 |
! |
|
3420 |
||
3421 |
canvas:aCanvas |
|
765 | 3422 |
"install canvas (UIPainterView)" |
3423 |
||
222 | 3424 |
|props| |
3425 |
||
3426 |
props := UIPainterView::ViewProperty new. |
|
3427 |
props view:aCanvas. |
|
713 | 3428 |
model root:(TreeItem name: UIPainter defaultNameOfCanvas asBoldText contents:props). |
222 | 3429 |
model root expand. |
3430 |
self enableChannel:(aCanvas enableChannel). |
|
3431 |
||
281 | 3432 |
! |
3433 |
||
3434 |
canvasSpec |
|
765 | 3435 |
"returns spec assigned to canvas" |
3436 |
||
281 | 3437 |
|spec| |
3438 |
||
3439 |
spec := WindowSpec new. |
|
311 | 3440 |
|
281 | 3441 |
spec fromView:(self canvas topView) callBack:nil. |
311 | 3442 |
windowSpec notNil ifTrue:[ |
362 | 3443 |
spec copyValuesFromSpec:windowSpec |
311 | 3444 |
]. |
362 | 3445 |
^ spec |
3446 |
||
282 | 3447 |
! |
3448 |
||
311 | 3449 |
canvasSpec:aSpec |
765 | 3450 |
"update canvas from spec" |
3451 |
||
311 | 3452 |
|spec| |
3453 |
||
3454 |
self setAttributesFromWindowSpec:aSpec. |
|
3455 |
spec := aSpec copy. |
|
3456 |
spec menu:nil. |
|
3457 |
spec flags:nil. |
|
3458 |
||
394 | 3459 |
spec setAttributesIn:(self canvas topView) with:(UIBuilder new isEditing:true). |
311 | 3460 |
! |
3461 |
||
282 | 3462 |
itemOfView:aView |
765 | 3463 |
"returns item assigned to view or nil" |
3464 |
||
282 | 3465 |
aView notNil ifTrue:[ |
3466 |
self allItemsDo:[:anItem| |
|
3467 |
(anItem contents view == aView) ifTrue:[^ anItem] |
|
3468 |
] |
|
3469 |
]. |
|
765 | 3470 |
^ nil |
282 | 3471 |
|
3472 |
||
755 | 3473 |
! |
3474 |
||
3475 |
lastDrawnMaster |
|
765 | 3476 |
"returns the lastDrawnMaster" |
3477 |
||
3478 |
^ lastDrawnMaster |
|
755 | 3479 |
|
3480 |
||
222 | 3481 |
! ! |
3482 |
||
3483 |
!UIPainter::TreeView methodsFor:'accessing property'! |
|
3484 |
||
3485 |
propertiesDo:aOneArgBlock |
|
765 | 3486 |
"evaluates the argument a block on each property" |
3487 |
||
222 | 3488 |
self allItemsDo:[:anItem| aOneArgBlock value:(anItem contents)] |
3489 |
||
3490 |
||
3491 |
! |
|
3492 |
||
3493 |
propertyDetect:aOneArgBlock |
|
765 | 3494 |
"evaluates the block on each property" |
3495 |
||
222 | 3496 |
self allItemsDo:[:anItem| |
3497 |
(aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents] |
|
3498 |
]. |
|
765 | 3499 |
^ nil |
222 | 3500 |
|
3501 |
! |
|
3502 |
||
3503 |
propertySelected |
|
3504 |
"returns current selected property or nil in case of multi selection |
|
765 | 3505 |
or empty selection " |
3506 |
||
222 | 3507 |
|idx| |
3508 |
||
3509 |
selection size == 1 ifTrue:[ |
|
3510 |
(idx := selection first) ~~ 1 ifTrue:[ "canvas: not yet supported" |
|
3511 |
^ (listOfNodes at:idx) contents |
|
3512 |
] |
|
3513 |
]. |
|
765 | 3514 |
^ nil |
222 | 3515 |
|
3516 |
! ! |
|
3517 |
||
3518 |
!UIPainter::TreeView methodsFor:'adding & removing'! |
|
3519 |
||
3520 |
addProperty:aProperty |
|
765 | 3521 |
"adds a new item" |
3522 |
||
533 | 3523 |
|parent| |
295 | 3524 |
|
3525 |
parent := self detectItemRespondsToView:(aProperty view superView). |
|
3526 |
||
3527 |
parent notNil ifTrue:[ |
|
656 | 3528 |
model add:(TreeItem new contents:aProperty) below:parent |
295 | 3529 |
] |
222 | 3530 |
|
3531 |
! |
|
3532 |
||
3533 |
removeAll |
|
765 | 3534 |
"removes all items other than canvas" |
3535 |
||
222 | 3536 |
lastDrawnMaster := nil. |
311 | 3537 |
windowSpec := nil. |
222 | 3538 |
|
3539 |
self canvas subViews copy do:[:aView| |
|
3540 |
(aView isKindOf:InputView) ifFalse:[aView destroy] |
|
3541 |
]. |
|
713 | 3542 |
model root name: UIPainter defaultNameOfCanvas asBoldText. |
774 | 3543 |
model removeAllOtherThanRoot. |
222 | 3544 |
|
3545 |
! |
|
3546 |
||
3547 |
removeView:aView |
|
765 | 3548 |
"removes a view" |
3549 |
||
282 | 3550 |
|item prnt| |
3551 |
||
3552 |
((item := self itemOfView:aView) notNil and:[(prnt := item parent) notNil]) ifTrue:[ |
|
222 | 3553 |
aView destroy. |
282 | 3554 |
prnt contents view sizeChanged:nil. |
222 | 3555 |
model remove:item |
3556 |
] |
|
3557 |
||
3558 |
||
3559 |
! ! |
|
3560 |
||
311 | 3561 |
!UIPainter::TreeView methodsFor:'building'! |
3562 |
||
3563 |
generateFullSpecForComponents:aSpecArray |
|
765 | 3564 |
"generates a full spec from aSpecArray" |
3565 |
||
351 | 3566 |
|fullSpec winSpec| |
311 | 3567 |
|
3568 |
fullSpec := FullSpec new. |
|
3569 |
||
3570 |
fullSpec fromBuilder:(self canvas topView) |
|
3571 |
components:(SpecCollection new collection:aSpecArray). |
|
3572 |
||
3573 |
windowSpec notNil ifTrue:[ |
|
351 | 3574 |
winSpec := fullSpec window. |
713 | 3575 |
winSpec copyValuesFromSpec:windowSpec. |
3576 |
winSpec name: winSpec label. |
|
311 | 3577 |
]. |
3578 |
^ fullSpec literalArrayEncoding. |
|
351 | 3579 |
|
311 | 3580 |
! |
3581 |
||
3582 |
setAttributesFromWindowSpec:aWindowSpec |
|
765 | 3583 |
"sets a window spec from aWindowSpec" |
3584 |
||
362 | 3585 |
windowSpec := WindowSpec new copyValuesFromSpec:aWindowSpec. |
851
2f65d898243e
name space for subspecs loading + app label update bug fixed
tz
parents:
838
diff
changeset
|
3586 |
self canvas topView name: aWindowSpec name. |
2f65d898243e
name space for subspecs loading + app label update bug fixed
tz
parents:
838
diff
changeset
|
3587 |
self canvasNameChanged: aWindowSpec name. |
785 | 3588 |
self application treeSelection. |
311 | 3589 |
! ! |
3590 |
||
222 | 3591 |
!UIPainter::TreeView methodsFor:'canvas selection'! |
3592 |
||
3593 |
cvsSelection:aSelection |
|
3594 |
"canvas changed its selection |
|
3595 |
" |
|
805 | 3596 |
|sel list size| |
3597 |
||
3598 |
((sel := aSelection) isNil or:[sel isCollection]) ifFalse:[ |
|
3599 |
sel := Array with:sel |
|
774 | 3600 |
]. |
805 | 3601 |
|
3602 |
(size := sel size) ~~ 0 ifTrue:[ |
|
3603 |
list := OrderedCollection new:size. |
|
3604 |
||
3605 |
sel do:[:aView||item| |
|
3606 |
(item := self itemOfView:aView) notNil ifTrue:[ |
|
3607 |
list add:item. |
|
3608 |
model doMakeVisible:item. |
|
3609 |
] |
|
3610 |
]. |
|
3611 |
sel := list collect:[:anItem| self indexOfNode:anItem ]. |
|
774 | 3612 |
]. |
222 | 3613 |
self cvsEventsDisabledDo:[ self selection:sel ]. |
3614 |
||
3615 |
||
3616 |
||
3617 |
||
3618 |
! |
|
3619 |
||
3620 |
cvsSelectionAdd:aView |
|
3621 |
"canvas adds a view to current selection |
|
3622 |
" |
|
774 | 3623 |
|item index oldSel| |
222 | 3624 |
|
3625 |
item := self itemOfView:aView. |
|
3626 |
||
3627 |
item notNil ifTrue:[ |
|
774 | 3628 |
model doMakeVisible:item. |
3629 |
||
3630 |
(index := self indexOfNode:item) ~~ 0 ifTrue:[ |
|
3631 |
oldSel := selection copy. |
|
3632 |
self addToSelection:index. |
|
3633 |
self selectionChangedFrom:oldSel |
|
3634 |
] |
|
3635 |
] |
|
222 | 3636 |
|
3637 |
||
3638 |
||
3639 |
! |
|
3640 |
||
3641 |
cvsSelectionRemove:aView |
|
3642 |
"canvas removes a view from current selection |
|
3643 |
" |
|
774 | 3644 |
|item index oldSel| |
3645 |
||
3646 |
( (item := self itemOfView:aView) notNil |
|
3647 |
and:[(index := self indexOfNode:item) ~~ 0 |
|
3648 |
and:[self isInSelection:index]] |
|
3649 |
) ifTrue:[ |
|
222 | 3650 |
oldSel := selection copy. |
774 | 3651 |
self removeFromSelection:index. |
3652 |
self selectionChangedFrom:oldSel. |
|
3653 |
]. |
|
222 | 3654 |
|
3655 |
||
3656 |
! ! |
|
3657 |
||
3658 |
!UIPainter::TreeView methodsFor:'change & update'! |
|
3659 |
||
281 | 3660 |
canvasNameChanged:aName |
3661 |
"called if identification name assigned to window (canvas) changed |
|
3662 |
" |
|
3663 |
|name node| |
|
3664 |
||
3665 |
node := listOfNodes at:1. |
|
3666 |
||
3667 |
( aName size ~~ 0 |
|
3668 |
and:[(name := aName string withoutSeparators) size ~~ 0 |
|
3669 |
and:[(self propertyDetect:[:p| p name = name]) isNil |
|
3670 |
and:[node name ~= name]]] |
|
3671 |
) ifTrue:[ |
|
713 | 3672 |
node name: name asBoldText. |
785 | 3673 |
node changed. |
281 | 3674 |
]. |
3675 |
! |
|
3676 |
||
222 | 3677 |
layoutChanged |
3678 |
"layout of any component changed; in case of single selection, the |
|
3679 |
application will be informed to update its layout |
|
3680 |
" |
|
3681 |
selection size == 1 ifTrue:[ |
|
3682 |
self application layoutChanged |
|
3683 |
] |
|
3684 |
||
3685 |
||
3686 |
! |
|
3687 |
||
3688 |
propertyChanged:aProperty |
|
3689 |
"property of view derived from argument a property changed |
|
3690 |
" |
|
3691 |
|item idx end| |
|
3692 |
||
3693 |
item := self itemOfView:(aProperty view). |
|
3694 |
||
3695 |
item notNil ifTrue:[ |
|
3696 |
item contents:aProperty. |
|
3697 |
||
3698 |
item name = aProperty name ifFalse:[ |
|
3699 |
idx := self firstLineShown. |
|
3700 |
||
3701 |
(end := self lastLineShown) > listOfNodes size ifTrue:[ |
|
3702 |
end := listOfNodes size |
|
446 | 3703 |
]. |
785 | 3704 |
item changed. |
222 | 3705 |
|
3706 |
[idx <= end] whileTrue:[ |
|
3707 |
(listOfNodes at:idx) == item ifTrue:[ |
|
3708 |
self redrawLine:idx. "/ is visible; redraw line |
|
3709 |
end := 0 |
|
3710 |
] ifFalse:[ |
|
3711 |
idx := idx + 1 |
|
3712 |
] |
|
3713 |
] |
|
3714 |
]. |
|
3715 |
||
3716 |
self selectedNode == item ifTrue:[ "/ inform application |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3717 |
self application propertyChanged |
222 | 3718 |
] |
3719 |
]. |
|
3720 |
||
3721 |
||
3722 |
! ! |
|
3723 |
||
3724 |
!UIPainter::TreeView methodsFor:'drag & drop'! |
|
3725 |
||
3726 |
canDrop:anObjectOrCollection |
|
765 | 3727 |
"can drop ? delegate to canvas" |
3728 |
||
3729 |
^ self canvas canDrop:anObjectOrCollection |
|
222 | 3730 |
! |
3731 |
||
3732 |
drop:anObjectOrCollection at:aPoint |
|
765 | 3733 |
"drop objects ? delegate to canvas" |
3734 |
||
222 | 3735 |
self canvas drop:anObjectOrCollection at:aPoint |
3736 |
! ! |
|
3737 |
||
282 | 3738 |
!UIPainter::TreeView methodsFor:'enumerating'! |
3739 |
||
3740 |
allItemsDo:aOneArgBlock |
|
765 | 3741 |
"evaluates the argument a block on each item other than the canvas" |
3742 |
||
282 | 3743 |
model root allChildrenDo:aOneArgBlock |
3744 |
||
3745 |
||
3746 |
! ! |
|
3747 |
||
222 | 3748 |
!UIPainter::TreeView methodsFor:'event processing'! |
3749 |
||
3750 |
cvsEventsDisabledDo:aBlock |
|
765 | 3751 |
"evaluates the block without raising selection changed notifications |
3752 |
to canvas" |
|
3753 |
||
222 | 3754 |
|restoreCvsEvents| |
3755 |
||
3756 |
restoreCvsEvents := cvsEventsDisabled. |
|
3757 |
cvsEventsDisabled := true. |
|
3758 |
aBlock value. |
|
3759 |
cvsEventsDisabled := restoreCvsEvents. |
|
3760 |
||
3761 |
||
3762 |
! |
|
3763 |
||
3764 |
doubleClicked |
|
765 | 3765 |
"disables collapsing of the root item" |
3766 |
||
222 | 3767 |
self selectedNode == model root ifFalse:[ |
3768 |
super doubleClicked |
|
3769 |
] |
|
3770 |
||
3771 |
||
805 | 3772 |
! |
3773 |
||
852 | 3774 |
redrawLabelAt:x y:yTop index:anIndex |
805 | 3775 |
"draws a tiny rectangle for indicating the master node (first selected node)" |
3776 |
||
3777 |
|dX| |
|
3778 |
||
852 | 3779 |
super redrawLabelAt:x y:yTop index:anIndex. |
805 | 3780 |
|
3781 |
((selection size > 1) and: [selection first == anIndex]) ifTrue:[ |
|
3782 |
dX := textInset - 1. |
|
807 | 3783 |
self paint:(Color red). "/ self application painter handleMasterColor. |
852 | 3784 |
self fillRectangleX:(x - dX - 2) |
3785 |
y:yTop + ((fontHeight - dX) // 2) |
|
805 | 3786 |
width:dX |
3787 |
height:dX |
|
3788 |
] |
|
222 | 3789 |
! ! |
3790 |
||
3791 |
!UIPainter::TreeView methodsFor:'initialization'! |
|
3792 |
||
3793 |
initialize |
|
765 | 3794 |
"initialize the tree view; multiple select and tree item actions" |
3795 |
||
222 | 3796 |
super initialize. |
564 | 3797 |
|
222 | 3798 |
self multipleSelectOk:true. |
368 | 3799 |
cvsEventsDisabled := false. |
440 | 3800 |
self showDirectoryIndicator: true. |
656 | 3801 |
self showDirectoryIndicatorForRoot: false. |
3802 |
||
3803 |
self model iconAction: |
|
3804 |
[:aNode| |
|
755 | 3805 |
|specClass| |
656 | 3806 |
(specClass := aNode contents spec) isNil |
778 | 3807 |
ifTrue: [WindowSpec icon] |
3808 |
ifFalse:[specClass class icon] |
|
656 | 3809 |
]. |
3810 |
||
713 | 3811 |
self model labelAction: |
3812 |
[:aNode| |
|
3813 |
|spec| |
|
3814 |
(spec := aNode contents spec) notNil |
|
805 | 3815 |
ifTrue: [self nameForSpecInList:spec] |
3816 |
ifFalse:[aNode name] |
|
713 | 3817 |
] |
222 | 3818 |
! ! |
3819 |
||
3820 |
!UIPainter::TreeView methodsFor:'private'! |
|
3821 |
||
713 | 3822 |
nameForSpecInList:aSpec |
765 | 3823 |
"returns the tree item label for aSpec" |
3824 |
||
713 | 3825 |
^ aSpec name asBoldText, ': [', aSpec viewClass name , ']' |
222 | 3826 |
! |
3827 |
||
3828 |
selectionChangedFrom:oldSelection |
|
3829 |
"selection has changed. update master selection and raise notification |
|
3830 |
to canvas in case of enabled cvs events |
|
3831 |
" |
|
282 | 3832 |
|sel size| |
222 | 3833 |
|
3834 |
super selectionChangedFrom:oldSelection. |
|
282 | 3835 |
size := selection size. |
222 | 3836 |
|
3837 |
cvsEventsDisabled ifFalse:[ |
|
282 | 3838 |
(size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[ |
3839 |
sel := OrderedCollection new. |
|
3840 |
||
3841 |
selection do:[:i| |
|
3842 |
i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view] |
|
3843 |
] |
|
222 | 3844 |
]. |
282 | 3845 |
self canvas updateSelectionFromModel:sel |
778 | 3846 |
]. |
713 | 3847 |
size = 1 ifTrue:[ |
778 | 3848 |
oldSelection size > 1 ifTrue: [ |
3849 |
(listOfNodes at:lastDrawnMaster) retrieveLabel. |
|
3850 |
self redrawLine: lastDrawnMaster. |
|
3851 |
lastDrawnMaster := selection first |
|
3852 |
] |
|
713 | 3853 |
]. |
3854 |
size > 1 ifTrue:[ |
|
3855 |
selection first ~~ lastDrawnMaster ifTrue: [ |
|
778 | 3856 |
(listOfNodes at:selection first) retrieveLabel. |
3857 |
lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel]. |
|
3858 |
self redrawLine: lastDrawnMaster. |
|
3859 |
self redrawLine: (lastDrawnMaster := selection first) |
|
3860 |
] |
|
785 | 3861 |
] |
713 | 3862 |
ifFalse: [ |
3863 |
lastDrawnMaster := nil |
|
785 | 3864 |
] |
222 | 3865 |
! ! |
3866 |
||
3867 |
!UIPainter::TreeView methodsFor:'queries'! |
|
3868 |
||
565 | 3869 |
canChangeOrderInContainer |
3870 |
"returns true if any selection exists and all widgets in the selection |
|
765 | 3871 |
can change their layout through to a move or align operation" |
565 | 3872 |
|
889 | 3873 |
^(selection size == 1) and: |
3874 |
[(selection at: 1) ~~ 1 and: |
|
3875 |
[self selectedNode parent children size > 1]] |
|
3876 |
||
3877 |
||
565 | 3878 |
! |
3879 |
||
282 | 3880 |
canMoveOrAlignSelection |
3881 |
"returns true if any selection exists and all widgets in the selection |
|
765 | 3882 |
can change their layout through to a move or align operation" |
282 | 3883 |
|
3884 |
selection size == 0 ifTrue:[ |
|
3885 |
^ false |
|
3886 |
]. |
|
3887 |
||
3888 |
selection do:[:i| |
|
3889 |
i == 1 ifTrue:[^ false]. |
|
3890 |
||
765 | 3891 |
(self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[ |
282 | 3892 |
^ false |
3893 |
] |
|
3894 |
]. |
|
3895 |
^ true |
|
3896 |
! |
|
3897 |
||
3898 |
canMoveSelectionIntoContainer |
|
765 | 3899 |
"returns true in case that one widget is selected and can change its container |
3900 |
widget to the next element in the list which will have the same container" |
|
3901 |
||
222 | 3902 |
|item prnt| |
3903 |
||
3904 |
( (item := self selectedNode) isNil |
|
3905 |
or:[(prnt := item parent) isNil |
|
3906 |
or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil |
|
3907 |
or:[prnt contents spec class supportsSubComponents not]]] |
|
3908 |
) ifTrue:[ |
|
3909 |
^ false |
|
3910 |
]. |
|
765 | 3911 |
^ true |
222 | 3912 |
! |
3913 |
||
282 | 3914 |
canMoveSelectionOutOfContainer |
765 | 3915 |
"returns true in case that one widget is selected which is contained within |
3916 |
another widget" |
|
3917 |
||
222 | 3918 |
|item prnt| |
3919 |
||
3920 |
( (item := self selectedNode) isNil |
|
3921 |
or:[(prnt := item parent) isNil |
|
3922 |
or:[prnt parent isNil]] |
|
3923 |
) ifTrue:[ |
|
3924 |
^ false |
|
3925 |
]. |
|
765 | 3926 |
^ true |
222 | 3927 |
! |
3928 |
||
301 | 3929 |
canResizeSelectedWidget |
3930 |
"returns true in case of one widget selected and is contained |
|
765 | 3931 |
within a widget which allows to resize sub components" |
3932 |
||
3933 |
|selectedNode| |
|
3934 |
||
3935 |
(selectedNode := self selectedNode) notNil ifTrue:[ |
|
3936 |
(selectedNode := selectedNode parent) notNil ifTrue:[ |
|
3937 |
^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents]) |
|
301 | 3938 |
] |
3939 |
]. |
|
3940 |
^ false |
|
3941 |
! |
|
3942 |
||
282 | 3943 |
hasOneSelectionOtherThanCanvas |
765 | 3944 |
"returns true in case that one selection exists other than the canvas" |
3945 |
||
3946 |
^ selection size == 1 and:[selection first ~~ 1] |
|
281 | 3947 |
! |
3948 |
||
3949 |
isCanvasSelected |
|
3950 |
"returns true in case of a single selection and the |
|
765 | 3951 |
selection is the canvas (index 1)" |
3952 |
||
3953 |
^ selection size == 1 and:[self isInSelection:1] |
|
222 | 3954 |
! ! |
3955 |
||
765 | 3956 |
!UIPainter::TreeView methodsFor:'searching'! |
282 | 3957 |
|
3958 |
detectItemRespondsToView:aView |
|
765 | 3959 |
"detects the item responding to the view. The item of the view or the first |
282 | 3960 |
subview providing the item is returned. If no property is detected nil is |
765 | 3961 |
returned" |
3962 |
||
282 | 3963 |
|view item| |
3964 |
||
3965 |
(view := aView) notNil ifTrue:[ |
|
3966 |
[(item := self itemOfView:view) isNil] whileTrue:[ |
|
3967 |
(view := view superView) isNil ifTrue:[^ listOfNodes at:1] |
|
3968 |
]. |
|
3969 |
]. |
|
3970 |
^ item |
|
3971 |
||
3972 |
! ! |
|
3973 |
||
222 | 3974 |
!UIPainter::TreeView methodsFor:'user interactions'! |
3975 |
||
774 | 3976 |
doChangeHierarchyOf:anItem |
3977 |
||
3978 |
|canvas| |
|
3979 |
||
3980 |
anItem isNil ifTrue:[ |
|
3981 |
^ self |
|
3982 |
]. |
|
3983 |
self setSelection:nil. |
|
3984 |
||
3985 |
canvas := self canvas. |
|
3986 |
canvas deleteSelection. |
|
3987 |
canvas setSelection:(anItem contents view) withRedraw:false. |
|
3988 |
canvas pasteWithLayout. |
|
3989 |
! |
|
3990 |
||
222 | 3991 |
doStepIn |
774 | 3992 |
|item prnt| |
222 | 3993 |
|
3994 |
( (item := self selectedNode) isNil |
|
3995 |
or:[(prnt := item parent) isNil |
|
3996 |
or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil |
|
3997 |
or:[prnt contents spec class supportsSubComponents not]]] |
|
3998 |
) ifFalse:[ |
|
774 | 3999 |
self doChangeHierarchyOf:prnt |
222 | 4000 |
] |
4001 |
! |
|
4002 |
||
4003 |
doStepOut |
|
774 | 4004 |
|item| |
4005 |
||
4006 |
((item := self selectedNode) notNil and:[(item := item parent) notNil]) ifTrue:[ |
|
4007 |
self doChangeHierarchyOf:(item parent) |
|
222 | 4008 |
]. |
4009 |
! |
|
4010 |
||
4011 |
doStepOver:anIndex |
|
765 | 4012 |
"moves child 'anOffset' forward or backward in list of children" |
4013 |
||
282 | 4014 |
|item idx size prnt spVw view canvas| |
222 | 4015 |
|
4016 |
( (item := self selectedNode) isNil |
|
4017 |
or:[(prnt := item parent) isNil |
|
282 | 4018 |
or:[(size := prnt children size) < 2 |
4019 |
or:[(idx := prnt indexOfChild:item) == 0]]] |
|
4020 |
) ifTrue:[ |
|
4021 |
^ self |
|
4022 |
]. |
|
4023 |
idx := idx + anIndex. |
|
4024 |
||
4025 |
idx < 1 ifTrue:[idx := size] |
|
4026 |
ifFalse:[idx > size ifTrue:[idx := 1]]. |
|
4027 |
||
774 | 4028 |
self setSelection:nil. |
4029 |
model remove:item. |
|
282 | 4030 |
model add:item beforeIndex:idx below:prnt. |
774 | 4031 |
|
282 | 4032 |
idx := prnt indexOfChild:item. |
4033 |
view := item contents view. |
|
4034 |
spVw := prnt contents view. |
|
4035 |
canvas := self canvas. |
|
4036 |
||
4037 |
canvas hideSelection. |
|
4038 |
||
4039 |
"/ input view might by contained in sequence |
|
4040 |
((size := canvas findInputViewIn:spVw) ~~ 0 and:[idx >= size]) ifTrue:[ |
|
4041 |
idx := idx + 1 |
|
4042 |
]. |
|
4043 |
spVw changeSequenceOrderFor:view to:idx. |
|
4044 |
||
4045 |
spVw specClass isLayoutContainer ifFalse:[ |
|
4046 |
spVw subViews do:[:v| v raise ]. |
|
4047 |
canvas inputView raise |
|
4048 |
]. |
|
4049 |
canvas showSelection. |
|
4050 |
self selectNode:item. |
|
222 | 4051 |
! ! |
4052 |
||
60 | 4053 |
!UIPainter class methodsFor:'documentation'! |
4054 |
||
4055 |
version |
|
4056 |
^ '$Header$' |
|
4057 |
! ! |