author | Claus Gittinger <cg@exept.de> |
Wed, 05 Dec 2007 19:00:01 +0100 | |
changeset 2208 | 4e1c31df6014 |
parent 2206 | 1a7921b6c104 |
child 2210 | 0a2c19976d82 |
permissions | -rw-r--r-- |
156 | 1 |
" |
765 | 2 |
COPYRIGHT (c) 1995-1998 by eXept Software AG |
2208 | 3 |
All Rights Reserved |
156 | 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 |
" |
|
2023 | 12 |
"{ Package: 'stx:libtool2' }" |
1391 | 13 |
|
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
14 |
ResourceSpecEditor subclass:#UIPainter |
2208 | 15 |
instanceVariableNames:'specSuperclassName treeView selectionPanel specTool layoutTool |
16 |
helpTool painterView painter' |
|
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-UIPainter' |
|
60 | 20 |
! |
21 |
||
222 | 22 |
SelectionInTreeView subclass:#TreeView |
2208 | 23 |
instanceVariableNames:'lastDrawnMaster cvsEventsDisabled windowSpec windowSpecClass' |
24 |
classVariableNames:'' |
|
25 |
poolDictionaries:'' |
|
26 |
privateIn:UIPainter |
|
222 | 27 |
! |
28 |
||
60 | 29 |
!UIPainter class methodsFor:'documentation'! |
30 |
||
156 | 31 |
copyright |
32 |
" |
|
765 | 33 |
COPYRIGHT (c) 1995-1998 by eXept Software AG |
2208 | 34 |
All Rights Reserved |
156 | 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:] |
|
2208 | 56 |
UIPainter open |
127 | 57 |
|
156 | 58 |
[author:] |
2208 | 59 |
Claus Gittinger, eXept Software AG |
60 |
Claus Atzkern, eXept Software AG |
|
61 |
Thomas Zwick, eXept Software AG |
|
156 | 62 |
|
127 | 63 |
[see also:] |
2208 | 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 |
1976 | 74 |
"open a GUI Painter on aClass and (windowSpec) aSelector" |
75 |
||
76 |
^ self new openOnClass:aClass theNonMetaclass 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 |
||
2208 | 94 |
^ 'NewApplication' |
713 | 95 |
! ! |
96 |
||
193 | 97 |
!UIPainter class methodsFor:'help specs'! |
98 |
||
1545 | 99 |
flyByHelpSpec |
100 |
<resource: #help> |
|
101 |
||
102 |
^super flyByHelpSpec addPairsFrom:#( |
|
103 |
||
104 |
#fileSave |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
105 |
'Save Spec' |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
106 |
|
1545 | 107 |
|
108 |
) |
|
109 |
! |
|
110 |
||
193 | 111 |
helpSpec |
743 | 112 |
"This resource specification was automatically generated |
113 |
by the UIHelpTool of ST/X." |
|
114 |
||
115 |
"Do not manually edit this!! If it is corrupted, |
|
116 |
the UIHelpTool may not be able to read the specification." |
|
295 | 117 |
|
193 | 118 |
" |
743 | 119 |
UIHelpTool openOnClass:UIPainter |
295 | 120 |
" |
121 |
||
743 | 122 |
<resource: #help> |
123 |
||
1827 | 124 |
^ super helpSpec addPairsFrom:#( |
193 | 125 |
|
934 | 126 |
#align |
127 |
'Widget alignment functions.' |
|
128 |
||
466 | 129 |
#alignSelectionBottom |
924 | 130 |
'Aligns the selected widgets bottom edges with the bottom of the dominant widget.' |
466 | 131 |
|
132 |
#alignSelectionCenterHor |
|
924 | 133 |
'Aligns the selected widgets centers vertically with the center of the dominant widget.' |
466 | 134 |
|
135 |
#alignSelectionCenterVer |
|
924 | 136 |
'Aligns the selected widgets centers horizontally with the center of the dominant widget.' |
466 | 137 |
|
138 |
#alignSelectionLeft |
|
924 | 139 |
'Aligns the selected widgets left edges with the left edge of the dominant widget.' |
466 | 140 |
|
141 |
#alignSelectionLeftAndRight |
|
924 | 142 |
'Aligns the selected widgets left & right edges with the dominant widget.' |
466 | 143 |
|
144 |
#alignSelectionRight |
|
924 | 145 |
'Aligns the selected widgets right edges with the right edge of the dominant widget.' |
466 | 146 |
|
147 |
#alignSelectionTop |
|
934 | 148 |
'Aligns the selected widgets top edgegs with the top edge of the dominant widget.' |
466 | 149 |
|
150 |
#alignSelectionTopAndBottom |
|
924 | 151 |
'Aligns the selected widgets top and bottom edges with the dominant widget.' |
466 | 152 |
|
153 |
#centerSelectionHor |
|
924 | 154 |
'Centers the selected widgets horizontally within their containing widget.' |
466 | 155 |
|
156 |
#centerSelectionVer |
|
924 | 157 |
'Centers the selected widgets vertically within their containing widget.' |
713 | 158 |
|
159 |
#changePositionDown |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
160 |
'Moves the selected widget(s) towards the bottom.' |
713 | 161 |
|
162 |
#changePositionLeft |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
163 |
'Moves the selected widget(s) towards the left.' |
713 | 164 |
|
165 |
#changePositionRight |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
166 |
'Moves the selected widget(s) towards the right.' |
713 | 167 |
|
168 |
#changePositionUp |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
169 |
'Moves the selected widget(s) towards the top.' |
713 | 170 |
|
1827 | 171 |
#drawEdit |
172 |
'' |
|
173 |
||
174 |
#editBrowseViewClass |
|
175 |
'Opens a browser on the class of the selected widget.' |
|
176 |
||
713 | 177 |
#editDimensionCopyExtent |
924 | 178 |
'Copies the extent of the selected widget.' |
713 | 179 |
|
180 |
#editDimensionCopyLayout |
|
924 | 181 |
'Copies the layout of the selected widget.' |
713 | 182 |
|
183 |
#editDimensionDefaultExtent |
|
924 | 184 |
'Sets the selected widget(s) extent to their default.' |
713 | 185 |
|
186 |
#editDimensionDefaultHeight |
|
924 | 187 |
'Sets the selected widget(s) height to their default.' |
713 | 188 |
|
189 |
#editDimensionDefaultWidth |
|
924 | 190 |
'Sets the selected widget(s) width to their default.' |
713 | 191 |
|
192 |
#editDimensionPasteExtent |
|
924 | 193 |
'Sets the extent of the selected widget(s) to the last copied extent.' |
713 | 194 |
|
195 |
#editDimensionPasteHeight |
|
924 | 196 |
'Sets the height of the selected widget(s) to the height of the last copied layout/extent.' |
713 | 197 |
|
198 |
#editDimensionPasteLayout |
|
924 | 199 |
'Sets the layout of the selected widget(s) to the last copied layout.' |
713 | 200 |
|
201 |
#editDimensionPasteWidth |
|
924 | 202 |
'Sets the width of the selected widget(s) to the width of the last copied layout/extent.' |
713 | 203 |
|
724 | 204 |
#editInspectSpec |
205 |
'Opens an inspector on the spec of the selected widget.' |
|
206 |
||
755 | 207 |
#editInspectView |
1742 | 208 |
'Opens an inspector on the selected widget.' |
755 | 209 |
|
743 | 210 |
#editOpenSpecDocumentation |
211 |
'Opens the documentation of the selected widget.' |
|
212 |
||
1827 | 213 |
#fileBrowseAspectMethods |
214 |
'Opens a System Browser on the applications aspect methods.' |
|
215 |
||
1742 | 216 |
#fileBrowseClass |
217 |
'Open a System Browser on the applications class.' |
|
218 |
||
498 | 219 |
#fileLoad |
1032 | 220 |
'Opens a dialog to load a window specification from a classes spec method.' |
498 | 221 |
|
533 | 222 |
#fileLoadSubspec |
924 | 223 |
'Opens a dialog to load a sub specification from a classes windowSpec method.' |
533 | 224 |
|
498 | 225 |
#fileNew |
713 | 226 |
'Creates a new window spec.' |
498 | 227 |
|
228 |
#filePickAnInterface |
|
924 | 229 |
'Select a view on the screen, generate a window spec for it and edit this spec.' |
498 | 230 |
|
231 |
#fileSave |
|
924 | 232 |
'Saves the window spec in the current class (as spec method).' |
713 | 233 |
|
234 |
#fileSaveAs |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
235 |
'Opens a dialog to select class and selector for saving the window spec.' |
713 | 236 |
|
237 |
#fileShowWindowSpec |
|
238 |
'Opens a Workspace showing the current window spec.' |
|
239 |
||
240 |
#generateAspectMethods |
|
241 |
'Generates aspect methods for defined aspect selectors of the widgets.' |
|
242 |
||
243 |
#generateHookMethods |
|
244 |
'Generates startup/release methods. (#closeRequest, #postBuildWith:, #postOpenWith:)' |
|
245 |
||
755 | 246 |
#helpExamples |
935 | 247 |
'Show some examples uses of the GUI Painter.' |
755 | 248 |
|
249 |
#helpFunctions |
|
935 | 250 |
'Show the documentation on the GUI Painters menu and button functions.' |
755 | 251 |
|
252 |
#helpLayoutTool |
|
935 | 253 |
'Show the Layout Tools documentation.' |
755 | 254 |
|
255 |
#helpSelectedWidget |
|
935 | 256 |
'Show the documentation of the selected widget.' |
257 |
||
258 |
#helpTutorial |
|
259 |
'Show the GUI Painters documentation.' |
|
755 | 260 |
|
924 | 261 |
#historyMenuItem |
262 |
'Edit this windowSpec.' |
|
263 |
||
713 | 264 |
#moveWidgetDown |
265 |
'Moves the selected widget one step down.' |
|
266 |
||
267 |
#moveWidgetInto |
|
268 |
'Moves the selected widget into next widget as child widget.' |
|
269 |
||
270 |
#moveWidgetOut |
|
271 |
'Moves the selected widget out of its parent widget.' |
|
272 |
||
273 |
#moveWidgetUp |
|
274 |
'Moves the selected widget one step up.' |
|
287 | 275 |
|
466 | 276 |
#pasteBuffer |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
277 |
'Pastes the widgets of the clipboard at the current mouse position.' |
466 | 278 |
|
279 |
#pasteWithLayout |
|
713 | 280 |
'Pastes the widgets of the clipboard without a changing of their layouts.' |
281 |
||
1827 | 282 |
#referToCOnfigDatabase |
283 |
'' |
|
284 |
||
285 |
#settingsAspectsAsInstances |
|
286 |
'Generate aspects as instance variables (or bindings, if off).' |
|
287 |
||
713 | 288 |
#settingsCanvas |
289 |
'Shows or hides the canvas window.' |
|
290 |
||
291 |
#settingsGallery |
|
292 |
'Shows or hides the gallery window.' |
|
293 |
||
294 |
#settingsGridManager |
|
1032 | 295 |
'Opens a dialog to toggle grid display or to change the grids spacing.' |
713 | 296 |
|
297 |
#settingsRedefineAspectMethods |
|
924 | 298 |
'Toggles the permission to overwrite existing aspect methods.' |
299 |
||
743 | 300 |
#settingsTranscriptHelp |
924 | 301 |
'Toggles display of help texts (after opening a new GUI Painter).' |
743 | 302 |
|
713 | 303 |
#settingsUndoManager |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
304 |
'Opens a dialog to undo modifications.' |
287 | 305 |
|
306 |
#spreadSelectionHor |
|
1862 | 307 |
'Sets the horizontal spaces between the selected widgets to the same value.' |
287 | 308 |
|
466 | 309 |
#spreadSelectionVer |
1862 | 310 |
'Sets the vertical spaces between the selected widgets to the same value.' |
713 | 311 |
|
312 |
#testGeometryTestMode |
|
924 | 313 |
'Toggles geometry test mode (to define ratios of variable panels and top-window dimension).' |
498 | 314 |
|
315 |
#testStartApplication |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
316 |
'Starts the application with the current window spec.' |
194 | 317 |
|
193 | 318 |
) |
319 |
! ! |
|
320 |
||
297 | 321 |
!UIPainter class methodsFor:'helpers'! |
322 |
||
368 | 323 |
convertString:aString maxLineSize:maxCharactersPerLine skipLineFeed:skipLineFeed |
297 | 324 |
"converts a string to a string collection with maximum characters |
325 |
per line |
|
326 |
" |
|
327 |
|stream |
|
2208 | 328 |
max "{ Class:SmallInteger }" |
329 |
size "{ Class:SmallInteger }" |
|
330 |
start "{ Class:SmallInteger }" |
|
331 |
stop "{ Class:SmallInteger }" |
|
332 |
cpySz "{ Class:SmallInteger }" |
|
333 |
lnSz "{ Class:SmallInteger }" |
|
334 |
atBeginOfLine| |
|
297 | 335 |
|
336 |
maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1] |
|
2208 | 337 |
ifTrue:[max := 20]. |
297 | 338 |
|
339 |
(size := aString size) <= max ifTrue:[ |
|
2208 | 340 |
^ aString |
297 | 341 |
]. |
342 |
start := 1. |
|
343 |
lnSz := 0. |
|
344 |
stream := (String new:size) writeStream. |
|
345 |
||
542 | 346 |
atBeginOfLine := true. |
347 |
||
297 | 348 |
[start <= size] whileTrue:[ |
2208 | 349 |
(start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ |
350 |
^ stream contents |
|
351 |
]. |
|
352 |
(aString at:start) == $\ ifTrue:[ |
|
353 |
skipLineFeed ifFalse:[ |
|
354 |
stream nextPut:$\ |
|
355 |
]. |
|
356 |
start := start + 1. |
|
357 |
stream cr. |
|
358 |
start := start + 1. |
|
359 |
lnSz := 0. |
|
360 |
] ifFalse:[ |
|
361 |
(stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ |
|
362 |
stop := size + 1 |
|
363 |
]. |
|
364 |
(aString at:(stop - 1)) == $\ ifTrue:[ |
|
365 |
stop := stop - 1 |
|
366 |
]. |
|
367 |
cpySz := stop - start. |
|
368 |
||
369 |
lnSz == 0 ifFalse:[ |
|
370 |
(lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz. atBeginOfLine := true. ] |
|
371 |
ifFalse:[stream space. lnSz := lnSz + 1] |
|
372 |
] ifTrue:[ |
|
373 |
lnSz := cpySz |
|
374 |
]. |
|
375 |
stream nextPutAll:aString startingAt:start to:(stop - 1). |
|
376 |
start := stop. |
|
377 |
] |
|
297 | 378 |
]. |
379 |
^ stream contents |
|
542 | 380 |
|
381 |
"Modified: / 1.2.1998 / 14:42:56 / cg" |
|
297 | 382 |
! ! |
383 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
384 |
!UIPainter class methodsFor:'image specs'! |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
385 |
|
1883 | 386 |
arrowDown |
387 |
"This resource specification was automatically generated |
|
388 |
by the ImageEditor of ST/X." |
|
389 |
||
390 |
"Do not manually edit this!! If it is corrupted, |
|
391 |
the ImageEditor may not be able to read the specification." |
|
392 |
||
393 |
" |
|
394 |
self arrowDown inspect |
|
395 |
ImageEditor openOnClass:self andSelector:#arrowDown |
|
396 |
Icon flushCachedIcons |
|
397 |
" |
|
398 |
||
399 |
<resource: #image> |
|
400 |
||
401 |
^Icon |
|
402 |
constantNamed:#'UIPainter class arrowDown' |
|
403 |
ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O? ?>C@XNC <^C;8O? ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
404 |
@@@@@@@@@@@? A<@C @D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
405 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
406 |
! |
|
407 |
||
408 |
arrowLeft |
|
409 |
"This resource specification was automatically generated |
|
410 |
by the ImageEditor of ST/X." |
|
411 |
||
412 |
"Do not manually edit this!! If it is corrupted, |
|
413 |
the ImageEditor may not be able to read the specification." |
|
414 |
||
415 |
" |
|
416 |
self arrowLeft inspect |
|
417 |
ImageEditor openOnClass:self andSelector:#arrowLeft |
|
418 |
Icon flushCachedIcons |
|
419 |
" |
|
420 |
||
421 |
<resource: #image> |
|
422 |
||
423 |
^Icon |
|
424 |
constantNamed:#'UIPainter class arrowLeft' |
|
425 |
ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O7 >^C18NG <^C98O7 ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@H@A @N@A8@C PF@@H@@@@@@@@a') ; yourself); yourself] |
|
426 |
! |
|
427 |
||
428 |
arrowRight |
|
429 |
"This resource specification was automatically generated |
|
430 |
by the ImageEditor of ST/X." |
|
431 |
||
432 |
"Do not manually edit this!! If it is corrupted, |
|
433 |
the ImageEditor may not be able to read the specification." |
|
434 |
||
435 |
" |
|
436 |
self arrowRight inspect |
|
437 |
ImageEditor openOnClass:self andSelector:#arrowRight |
|
438 |
Icon flushCachedIcons |
|
439 |
" |
|
440 |
||
441 |
<resource: #image> |
|
442 |
||
443 |
^Icon |
|
444 |
constantNamed:#'UIPainter class arrowRight' |
|
445 |
ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O_ <>C18OC <^C38O_ ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@ @C@@NA@<@C @L@@ @@@@@@@@a') ; yourself); yourself] |
|
446 |
! |
|
447 |
||
448 |
arrowUp |
|
449 |
"This resource specification was automatically generated |
|
450 |
by the ImageEditor of ST/X." |
|
451 |
||
452 |
"Do not manually edit this!! If it is corrupted, |
|
453 |
the ImageEditor may not be able to read the specification." |
|
454 |
||
455 |
" |
|
456 |
self arrowUp inspect |
|
457 |
ImageEditor openOnClass:self andSelector:#arrowUp |
|
458 |
Icon flushCachedIcons |
|
459 |
" |
|
460 |
||
461 |
<resource: #image> |
|
462 |
||
463 |
^Icon |
|
464 |
constantNamed:#'UIPainter class arrowUp' |
|
465 |
ifAbsentPut:[(Depth1Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?>C?8O? >>C18NC 0FC?8O? ?>C?8@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A@@NG1<@O8@@@@@@@@@@AP@a') ; yourself); yourself] |
|
466 |
! |
|
467 |
||
2157 | 468 |
defaultIcon |
2175 | 469 |
<resource: #programImage> |
470 |
||
2157 | 471 |
^ ToolbarIconLibrary startUIPainterIcon |
472 |
||
473 |
"Created: / 10-02-2007 / 14:45:56 / cg" |
|
2175 | 474 |
"Modified: / 17-09-2007 / 11:36:33 / cg" |
2157 | 475 |
! |
476 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
477 |
iconAlignB |
743 | 478 |
"This resource specification was automatically generated |
479 |
by the ImageEditor of ST/X." |
|
480 |
||
778 | 481 |
"Do not manually edit this!! If it is corrupted, |
743 | 482 |
the ImageEditor may not be able to read the specification." |
483 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
484 |
" |
743 | 485 |
ImageEditor openOnClass:self andSelector:#iconAlignB |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
486 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
487 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
488 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
489 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
490 |
^Icon |
2208 | 491 |
constantNamed:#'UIPainter iconAlignB' |
492 |
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] |
|
778 | 493 |
! |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
494 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
495 |
iconAlignL |
743 | 496 |
"This resource specification was automatically generated |
497 |
by the ImageEditor of ST/X." |
|
498 |
||
778 | 499 |
"Do not manually edit this!! If it is corrupted, |
743 | 500 |
the ImageEditor may not be able to read the specification." |
501 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
502 |
" |
743 | 503 |
ImageEditor openOnClass:self andSelector:#iconAlignL |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
504 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
505 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
506 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
507 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
508 |
^Icon |
2208 | 509 |
constantNamed:#'UIPainter iconAlignL' |
510 |
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] |
|
778 | 511 |
! |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
512 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
513 |
iconAlignLR |
743 | 514 |
"This resource specification was automatically generated |
515 |
by the ImageEditor of ST/X." |
|
516 |
||
785 | 517 |
"Do not manually edit this!! If it is corrupted, |
743 | 518 |
the ImageEditor may not be able to read the specification." |
519 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
520 |
" |
743 | 521 |
ImageEditor openOnClass:self andSelector:#iconAlignLR |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
522 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
523 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
524 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
525 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
526 |
^Icon |
2208 | 527 |
constantNamed:#'UIPainter iconAlignLR' |
528 |
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] |
|
785 | 529 |
! |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
530 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
531 |
iconAlignR |
743 | 532 |
"This resource specification was automatically generated |
533 |
by the ImageEditor of ST/X." |
|
534 |
||
778 | 535 |
"Do not manually edit this!! If it is corrupted, |
743 | 536 |
the ImageEditor may not be able to read the specification." |
537 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
538 |
" |
743 | 539 |
ImageEditor openOnClass:self andSelector:#iconAlignR |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
540 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
541 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
542 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
543 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
544 |
^Icon |
2208 | 545 |
constantNamed:#'UIPainter iconAlignR' |
546 |
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] |
|
1432 | 547 |
! |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
548 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
549 |
iconAlignT |
743 | 550 |
"This resource specification was automatically generated |
551 |
by the ImageEditor of ST/X." |
|
552 |
||
778 | 553 |
"Do not manually edit this!! If it is corrupted, |
743 | 554 |
the ImageEditor may not be able to read the specification." |
555 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
556 |
" |
743 | 557 |
ImageEditor openOnClass:self andSelector:#iconAlignT |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
558 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
559 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
560 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
561 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
562 |
^Icon |
2208 | 563 |
constantNamed:#'UIPainter iconAlignT' |
564 |
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] |
|
778 | 565 |
! |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
566 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
567 |
iconAlignTB |
743 | 568 |
"This resource specification was automatically generated |
569 |
by the ImageEditor of ST/X." |
|
570 |
||
778 | 571 |
"Do not manually edit this!! If it is corrupted, |
743 | 572 |
the ImageEditor may not be able to read the specification." |
573 |
||
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
574 |
" |
743 | 575 |
ImageEditor openOnClass:self andSelector:#iconAlignTB |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
576 |
" |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
577 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
578 |
<resource: #image> |
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
579 |
|
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
580 |
^Icon |
2208 | 581 |
constantNamed:#'UIPainter iconAlignTB' |
582 |
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] |
|
1862 | 583 |
! |
584 |
||
585 |
iconCenterH |
|
586 |
"This resource specification was automatically generated |
|
587 |
by the ImageEditor of ST/X." |
|
588 |
||
589 |
"Do not manually edit this!! If it is corrupted, |
|
590 |
the ImageEditor may not be able to read the specification." |
|
591 |
||
592 |
" |
|
593 |
self iconCenterH inspect |
|
594 |
ImageEditor openOnClass:self andSelector:#iconCenterH |
|
595 |
Icon flushCachedIcons |
|
596 |
" |
|
597 |
||
598 |
<resource: #image> |
|
599 |
||
600 |
^Icon |
|
601 |
constantNamed:#'UIPainter class iconCenterH' |
|
602 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
603 |
@@@@@@@@@@@@@@@@@(@J@B @@(@J@B @@(UZUR @@(?:?R @@(@J@B @@(@J@B @@(@J@B @@@@J@@@@@EUZUU@@@O?:?=@@@@@J@@@@@(@J@B @@(@J@B @ |
|
604 |
@(@J@B @@(EZUB@@@(O:=B @@(@J@B @@(@J@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:'@@@@@@@@@C@@A?>@A?>@A?>@A?>@@C@@@C@@G?? G?? G?? G??#@C@@@C@C@?<@@?<A@?<@@?<@@C@@@@@A@@@@') ; yourself); yourself] |
|
605 |
! |
|
606 |
||
607 |
iconCenterHInFrame |
|
608 |
"This resource specification was automatically generated |
|
609 |
by the ImageEditor of ST/X." |
|
610 |
||
611 |
"Do not manually edit this!! If it is corrupted, |
|
612 |
the ImageEditor may not be able to read the specification." |
|
613 |
||
614 |
" |
|
615 |
self iconCenterHInFrame inspect |
|
616 |
ImageEditor openOnClass:self andSelector:#iconCenterHInFrame |
|
617 |
Icon flushCachedIcons |
|
618 |
" |
|
619 |
||
620 |
<resource: #image> |
|
621 |
||
622 |
^Icon |
|
623 |
constantNamed:#'UIPainter class iconCenterHInFrame' |
|
624 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
625 |
@@@@@@@@J******@H@@@@@B@HL@@@CB@H8UUUR2@HH???RB@H8@@@B2@HH@@@BB@H8@@@B2@H@@@@@B@HEUUUUB@HO???=B@H@@@@@B@H8@@@@2@HH@@@@B@ |
|
626 |
H8@@@@2@HHEUUBB@H8O?=B2@HL@@@CB@H@@@@@B@J******@@@@@@@@@') ; 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:'@@@@_??8P@@HW??(U?>(U?>(U?>(T@@(T@@(W??(W??(W??(W??+T@@(T@@+T?<(T?<)T?<(W??(P@@H_??9@@@@') ; yourself); yourself] |
|
627 |
! |
|
628 |
||
629 |
iconCenterV |
|
630 |
"This resource specification was automatically generated |
|
631 |
by the ImageEditor of ST/X." |
|
632 |
||
633 |
"Do not manually edit this!! If it is corrupted, |
|
634 |
the ImageEditor may not be able to read the specification." |
|
635 |
||
636 |
" |
|
637 |
self iconCenterV inspect |
|
638 |
ImageEditor openOnClass:self andSelector:#iconCenterV |
|
639 |
Icon flushCachedIcons |
|
640 |
" |
|
641 |
||
642 |
<resource: #image> |
|
643 |
||
644 |
^Icon |
|
645 |
constantNamed:#'UIPainter class iconCenterV' |
|
646 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
647 |
@@@@@@@@@@@@@@@@@@@@@@@@B**@J*(@B**MJ*(@@@@M@@@@@@@M@M@@@M@M@M@@@M@M@M@@@M@M@M@@B*****(@B*****(@@M@M@M@@@M@M@M@@@E@M@M@@ |
|
648 |
@@@M@E@@@@@M@@@@B**EJ*(@B(*@J*(@@@@@@@@@@@@@@@@@@@@@@@@@') ; 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 @@G @@G'' G''''!!G'''' G'''' G'''' O??0O??0G'''' G'''' G'''' G'''' @G''#@G @@G C@@@@@@@@@@@@') ; yourself); yourself] |
|
649 |
! |
|
650 |
||
651 |
iconCenterVInFrame |
|
652 |
"This resource specification was automatically generated |
|
653 |
by the ImageEditor of ST/X." |
|
654 |
||
655 |
"Do not manually edit this!! If it is corrupted, |
|
656 |
the ImageEditor may not be able to read the specification." |
|
657 |
||
658 |
" |
|
659 |
self iconCenterVInFrame inspect |
|
660 |
ImageEditor openOnClass:self andSelector:#iconCenterVInFrame |
|
661 |
Icon flushCachedIcons |
|
662 |
" |
|
663 |
||
664 |
<resource: #image> |
|
665 |
||
666 |
^Icon |
|
667 |
constantNamed:#'UIPainter class iconCenterVInFrame' |
|
668 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
669 |
@@@@@@@@J******@H@@@@@B@HL3@L3B@H:*GJ*2@H@@G@@B@HG@G@@B@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@GB@HG@G@EB@ |
|
670 |
HE@G@@B@H@@G@@B@H:*E@J2@HL3@L3B@H@@@@@B@J******@@@@@@@@@') ; 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:'@@@B_??9P@@HW??(TG (W'' (W''''*W''''(W''''*W'''')W''''(W'''')W''''+W''''*W''''*W''''(W'' )TG (W??(P@@H_??8@@@@') ; yourself); yourself] |
|
671 |
! |
|
672 |
||
673 |
iconDistributeH |
|
674 |
"This resource specification was automatically generated |
|
675 |
by the ImageEditor of ST/X." |
|
676 |
||
677 |
"Do not manually edit this!! If it is corrupted, |
|
678 |
the ImageEditor may not be able to read the specification." |
|
679 |
||
680 |
" |
|
681 |
self iconDistributeH inspect |
|
682 |
ImageEditor openOnClass:self andSelector:#iconDistributeH |
|
683 |
Icon flushCachedIcons |
|
684 |
" |
|
685 |
||
686 |
<resource: #image> |
|
687 |
||
688 |
^Icon |
|
689 |
constantNamed:#'UIPainter class iconDistributeH' |
|
690 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1863 | 691 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@E@@E@@E@G@@G@@G@G@@G@@G@GHBGHBG@GHBGHBG@GJ*GJ*G@GHBGHBG@GHBGHBG@GB*GJ G@GB*GJ G@ |
692 |
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:'@@@@@@@@@@@@@@@@<G <<G <<G ?<G =>O1?>O1????<>O1<>O1><G <<G ><G <<G ?@@@A@@@@@@@@@@@@@@@A') ; yourself); yourself] |
|
1862 | 693 |
! |
694 |
||
695 |
iconDistributeV |
|
696 |
"This resource specification was automatically generated |
|
697 |
by the ImageEditor of ST/X." |
|
698 |
||
699 |
"Do not manually edit this!! If it is corrupted, |
|
700 |
the ImageEditor may not be able to read the specification." |
|
701 |
||
702 |
" |
|
703 |
self iconDistributeV inspect |
|
704 |
ImageEditor openOnClass:self andSelector:#iconDistributeV |
|
705 |
Icon flushCachedIcons |
|
706 |
" |
|
707 |
||
708 |
<resource: #image> |
|
709 |
||
710 |
^Icon |
|
711 |
constantNamed:#'UIPainter class iconDistributeV' |
|
712 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
1863 | 713 |
@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@@@@*(@@@@@JB@@@@@@JB@@@@@@JB@@@@@@J*(@@@@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@@@J*(@@@@@JB@@@@ |
714 |
@@JB@@@@@@@B@@@@@@@*(@@@@@@@@@@@@@UUUT@@@@???4@@@@@@@@@@') ; 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??CA??@@G0@@A@@@A@@@A@@@G0CA??@A??@A??@A??@@G0C@A@@@A@@@A@@@G0AA??AA??@A??@A??B') ; yourself); yourself] |
|
778 | 715 |
! ! |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
716 |
|
60 | 717 |
!UIPainter class methodsFor:'interface specs'! |
718 |
||
743 | 719 |
dialogSpecForDefiningClassAndSelector |
720 |
"This resource specification was automatically generated |
|
721 |
by the UIPainter of ST/X." |
|
722 |
||
765 | 723 |
"Do not manually edit this!! If it is corrupted, |
743 | 724 |
the UIPainter may not be able to read the specification." |
366 | 725 |
|
726 |
" |
|
743 | 727 |
UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningClassAndSelector |
728 |
UIPainter new openInterface:#dialogSpecForDefiningClassAndSelector |
|
366 | 729 |
" |
730 |
||
731 |
<resource: #canvas> |
|
732 |
||
733 |
^ |
|
446 | 734 |
|
366 | 735 |
#(#FullSpec |
2208 | 736 |
#window: |
737 |
#(#WindowSpec |
|
738 |
#name: 'GUI Painter' |
|
739 |
#layout: #(#LayoutFrame 291 0 130 0 637 0 289 0) |
|
740 |
#label: 'GUI Painter' |
|
741 |
#min: #(#Point 350 160) |
|
742 |
#max: #(#Point 500 160) |
|
743 |
#bounds: #(#Rectangle 291 130 638 290) |
|
744 |
#usePreferredExtent: false |
|
745 |
) |
|
746 |
#component: |
|
747 |
#(#SpecCollection |
|
748 |
#collection: |
|
749 |
#( |
|
750 |
#(#FramedBoxSpec |
|
751 |
#name: 'FramedBox' |
|
752 |
#layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) |
|
753 |
#component: |
|
754 |
#(#SpecCollection |
|
755 |
#collection: |
|
756 |
#( |
|
757 |
#(#LabelSpec |
|
758 |
#name: 'selectorLabel' |
|
759 |
#layout: #(#AlignmentOrigin 67 0.11 29 0 1 0.5) |
|
760 |
#label: 'Selector:' |
|
761 |
#translateLabel: true |
|
762 |
#adjust: #right |
|
763 |
#resizeForLabel: true |
|
764 |
) |
|
765 |
#(#InputFieldSpec |
|
766 |
#name: 'methodNameField' |
|
767 |
#layout: #(#LayoutFrame 70 0.11 18 0 4 1.0 40 0) |
|
768 |
#tabable: true |
|
769 |
#model: #methodNameChannel |
|
770 |
#group: #inputGroup |
|
771 |
) |
|
772 |
#(#LabelSpec |
|
773 |
#name: 'classLabel' |
|
774 |
#layout: #(#AlignmentOrigin 67 0.11 54 0 1 0.5) |
|
775 |
#label: 'Class:' |
|
776 |
#translateLabel: true |
|
777 |
#adjust: #right |
|
778 |
#resizeForLabel: true |
|
779 |
) |
|
780 |
#(#InputFieldSpec |
|
781 |
#name: 'classNameField' |
|
782 |
#layout: #(#LayoutFrame 70 0.11 43 0 4 1.0 65 0) |
|
783 |
#tabable: true |
|
784 |
#model: #classNameChannel |
|
785 |
#group: #inputGroup |
|
786 |
) |
|
787 |
#(#LabelSpec |
|
788 |
#name: 'superClassLabel' |
|
789 |
#layout: #(#AlignmentOrigin 67 0.11 79 0 1 0.5) |
|
790 |
#label: 'Superclass:' |
|
791 |
#translateLabel: true |
|
792 |
#adjust: #right |
|
793 |
#resizeForLabel: true |
|
794 |
) |
|
795 |
#(#ComboBoxSpec |
|
796 |
#name: 'superclassNameComboBox' |
|
797 |
#layout: #(#LayoutFrame 70 0.11 68 0 4 1.0 90 0) |
|
798 |
#tabable: true |
|
799 |
#model: #superclassNameChannel |
|
800 |
#comboList: #superclassNameDefaults |
|
801 |
) |
|
802 |
) |
|
803 |
) |
|
804 |
#label: 'Define Class And Selector' |
|
805 |
#labelPosition: #topLeft |
|
806 |
#translateLabel: true |
|
807 |
) |
|
808 |
#(#UISubSpecification |
|
809 |
#name: 'subSpec' |
|
810 |
#layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
|
811 |
#majorKey: #ToolApplicationModel |
|
812 |
#minorKey: #windowSpecForCommitWithoutChannels |
|
813 |
) |
|
814 |
) |
|
815 |
) |
|
743 | 816 |
) |
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
817 |
|
950
3e227dc788be
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
939
diff
changeset
|
818 |
"Modified: / 13.8.1998 / 19:59:44 / cg" |
743 | 819 |
! |
820 |
||
821 |
dialogSpecForDefiningGridParameters |
|
822 |
"This resource specification was automatically generated |
|
823 |
by the UIPainter of ST/X." |
|
824 |
||
765 | 825 |
"Do not manually edit this!! If it is corrupted, |
743 | 826 |
the UIPainter may not be able to read the specification." |
827 |
||
828 |
" |
|
829 |
UIPainter new openOnClass:UIPainter andSelector:#dialogSpecForDefiningGridParameters |
|
830 |
UIPainter new openInterface:#dialogSpecForDefiningGridParameters |
|
831 |
" |
|
832 |
||
833 |
<resource: #canvas> |
|
834 |
||
1782 | 835 |
^ |
836 |
#(FullSpec |
|
837 |
name: dialogSpecForDefiningGridParameters |
|
838 |
window: |
|
839 |
(WindowSpec |
|
840 |
label: 'GUI Painter' |
|
841 |
name: 'GUI Painter' |
|
842 |
min: (Point 300 200) |
|
843 |
max: (Point 300 200) |
|
844 |
bounds: (Rectangle 16 46 298 244) |
|
845 |
) |
|
846 |
component: |
|
847 |
(SpecCollection |
|
848 |
collection: ( |
|
849 |
(FramedBoxSpec |
|
850 |
label: 'Grid Parameter' |
|
851 |
name: 'FramedBox' |
|
852 |
layout: (LayoutFrame 0 0.0 3 0.0 0 1.0 -35 1.0) |
|
853 |
labelPosition: topLeft |
|
854 |
translateLabel: true |
|
855 |
component: |
|
856 |
(SpecCollection |
|
857 |
collection: ( |
|
858 |
(CheckBoxSpec |
|
859 |
label: 'Show Grid' |
|
860 |
name: 'ShowGridCheckBox' |
|
861 |
layout: (Point 13 14) |
|
862 |
model: showGrid |
|
863 |
translateLabel: true |
|
864 |
) |
|
865 |
(CheckBoxSpec |
|
866 |
label: 'Align To Grid' |
|
867 |
name: 'AlignCheckBox' |
|
868 |
layout: (Point 13 42) |
|
869 |
model: alignToGrid |
|
870 |
translateLabel: true |
|
871 |
) |
|
872 |
(LabelSpec |
|
873 |
label: 'Horizontal Pixels:' |
|
874 |
name: 'HorizontalPixelsLabel' |
|
875 |
layout: (AlignmentOrigin 138 0 89 0 1 0.5) |
|
876 |
translateLabel: true |
|
877 |
resizeForLabel: true |
|
878 |
adjust: right |
|
879 |
) |
|
880 |
(InputFieldSpec |
|
881 |
name: 'HorizontalPixelsField' |
|
882 |
layout: (LayoutFrame 144 0 77 0 197 0 99 0) |
|
883 |
model: hspace |
|
884 |
group: inputGroup |
|
885 |
type: numberOrNil |
|
886 |
acceptOnPointerLeave: false |
|
887 |
) |
|
888 |
(LabelSpec |
|
889 |
label: 'Vertical Pixels:' |
|
890 |
name: 'VerticalPixelsLabel' |
|
891 |
layout: (AlignmentOrigin 139 0 114 0 1 0.5) |
|
892 |
translateLabel: true |
|
893 |
resizeForLabel: true |
|
894 |
adjust: right |
|
895 |
) |
|
896 |
(InputFieldSpec |
|
897 |
name: 'VerticalPixelsField' |
|
898 |
layout: (LayoutFrame 144 0 102 0 197 0 124 0) |
|
899 |
model: vspace |
|
900 |
group: inputGroup |
|
901 |
type: numberOrNil |
|
902 |
acceptOnPointerLeave: false |
|
903 |
) |
|
904 |
) |
|
905 |
||
906 |
) |
|
907 |
) |
|
908 |
(UISubSpecification |
|
909 |
name: 'subSpec' |
|
910 |
layout: (LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
|
911 |
majorKey: ToolApplicationModel |
|
912 |
minorKey: windowSpecForCommitWithoutChannels |
|
913 |
) |
|
914 |
) |
|
915 |
||
916 |
) |
|
366 | 917 |
) |
918 |
! |
|
919 |
||
743 | 920 |
windowSpec |
921 |
"This resource specification was automatically generated |
|
922 |
by the UIPainter of ST/X." |
|
923 |
||
924 |
"Do not manually edit this!! If it is corrupted, |
|
925 |
the UIPainter may not be able to read the specification." |
|
222 | 926 |
|
927 |
" |
|
743 | 928 |
UIPainter new openOnClass:UIPainter andSelector:#windowSpec |
929 |
UIPainter new openInterface:#windowSpec |
|
930 |
UIPainter open |
|
222 | 931 |
" |
932 |
||
933 |
<resource: #canvas> |
|
934 |
||
1115 | 935 |
^ |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
936 |
#(FullSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
937 |
name: windowSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
938 |
window: |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
939 |
(WindowSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
940 |
label: 'GUI Painter' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
941 |
name: 'GUI Painter' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
942 |
min: (Point 560 460) |
1790 | 943 |
bounds: (Rectangle 12 22 620 545) |
2157 | 944 |
icon: defaultIcon |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
945 |
menu: menu |
1317 | 946 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
947 |
component: |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
948 |
(SpecCollection |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
949 |
collection: ( |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
950 |
(MenuPanelSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
951 |
name: 'menuToolbarView' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
952 |
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
953 |
level: 1 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
954 |
tabable: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
955 |
menu: menuToolbar |
1317 | 956 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
957 |
(VariableHorizontalPanelSpec |
2001 | 958 |
name: 'mainPanel' |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
959 |
layout: (LayoutFrame 0 0.0 32 0.0 0 1.0 -24 1.0) |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
960 |
level: 1 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
961 |
component: |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
962 |
(SpecCollection |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
963 |
collection: ( |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
964 |
(ArbitraryComponentSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
965 |
name: 'treeView' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
966 |
tabable: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
967 |
menu: menuEdit |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
968 |
hasHorizontalScrollBar: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
969 |
hasVerticalScrollBar: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
970 |
miniScrollerHorizontal: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
971 |
miniScrollerVertical: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
972 |
hasBorder: false |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
973 |
component: treeView |
1317 | 974 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
975 |
(ViewSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
976 |
name: 'specHolderView' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
977 |
level: 0 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
978 |
component: |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
979 |
(SpecCollection |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
980 |
collection: ( |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
981 |
(MenuPanelSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
982 |
name: 'menuToolbar2View' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
983 |
layout: (LayoutFrame 2 0.0 2 0 -2 1.0 32 0) |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
984 |
level: 0 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
985 |
tabable: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
986 |
menu: menuToolbar2 |
1317 | 987 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
988 |
(NoteBookViewSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
989 |
name: 'noteBook' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
990 |
layout: (LayoutFrame 2 0.0 32 0.0 -2 1.0 -28 1.0) |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
991 |
level: 0 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
992 |
enableChannel: enableChannel |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
993 |
tabable: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
994 |
model: tabModel |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
995 |
menu: tabList |
1790 | 996 |
translateLabel: true |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
997 |
canvas: noteBookView |
1317 | 998 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
999 |
(HorizontalPanelViewSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1000 |
name: 'HorizontalPanel1' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1001 |
layout: (LayoutFrame 2 0 -26 1 -2 1 -2 1) |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1002 |
horizontalLayout: fit |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1003 |
verticalLayout: fit |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1004 |
horizontalSpace: 3 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1005 |
verticalSpace: 3 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1006 |
reverseOrderIfOKAtLeft: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1007 |
component: |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1008 |
(SpecCollection |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1009 |
collection: ( |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1010 |
(ActionButtonSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1011 |
label: 'Cancel' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1012 |
name: 'cancelButton' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1013 |
activeHelpKey: commitCancel |
1782 | 1014 |
translateLabel: true |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1015 |
tabable: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1016 |
model: cancel |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1017 |
enableChannel: modifiedChannel |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1018 |
extent: (Point 201 24) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
1019 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1020 |
(ActionButtonSpec |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1021 |
label: 'OK' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1022 |
name: 'acceptButton' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1023 |
activeHelpKey: commitOK |
1782 | 1024 |
translateLabel: true |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1025 |
tabable: true |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1026 |
model: accept |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1027 |
enableChannel: modifiedChannel |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1028 |
extent: (Point 201 24) |
1457
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
1029 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
1030 |
) |
8c15098c3469
ok button is left in some viewStyles
Claus Gittinger <cg@exept.de>
parents:
1456
diff
changeset
|
1031 |
|
1317 | 1032 |
) |
1033 |
) |
|
1034 |
) |
|
1115 | 1035 |
|
1317 | 1036 |
) |
1037 |
) |
|
1038 |
) |
|
1115 | 1039 |
|
1317 | 1040 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1041 |
handles: (Any 0.318868 1.0) |
1317 | 1042 |
) |
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1043 |
(UISubSpecification |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1044 |
name: 'infoBarSubSpec' |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1045 |
layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1046 |
level: 1 |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1047 |
majorKey: ToolApplicationModel |
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
1048 |
minorKey: windowSpecForInfoBar |
1317 | 1049 |
) |
1050 |
) |
|
1115 | 1051 |
|
1317 | 1052 |
) |
222 | 1053 |
) |
2157 | 1054 |
|
1055 |
"Modified: / 10-02-2007 / 14:45:31 / cg" |
|
222 | 1056 |
! ! |
1057 |
||
1058 |
!UIPainter class methodsFor:'menu specs'! |
|
1059 |
||
446 | 1060 |
menu |
743 | 1061 |
"This resource specification was automatically generated |
1062 |
by the MenuEditor of ST/X." |
|
1063 |
||
1064 |
"Do not manually edit this!! If it is corrupted, |
|
1065 |
the MenuEditor may not be able to read the specification." |
|
217 | 1066 |
|
1067 |
" |
|
446 | 1068 |
MenuEditor new openOnClass:UIPainter andSelector:#menu |
1069 |
(Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp |
|
1070 |
" |
|
1071 |
||
1072 |
<resource: #menu> |
|
1073 |
||
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1074 |
^ |
1775 | 1075 |
#(Menu |
1076 |
( |
|
1077 |
(MenuItem |
|
1078 |
enabled: enableChannel |
|
1079 |
label: '&File' |
|
1080 |
translateLabel: true |
|
1081 |
submenu: |
|
1082 |
(Menu |
|
1083 |
( |
|
1084 |
(MenuItem |
|
1085 |
activeHelpKey: fileNew |
|
1086 |
label: 'New' |
|
1087 |
itemValue: doNew |
|
1088 |
translateLabel: true |
|
2023 | 1089 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1090 |
) |
1775 | 1091 |
(MenuItem |
1092 |
label: '-' |
|
2023 | 1093 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1094 |
) |
1775 | 1095 |
(MenuItem |
1096 |
activeHelpKey: fileLoad |
|
1097 |
label: 'Load...' |
|
1098 |
itemValue: doLoad |
|
1099 |
translateLabel: true |
|
2023 | 1100 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1101 |
) |
1775 | 1102 |
(MenuItem |
1103 |
activeHelpKey: fileLoadSubspec |
|
1104 |
label: 'Load Subspec...' |
|
1105 |
itemValue: doLoadSubspec |
|
1106 |
translateLabel: true |
|
2023 | 1107 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1108 |
) |
1775 | 1109 |
(MenuItem |
1110 |
label: '-' |
|
2023 | 1111 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1112 |
) |
1775 | 1113 |
(MenuItem |
1114 |
activeHelpKey: fileSave |
|
1115 |
label: 'Save' |
|
1116 |
itemValue: doSave |
|
1117 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1118 |
) |
1775 | 1119 |
(MenuItem |
1120 |
activeHelpKey: fileSaveAs |
|
1121 |
label: 'Save As...' |
|
1122 |
itemValue: doSaveAs |
|
1123 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1124 |
) |
1775 | 1125 |
(MenuItem |
1126 |
activeHelpKey: fileSaveAs |
|
1127 |
label: 'Define Class and Selector...' |
|
1128 |
itemValue: doDefineClassAndSelector |
|
1129 |
translateLabel: true |
|
2023 | 1130 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1131 |
) |
1775 | 1132 |
(MenuItem |
1133 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1134 |
) |
1775 | 1135 |
(MenuItem |
1136 |
activeHelpKey: filePickAnInterface |
|
1137 |
label: 'Pick a Window Spec...' |
|
1138 |
itemValue: doPickAView |
|
1139 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1140 |
) |
1775 | 1141 |
(MenuItem |
1142 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1143 |
) |
1775 | 1144 |
(MenuItem |
1145 |
activeHelpKey: fileShowWindowSpec |
|
1146 |
label: 'Show Window Spec' |
|
1147 |
itemValue: doWindowSpec |
|
1148 |
translateLabel: true |
|
2023 | 1149 |
isVisible: isStandAlone |
1498 | 1150 |
) |
1775 | 1151 |
(MenuItem |
1152 |
activeHelpKey: fileBrowseClass |
|
1153 |
enabled: hasSpecClass |
|
1154 |
label: 'Browse Applications Class' |
|
1155 |
itemValue: doBrowseClass |
|
1156 |
translateLabel: true |
|
2023 | 1157 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1158 |
) |
1775 | 1159 |
(MenuItem |
1160 |
activeHelpKey: fileBrowseAspectMethods |
|
1161 |
enabled: hasSpecClass |
|
1162 |
label: 'Browse Applications Aspect Methods' |
|
1163 |
itemValue: doBrowseAspectMethods |
|
1164 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1165 |
) |
1775 | 1166 |
(MenuItem |
1167 |
label: '-' |
|
2023 | 1168 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1169 |
) |
1775 | 1170 |
(MenuItem |
1171 |
activeHelpKey: fileExit |
|
1172 |
label: 'Exit' |
|
1173 |
itemValue: closeRequest |
|
1174 |
translateLabel: true |
|
2023 | 1175 |
isVisible: isStandAlone |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1176 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1177 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1178 |
nil |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1179 |
nil |
1498 | 1180 |
) |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1181 |
) |
1775 | 1182 |
(MenuItem |
1183 |
label: 'Edit' |
|
1184 |
translateLabel: true |
|
1185 |
submenuChannel: menuEdit |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1186 |
) |
1775 | 1187 |
(MenuItem |
1188 |
label: 'Align' |
|
1189 |
translateLabel: true |
|
1190 |
submenuChannel: menuAlign |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1191 |
) |
1775 | 1192 |
(MenuItem |
1193 |
label: 'Generate' |
|
1194 |
translateLabel: true |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1195 |
isVisible: isNotEditingSpecOnly |
1775 | 1196 |
submenu: |
1197 |
(Menu |
|
1198 |
( |
|
1199 |
(MenuItem |
|
1200 |
activeHelpKey: generateAspectMethods |
|
1201 |
enabled: hasSpecClass |
|
1202 |
label: 'Aspect Methods' |
|
1203 |
itemValue: doGenerateAspectMethods |
|
1204 |
translateLabel: true |
|
1498 | 1205 |
) |
1775 | 1206 |
(MenuItem |
1207 |
activeHelpKey: generateAspectMethodFor |
|
1208 |
enabled: hasSpecClass |
|
1209 |
label: 'Aspect Method For...' |
|
1210 |
itemValue: doGenerateAspectMethodFor |
|
1211 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1212 |
) |
1775 | 1213 |
(MenuItem |
1214 |
enabled: hasSpecClass |
|
1215 |
label: 'Menu Stub Methods' |
|
1216 |
itemValue: doGenerateMenuMethods |
|
1217 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1218 |
) |
1775 | 1219 |
(MenuItem |
1220 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1221 |
) |
1775 | 1222 |
(MenuItem |
1223 |
activeHelpKey: generateHookMethods |
|
1224 |
enabled: hasSpecClass |
|
1225 |
label: 'Hook Methods' |
|
1226 |
itemValue: doGenerateHookMethods |
|
1227 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1228 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1229 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1230 |
nil |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1231 |
nil |
1498 | 1232 |
) |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1233 |
) |
1775 | 1234 |
(MenuItem |
1235 |
label: 'Test' |
|
1236 |
translateLabel: true |
|
1237 |
submenu: |
|
1238 |
(Menu |
|
1239 |
( |
|
1240 |
(MenuItem |
|
1241 |
activeHelpKey: testStartApplication |
|
1242 |
label: 'Start Application' |
|
1243 |
itemValue: doStartApplication |
|
1244 |
translateLabel: true |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1245 |
isVisible: isNotEditingSpecOnly |
1498 | 1246 |
) |
1775 | 1247 |
(MenuItem |
1248 |
label: '-' |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1249 |
isVisible: isNotEditingSpecOnly |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1250 |
) |
1775 | 1251 |
(MenuItem |
1252 |
activeHelpKey: testGeometryTestMode |
|
1253 |
label: 'Geometry Test Mode' |
|
1254 |
translateLabel: true |
|
1255 |
indication: testMode: |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1256 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1257 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1258 |
nil |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1259 |
nil |
1498 | 1260 |
) |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1261 |
) |
1775 | 1262 |
(MenuItem |
1263 |
label: 'Settings' |
|
1264 |
translateLabel: true |
|
1265 |
submenu: |
|
1266 |
(Menu |
|
1267 |
( |
|
1268 |
(MenuItem |
|
1269 |
activeHelpKey: settingsCanvas |
|
1270 |
label: 'Canvas' |
|
1271 |
translateLabel: true |
|
1272 |
indication: painterShown |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1273 |
) |
1775 | 1274 |
(MenuItem |
1275 |
activeHelpKey: settingsGallery |
|
1276 |
label: 'Gallery' |
|
1277 |
translateLabel: true |
|
1278 |
indication: galleryShown |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1279 |
) |
1775 | 1280 |
(MenuItem |
1281 |
label: '-' |
|
1282 |
) |
|
1283 |
(MenuItem |
|
1284 |
activeHelpKey: settingsRedefineAspectMethods |
|
1285 |
enabled: hasSpecClass |
|
1286 |
label: 'Redefine Aspect Methods' |
|
1287 |
translateLabel: true |
|
1288 |
indication: redefineAspectMethods: |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1289 |
isVisible: isNotEditingSpecOnly |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1290 |
) |
1775 | 1291 |
(MenuItem |
1292 |
activeHelpKey: settingsAspectsAsInstances |
|
1293 |
enabled: hasSpecClass |
|
1294 |
label: 'Aspects as InstanceVariables' |
|
1295 |
translateLabel: true |
|
1296 |
indication: generateAspectsAsInstanceVariables: |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1297 |
isVisible: isNotEditingSpecOnly |
1498 | 1298 |
) |
1775 | 1299 |
(MenuItem |
1300 |
label: 'AutoAccept on Selection-Change ' |
|
1301 |
translateLabel: true |
|
1302 |
indication: autoAcceptOnSelectionChange |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1303 |
) |
1775 | 1304 |
(MenuItem |
1305 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1306 |
) |
1775 | 1307 |
(MenuItem |
1308 |
activeHelpKey: settingsUndoManager |
|
1309 |
enabled: hasUndoHistory |
|
1310 |
label: 'Undo Manager...' |
|
1311 |
itemValue: openUndoMenu |
|
1312 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1313 |
) |
1775 | 1314 |
(MenuItem |
1315 |
activeHelpKey: settingsGridManager |
|
1316 |
label: 'Grid Manager...' |
|
1317 |
itemValue: doDefineGrid |
|
1318 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1319 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1320 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1321 |
nil |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1322 |
nil |
1498 | 1323 |
) |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1324 |
) |
1775 | 1325 |
(MenuItem |
1326 |
label: 'History' |
|
1327 |
translateLabel: true |
|
2023 | 1328 |
isVisible: isStandAlone |
1775 | 1329 |
submenuChannel: menuHistory |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1330 |
) |
1775 | 1331 |
(MenuItem |
2138
55f338a77eb0
support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents:
2124
diff
changeset
|
1332 |
label: 'MENU_Help' |
1775 | 1333 |
translateLabel: true |
2124 | 1334 |
startGroup: conditionalRight |
1775 | 1335 |
submenu: |
1336 |
(Menu |
|
1337 |
( |
|
1338 |
(MenuItem |
|
1339 |
activeHelpKey: helpTutorial |
|
1340 |
label: 'Tutorial' |
|
1341 |
itemValue: openHTMLDocument: |
|
1342 |
translateLabel: true |
|
1343 |
argument: 'tools/uipainter/TOP.html' |
|
1344 |
) |
|
1345 |
(MenuItem |
|
1346 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1347 |
) |
1775 | 1348 |
(MenuItem |
1349 |
activeHelpKey: helpFunctions |
|
1350 |
label: 'Functions' |
|
1351 |
itemValue: openHTMLDocument: |
|
1352 |
translateLabel: true |
|
1353 |
argument: 'tools/uipainter/Functions.html' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1354 |
) |
1775 | 1355 |
(MenuItem |
1356 |
activeHelpKey: helpExamples |
|
1357 |
label: 'Examples' |
|
1358 |
itemValue: openHTMLDocument: |
|
1359 |
translateLabel: true |
|
1360 |
argument: 'tools/uipainter/Examples.html' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1361 |
) |
1775 | 1362 |
(MenuItem |
1363 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1364 |
) |
1775 | 1365 |
(MenuItem |
1366 |
activeHelpKey: helpHelpTool |
|
1367 |
label: 'Help Tool' |
|
1368 |
itemValue: openHTMLDocument: |
|
1369 |
translateLabel: true |
|
1370 |
argument: 'tools/uipainter/HelpTool.html' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1371 |
) |
1775 | 1372 |
(MenuItem |
1373 |
activeHelpKey: helpLayoutTool |
|
1374 |
label: 'Layout Tool' |
|
1375 |
itemValue: openHTMLDocument: |
|
1376 |
translateLabel: true |
|
1377 |
argument: 'tools/uipainter/LayoutTool.html' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1378 |
) |
1775 | 1379 |
(MenuItem |
1380 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1381 |
) |
1775 | 1382 |
(MenuItem |
1383 |
activeHelpKey: helpSelectedWidget |
|
1384 |
label: 'Selected Widget' |
|
1385 |
itemValue: doOpenWidgetDocumentation |
|
1386 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1387 |
) |
1775 | 1388 |
(MenuItem |
1389 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1390 |
) |
1775 | 1391 |
(MenuItem |
1392 |
activeHelpKey: helpShowHelp |
|
1393 |
label: 'Show Help Texts' |
|
1394 |
translateLabel: true |
|
1395 |
indication: showingHelp: |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1396 |
) |
1775 | 1397 |
(MenuItem |
1398 |
label: '-' |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1399 |
) |
1775 | 1400 |
(MenuItem |
1401 |
activeHelpKey: aboutThisAppliaction |
|
1402 |
label: 'About this Application...' |
|
1403 |
itemValue: openAboutThisApplication |
|
1404 |
translateLabel: true |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1405 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1406 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1407 |
nil |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1408 |
nil |
1498 | 1409 |
) |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1410 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1411 |
) |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1412 |
nil |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
1413 |
nil |
564 | 1414 |
) |
1415 |
! |
|
1416 |
||
446 | 1417 |
menuAlign |
743 | 1418 |
"This resource specification was automatically generated |
1419 |
by the MenuEditor of ST/X." |
|
1420 |
||
778 | 1421 |
"Do not manually edit this!! If it is corrupted, |
743 | 1422 |
the MenuEditor may not be able to read the specification." |
446 | 1423 |
|
1424 |
" |
|
1425 |
MenuEditor new openOnClass:UIPainter andSelector:#menuAlign |
|
1426 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp |
|
217 | 1427 |
" |
1428 |
||
1429 |
<resource: #menu> |
|
1430 |
||
1862 | 1431 |
^ |
1432 |
#(Menu |
|
1433 |
( |
|
1434 |
(MenuItem |
|
1435 |
activeHelpKey: alignSelectionLeft |
|
1436 |
enabled: canMoveOrAlignSelection |
|
1437 |
label: 'Left' |
|
1438 |
itemValue: alignSelectionLeft |
|
1439 |
translateLabel: true |
|
1440 |
labelImage: (ResourceRetriever UIPainter iconAlignL 'Left') |
|
1441 |
) |
|
1442 |
(MenuItem |
|
1443 |
activeHelpKey: alignSelectionRight |
|
1444 |
enabled: canMoveOrAlignSelection |
|
1445 |
label: 'Right' |
|
1446 |
itemValue: alignSelectionRight |
|
1447 |
translateLabel: true |
|
1448 |
labelImage: (ResourceRetriever UIPainter iconAlignR 'Right') |
|
1449 |
) |
|
1450 |
(MenuItem |
|
1451 |
activeHelpKey: alignSelectionLeftAndRight |
|
1452 |
enabled: canMoveOrAlignSelection |
|
1453 |
label: 'Left && Right' |
|
1454 |
itemValue: alignSelectionLeftAndRight |
|
1455 |
translateLabel: true |
|
1456 |
labelImage: (ResourceRetriever UIPainter iconAlignLR 'Left & Right') |
|
1457 |
) |
|
1458 |
(MenuItem |
|
1459 |
activeHelpKey: alignSelectionTop |
|
1460 |
enabled: canMoveOrAlignSelection |
|
1461 |
label: 'Top' |
|
1462 |
itemValue: alignSelectionTop |
|
1463 |
translateLabel: true |
|
1464 |
labelImage: (ResourceRetriever UIPainter iconAlignT 'Top') |
|
1465 |
) |
|
1466 |
(MenuItem |
|
1467 |
activeHelpKey: alignSelectionBottom |
|
1468 |
enabled: canMoveOrAlignSelection |
|
1469 |
label: 'Bottom' |
|
1470 |
itemValue: alignSelectionBottom |
|
1471 |
translateLabel: true |
|
1472 |
labelImage: (ResourceRetriever UIPainter iconAlignB 'Bottom') |
|
1473 |
) |
|
1474 |
(MenuItem |
|
1475 |
activeHelpKey: alignSelectionTopAndBottom |
|
1476 |
enabled: canMoveOrAlignSelection |
|
1477 |
label: 'Top && Bottom' |
|
1478 |
itemValue: alignSelectionTopAndBottom |
|
1479 |
translateLabel: true |
|
1480 |
labelImage: (ResourceRetriever UIPainter iconAlignTB 'Top & Bottom') |
|
1481 |
) |
|
1482 |
(MenuItem |
|
1483 |
label: '-' |
|
1484 |
) |
|
1485 |
(MenuItem |
|
1486 |
activeHelpKey: alignSelectionCenterHor |
|
1487 |
enabled: canMoveOrAlignSelection |
|
1488 |
label: 'Center Horizontal' |
|
1489 |
itemValue: alignSelectionCenterHor |
|
1490 |
translateLabel: true |
|
1491 |
labelImage: (ResourceRetriever UIPainter iconCenterH '') |
|
1492 |
) |
|
1493 |
(MenuItem |
|
1494 |
activeHelpKey: centerSelectionHor |
|
1495 |
enabled: canMoveOrAlignSelection |
|
1496 |
label: 'Center Horizontal in Frame' |
|
1497 |
itemValue: centerSelectionHor |
|
1498 |
translateLabel: true |
|
1499 |
labelImage: (ResourceRetriever UIPainter iconCenterHInFrame '') |
|
1500 |
) |
|
1501 |
(MenuItem |
|
1502 |
activeHelpKey: alignSelectionCenterVer |
|
1503 |
enabled: canMoveOrAlignSelection |
|
1504 |
label: 'Center Vertical' |
|
1505 |
itemValue: alignSelectionCenterVer |
|
1506 |
translateLabel: true |
|
1507 |
labelImage: (ResourceRetriever UIPainter iconCenterV '') |
|
1508 |
) |
|
1509 |
(MenuItem |
|
1510 |
activeHelpKey: centerSelectionVer |
|
1511 |
enabled: canMoveOrAlignSelection |
|
1512 |
label: 'Center Vertical in Frame' |
|
1513 |
itemValue: centerSelectionVer |
|
1514 |
translateLabel: true |
|
1515 |
labelImage: (ResourceRetriever UIPainter iconCenterVInFrame '') |
|
1516 |
) |
|
1517 |
(MenuItem |
|
1518 |
label: '-' |
|
1519 |
) |
|
1520 |
(MenuItem |
|
1521 |
activeHelpKey: spreadSelectionHor |
|
1522 |
enabled: canMoveOrAlignSelection |
|
1523 |
label: 'Distribute Horizontal' |
|
1524 |
itemValue: spreadSelectionHor |
|
1525 |
translateLabel: true |
|
1526 |
labelImage: (ResourceRetriever UIPainter iconDistributeH '') |
|
1527 |
) |
|
1528 |
(MenuItem |
|
1529 |
activeHelpKey: spreadSelectionVer |
|
1530 |
enabled: canMoveOrAlignSelection |
|
1531 |
label: 'Distribute Vertical' |
|
1532 |
itemValue: spreadSelectionVer |
|
1533 |
translateLabel: true |
|
1534 |
labelImage: (ResourceRetriever UIPainter iconDistributeV '') |
|
1535 |
) |
|
1536 |
) |
|
1537 |
nil |
|
1538 |
nil |
|
446 | 1539 |
) |
1540 |
! |
|
1541 |
||
1542 |
menuEdit |
|
743 | 1543 |
"This resource specification was automatically generated |
1544 |
by the MenuEditor of ST/X." |
|
1545 |
||
755 | 1546 |
"Do not manually edit this!! If it is corrupted, |
743 | 1547 |
the MenuEditor may not be able to read the specification." |
446 | 1548 |
|
1549 |
" |
|
1550 |
MenuEditor new openOnClass:UIPainter andSelector:#menuEdit |
|
1551 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp |
|
1552 |
" |
|
1553 |
||
1554 |
<resource: #menu> |
|
1555 |
||
1827 | 1556 |
^ |
1557 |
#(Menu |
|
1558 |
( |
|
1559 |
(MenuItem |
|
1560 |
activeHelpKey: editUndo |
|
1561 |
enabled: hasUndoHistory |
|
1562 |
label: 'Undo' |
|
1563 |
itemValue: undoLast |
|
1564 |
nameKey: undo |
|
1565 |
translateLabel: true |
|
1566 |
) |
|
1567 |
(MenuItem |
|
1568 |
label: '-' |
|
1569 |
) |
|
1570 |
(MenuItem |
|
1571 |
activeHelpKey: editCut |
|
1991 | 1572 |
enabled: canCutHolder |
1827 | 1573 |
label: 'Cut' |
1574 |
itemValue: deleteSelection |
|
1575 |
translateLabel: true |
|
1576 |
) |
|
1577 |
(MenuItem |
|
1578 |
activeHelpKey: editCopy |
|
1991 | 1579 |
enabled: canCopyHolder |
1827 | 1580 |
label: 'Copy' |
1581 |
itemValue: copySelection |
|
1582 |
translateLabel: true |
|
1583 |
) |
|
1584 |
(MenuItem |
|
1585 |
activeHelpKey: pasteBuffer |
|
1991 | 1586 |
enabled: canPasteHolder |
1827 | 1587 |
label: 'Paste' |
1588 |
itemValue: pasteBuffer |
|
1589 |
translateLabel: true |
|
1590 |
) |
|
1591 |
(MenuItem |
|
1592 |
activeHelpKey: pasteWithLayout |
|
1991 | 1593 |
enabled: canPasteKeepingLayoutHolder |
1827 | 1594 |
label: 'Paste with Layout' |
1595 |
itemValue: pasteWithLayout |
|
1596 |
translateLabel: true |
|
1597 |
) |
|
1598 |
(MenuItem |
|
1599 |
activeHelpKey: editPaste |
|
1991 | 1600 |
enabled: canPasteKeepingLayoutHolder |
1827 | 1601 |
label: 'Paste Keeping Absolute Position' |
1602 |
itemValue: pasteKeepingPosition |
|
1603 |
translateLabel: true |
|
1604 |
) |
|
1605 |
(MenuItem |
|
1940 | 1606 |
activeHelpKey: editDelete |
1991 | 1607 |
enabled: canCutHolder |
1940 | 1608 |
label: 'Delete' |
1609 |
itemValue: deleteTotalSelection |
|
1610 |
translateLabel: true |
|
1611 |
) |
|
1612 |
(MenuItem |
|
2023 | 1613 |
activeHelpKey: moveWidgetUp |
1614 |
enabled: canReplaceSelection |
|
1615 |
label: 'Replace...' |
|
1616 |
itemValue: doAskAndReplaceWidgetBy |
|
1940 | 1617 |
translateLabel: true |
1618 |
) |
|
1619 |
(MenuItem |
|
1827 | 1620 |
label: '-' |
1621 |
) |
|
1622 |
(MenuItem |
|
1623 |
enabled: canMoveSelection |
|
1624 |
label: 'Move' |
|
1625 |
translateLabel: true |
|
1626 |
submenuChannel: menuMove |
|
1627 |
) |
|
1628 |
(MenuItem |
|
1629 |
enabled: hasSelection |
|
1630 |
label: 'Dimension' |
|
1631 |
translateLabel: true |
|
1632 |
submenu: |
|
1633 |
(Menu |
|
1634 |
( |
|
1635 |
(MenuItem |
|
1636 |
activeHelpKey: editDimensionDefaultExtent |
|
1637 |
enabled: canMoveOrAlignSelection |
|
1638 |
label: 'Default Extent' |
|
1639 |
itemValue: setToDefaultExtent |
|
1640 |
translateLabel: true |
|
1641 |
) |
|
1642 |
(MenuItem |
|
1643 |
activeHelpKey: editDimensionDefaultWidth |
|
1644 |
enabled: canMoveOrAlignSelection |
|
1645 |
label: 'Default Width' |
|
1646 |
itemValue: setToDefaultWidth |
|
1647 |
translateLabel: true |
|
1648 |
) |
|
1649 |
(MenuItem |
|
1650 |
activeHelpKey: editDimensionDefaultHeight |
|
1651 |
enabled: canMoveOrAlignSelection |
|
1652 |
label: 'Default Height' |
|
1653 |
itemValue: setToDefaultHeight |
|
1654 |
translateLabel: true |
|
1655 |
) |
|
1656 |
(MenuItem |
|
1657 |
label: '-' |
|
1658 |
) |
|
1659 |
(MenuItem |
|
1660 |
activeHelpKey: editDimensionCopyLayout |
|
1661 |
enabled: hasSingleSelection |
|
1662 |
label: 'Copy Layout' |
|
1663 |
itemValue: copyLayout |
|
1664 |
translateLabel: true |
|
1665 |
) |
|
1666 |
(MenuItem |
|
1667 |
activeHelpKey: editDimensionPasteLayout |
|
1668 |
enabled: canMoveOrAlignSelection |
|
1669 |
label: 'Paste Layout' |
|
1670 |
itemValue: pasteLayout |
|
1671 |
translateLabel: true |
|
1672 |
) |
|
1673 |
(MenuItem |
|
1674 |
activeHelpKey: editDimensionExchangeLayouts |
|
1675 |
enabled: canExchangeSelectionLayouts |
|
1676 |
label: 'Exchange Layouts' |
|
1677 |
itemValue: exchangeLayouts |
|
1678 |
translateLabel: true |
|
1679 |
) |
|
1680 |
(MenuItem |
|
1681 |
label: '-' |
|
1682 |
) |
|
1683 |
(MenuItem |
|
1684 |
activeHelpKey: editDimensionCopyExtent |
|
1685 |
enabled: hasSingleSelection |
|
1686 |
label: 'Copy Extent' |
|
1687 |
itemValue: copyExtent |
|
1688 |
translateLabel: true |
|
1689 |
) |
|
1690 |
(MenuItem |
|
1691 |
activeHelpKey: editDimensionPasteExtent |
|
1692 |
enabled: canMoveOrAlignSelection |
|
1693 |
label: 'Paste Extent' |
|
1694 |
itemValue: pasteExtent |
|
1695 |
translateLabel: true |
|
1696 |
) |
|
1697 |
(MenuItem |
|
1698 |
activeHelpKey: editDimensionPasteWidth |
|
1699 |
enabled: canMoveOrAlignSelection |
|
1700 |
label: 'Paste Width' |
|
1701 |
itemValue: pasteWidth |
|
1702 |
translateLabel: true |
|
1703 |
) |
|
1704 |
(MenuItem |
|
1705 |
activeHelpKey: editDimensionPasteHeight |
|
1706 |
enabled: canMoveOrAlignSelection |
|
1707 |
label: 'Paste Height' |
|
1708 |
itemValue: pasteHeight |
|
1709 |
translateLabel: true |
|
1710 |
) |
|
1711 |
) |
|
1712 |
nil |
|
1713 |
nil |
|
1230
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
1714 |
) |
1827 | 1715 |
) |
1716 |
(MenuItem |
|
1717 |
label: '-' |
|
1718 |
) |
|
1719 |
(MenuItem |
|
1720 |
activeHelpKey: editOpenSpecDocumentation |
|
1721 |
label: 'Open Widget Documentation' |
|
1722 |
itemValue: doOpenWidgetDocumentation |
|
1723 |
translateLabel: true |
|
1724 |
) |
|
1725 |
(MenuItem |
|
1726 |
activeHelpKey: referToCOnfigDatabase |
|
1727 |
label: 'Refer to Config Database' |
|
1728 |
itemValue: configSelection |
|
1729 |
translateLabel: true |
|
1730 |
isVisible: false |
|
1731 |
) |
|
1732 |
(MenuItem |
|
1733 |
label: '-' |
|
1734 |
isVisible: false |
|
1735 |
) |
|
1736 |
(MenuItem |
|
1737 |
activeHelpKey: drawEdit |
|
1738 |
label: 'Draw Edit' |
|
1739 |
itemValue: shapeEdit |
|
1740 |
translateLabel: true |
|
1741 |
isVisible: false |
|
1742 |
) |
|
1743 |
(MenuItem |
|
1744 |
label: '-' |
|
1745 |
) |
|
1746 |
(MenuItem |
|
1747 |
activeHelpKey: group |
|
1748 |
enabled: enGroup |
|
1749 |
label: 'Group' |
|
1750 |
itemValue: group |
|
1751 |
translateLabel: true |
|
1752 |
) |
|
1753 |
(MenuItem |
|
1754 |
activeHelpKey: groupWithLayout |
|
1755 |
enabled: enGroup |
|
1756 |
label: 'Group with Layout' |
|
1757 |
itemValue: groupWithLayout |
|
1758 |
translateLabel: true |
|
1759 |
) |
|
1760 |
(MenuItem |
|
1761 |
activeHelpKey: ungroup |
|
1762 |
enabled: enUngroup |
|
1763 |
label: 'Ungroup' |
|
1764 |
itemValue: ungroup |
|
1765 |
translateLabel: true |
|
1766 |
) |
|
1767 |
(MenuItem |
|
1768 |
activeHelpKey: ungroupWithLayout |
|
1769 |
enabled: enUngroup |
|
1770 |
label: 'Ungroup with Layout' |
|
1771 |
itemValue: ungroupWithLayout |
|
1772 |
translateLabel: true |
|
1773 |
) |
|
1774 |
(MenuItem |
|
1775 |
label: '-' |
|
1776 |
) |
|
1777 |
(MenuItem |
|
1778 |
activeHelpKey: editBrowseViewClass |
|
1779 |
enabled: hasOneSelectionOtherThanCanvas |
|
1780 |
label: 'Browse Widget Class' |
|
1781 |
itemValue: doBrowseViewClass |
|
1782 |
translateLabel: true |
|
1783 |
) |
|
1784 |
(MenuItem |
|
1785 |
activeHelpKey: editInspectView |
|
1786 |
enabled: hasOneSelectionOtherThanCanvas |
|
1787 |
label: 'Inspect Widget' |
|
1788 |
itemValue: doInspectView |
|
1789 |
translateLabel: true |
|
1790 |
) |
|
1791 |
(MenuItem |
|
1792 |
activeHelpKey: editInspectSpec |
|
1793 |
label: 'Inspect Spec' |
|
1794 |
itemValue: doInspectSpec |
|
1795 |
translateLabel: true |
|
1796 |
) |
|
1797 |
) |
|
1798 |
nil |
|
1799 |
nil |
|
498 | 1800 |
) |
1801 |
! |
|
1802 |
||
1803 |
menuMove |
|
743 | 1804 |
"This resource specification was automatically generated |
1805 |
by the MenuEditor of ST/X." |
|
1806 |
||
755 | 1807 |
"Do not manually edit this!! If it is corrupted, |
743 | 1808 |
the MenuEditor may not be able to read the specification." |
498 | 1809 |
|
1810 |
" |
|
1811 |
MenuEditor new openOnClass:UIPainter andSelector:#menuMove |
|
1812 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuMove)) startUp |
|
1813 |
" |
|
1814 |
||
1815 |
<resource: #menu> |
|
1816 |
||
1817 |
^ |
|
1818 |
||
1819 |
#(#Menu |
|
1820 |
||
2208 | 1821 |
#( |
1822 |
#(#MenuItem |
|
1823 |
#label: 'Up' |
|
1824 |
#translateLabel: true |
|
1825 |
#value: #doStepUp |
|
1826 |
#activeHelpKey: #moveWidgetUp |
|
1827 |
#enabled: #canChangeOrderInContainer |
|
1828 |
#labelImage: #(#ResourceRetriever #Icon #upIcon 'Up') |
|
1829 |
) |
|
1830 |
#(#MenuItem |
|
1831 |
#label: 'Down' |
|
1832 |
#translateLabel: true |
|
1833 |
#value: #doStepDown |
|
1834 |
#activeHelpKey: #moveWidgetDown |
|
1835 |
#enabled: #canChangeOrderInContainer |
|
1836 |
#labelImage: #(#ResourceRetriever #Icon #downIcon 'Down') |
|
1837 |
) |
|
1838 |
#(#MenuItem |
|
1839 |
#label: 'Into' |
|
1840 |
#translateLabel: true |
|
1841 |
#value: #doStepIn |
|
1842 |
#activeHelpKey: #moveWidgetInto |
|
1843 |
#enabled: #canMoveSelectionIntoContainer |
|
1844 |
#labelImage: #(#ResourceRetriever #Icon #downRightIcon 'Into') |
|
1845 |
) |
|
1846 |
#(#MenuItem |
|
1847 |
#label: 'Out' |
|
1848 |
#translateLabel: true |
|
1849 |
#value: #doStepOut |
|
1850 |
#activeHelpKey: #moveWidgetOut |
|
1851 |
#enabled: #canMoveSelectionOutOfContainer |
|
1852 |
#labelImage: #(#ResourceRetriever #Icon #leftDownIcon 'Out') |
|
1853 |
) |
|
1854 |
) nil |
|
1855 |
nil |
|
446 | 1856 |
) |
1857 |
! |
|
1858 |
||
1940 | 1859 |
menuReplaceWidget |
1860 |
"This resource specification was automatically generated |
|
1861 |
by the MenuEditor of ST/X." |
|
1862 |
||
1863 |
"Do not manually edit this!! If it is corrupted, |
|
1864 |
the MenuEditor may not be able to read the specification." |
|
1865 |
||
1866 |
" |
|
1867 |
MenuEditor new openOnClass:UIPainter andSelector:#menuReplaceWidget |
|
1868 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuReplaceWidget)) startUp |
|
1869 |
" |
|
1870 |
||
1871 |
<resource: #menu> |
|
1872 |
||
1873 |
^ |
|
1874 |
#(Menu |
|
1875 |
( |
|
1876 |
(MenuItem |
|
1877 |
activeHelpKey: moveWidgetUp |
|
1878 |
enabled: canChangeOrderInContainer |
|
1879 |
label: 'Replace By...' |
|
1880 |
itemValue: doAskAndReplaceWidgetBy |
|
1881 |
translateLabel: true |
|
1882 |
) |
|
1883 |
) |
|
1884 |
nil |
|
1885 |
nil |
|
1886 |
) |
|
1887 |
! |
|
1888 |
||
446 | 1889 |
menuToolbar |
743 | 1890 |
"This resource specification was automatically generated |
1891 |
by the MenuEditor of ST/X." |
|
1892 |
||
778 | 1893 |
"Do not manually edit this!! If it is corrupted, |
743 | 1894 |
the MenuEditor may not be able to read the specification." |
446 | 1895 |
|
1896 |
" |
|
1897 |
MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar |
|
1898 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp |
|
1899 |
" |
|
1900 |
||
1901 |
<resource: #menu> |
|
1902 |
||
1690 | 1903 |
^ |
1750 | 1904 |
#(Menu |
1905 |
( |
|
1906 |
(MenuItem |
|
1907 |
activeHelpKey: testStartApplication |
|
1908 |
label: 'Start' |
|
1909 |
itemValue: doStartApplication |
|
1910 |
translateLabel: true |
|
1911 |
isButton: true |
|
1912 |
labelImage: (ResourceRetriever ToolbarIconLibrary start22x22Icon) |
|
1690 | 1913 |
) |
1750 | 1914 |
(MenuItem |
1917 | 1915 |
label: '-' |
1690 | 1916 |
) |
1750 | 1917 |
(MenuItem |
1918 |
activeHelpKey: fileNew |
|
1919 |
label: 'New' |
|
1920 |
itemValue: doNew |
|
1921 |
translateLabel: true |
|
1922 |
isButton: true |
|
2023 | 1923 |
isVisible: isStandAlone |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1924 |
labelImage: (ResourceRetriever ToolbarIconLibrary newWindowSpecIcon) |
1690 | 1925 |
) |
1750 | 1926 |
(MenuItem |
1950 | 1927 |
label: '-' |
2023 | 1928 |
isVisible: isStandAlone |
1950 | 1929 |
) |
1930 |
(MenuItem |
|
1750 | 1931 |
activeHelpKey: fileLoad |
1932 |
label: 'Load' |
|
1933 |
itemValue: doLoad |
|
1934 |
translateLabel: true |
|
1935 |
isButton: true |
|
2023 | 1936 |
isVisible: isStandAlone |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1937 |
labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) |
1690 | 1938 |
) |
1750 | 1939 |
(MenuItem |
1940 |
activeHelpKey: fileSave |
|
1941 |
label: 'Save' |
|
1942 |
itemValue: doSave |
|
1943 |
translateLabel: true |
|
1944 |
isButton: true |
|
1883 | 1945 |
labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) |
1690 | 1946 |
) |
1750 | 1947 |
(MenuItem |
1917 | 1948 |
label: '-' |
1949 |
) |
|
1950 |
(MenuItem |
|
1951 |
activeHelpKey: editUndo |
|
1952 |
enabled: hasUndoHistoryHolder |
|
1953 |
label: 'Undo' |
|
1954 |
itemValue: undoLast |
|
1955 |
translateLabel: true |
|
1956 |
isButton: true |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
1957 |
labelImage: (ResourceRetriever ToolbarIconLibrary undoIcon) |
1917 | 1958 |
) |
1959 |
(MenuItem |
|
1960 |
label: '-' |
|
1690 | 1961 |
) |
1750 | 1962 |
(MenuItem |
1963 |
activeHelpKey: editCut |
|
1991 | 1964 |
enabled: canCutHolder |
1750 | 1965 |
label: 'Cut' |
1966 |
itemValue: deleteSelection |
|
1967 |
translateLabel: true |
|
1968 |
isButton: true |
|
1883 | 1969 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutWidgetIcon) |
1690 | 1970 |
) |
1750 | 1971 |
(MenuItem |
1972 |
activeHelpKey: editCopy |
|
1991 | 1973 |
enabled: canCopyHolder |
1750 | 1974 |
label: 'Copy' |
1975 |
itemValue: copySelection |
|
1976 |
translateLabel: true |
|
1977 |
isButton: true |
|
1883 | 1978 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyWidgetIcon) |
1690 | 1979 |
) |
1750 | 1980 |
(MenuItem |
1981 |
activeHelpKey: editPaste |
|
1991 | 1982 |
enabled: canPasteKeepingLayoutHolder |
1750 | 1983 |
label: 'Paste With Layout' |
1984 |
itemValue: pasteWithLayout |
|
1985 |
translateLabel: true |
|
1986 |
isButton: true |
|
1883 | 1987 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteWidgetIcon) |
1690 | 1988 |
) |
1750 | 1989 |
(MenuItem |
1990 |
activeHelpKey: editDelete |
|
1991 | 1991 |
enabled: canCutHolder |
1750 | 1992 |
label: 'Delete' |
1993 |
itemValue: deleteTotalSelection |
|
1994 |
translateLabel: true |
|
1995 |
isButton: true |
|
1820 | 1996 |
isVisible: false |
1883 | 1997 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteWidgetIcon) |
1690 | 1998 |
) |
1750 | 1999 |
(MenuItem |
1917 | 2000 |
label: '-' |
1690 | 2001 |
) |
1750 | 2002 |
(MenuItem |
2003 |
activeHelpKey: moveWidgetUp |
|
2004 |
enabled: canChangeOrderInContainer |
|
2005 |
label: 'Move Up' |
|
2006 |
itemValue: doStepUp |
|
2007 |
translateLabel: true |
|
2008 |
isButton: true |
|
1883 | 2009 |
labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetUpIcon) |
1690 | 2010 |
) |
1750 | 2011 |
(MenuItem |
2012 |
activeHelpKey: moveWidgetDown |
|
2013 |
enabled: canChangeOrderInContainer |
|
2014 |
label: 'Move Down' |
|
2015 |
itemValue: doStepDown |
|
2016 |
translateLabel: true |
|
2017 |
isButton: true |
|
1883 | 2018 |
labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetDownIcon) |
1690 | 2019 |
) |
1750 | 2020 |
(MenuItem |
2021 |
activeHelpKey: moveWidgetInto |
|
2022 |
enabled: canMoveSelectionIntoContainer |
|
2023 |
label: 'Move Into' |
|
2024 |
itemValue: doStepIn |
|
2025 |
translateLabel: true |
|
2026 |
isButton: true |
|
1883 | 2027 |
labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetDownRightIcon) |
1690 | 2028 |
) |
1750 | 2029 |
(MenuItem |
2030 |
activeHelpKey: moveWidgetOut |
|
2031 |
enabled: canMoveSelectionOutOfContainer |
|
2032 |
label: 'Move Out' |
|
2033 |
itemValue: doStepOut |
|
2034 |
translateLabel: true |
|
2035 |
isButton: true |
|
1883 | 2036 |
labelImage: (ResourceRetriever ToolbarIconLibrary moveWidgetLeftDownIcon) |
1690 | 2037 |
) |
1750 | 2038 |
(MenuItem |
1917 | 2039 |
label: '-' |
1820 | 2040 |
startGroup: right |
1690 | 2041 |
) |
1750 | 2042 |
(MenuItem |
2043 |
activeHelpKey: settingsCanvas |
|
2044 |
label: 'Canvas' |
|
2045 |
translateLabel: true |
|
2046 |
indication: painterShown |
|
1690 | 2047 |
) |
1750 | 2048 |
(MenuItem |
2049 |
activeHelpKey: settingsGallery |
|
2050 |
label: 'Gallery' |
|
2051 |
translateLabel: true |
|
2052 |
indication: galleryShown |
|
1690 | 2053 |
) |
2054 |
) |
|
2055 |
nil |
|
2056 |
nil |
|
713 | 2057 |
) |
2058 |
! |
|
2059 |
||
2060 |
menuToolbar2 |
|
743 | 2061 |
"This resource specification was automatically generated |
2062 |
by the MenuEditor of ST/X." |
|
2063 |
||
778 | 2064 |
"Do not manually edit this!! If it is corrupted, |
743 | 2065 |
the MenuEditor may not be able to read the specification." |
713 | 2066 |
|
2067 |
" |
|
2068 |
MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar2 |
|
2069 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar2)) startUp |
|
2070 |
" |
|
2071 |
||
2072 |
<resource: #menu> |
|
2073 |
||
1565 | 2074 |
^ |
2075 |
#(#Menu |
|
2076 |
#( |
|
2077 |
#(#MenuItem |
|
2078 |
#label: 'Align Left' |
|
2079 |
#isButton: true |
|
2080 |
#value: #alignSelectionLeft |
|
2081 |
#activeHelpKey: #alignSelectionLeft |
|
2082 |
#enabled: #canMoveOrAlignSelection |
|
2083 |
#labelImage: #(#ResourceRetriever nil #iconAlignL) |
|
2084 |
) |
|
2085 |
#(#MenuItem |
|
2086 |
#label: 'Align Right' |
|
2087 |
#isButton: true |
|
2088 |
#value: #alignSelectionRight |
|
2089 |
#activeHelpKey: #alignSelectionRight |
|
2090 |
#enabled: #canMoveOrAlignSelection |
|
2091 |
#labelImage: #(#ResourceRetriever nil #iconAlignR) |
|
2092 |
) |
|
2093 |
#(#MenuItem |
|
2094 |
#label: 'Align Left & Right' |
|
2095 |
#isButton: true |
|
2096 |
#value: #alignSelectionLeftAndRight |
|
2097 |
#activeHelpKey: #alignSelectionLeftAndRight |
|
2098 |
#enabled: #canMoveOrAlignSelection |
|
2099 |
#labelImage: #(#ResourceRetriever nil #iconAlignLR) |
|
2100 |
) |
|
2101 |
#(#MenuItem |
|
2102 |
#label: '' |
|
2103 |
) |
|
2104 |
#(#MenuItem |
|
2105 |
#label: 'Align Top' |
|
2106 |
#isButton: true |
|
2107 |
#value: #alignSelectionTop |
|
2108 |
#activeHelpKey: #alignSelectionTop |
|
2109 |
#enabled: #canMoveOrAlignSelection |
|
2110 |
#labelImage: #(#ResourceRetriever nil #iconAlignT) |
|
2111 |
) |
|
2112 |
#(#MenuItem |
|
2113 |
#label: 'Align Bottom' |
|
2114 |
#isButton: true |
|
2115 |
#value: #alignSelectionBottom |
|
2116 |
#activeHelpKey: #alignSelectionBottom |
|
2117 |
#enabled: #canMoveOrAlignSelection |
|
2118 |
#labelImage: #(#ResourceRetriever nil #iconAlignB) |
|
2119 |
) |
|
2120 |
#(#MenuItem |
|
2121 |
#label: 'Align Top & Bottom' |
|
2122 |
#isButton: true |
|
2123 |
#value: #alignSelectionTopAndBottom |
|
2124 |
#activeHelpKey: #alignSelectionTopAndBottom |
|
2125 |
#enabled: #canMoveOrAlignSelection |
|
2126 |
#labelImage: #(#ResourceRetriever nil #iconAlignTB) |
|
2127 |
) |
|
2128 |
#(#MenuItem |
|
2129 |
#label: '' |
|
2130 |
) |
|
2131 |
#(#MenuItem |
|
2132 |
#label: 'Move Left' |
|
2133 |
#isButton: true |
|
2134 |
#triggerOnDown: true |
|
2135 |
#hideMenuOnActivated: false |
|
2136 |
#value: #moveSelectionLeft |
|
2137 |
#activeHelpKey: #changePositionLeft |
|
2138 |
#enabled: #canMoveOrAlignSelection |
|
1883 | 2139 |
#labelImage: #(#ResourceRetriever nil #arrowLeft) |
1565 | 2140 |
) |
2141 |
#(#MenuItem |
|
2142 |
#label: 'Move Right' |
|
2143 |
#isButton: true |
|
2144 |
#triggerOnDown: true |
|
2145 |
#hideMenuOnActivated: false |
|
2146 |
#value: #moveSelectionRight |
|
2147 |
#activeHelpKey: #changePositionRight |
|
2148 |
#enabled: #canMoveOrAlignSelection |
|
1883 | 2149 |
#labelImage: #(#ResourceRetriever nil #arrowRight) |
1565 | 2150 |
) |
2151 |
#(#MenuItem |
|
2152 |
#label: 'Move Up' |
|
2153 |
#isButton: true |
|
2154 |
#triggerOnDown: true |
|
2155 |
#value: #moveSelectionUp |
|
2156 |
#activeHelpKey: #changePositionUp |
|
2157 |
#enabled: #canMoveOrAlignSelection |
|
1883 | 2158 |
#labelImage: #(#ResourceRetriever nil #arrowUp) |
1565 | 2159 |
) |
2160 |
#(#MenuItem |
|
2161 |
#label: 'Move Down' |
|
2162 |
#isButton: true |
|
2163 |
#triggerOnDown: true |
|
2164 |
#value: #moveSelectionDown |
|
2165 |
#activeHelpKey: #changePositionDown |
|
2166 |
#enabled: #canMoveOrAlignSelection |
|
1883 | 2167 |
#labelImage: #(#ResourceRetriever nil #arrowDown) |
1565 | 2168 |
) |
2169 |
#(#MenuItem |
|
2170 |
#label: 'Widget Documentation' |
|
2171 |
#translateLabel: true |
|
2172 |
#isButton: true |
|
2173 |
#startGroup: #right |
|
2174 |
#value: #doOpenWidgetDocumentation |
|
2175 |
#activeHelpKey: #editOpenSpecDocumentation |
|
2176 |
#labelImage: #(#ResourceRetriever #Icon #helpIcon) |
|
2177 |
) |
|
2178 |
) |
|
2179 |
nil |
|
2180 |
nil |
|
217 | 2181 |
) |
446 | 2182 |
! ! |
2183 |
||
60 | 2184 |
!UIPainter methodsFor:'aspects'! |
2185 |
||
724 | 2186 |
aspectFor:aKey |
765 | 2187 |
"returns the aspect for aKey" |
2188 |
||
2189 |
^aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
|
724 | 2190 |
! |
2191 |
||
565 | 2192 |
canChangeOrderInContainer |
765 | 2193 |
"returns a boolean value holder which is true if the widget order can be changed |
2194 |
within their container" |
|
2195 |
||
565 | 2196 |
^ builder booleanValueAspectFor:#canChangeOrderInContainer |
2197 |
! |
|
2198 |
||
1230
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2199 |
canExchangeSelectionLayouts |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2200 |
"returns a boolean value holder which is true in case that the selection |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2201 |
consists of exactly 2 components |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2202 |
and all widgets in the selection can change its layout through to a move or |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2203 |
align operation" |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2204 |
|
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2205 |
^ builder booleanValueAspectFor:#canExchangeSelectionLayouts |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2206 |
! |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2207 |
|
282 | 2208 |
canMoveOrAlignSelection |
2209 |
"returns a boolean value holder which is true in case that any selection exists |
|
2210 |
and all widgets in the selection can change its layout through to a move or |
|
765 | 2211 |
align operation" |
2212 |
||
282 | 2213 |
^ builder booleanValueAspectFor:#canMoveOrAlignSelection |
222 | 2214 |
! |
2215 |
||
755 | 2216 |
canMoveSelection |
2217 |
||
765 | 2218 |
^self canChangeOrderInContainer value or: [ |
2219 |
self canMoveSelectionOutOfContainer value or: [ |
|
2220 |
self canMoveSelectionOutOfContainer value]] |
|
755 | 2221 |
! |
2222 |
||
282 | 2223 |
canMoveSelectionIntoContainer |
765 | 2224 |
"returns a boolean value holder which is true in case that one widget is selected |
282 | 2225 |
and can change its container widget to the next element in the list which will have |
765 | 2226 |
the same container" |
2227 |
||
282 | 2228 |
^ builder booleanValueAspectFor:#canMoveSelectionIntoContainer |
2229 |
! |
|
2230 |
||
2231 |
canMoveSelectionOutOfContainer |
|
765 | 2232 |
"returns a boolean value holder which is true in case that one widget is selected |
2233 |
which is contained within another component" |
|
2234 |
||
282 | 2235 |
^ builder booleanValueAspectFor:#canMoveSelectionOutOfContainer |
222 | 2236 |
! |
2237 |
||
1991 | 2238 |
canPasteKeepingLayoutHolder |
2239 |
||
2240 |
|holder| |
|
2241 |
(holder := builder bindingAt:#valueOfCanPasteWithKeepingLayout) isNil ifTrue:[ |
|
2242 |
builder aspectAt:#valueOfCanPasteWithKeepingLayout put:(holder := false asValue). |
|
2243 |
]. |
|
2244 |
^ holder |
|
2245 |
! |
|
2246 |
||
1940 | 2247 |
canReplaceSelection |
2248 |
treeView isCanvasSelected ifTrue:[^ false]. |
|
2249 |
^ true |
|
2250 |
! |
|
2251 |
||
118 | 2252 |
enableChannel |
2012 | 2253 |
"true if modifications are allowed otherwise in test mode" |
2254 |
||
2255 |
^ builder valueAspectFor:#enableChannel initialValue:true |
|
2256 |
! |
|
2257 |
||
2258 |
enableChannel2 |
|
765 | 2259 |
"true if modifications are allowed otherwise running test" |
2260 |
||
2261 |
^ self painter enableChannel |
|
109 | 2262 |
! |
2263 |
||
173 | 2264 |
galleryShown |
765 | 2265 |
"returns a boolean value holder which is set to true if the gallery is shown" |
2266 |
||
173 | 2267 |
|holder| |
2268 |
||
2269 |
(holder := builder bindingAt:#galleryShown) isNil ifTrue:[ |
|
2208 | 2270 |
builder aspectAt:#galleryShown put:(holder := true asValue). |
2271 |
holder addDependent:self |
|
173 | 2272 |
]. |
2273 |
^ holder |
|
2274 |
||
2275 |
! |
|
2276 |
||
282 | 2277 |
hasOneSelectionOtherThanCanvas |
765 | 2278 |
"returns a value holder which is true in case that one widget is selected |
2279 |
other than the root" |
|
2280 |
||
282 | 2281 |
^ builder booleanValueAspectFor:#hasOneSelectionOtherThanCanvas |
222 | 2282 |
! |
2283 |
||
1917 | 2284 |
hasUndoHistory |
2285 |
^ self painter hasUndoHistory |
|
2286 |
! |
|
2287 |
||
1954 | 2288 |
hasUndoHistoryHolder |
2289 |
^ self painter hasUndoHistoryHolder |
|
2290 |
! |
|
2291 |
||
884 | 2292 |
helpIcon |
2293 |
||
2294 |
^Icon helpIcon |
|
2295 |
! |
|
2296 |
||
109 | 2297 |
noteBookView |
765 | 2298 |
"returns the notebook view; initialize the tools embedded in the notebook" |
2299 |
||
2159 | 2300 |
|noteBook| |
109 | 2301 |
|
2302 |
(noteBook := builder bindingAt:#noteBookView) isNil ifTrue:[ |
|
1316 | 2303 |
noteBook := View new. |
2304 |
builder aspectAt:#noteBookView put:noteBook. |
|
2305 |
||
2159 | 2306 |
layoutTool := self createToolApplication:UILayoutTool spec:#windowSpec in:noteBook. |
2307 |
helpTool := self createToolApplication:UIHelpTool spec:#innerSpec in:noteBook. |
|
2308 |
specTool := self createToolApplication:UISpecificationTool spec:#windowSpec in:noteBook. |
|
2309 |
||
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
2310 |
helpTool loadFromClass:specClass. |
109 | 2311 |
]. |
2312 |
^ noteBook |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
2313 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
2314 |
"Modified: / 31-08-2006 / 10:11:15 / cg" |
109 | 2315 |
! |
2316 |
||
282 | 2317 |
painterShown |
765 | 2318 |
"returns a boolean value holder which is set to true if the painter is shown" |
2319 |
||
173 | 2320 |
|holder| |
2321 |
||
2322 |
(holder := builder bindingAt:#painterShown) isNil ifTrue:[ |
|
2208 | 2323 |
builder aspectAt:#painterShown put:(holder := true asValue). |
2324 |
holder addDependent:self |
|
173 | 2325 |
]. |
2326 |
^ holder |
|
2327 |
||
2328 |
! |
|
2329 |
||
109 | 2330 |
tabList |
765 | 2331 |
"returns a value holder which keeps a list of the section labels in the notebook" |
2332 |
||
1782 | 2333 |
|tabs holder| |
109 | 2334 |
|
2335 |
(holder := builder bindingAt:#tabList) isNil ifTrue:[ |
|
1782 | 2336 |
tabs := #(Basics Details Layout). |
2337 |
builder aspectAt:#tabList put:(holder := (resources array:tabs) asValue). |
|
109 | 2338 |
]. |
2339 |
^ holder |
|
2340 |
! |
|
2341 |
||
2342 |
tabModel |
|
765 | 2343 |
"returns a value holder which keeps the label of the current section in the notebook" |
2344 |
||
109 | 2345 |
|holder| |
2346 |
||
2347 |
(holder := builder bindingAt:#tabModel) isNil ifTrue:[ |
|
2208 | 2348 |
holder := AspectAdaptor new subject:self; forAspect:#tabSelection. |
2349 |
builder aspectAt:#tabModel put:holder. |
|
109 | 2350 |
]. |
2351 |
^ holder |
|
222 | 2352 |
! |
2353 |
||
2354 |
treeView |
|
765 | 2355 |
"returns the tree view which holds all widget" |
2356 |
||
222 | 2357 |
^ treeView |
729 | 2358 |
! |
2359 |
||
2360 |
valueOfCanPasteWithKeepingLayout |
|
1991 | 2361 |
self obsoleteMethodWarning:'stupid name - use #canPasteKeepingLayoutHolder'. |
2362 |
^ self canPasteKeepingLayoutHolder |
|
60 | 2363 |
! ! |
2364 |
||
587
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
2365 |
!UIPainter methodsFor:'building editors'! |
513 | 2366 |
|
2367 |
openDataSetColumnEditor |
|
765 | 2368 |
"opens a Table Column Editor on current widget" |
2369 |
||
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2370 |
|cls editor specTool columnHolder tableSelector columns| |
824
1d5adf147721
change mechanism for opening the dataset builder (step 2)
tz
parents:
819
diff
changeset
|
2371 |
|
1983 | 2372 |
(cls := self resolveName:specClassName) isNil ifTrue:[ |
2373 |
self askForSaving ifTrue:[cls := self resolveName:specClassName]. |
|
1103
ecc91379704b
accept before opening an editor
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
2374 |
]. |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2375 |
cls isNil ifTrue:[^ self]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2376 |
|
1103
ecc91379704b
accept before opening an editor
Claus Gittinger <cg@exept.de>
parents:
1071
diff
changeset
|
2377 |
self modifiedChannel value ifTrue:[ |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2378 |
(self confirm:'Accept changes made to spec ?') ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2379 |
self accept |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2380 |
] |
513 | 2381 |
]. |
743 | 2382 |
|
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2383 |
editor := DataSetBuilder new. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2384 |
specTool := self specTool. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2385 |
|
513 | 2386 |
editor masterApplication:self. |
824
1d5adf147721
change mechanism for opening the dataset builder (step 2)
tz
parents:
819
diff
changeset
|
2387 |
editor specClass: cls. |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2388 |
editor rowClassName:(specTool specification rowClassName). |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2389 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2390 |
columnHolder := specTool aspectFor:#columnHolder. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2391 |
tableSelector := columnHolder value. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2392 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2393 |
tableSelector := tableSelector size ~~ 0 ifTrue:[tableSelector asSymbol] |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2394 |
ifFalse:[nil]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2395 |
|
1554
d5e4612bf7cf
implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents:
1545
diff
changeset
|
2396 |
(tableSelector notNil and:[cls class includesSelector:tableSelector]) ifTrue:[ |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2397 |
editor openModalOnClass:cls andSelector:tableSelector |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2398 |
] ifFalse:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2399 |
columns := specTool specification columns. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2400 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2401 |
columns size ~~ 0 ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2402 |
editor openModalOnResourceSpec:columns |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2403 |
] ifFalse:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2404 |
editor openModal |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2405 |
] |
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
2406 |
]. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
2407 |
|
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2408 |
editor hasSaved ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2409 |
specTool specification columns:nil. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2410 |
specTool specification rowClassName:(editor rowClassName). |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2411 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2412 |
tableSelector = editor specSelector ifFalse:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2413 |
columnHolder value:(editor specSelector). |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2414 |
self accept. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2415 |
]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2416 |
^ self |
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
2417 |
]. |
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
2418 |
|
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2419 |
(editor modified and:[tableSelector isNil]) ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2420 |
specTool specification columns:(editor columns). |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2421 |
specTool specification rowClassName:(editor rowClassName). |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2422 |
self modifiedChannel value:true. |
827
aa8f49da0f22
change mechanism for opening the dataset builder (step 3)
tz
parents:
824
diff
changeset
|
2423 |
]. |
513 | 2424 |
! |
2425 |
||
2426 |
openEditMenu |
|
765 | 2427 |
"opens a Menu Editor on current widget" |
2428 |
||
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2429 |
|cls selectorOrMenu editor selectedSpec spec holder| |
513 | 2430 |
|
1983 | 2431 |
(cls := self resolveName:specClassName) isNil ifTrue:[ |
2432 |
self askForSaving ifTrue:[cls := self resolveName:specClassName]. |
|
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2433 |
]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2434 |
cls isNil ifTrue:[^ self]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2435 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2436 |
self modifiedChannel value ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2437 |
(self confirm:'Accept changes made to spec ?') ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2438 |
self accept |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2439 |
] |
513 | 2440 |
]. |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2441 |
spec := self specTool specification. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2442 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2443 |
(selectorOrMenu := spec menuSelector) notNil ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2444 |
selectorOrMenu := selectorOrMenu asSymbol |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2445 |
] ifFalse:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2446 |
"/ cg: q&d hack ... |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2447 |
selectorOrMenu := nil. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2448 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2449 |
(selectedSpec := treeView propertySelected) notNil ifTrue:[ |
1688
389815b12d3a
Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents:
1684
diff
changeset
|
2450 |
Error handle:[:ex | |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2451 |
selectorOrMenu := nil. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2452 |
] do:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2453 |
selectorOrMenu := selectedSpec view asMenu. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2454 |
] |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2455 |
]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2456 |
]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2457 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2458 |
editor := MenuEditor new. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2459 |
editor masterApplication:self. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2460 |
editor specClass: cls. |
1669 | 2461 |
editor useHelpTool:(self helpTool). |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2462 |
|
1698 | 2463 |
selectorOrMenu class == Menu |
2464 |
ifTrue: [editor openModalOnMenu:selectorOrMenu] |
|
2465 |
ifFalse: [editor openModalOnClass:cls andSelector:selectorOrMenu]. |
|
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2466 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2467 |
editor hasSaved ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2468 |
holder := self specTool aspectFor:#menuSelector. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2469 |
holder value:(editor specSelector). |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2470 |
self accept. |
1669 | 2471 |
^ self |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2472 |
]. |
513 | 2473 |
! |
2474 |
||
2475 |
openHierarchicalListEditor |
|
765 | 2476 |
"opens a Hierarchical List Editor on current widget" |
2477 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2478 |
|selector editor spec| |
765 | 2479 |
|
1983 | 2480 |
(self resolveName:specClassName) isNil ifTrue:[ |
2208 | 2481 |
self askForSaving ifFalse: [^self] |
513 | 2482 |
]. |
2483 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2484 |
spec := self specTool specification. |
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2485 |
(selector := spec hierarchicalList) notNil ifTrue:[ |
2208 | 2486 |
selector := selector asSymbol |
513 | 2487 |
]. |
735
29c8681ce68d
no picking for hierarchical lists + error handler for the starting phase
tz
parents:
729
diff
changeset
|
2488 |
|
513 | 2489 |
editor := HierarchicalListEditor new. |
2490 |
editor masterApplication:self. |
|
1983 | 2491 |
editor openModalOnClass:specClassName andSelector:selector. |
765 | 2492 |
|
2493 |
editor specSelector ~= selector ifTrue:[ |
|
2208 | 2494 |
editor hasSaved ifTrue:[ |
2495 |
spec hierarchicalList:editor specSelector. |
|
2496 |
self modifiedChannel value:true. |
|
2497 |
self accept |
|
2498 |
] |
|
513 | 2499 |
] |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2500 |
|
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2501 |
"Modified: / 16.7.1998 / 18:15:46 / cg" |
513 | 2502 |
! |
2503 |
||
729 | 2504 |
openSubSpecGUIPainter |
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2505 |
"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
|
2506 |
|
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2507 |
|spec cls meta sel| |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2508 |
|
1983 | 2509 |
(self resolveName:specClassName) isNil ifTrue:[ |
1523 | 2510 |
self askForSaving ifFalse: [^self] |
913
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2511 |
]. |
12e73e6c57b4
do open building editors after defining first new app class
tz
parents:
892
diff
changeset
|
2512 |
|
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2513 |
spec := self specTool specification. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2514 |
cls := spec majorKey. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2515 |
cls isNil ifTrue:[ |
1983 | 2516 |
cls := specClassName. |
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2517 |
]. |
1983 | 2518 |
(cls := self resolveName:cls inClass:(Smalltalk at: specClassName asSymbol)) isNil ifTrue:[ |
1523 | 2519 |
spec majorKey isNil ifTrue:[ |
2520 |
^ self warn:'Cannot find class (no majorKey specified).'. |
|
2521 |
]. |
|
2522 |
^ 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
|
2523 |
]. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2524 |
sel := spec minorKey. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2525 |
meta := cls class whichClassIncludesSelector:sel. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2526 |
meta isNil ifTrue:[ |
1523 | 2527 |
^ 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
|
2528 |
]. |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2529 |
|
1523 | 2530 |
self class |
2531 |
openOnClass:meta soleInstance |
|
2532 |
andSelector:spec minorKey. |
|
2533 |
||
2534 |
"Modified: / 5.11.2001 / 16:51:46 / cg" |
|
609
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2535 |
! |
60f89fba074a
Allow opening of a GUI Painter for a subSpecification.
Stefan Vogel <sv@exept.de>
parents:
587
diff
changeset
|
2536 |
|
743 | 2537 |
openTabListEditor |
765 | 2538 |
"opens a Tab List Editor on current widget" |
2539 |
||
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2540 |
|selector editor spec cls holder| |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2541 |
|
1983 | 2542 |
(cls := self resolveName:specClassName) isNil ifTrue:[ |
2543 |
self askForSaving ifTrue:[cls := self resolveName:specClassName]. |
|
513 | 2544 |
]. |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2545 |
cls isNil ifTrue:[^ self]. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2546 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2547 |
self modifiedChannel value ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2548 |
(self confirm:'Accept changes made to spec ?') ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2549 |
self accept |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2550 |
] |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2551 |
]. |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2552 |
spec := self specTool specification. |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2553 |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2554 |
(selector := spec listSelector) isArray |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2555 |
ifTrue: [^self warn: 'Cannot open the Tab List Editor on an array!!']. |
743 | 2556 |
|
2557 |
editor := TabListEditor new. |
|
513 | 2558 |
editor masterApplication:self. |
1453
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2559 |
editor openModalOnClass:cls andSelector:selector. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2560 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2561 |
editor hasSaved ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2562 |
holder := self specTool aspectFor:#listSelector. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2563 |
|
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2564 |
holder value ~= editor specSelector ifTrue:[ |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2565 |
holder value:editor specSelector. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2566 |
self accept. |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2567 |
] |
0cf534cc29a9
bugfix when after close subtool (table menu ..) when reading selector
ca
parents:
1444
diff
changeset
|
2568 |
]. |
513 | 2569 |
! ! |
2570 |
||
109 | 2571 |
!UIPainter methodsFor:'change & update'! |
2572 |
||
222 | 2573 |
layoutChanged |
282 | 2574 |
"called by the painter/canvas whenever the layout of the current selected |
765 | 2575 |
widget has changed" |
2576 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2577 |
self isModified ifFalse:[ |
1188 | 2578 |
self layoutTool update. |
2579 |
self clearModifiedFlag |
|
222 | 2580 |
] |
2581 |
! |
|
2582 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2583 |
propertyChanged |
282 | 2584 |
"called by the painter/canvas whenever the property of the current selected |
765 | 2585 |
widget has changed" |
2586 |
||
1071 | 2587 |
|property spec| |
765 | 2588 |
|
2589 |
(property := treeView propertySelected) notNil ifTrue:[ |
|
1188 | 2590 |
spec := property spec copy. |
2591 |
self specTool specification:spec. |
|
2592 |
self setViewInLayoutTool:(property view) spec:spec. |
|
2593 |
self clearModifiedFlag |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2594 |
] ifFalse:[ |
1188 | 2595 |
self layoutTool layoutView notNil ifTrue:[ |
2596 |
self clearModifiedFlag. |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2597 |
self treeSelectionChanged |
1188 | 2598 |
] |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
2599 |
] |
222 | 2600 |
! |
2601 |
||
2602 |
update:something with:aParameter from:someObject |
|
765 | 2603 |
"catches change notifications" |
2604 |
||
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2605 |
|window lbl| |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2606 |
|
222 | 2607 |
someObject == treeView model ifTrue:[ |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2608 |
(something == #selection |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2609 |
or:[something == #selectionIndex]) ifTrue:[self treeSelectionChanged]. |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
2610 |
^ self |
173 | 2611 |
]. |
2612 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2613 |
someObject == self galleryShown ifTrue:[ |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2614 |
"/ galleryShown toggle changed |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2615 |
window := selectionPanel window. |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2616 |
(someObject value) ifTrue:[ |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2617 |
self raiseUIView:window |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2618 |
] ifFalse:[ |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2619 |
self hideUIView:window |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2620 |
]. |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
2621 |
^ self |
173 | 2622 |
]. |
2623 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2624 |
someObject == self painterShown ifTrue:[ |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2625 |
"/ canvasShown toggle changed |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2626 |
window := self painter topView. |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2627 |
(someObject value) ifTrue:[ |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2628 |
self raiseUIView:window |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2629 |
] ifFalse:[ |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2630 |
self hideUIView:window |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2631 |
]. |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
2632 |
^ self |
173 | 2633 |
]. |
2634 |
||
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2635 |
someObject == self autoAcceptOnSelectionChange ifTrue:[ |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2636 |
lbl := someObject value ifTrue:['Apply'] ifFalse:['OK']. |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2637 |
(builder componentAt:'acceptButton') label:(resources string:lbl). |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2638 |
^ self |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2639 |
]. |
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
2640 |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2641 |
"Modified: / 16.7.1998 / 19:09:57 / cg" |
884 | 2642 |
! |
2643 |
||
2644 |
updateChannels |
|
2645 |
"updates the channels" |
|
2646 |
||
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2647 |
|canCutOrCopy canPaste clipboard sel treeSelection| |
884 | 2648 |
|
2649 |
self canMoveOrAlignSelection value:(treeView canMoveOrAlignSelection). |
|
1230
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2650 |
self canExchangeSelectionLayouts value:(treeView canExchangeSelectionLayouts). |
884 | 2651 |
self canChangeOrderInContainer value:(treeView canChangeOrderInContainer). |
2652 |
self canMoveSelectionIntoContainer value:(treeView canMoveSelectionIntoContainer). |
|
2653 |
self canMoveSelectionOutOfContainer value:(treeView canMoveSelectionOutOfContainer). |
|
2654 |
self hasOneSelectionOtherThanCanvas value:(treeView hasOneSelectionOtherThanCanvas). |
|
2655 |
||
2656 |
treeView notNil |
|
2657 |
ifTrue: |
|
2658 |
[ |
|
1230
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2659 |
treeSelection := treeView selection. |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2660 |
"/ the top-node cannot be cut, copied or pasted. |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2661 |
canCutOrCopy := treeSelection size >= 1 and:[treeSelection first ~~ 1]. |
1872 | 2662 |
clipboard := self getClipboardObject. |
2663 |
||
2664 |
clipboard isCollection |
|
2665 |
ifTrue:[clipboard notEmpty ifTrue:[sel := clipboard first]] |
|
2666 |
ifFalse:[sel := clipboard]. |
|
1230
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
2667 |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
2668 |
canPaste := (sel isKindOf:UISpecification) |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
2669 |
"/ and:[treeSelection size = 1 |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
2670 |
"/ and:[treeSelection first == 1 |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
2671 |
"/ or: [self canPasteInto: treeView selectedNode contents view]]] |
884 | 2672 |
]. |
2673 |
||
1991 | 2674 |
self canCutHolder value: canCutOrCopy. |
2675 |
self canCopyHolder value: canCutOrCopy. |
|
2676 |
self canPasteHolder value: canPaste. |
|
2677 |
self canPasteKeepingLayoutHolder value: (canPaste "& self canKeepLayoutInSelection"). |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2678 |
|
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1059
diff
changeset
|
2679 |
"/ self modifiedChannel value: false. |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1059
diff
changeset
|
2680 |
|
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
2681 |
"Modified: / 16.7.1998 / 19:13:30 / cg" |
109 | 2682 |
! ! |
2683 |
||
952 | 2684 |
!UIPainter methodsFor:'defaults'! |
2685 |
||
2686 |
aboutImage |
|
2687 |
"the image to be displayed in my about-box; |
|
2688 |
If nil is returned, thhe ST/X default image is used." |
|
2689 |
||
2690 |
^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/setup_windows.xpm' |
|
2691 |
||
2692 |
"Created: / 13.8.1998 / 20:33:05 / cg" |
|
1466
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
2693 |
! |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
2694 |
|
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
2695 |
defaultWindowSpecClass |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
2696 |
^ WindowSpec |
952 | 2697 |
! ! |
2698 |
||
109 | 2699 |
!UIPainter methodsFor:'event handling'! |
2700 |
||
2701 |
doesNotUnderstand:aMessage |
|
1940 | 2702 |
"forward misunderstood messages to the painter" |
282 | 2703 |
|
2704 |
|painter| |
|
2705 |
||
2706 |
painter := self painter. |
|
2707 |
||
2708 |
(painter respondsTo:(aMessage selector)) ifTrue:[ |
|
1940 | 2709 |
^ aMessage sendTo:painter |
282 | 2710 |
]. |
2711 |
super doesNotUnderstand:aMessage |
|
2712 |
||
1957 | 2713 |
! |
2714 |
||
2715 |
processEvent:anEvent |
|
2716 |
"filter keyboard events. |
|
2717 |
Return true, if I have eaten the event" |
|
2718 |
||
2719 |
|key| |
|
2720 |
||
2721 |
anEvent isKeyPressEvent ifTrue:[ |
|
2722 |
||
2723 |
anEvent targetView == treeView ifFalse:[^ false]. |
|
2724 |
treeView hasFocus ifFalse:[^ false]. |
|
2725 |
||
2726 |
key := anEvent key. |
|
2727 |
||
2728 |
"/ (anEvent rawKey == #Cmdr) ifTrue:[ |
|
2729 |
"/ self openNameEditorOnTreeSelection. |
|
2730 |
"/ ^ true. |
|
2731 |
"/ ]. |
|
2732 |
(anEvent rawKey == #CtrlCursorUp) ifTrue:[ |
|
2733 |
self doStepUp. |
|
2734 |
^ true. |
|
2735 |
]. |
|
2736 |
(anEvent rawKey == #CtrlCursorDown) ifTrue:[ |
|
2737 |
self doStepDown. |
|
2738 |
^ true. |
|
2739 |
]. |
|
2740 |
(anEvent rawKey == #CtrlCursorLeft) ifTrue:[ |
|
2741 |
self doStepOut. |
|
2742 |
^ true. |
|
2743 |
]. |
|
2744 |
(anEvent rawKey == #CtrlCursorRight) ifTrue:[ |
|
2745 |
self doStepIn. |
|
2746 |
^ true. |
|
2747 |
]. |
|
2748 |
]. |
|
2749 |
||
2750 |
^ false. |
|
282 | 2751 |
! ! |
2752 |
||
547 | 2753 |
!UIPainter methodsFor:'help'! |
2754 |
||
572 | 2755 |
defaultInfoLabel |
765 | 2756 |
"returns the default info label" |
572 | 2757 |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
2758 |
specClassName isNil ifTrue: [^'No class defined.']. |
877 | 2759 |
specSelector isNil ifTrue: [^'No selector defined.']. |
2001 | 2760 |
^ specClassName printString, ' >> ', specSelector |
877 | 2761 |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
2762 |
"Modified: / 31-08-2006 / 10:12:03 / cg" |
297 | 2763 |
! ! |
2764 |
||
1917 | 2765 |
!UIPainter methodsFor:'help spec'! |
2766 |
||
2767 |
flyByHelpSpec |
|
2768 |
|spec| |
|
2769 |
||
2770 |
spec := self class flyByHelpSpec. |
|
2771 |
spec at:#editUndo put:(resources string:'Undo (%1)' |
|
2772 |
with:(resources string:self painter undoHistory labelOfLastUndo)). |
|
2773 |
^ spec |
|
2774 |
! |
|
2775 |
||
2776 |
helpSpec |
|
2777 |
|spec| |
|
2778 |
||
2779 |
spec := self class helpSpec. |
|
2780 |
spec at:#editUndo put:(resources string:'Undo (%1)' |
|
2781 |
with:(resources string:self painter undoHistory labelOfLastUndo)). |
|
2782 |
^ spec |
|
2783 |
! ! |
|
2784 |
||
2023 | 2785 |
!UIPainter methodsFor:'initialization'! |
2786 |
||
2787 |
initialize |
|
2788 |
|name| |
|
2789 |
||
2790 |
super initialize. |
|
2791 |
||
2792 |
modified := false. |
|
2793 |
aspects := IdentityDictionary new. |
|
2794 |
aspects at:#classNameChannel put:'NewApplication' asValue. |
|
2795 |
aspects at:#superclassNameChannel put:'ApplicationModel' asValue. |
|
2796 |
aspects at:#methodNameChannel put:'windowSpec' asValue. |
|
2797 |
||
2798 |
treeView := TreeView new. |
|
2799 |
treeView windowSpecClass:(self defaultWindowSpecClass). |
|
2800 |
treeView |
|
2801 |
selectConditionBlock:[:newSelection | self selectionChangeAllowed:newSelection ]. |
|
2802 |
||
2803 |
painterView := StandardSystemView new. |
|
2804 |
name := name ? UIPainter defaultNameOfCanvas. |
|
2805 |
painterView beToolWindow. |
|
2806 |
painterView name:name. |
|
2807 |
painterView label:name. |
|
2808 |
painterView extent:(treeView windowSpecClass defaultExtentInUIPainter). |
|
2809 |
painter := UIPainterView in:painterView. |
|
2810 |
painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout. |
|
2811 |
treeView := treeView canvas:painter specName:name. |
|
2812 |
painter treeView:treeView. |
|
2813 |
treeView model addDependent:self. |
|
2814 |
painter enableChannel:(self enableChannel). |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
2815 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
2816 |
selectionPanel := self selectionPanelClass new. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
2817 |
selectionPanel allButOpenInterface:#windowSpec. |
2023 | 2818 |
! ! |
2819 |
||
1718 | 2820 |
!UIPainter methodsFor:'menus-dynamic'! |
1521
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
2821 |
|
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
2822 |
menuEdit |
1528 | 2823 |
^ [ |
2824 |
|m i| |
|
2825 |
||
2826 |
m := self class menuEdit. |
|
2827 |
m := m decodeAsLiteralArray. |
|
2828 |
i := m detectItem:[:item | item nameKey == #undo] ifNone:nil. |
|
2829 |
i notNil ifTrue:[ |
|
1917 | 2830 |
i label:(resources string:(i label , ' (%1)') |
2831 |
with:(resources string:self painter undoHistory labelOfLastUndo)). |
|
1528 | 2832 |
]. |
1540
dda0bf556ebc
findGuiResources... now sets the receiver, if not yet set
Claus Gittinger <cg@exept.de>
parents:
1528
diff
changeset
|
2833 |
"/ m receiver:self. -- now done in findGuiResources ... |
1528 | 2834 |
m findGuiResourcesIn:self. |
2835 |
m |
|
2836 |
]. |
|
1940 | 2837 |
! |
2838 |
||
2839 |
menuReplaceWidget |
|
2840 |
^ [ |
|
2841 |
|m i specAndView spec usefulReplacementSpecClasses| |
|
2842 |
||
2843 |
m := self class menuReplaceWidget. |
|
2844 |
m := m decodeAsLiteralArray. |
|
2845 |
||
2846 |
specAndView := self selectedSpecAndView. |
|
2847 |
spec := specAndView first. |
|
1968 | 2848 |
spec notNil ifTrue:[ |
2849 |
usefulReplacementSpecClasses := spec usefulReplacementSpecClasses. |
|
2850 |
usefulReplacementSpecClasses notEmptyOrNil ifTrue:[ |
|
2851 |
m addSeparator. |
|
2852 |
usefulReplacementSpecClasses do:[:eachClass | |
|
2853 |
|item| |
|
2854 |
||
2855 |
item := MenuItem new label:(resources string:'Replace by %1' with:eachClass userFriendlyName). |
|
2856 |
item value:#replaceWidgetByClass:. |
|
2857 |
item argument:eachClass. |
|
2858 |
m addItem:item. |
|
2859 |
]. |
|
1940 | 2860 |
]. |
2861 |
]. |
|
2862 |
||
2863 |
m findGuiResourcesIn:self. |
|
2864 |
m |
|
2865 |
]. |
|
1521
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
2866 |
! ! |
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
2867 |
|
109 | 2868 |
!UIPainter methodsFor:'private'! |
2869 |
||
729 | 2870 |
askForModification |
765 | 2871 |
"asks for window spec modification" |
2872 |
||
1341 | 2873 |
|painter| |
2874 |
||
2875 |
painter := self painter. |
|
2876 |
||
765 | 2877 |
self askForSectionModification. |
729 | 2878 |
|
1341 | 2879 |
(modified or: [painter isModified or: [self helpTool modified]]) |
2880 |
ifTrue:[ |
|
1772
e33aee13defe
Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents:
1760
diff
changeset
|
2881 |
((YesNoBox title:(resources string:'Window spec was modified. Exit anyway?')) |
1341 | 2882 |
noText:(resources string:'Cancel'); |
1772
e33aee13defe
Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents:
1760
diff
changeset
|
2883 |
yesText:(resources string:'Discard Changes and Exit'); |
1341 | 2884 |
showAtPointer; |
2885 |
accepted) ifFalse: [^false]. |
|
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
2886 |
self clearModified. |
1341 | 2887 |
painter resetModification |
729 | 2888 |
]. |
2889 |
^true |
|
838
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2890 |
|
0ac5a26498c1
help texts & national strings
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
2891 |
"Modified: / 20.5.1998 / 02:03:16 / cg" |
729 | 2892 |
! |
2893 |
||
808 | 2894 |
askForSaving |
2895 |
"asks for defining an application class" |
|
2896 |
||
2897 |
self askForSectionModification. |
|
2898 |
||
2899 |
((YesNoBox title:'No application class defined yet!!') |
|
2208 | 2900 |
noText:'Cancel'; |
2901 |
yesText:'Define'; |
|
2902 |
showAtPointer; |
|
2903 |
accepted) ifFalse: [^false]. |
|
808 | 2904 |
|
2905 |
self doSave. |
|
2906 |
||
2907 |
^true |
|
2908 |
! |
|
2909 |
||
765 | 2910 |
askForSectionModification |
2911 |
"asks for section modification in the notebook" |
|
2912 |
||
2913 |
self isModified ifTrue:[ |
|
2208 | 2914 |
(self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ |
2915 |
self accept |
|
2916 |
] ifFalse: [ |
|
2917 |
self cancel |
|
2918 |
] |
|
765 | 2919 |
] |
2920 |
! |
|
2921 |
||
743 | 2922 |
checkClassAndSelector |
765 | 2923 |
"checks for class & superclass" |
743 | 2924 |
|
1211 | 2925 |
|superclass cls| |
743 | 2926 |
|
1983 | 2927 |
specClassName isNil ifTrue:[^ false]. |
2928 |
||
2929 |
cls := self resolveName:specClassName. |
|
743 | 2930 |
|
2931 |
cls isNil ifTrue:[ |
|
1976 | 2932 |
superclass := self resolveName:specSuperclassName. |
2933 |
||
2934 |
superclass isNil ifTrue:[ |
|
2935 |
self warn:'No class named ' , specSuperclassName , ' exists!!'. |
|
2936 |
^ false. |
|
2937 |
]. |
|
2938 |
||
1983 | 2939 |
(self confirm:'Create class ' , specClassName asBoldText, '?') ifTrue:[ |
1976 | 2940 |
cls := superclass |
1983 | 2941 |
subclass:(specClassName asSymbol) |
1976 | 2942 |
instanceVariableNames:'' |
2943 |
classVariableNames:'' |
|
2944 |
poolDictionaries:'' |
|
2945 |
category:'Applications'. |
|
2946 |
||
1983 | 2947 |
cls name ~= specClassName ifTrue:[ |
1976 | 2948 |
self information:'Created new class is ' , cls name. |
1983 | 2949 |
specClassName := cls name |
1976 | 2950 |
]. |
2951 |
^ true. |
|
2952 |
]. |
|
2953 |
^ false. |
|
743 | 2954 |
]. |
2955 |
cls isBehavior ifFalse:[ |
|
1983 | 2956 |
self warn:'A global named ' , specClassName , ' exists, but it is no class.'. |
1976 | 2957 |
^ false. |
743 | 2958 |
]. |
2959 |
||
1976 | 2960 |
specSuperclassName isBehavior ifFalse:[ |
2001 | 2961 |
specSuperclassName notEmptyOrNil ifTrue:[ |
1976 | 2962 |
superclass := self resolveName:specSuperclassName |
2001 | 2963 |
] ifFalse:[ |
1976 | 2964 |
specSuperclassName := nil. |
2965 |
] |
|
743 | 2966 |
] ifTrue:[ |
1976 | 2967 |
superclass := specSuperclassName |
743 | 2968 |
]. |
2969 |
||
1976 | 2970 |
specSuperclassName notNil ifTrue:[ |
2971 |
superclass isNil ifTrue:[ |
|
2972 |
self warn:'No class named ' , specSuperclassName , ' exists!!'. |
|
2973 |
^ false. |
|
2974 |
]. |
|
2975 |
||
2976 |
(cls isSubclassOf:superclass) ifFalse:[ |
|
1983 | 2977 |
self information:('A global named ' , specClassName , ' exists,\' , |
1976 | 2978 |
'but is not a subclass of ' , superclass name , '.\\' , |
2979 |
'Check and try again if that is not what you want.') withCRs. |
|
2980 |
] |
|
743 | 2981 |
]. |
2982 |
||
2983 |
superclass isNil ifTrue:[ |
|
1976 | 2984 |
cls notNil ifTrue:[ |
2985 |
specSuperclassName := cls superclass name |
|
2986 |
] |
|
743 | 2987 |
]. |
2988 |
||
2989 |
^ true |
|
2990 |
||
2991 |
"Modified: 12.8.1997 / 23:39:10 / cg" |
|
2992 |
! |
|
2993 |
||
2159 | 2994 |
createToolApplication:anApplicationClass spec:aSpec in:aView |
2995 |
|appl applBuilder applWindow| |
|
2996 |
||
2997 |
appl := anApplicationClass new. |
|
2998 |
appl createBuilder. |
|
2999 |
applBuilder := appl builder. |
|
3000 |
||
3001 |
applWindow := ApplicationSubView origin:0.0@0.0 corner:1.0@1.0 in:aView. |
|
3002 |
applWindow level:0. |
|
3003 |
applWindow hiddenOnRealize:true. |
|
3004 |
||
3005 |
appl masterApplication:self. |
|
3006 |
applBuilder window:applWindow. |
|
3007 |
applWindow client:appl spec:aSpec builder:applBuilder. |
|
3008 |
appl modifiedHolder:(self modifiedChannel). |
|
3009 |
applBuilder window:applWindow. |
|
3010 |
||
3011 |
^ appl |
|
3012 |
! |
|
3013 |
||
173 | 3014 |
hideUIView:aView |
765 | 3015 |
"hides the view which is an application or top view" |
3016 |
||
173 | 3017 |
aView beIndependent. |
3018 |
aView unmap. |
|
3019 |
! |
|
3020 |
||
287 | 3021 |
raiseTabView |
2159 | 3022 |
|tool| |
3023 |
||
3024 |
self isLayoutToolSelected ifTrue:[tool := layoutTool ] |
|
3025 |
ifFalse:[self isHelpToolSelected ifTrue:[tool := helpTool ] |
|
3026 |
ifFalse:[ |
|
3027 |
tool := specTool. |
|
3028 |
tool notNil ifTrue:[ specTool selection:tabSelection ]. |
|
3029 |
]]. |
|
3030 |
||
3031 |
(Array with:helpTool with:layoutTool with:specTool) do:[:aTool| |
|
3032 |
aTool ~~ tool ifTrue:[ |
|
3033 |
aTool window beInvisible. |
|
3034 |
]. |
|
3035 |
]. |
|
3036 |
tool notNil ifTrue:[ |
|
3037 |
tool window beVisible. |
|
3038 |
]. |
|
173 | 3039 |
! |
3040 |
||
3041 |
raiseUIView:aView |
|
765 | 3042 |
"raise the view which is an application or top view" |
3043 |
||
1193
ada18c876301
partners must be remapped (at old position)
Claus Gittinger <cg@exept.de>
parents:
1192
diff
changeset
|
3044 |
aView remap. |
173 | 3045 |
aView bePartner. |
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3046 |
! |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3047 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3048 |
setClass:cls selector:selector |
765 | 3049 |
"sets the specClass and the specSelector under which the window spec should be saved" |
3050 |
||
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3051 |
|clsName superClassName| |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3052 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3053 |
clsName := cls name. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3054 |
superClassName := cls superclass name. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3055 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3056 |
(self aspectFor:#classNameChannel) value:clsName. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3057 |
(self aspectFor:#methodNameChannel) value:(selector ? ''). |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3058 |
(self aspectFor:#superclassNameChannel) value:superClassName. |
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3059 |
|
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3060 |
self painter |
1760
8419c463c4f6
use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents:
1750
diff
changeset
|
3061 |
className:clsName |
8419c463c4f6
use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents:
1750
diff
changeset
|
3062 |
superclassName:superClassName |
8419c463c4f6
use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents:
1750
diff
changeset
|
3063 |
selector:(selector ? ''). |
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3064 |
|
287 | 3065 |
self specClass:clsName. |
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3066 |
specSelector := (selector ? ''). |
1976 | 3067 |
specSuperclassName := superClassName. |
177
eefd69a52f5b
fixed setup of class/selector when picking/fetching via
Claus Gittinger <cg@exept.de>
parents:
176
diff
changeset
|
3068 |
|
1983 | 3069 |
(specClassName notNil and:[ selector notNil ]) ifTrue:[ |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3070 |
self addHistoryEntryForClass:specClass selector:specSelector. |
1760
8419c463c4f6
use #and: - not #& you lazy bone, you
Claus Gittinger <cg@exept.de>
parents:
1750
diff
changeset
|
3071 |
self updateInfoLabel |
446 | 3072 |
]. |
587
dd545d089d95
Fix typos. Ensure that specClass is a string.
Stefan Vogel <sv@exept.de>
parents:
572
diff
changeset
|
3073 |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3074 |
"Modified: / 05-02-1998 / 09:44:58 / stefan" |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3075 |
"Modified: / 31-08-2006 / 10:14:49 / cg" |
282 | 3076 |
! |
3077 |
||
1071 | 3078 |
setViewInLayoutTool:aView spec:aSpec |
765 | 3079 |
"sets view for layout tool" |
3080 |
||
287 | 3081 |
|type| |
3082 |
||
3083 |
self painter topView == aView ifTrue:[ |
|
2208 | 3084 |
type := #Extent |
287 | 3085 |
]. |
1071 | 3086 |
self layoutTool layoutView:aView type:type spec:aSpec |
287 | 3087 |
|
3088 |
! |
|
3089 |
||
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3090 |
specClass |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3091 |
specClass isNil ifTrue:[ |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3092 |
specClassName notNil ifTrue:[ |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3093 |
specClass := Smalltalk classNamed:specClassName. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3094 |
] |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3095 |
]. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3096 |
^ specClass |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3097 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3098 |
"Created: / 31-08-2006 / 10:08:43 / cg" |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3099 |
"Modified: / 04-09-2006 / 10:39:21 / cg" |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3100 |
! |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3101 |
|
1976 | 3102 |
specClass:aClassOrClassName |
765 | 3103 |
"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
|
3104 |
|
1976 | 3105 |
aClassOrClassName isBehavior |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3106 |
ifTrue: [ specClass := aClassOrClassName. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3107 |
specClassName := aClassOrClassName name ] |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3108 |
ifFalse:[ specClass := Smalltalk classNamed:aClassOrClassName. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3109 |
specClassName := aClassOrClassName ]. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3110 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3111 |
self helpTool loadFromClass:specClass. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3112 |
self clearModifiedFlag. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3113 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3114 |
"Modified: / 31-08-2006 / 10:10:22 / cg" |
287 | 3115 |
! ! |
3116 |
||
1714 | 3117 |
!UIPainter methodsFor:'private-tools'! |
287 | 3118 |
|
3119 |
helpTool |
|
765 | 3120 |
"returns the help tool" |
3121 |
||
1316 | 3122 |
helpTool isNil ifTrue:[self noteBookView]. |
3123 |
^ helpTool |
|
287 | 3124 |
! |
3125 |
||
3126 |
layoutTool |
|
765 | 3127 |
"returns the layout tool" |
3128 |
||
1316 | 3129 |
layoutTool isNil ifTrue:[self noteBookView]. |
3130 |
^ layoutTool |
|
287 | 3131 |
! |
3132 |
||
3133 |
painter |
|
765 | 3134 |
"returns the canvas view" |
3135 |
||
2077 | 3136 |
^ painter. |
3137 |
"/ ^ treeView canvas |
|
3138 |
||
3139 |
"Modified: / 05-09-2006 / 18:36:32 / cg" |
|
287 | 3140 |
! |
3141 |
||
3142 |
specTool |
|
765 | 3143 |
"returns the spec tool" |
3144 |
||
1316 | 3145 |
specTool isNil ifTrue:[self noteBookView]. |
3146 |
^ specTool |
|
109 | 3147 |
! ! |
3148 |
||
166 | 3149 |
!UIPainter methodsFor:'queries'! |
3150 |
||
217 | 3151 |
hasSpecClass |
765 | 3152 |
"answers whether an application class is defined" |
3153 |
||
1983 | 3154 |
^ (self resolveName:specClassName) notNil |
217 | 3155 |
! |
3156 |
||
3157 |
hasSpecClassAndSelector |
|
765 | 3158 |
"answers whether an application class and a selector under which |
3159 |
the window spec is stored is defined" |
|
3160 |
||
217 | 3161 |
specSelector size > 1 ifTrue:[ |
2208 | 3162 |
^ self hasSpecClass |
217 | 3163 |
]. |
765 | 3164 |
^ false |
217 | 3165 |
! |
3166 |
||
166 | 3167 |
isHelpToolSelected |
765 | 3168 |
"answers whether the current selected section in the noteBook is the Help Tool" |
3169 |
||
287 | 3170 |
^ tabSelection = UIHelpTool label |
166 | 3171 |
! |
3172 |
||
3173 |
isLayoutToolSelected |
|
765 | 3174 |
"answers whether the current selected section in the noteBook is the Layout Tool" |
3175 |
||
287 | 3176 |
^ tabSelection = UILayoutTool label |
217 | 3177 |
! |
3178 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3179 |
isModified |
765 | 3180 |
"answers whether the current window spec or a layout is modified" |
3181 |
||
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3182 |
^ self modifiedChannel value |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3183 |
! |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3184 |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3185 |
isNotEditingSpecOnly |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3186 |
^ true |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3187 |
! |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3188 |
|
217 | 3189 |
isPainterEnabled |
765 | 3190 |
"answers whether I am running in test mode" |
3191 |
||
217 | 3192 |
^ self painter enabled |
1608 | 3193 |
! |
3194 |
||
3195 |
isUIPainter |
|
3196 |
^ true |
|
166 | 3197 |
! ! |
3198 |
||
109 | 3199 |
!UIPainter methodsFor:'selection'! |
3200 |
||
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3201 |
askForUnsavedModifications |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3202 |
|whatToDo| |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3203 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3204 |
self isModified ifFalse:[^ true]. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3205 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3206 |
whatToDo := DialogBox |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3207 |
confirmWithCancel:'Accept modifications in section ' , tabSelection printString asBoldText, ' ?' |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3208 |
labels:#('Cancel' 'Ignore' 'Accept') |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3209 |
default:3. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3210 |
whatToDo isNil ifTrue:[^ false]. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3211 |
whatToDo == true ifTrue:[ |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3212 |
self accept |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3213 |
] ifFalse:[ |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3214 |
self cancel |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3215 |
]. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3216 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3217 |
^ true |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3218 |
! |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3219 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3220 |
copySelection |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3221 |
self painter copySelection. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3222 |
self updateChannels. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3223 |
! |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3224 |
|
1940 | 3225 |
selectedSpec |
3226 |
|specAndView| |
|
3227 |
||
3228 |
specAndView := self selectedSpecAndView. |
|
3229 |
^ specAndView first |
|
3230 |
! |
|
3231 |
||
3232 |
selectedSpecAndView |
|
3233 |
|spec view property| |
|
3234 |
||
3235 |
treeView isCanvasSelected ifTrue:[ |
|
3236 |
spec := treeView canvasSpec. |
|
3237 |
view := self painter topView. |
|
3238 |
] ifFalse:[ |
|
3239 |
(property := treeView propertySelected) notNil ifTrue:[ |
|
3240 |
treeView canResizeSelectedWidget ifTrue:[ |
|
3241 |
view := property view. |
|
3242 |
]. |
|
3243 |
spec := property spec copy. |
|
3244 |
] |
|
3245 |
]. |
|
3246 |
^ Array with:spec with:view |
|
3247 |
! |
|
3248 |
||
109 | 3249 |
tabSelection |
765 | 3250 |
"returns the label of the current section in the notebook" |
3251 |
||
109 | 3252 |
^ tabSelection |
3253 |
! |
|
3254 |
||
3255 |
tabSelection:something |
|
765 | 3256 |
"called whenever the section of the notebook has changed" |
351 | 3257 |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3258 |
(something isNil or:[tabSelection = something]) ifTrue:[ |
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3259 |
^ self |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3260 |
]. |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3261 |
|
2202 | 3262 |
self isModified ifTrue:[ |
3263 |
self autoAcceptOnSelectionChange value ifTrue:[ |
|
3264 |
self accept |
|
3265 |
] ifFalse:[ |
|
3266 |
self askForUnsavedModifications ifFalse:[^ self]. |
|
3267 |
]. |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
3268 |
]. |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3269 |
tabSelection := something. |
287 | 3270 |
self raiseTabView. |
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3271 |
self cancel. |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3272 |
! |
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3273 |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
3274 |
treeSelectionChanged |
765 | 3275 |
"called whenever the selection of the treeview has changed" |
3276 |
||
1940 | 3277 |
|specAndView view spec| |
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3278 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3279 |
self askForUnsavedModifications ifFalse:[^ self]. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3280 |
"/ self isModified ifTrue:[ |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3281 |
"/ (self confirm:'Accept modifications in section ' , tabSelection printString asBoldText, '?') ifTrue:[ |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3282 |
"/ self accept |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3283 |
"/ ] |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3284 |
"/ ]. |
713 | 3285 |
|
1940 | 3286 |
specAndView := self selectedSpecAndView. |
3287 |
spec := specAndView first. |
|
3288 |
view := specAndView last. |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3289 |
|
1071 | 3290 |
self setViewInLayoutTool:view spec:spec. |
287 | 3291 |
self specTool specification:spec. |
282 | 3292 |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3293 |
self updateSlicesForSpec:spec andView:view. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3294 |
self clearModifiedFlag. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3295 |
self updateChannels. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3296 |
! |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3297 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3298 |
updateSlicesForSpec:spec andView:view |
2023 | 3299 |
|slices "size" list tabComponent| |
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3300 |
|
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3301 |
tabComponent := self componentAt:#noteBook. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
3302 |
|
282 | 3303 |
spec notNil ifTrue:[ |
1188 | 3304 |
self helpTool helpKey:(spec activeHelpKey). |
3305 |
slices := spec class slices. |
|
2023 | 3306 |
|
3307 |
list := slices collect:[:eachSlice | eachSlice first asString]. |
|
3308 |
self treeView isCanvasSelected ifFalse:[ |
|
2040 | 3309 |
list := list copyWith:(UIHelpTool label) |
2023 | 3310 |
]. |
1188 | 3311 |
view notNil ifTrue:[ |
2040 | 3312 |
list := list copyWith:UILayoutTool label. |
1188 | 3313 |
]. |
3314 |
||
2023 | 3315 |
"/ size := slices size. |
3316 |
"/ view notNil ifTrue:[ |
|
3317 |
"/ self treeView isCanvasSelected ifFalse:[ |
|
3318 |
"/ list := Array new:(size + 2). |
|
3319 |
"/ list at:(size + 2) put:(UILayoutTool label). |
|
3320 |
"/ ] ifTrue:[ |
|
3321 |
"/ list := Array new:(size + 1). |
|
3322 |
"/ list at:(size + 1) put:(UILayoutTool label). |
|
3323 |
"/ ]. |
|
3324 |
"/ ] ifFalse:[ |
|
3325 |
"/ list := Array new:(size + 1). |
|
3326 |
"/ ]. |
|
3327 |
"/ |
|
3328 |
"/ 1 to:size do:[:i| list at:i put:((slices at:i) first asString)]. |
|
3329 |
"/ self treeView isCanvasSelected ifFalse: [ |
|
3330 |
"/ list at:(size + 1) put:(UIHelpTool label) |
|
3331 |
"/ ]. |
|
1188 | 3332 |
|
3333 |
self tabList value:list. |
|
3334 |
self showHelp:spec class name for:self. |
|
3335 |
tabComponent enabled:true. |
|
3336 |
||
3337 |
(tabSelection := tabComponent selection) isNil ifTrue:[ |
|
3338 |
tabComponent setSelection:(tabSelection := list first) |
|
3339 |
]. |
|
3340 |
self raiseTabView |
|
282 | 3341 |
] ifFalse:[ |
1188 | 3342 |
self helpTool helpKey:nil. |
3343 |
tabComponent enabled:false. |
|
3344 |
self defaultInfoLabel. |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
3345 |
]. |
60 | 3346 |
! ! |
3347 |
||
765 | 3348 |
!UIPainter methodsFor:'settings'! |
3349 |
||
924 | 3350 |
generateAspectsAsInstanceVariables |
3351 |
"if on, aspects are held as instance variables; |
|
3352 |
if off (the default), they are kept in the bindings dictionary. |
|
3353 |
" |
|
3354 |
^ UIPainterView generateAspectsAsInstanceVariables |
|
3355 |
||
3356 |
"Created: / 29.7.1998 / 11:17:59 / cg" |
|
3357 |
! |
|
3358 |
||
3359 |
generateAspectsAsInstanceVariables:aBoolean |
|
3360 |
"if on, aspects are held as instance variables; |
|
3361 |
if off (the default), they are kept in the bindings dictionary. |
|
3362 |
" |
|
3363 |
^ UIPainterView generateAspectsAsInstanceVariables:aBoolean |
|
3364 |
||
3365 |
"Created: / 29.7.1998 / 11:18:20 / cg" |
|
3366 |
! |
|
3367 |
||
765 | 3368 |
redefineAspectMethods |
3369 |
"redefine methods yes or no. If a method is defined in super class |
|
3370 |
should the message be reinstalled ? |
|
3371 |
" |
|
3372 |
^ UIPainterView redefineAspectMethods |
|
3373 |
||
3374 |
||
3375 |
! |
|
3376 |
||
3377 |
redefineAspectMethods:aBoolean |
|
3378 |
"redefine methods yes or no. If a method is defined in super class |
|
3379 |
should the message be reinstalled ? |
|
3380 |
" |
|
3381 |
UIPainterView redefineAspectMethods:aBoolean |
|
3382 |
||
3383 |
||
3384 |
! ! |
|
3385 |
||
1716 | 3386 |
!UIPainter methodsFor:'startup & release'! |
109 | 3387 |
|
3388 |
closeRequest |
|
2023 | 3389 |
"asks for permission before closing" |
713 | 3390 |
|
729 | 3391 |
self askForModification ifFalse:[^self]. |
133 | 3392 |
|
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3393 |
super closeRequest. |
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3394 |
|
222 | 3395 |
treeView model removeDependent:self. |
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3396 |
"/ self painter release. |
60 | 3397 |
|
109 | 3398 |
selectionPanel notNil ifTrue:[ |
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3399 |
selectionPanel masterApplication:nil. |
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3400 |
selectionPanel closeRequest |
109 | 3401 |
]. |
149 | 3402 |
selectionPanel := nil. |
222 | 3403 |
treeView := nil. |
109 | 3404 |
! |
3405 |
||
3406 |
closeRequestFor:aTopView |
|
765 | 3407 |
"handles a close request for a specific view" |
3408 |
||
173 | 3409 |
|topView| |
60 | 3410 |
|
765 | 3411 |
(topView := self window) == aTopView ifTrue:[ |
2208 | 3412 |
super closeRequestFor:aTopView |
109 | 3413 |
] ifFalse:[ |
2208 | 3414 |
aTopView = selectionPanel window ifTrue:[ |
3415 |
self galleryShown value:false |
|
3416 |
] ifFalse:[ |
|
3417 |
aTopView == (self painter topView) ifTrue:[ |
|
3418 |
self painterShown value:false |
|
3419 |
] ifFalse:[ |
|
3420 |
aTopView closeRequest |
|
3421 |
] |
|
3422 |
]. |
|
3423 |
topView raise. |
|
109 | 3424 |
]. |
60 | 3425 |
! |
3426 |
||
1994 | 3427 |
commonPostBuild |
3428 |
"sets the root of the tree view as first selection; |
|
3429 |
sets the grid parameters, if defined" |
|
3430 |
||
3431 |
|cls sel| |
|
3432 |
||
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3433 |
cls := self specClass. |
1994 | 3434 |
sel := specSelector. |
3435 |
cls notNil ifTrue:[ |
|
3436 |
self setClass:cls selector:sel. |
|
3437 |
||
3438 |
(cls respondsTo:sel) ifTrue:[ |
|
3439 |
self painter setupFromSpec:(cls perform:sel). |
|
3440 |
] |
|
3441 |
]. |
|
3442 |
||
3443 |
self autoAcceptOnSelectionChange addDependent:self. |
|
3444 |
self autoAcceptOnSelectionChange value ifTrue:[ |
|
3445 |
(builder componentAt:'acceptButton') label:(resources string:'Apply') |
|
3446 |
]. |
|
3447 |
||
2023 | 3448 |
"/ using masters infoHolder ? |
3449 |
(builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ |
|
3450 |
(builder componentAt:#mainPanel) layout bottomOffset:0. |
|
3451 |
(builder componentAt:#infoBarSubSpec) beInvisible |
|
3452 |
]. |
|
3453 |
||
2001 | 3454 |
self updateInfoLabel. |
2023 | 3455 |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3456 |
"Modified: / 31-08-2006 / 10:12:53 / cg" |
1994 | 3457 |
! |
3458 |
||
1976 | 3459 |
loadFromClass:aClass andSelector:selector |
1185 | 3460 |
"loads a window spec by evaluating aMessageString |
3461 |
(which is something like 'fooClass windowSpec')" |
|
3462 |
||
1976 | 3463 |
self assert:(aClass isNil or:[aClass isClass]). |
3464 |
||
3465 |
self askForModification ifFalse:[^ self]. |
|
3466 |
||
3467 |
self setClass:aClass selector:selector. |
|
3468 |
||
3469 |
(aClass respondsTo:selector) ifTrue:[ |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3470 |
self loadFromSpec:(aClass perform:selector). |
1976 | 3471 |
] |
3472 |
! |
|
3473 |
||
3474 |
loadFromMessage:classAndSelector |
|
3475 |
"loads a window spec by evaluating aMessageString |
|
3476 |
(which is something like 'fooClass windowSpec')" |
|
3477 |
||
3478 |
self askForModification ifFalse:[^ self]. |
|
3479 |
||
3480 |
classAndSelector notNil ifTrue:[ |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3481 |
self |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3482 |
loadFromClass:classAndSelector methodClass |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3483 |
andSelector:classAndSelector methodSelector |
743 | 3484 |
] |
3485 |
! |
|
3486 |
||
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3487 |
loadFromSpec:aSpec |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3488 |
"loads a window spec proper" |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3489 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3490 |
self askForModification ifFalse:[^ self]. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3491 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3492 |
self painter setupFromSpec:aSpec. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3493 |
! |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3494 |
|
1850
410f98d259b7
kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents:
1827
diff
changeset
|
3495 |
openInterface:aSymbol |
1994 | 3496 |
"in addition to opening my interface, also open up a gallery and a painter" |
1850
410f98d259b7
kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents:
1827
diff
changeset
|
3497 |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3498 |
|topView| |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3499 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3500 |
self setupSpecClassAndSelector. |
1994 | 3501 |
|
2012 | 3502 |
"/ treeView := TreeView new. |
3503 |
"/ treeView windowSpecClass:(self defaultWindowSpecClass). |
|
3504 |
"/ treeView |
|
3505 |
"/ selectConditionBlock:[:newSelection | self selectionChangeAllowed:newSelection ]. |
|
3506 |
||
3507 |
"/ painterView := StandardSystemView new. |
|
3508 |
"/ name := name ? UIPainter defaultNameOfCanvas. |
|
3509 |
"/ painterView beToolWindow. |
|
3510 |
"/ painterView name:name. |
|
3511 |
"/ painterView label:name. |
|
3512 |
"/ painterView extent:(treeView windowSpecClass defaultExtentInUIPainter). |
|
3513 |
"/ painter := UIPainterView in:painterView. |
|
3514 |
"/ painter layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout. |
|
3515 |
"/ treeView := treeView canvas:painter specName:name. |
|
3516 |
"/ painter treeView:treeView. |
|
3517 |
"/ treeView model addDependent:self. |
|
3518 |
"/ painter enableChannel:(self enableChannel). |
|
1994 | 3519 |
|
765 | 3520 |
super openInterface:aSymbol. |
1994 | 3521 |
|
136 | 3522 |
topView := self window. |
345 | 3523 |
topView label:'GUI Painter'. |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3524 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3525 |
"/ self setupCanvasAndSelectionPanel. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3526 |
"/ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3527 |
"/ selectionPanel window waitUntilVisible. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3528 |
"/ painterView window waitUntilVisible. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3529 |
"/ self window waitUntilVisible. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3530 |
"/ [ Delay waitForSeconds:0.5. self window topView raise ] fork. |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3531 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3532 |
"Modified: / 31-08-2006 / 10:13:16 / cg" |
60 | 3533 |
! |
3534 |
||
109 | 3535 |
openOnClass:aClass |
765 | 3536 |
"opens the GUI Painter on aClass and #windowSpec" |
3537 |
||
109 | 3538 |
self openOnClass:aClass andSelector:#windowSpec |
3539 |
! |
|
3540 |
||
60 | 3541 |
openOnClass:aClass andSelector:aSelector |
1976 | 3542 |
"opens the GUI Painter on aClass and aSelector" |
3543 |
||
157
ce974dce3dd4
enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents:
156
diff
changeset
|
3544 |
aClass isNil ifTrue:[ |
1976 | 3545 |
(self confirm:'No class given to the GUI Painter (class was probably renamed?)\\Open anyway (to create a new window spec) ?' withCRs) |
3546 |
ifFalse:[^ nil]. |
|
157
ce974dce3dd4
enhanced class & method dialog
Claus Gittinger <cg@exept.de>
parents:
156
diff
changeset
|
3547 |
]. |
60 | 3548 |
|
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
3549 |
specSelector := aSelector. |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3550 |
specClass := aClass. |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3551 |
specClassName := aClass name. |
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
3552 |
|
964
476235fbb312
setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
3553 |
self openInterface. |
476235fbb312
setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
3554 |
|
476235fbb312
setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
3555 |
"/ specSelector := aSelector. |
476235fbb312
setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
3556 |
"/ specClass := aClass. |
476235fbb312
setup class/selector, before opening the interface;
Claus Gittinger <cg@exept.de>
parents:
952
diff
changeset
|
3557 |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
3558 |
"Modified: / 31-08-2006 / 10:13:31 / cg" |
713 | 3559 |
! |
3560 |
||
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3561 |
postBuildWith: aBuilder |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3562 |
super postBuildWith:aBuilder. |
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
3563 |
|
1994 | 3564 |
self setupPainter. |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
3565 |
|
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3566 |
"Modified: / 22.8.1998 / 17:41:34 / cg" |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3567 |
! |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3568 |
|
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3569 |
postOpenWith: aBuilder |
1994 | 3570 |
"spread the painter and gallery views on the screen" |
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3571 |
|
1194 | 3572 |
|myWindow canvasWindow canvasOrg galleryWindow |
1957 | 3573 |
galleryOrg myOrg myCorner windowGroup| |
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3574 |
|
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3575 |
super postOpenWith: aBuilder. |
1957 | 3576 |
|
3577 |
windowGroup := self topApplication windowGroup. |
|
3578 |
windowGroup addPreEventHook:self. |
|
3579 |
||
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
3580 |
treeView selection: #(1). |
1247 | 3581 |
aBuilder keyboardProcessor menuBar:nil. |
798
c1116ba57e66
set window specification after realization of the window
ca
parents:
794
diff
changeset
|
3582 |
|
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3583 |
myWindow := self window. |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3584 |
canvasWindow := self painter topView. |
1456 | 3585 |
[selectionPanel isNil] whileTrue:[ |
3586 |
Delay waitForSeconds:0.1. |
|
3587 |
]. |
|
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3588 |
|
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3589 |
galleryWindow := selectionPanel window. |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3590 |
|
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3591 |
myOrg := myWindow origin. |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3592 |
myCorner := myWindow corner. |
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3593 |
|
1197
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3594 |
"/ try to lay out things non-overlapping |
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3595 |
true |
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3596 |
|
1197
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3597 |
"/ but only, if the window manager placed all windows |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3598 |
"/ on top of each other |
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3599 |
"/ myOrg = canvasWindow origin |
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3600 |
|
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3601 |
ifTrue:[ |
1197
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3602 |
|
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3603 |
canvasOrg := 10@20. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3604 |
"/ myOrg := (device width - myWindow width - 20) @ 20. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3605 |
galleryOrg := (device width - galleryWindow width - 20) |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3606 |
@ |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3607 |
((myWindow height + 20) min:(device height - galleryWindow height - 20)). |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3608 |
myWindow origin:myOrg. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3609 |
|
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3610 |
canvasWindow origin:canvasOrg. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3611 |
galleryWindow origin:galleryOrg. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3612 |
|
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3613 |
galleryWindow raise. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3614 |
canvasWindow raise. |
ef91ed58b7d4
only move canvas & gallery, if windowManager placed windows
Claus Gittinger <cg@exept.de>
parents:
1195
diff
changeset
|
3615 |
]. |
1192
f3f5c92930c9
do painter setup in postBuild, selection in postOpen.
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
3616 |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3617 |
self setupCanvasAndSelectionPanel. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3618 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3619 |
"/ selectionPanel window waitUntilVisible. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3620 |
"/ painterView window waitUntilVisible. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3621 |
"/ self window waitUntilVisible. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3622 |
[ Delay waitForSeconds:0.1. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3623 |
self window topView raise. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3624 |
Delay waitForSeconds:0.25. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3625 |
self window topView raise |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3626 |
] fork. |
1195 | 3627 |
"Modified: / 13.7.1999 / 21:26:52 / cg" |
1461 | 3628 |
! |
3629 |
||
3630 |
selectionPanelClass |
|
3631 |
^ UISelectionPanel |
|
1994 | 3632 |
! |
3633 |
||
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3634 |
setupCanvasAndSelectionPanel |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3635 |
|topView galleryWindow icon| |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3636 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3637 |
icon := Smalltalk imageFromFileNamed:'UIPainter.xbm' forClass:self class. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3638 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3639 |
topView := self window. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3640 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3641 |
painterView openInGroup:(topView windowGroup). |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3642 |
painterView application:self. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3643 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3644 |
galleryWindow := selectionPanel window. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3645 |
galleryWindow beToolWindow. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3646 |
galleryWindow openInGroup:(topView windowGroup). |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3647 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3648 |
selectionPanel masterApplication:self. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3649 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3650 |
topView iconLabel:'GUI Painter'. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3651 |
topView icon:icon. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3652 |
painterView iconLabel:'GUI Canvas'. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3653 |
painterView icon:icon. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3654 |
galleryWindow iconLabel:'GUI Gallery'. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3655 |
galleryWindow icon:icon. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3656 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3657 |
topView bePartner. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3658 |
painterView bePartner. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3659 |
galleryWindow bePartner. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3660 |
! |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3661 |
|
1994 | 3662 |
setupPainter |
3663 |
"sets the painter's grid parameters, if defined" |
|
3664 |
||
3665 |
|painter settings gridPara hspace vspace| |
|
3666 |
||
3667 |
painter := self painter. |
|
3668 |
settings := self class settings. |
|
3669 |
gridPara := painter gridParameters copy. |
|
3670 |
hspace := settings at: #HGridSpace ifAbsent:10. |
|
3671 |
vspace := settings at: #VGridSpace ifAbsent:10. |
|
3672 |
gridPara at:1 put:hspace; at:2 put:vspace; at:5 put:hspace; at:6 put:vspace. |
|
3673 |
painter gridParameters:gridPara. |
|
3674 |
painter gridShown: (settings at: #GridShown ifAbsent:false). |
|
3675 |
painter gridAlign: (settings at: #GridAlign ifAbsent:false). |
|
3676 |
painter shown ifTrue:[painter clearView]. |
|
3677 |
||
3678 |
"Modified: / 22.8.1998 / 17:41:34 / cg" |
|
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3679 |
! |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3680 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3681 |
setupSpecClassAndSelector |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3682 |
|cls name| |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3683 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3684 |
self specClass notNil ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3685 |
specClassName isBehavior ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3686 |
name := specClassName nameWithoutPrefix. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3687 |
] ifFalse:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3688 |
name := specClassName printString string |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3689 |
] |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3690 |
]. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3691 |
(aspects at:#classNameChannel) value:(specClassName ? 'NewApplication'). |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3692 |
|
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3693 |
specSuperclassName isNil ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3694 |
specClassName notNil ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3695 |
(cls := self resolveName:specClassName) notNil ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3696 |
specSuperclassName := cls superclass name. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3697 |
] |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3698 |
] |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3699 |
]. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3700 |
aspects at:#superclassNameChannel |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3701 |
put:((specSuperclassName notNil |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3702 |
ifTrue:[ specSuperclassName ] |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3703 |
ifFalse:[ 'ApplicationModel' ]) asValue). |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3704 |
aspects at:#superclassNameDefaults |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3705 |
put:#( 'ApplicationModel' 'SimpleDialog' ) asValue. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3706 |
aspects at:#methodNameChannel |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3707 |
put:((specSelector notNil |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3708 |
ifTrue:[ specSelector asValue ] |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
3709 |
ifFalse:[ #windowSpec ]) asValue). |
60 | 3710 |
! ! |
3711 |
||
743 | 3712 |
!UIPainter methodsFor:'user actions'! |
446 | 3713 |
|
765 | 3714 |
accept |
3715 |
"accepts all modifications done to the attributes of the current section" |
|
3716 |
||
1071 | 3717 |
|painter layout spec layoutTool layoutView t| |
1068 | 3718 |
|
3719 |
self acceptChannel value:true; value:false. "/ force editFields to accept |
|
1188 | 3720 |
self clearModifiedFlag. |
788 | 3721 |
|
765 | 3722 |
painter := self painter. |
1071 | 3723 |
spec := self specTool specification. |
765 | 3724 |
|
3725 |
self isLayoutToolSelected ifTrue:[ |
|
1188 | 3726 |
layoutTool := self layoutTool. |
3727 |
||
3728 |
(layout := layoutTool layout) notNil ifTrue:[ |
|
3729 |
layoutTool layoutType == #Extent ifTrue:[ |
|
3730 |
layoutView := layoutTool layoutView. |
|
3731 |
||
3732 |
layoutView == painter topView ifTrue:[ |
|
3733 |
layoutView extent:layout |
|
3734 |
] ifFalse:[ |
|
3735 |
spec useDefaultExtent:(layoutTool aspectFor:#useDefaultExtent) value. |
|
3736 |
spec useDefaultExtent ifTrue:[ |
|
3737 |
"/ temporarily unfreeze the widgets size |
|
3738 |
"/ (but remember, the old setting, which is actually |
|
3739 |
"/ controlled by the resizeForLabel attribute) |
|
3740 |
t := layoutView sizeFixed. |
|
3741 |
layoutView sizeFixed:false. |
|
3742 |
layout := layoutView preferredExtent. |
|
3743 |
layoutView sizeFixed:t. |
|
3744 |
]. |
|
3745 |
painter setExtent:layout. |
|
3746 |
painter updateFromSpec:spec. |
|
3747 |
] |
|
3748 |
] ifFalse:[ |
|
1444
fec7424dccda
clear the useDefaultExtent flag, if the layout is NOT an extent
martin
parents:
1442
diff
changeset
|
3749 |
spec useDefaultExtent:false. |
1188 | 3750 |
painter setLayout:layout |
3751 |
] |
|
3752 |
] |
|
765 | 3753 |
] ifFalse:[ |
1188 | 3754 |
self isHelpToolSelected ifTrue:[ |
3755 |
self helpTool accept. |
|
3756 |
spec activeHelpKey:self helpTool helpKey. |
|
3757 |
]. |
|
3758 |
painter updateFromSpec:spec |
|
1071 | 3759 |
]. |
3760 |
||
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3761 |
self clearModified |
765 | 3762 |
! |
3763 |
||
3764 |
addWidget: aSpecClass |
|
3765 |
"adds a widget from aSpecClass to the current widget" |
|
3766 |
||
3767 |
self addWidgetOfSpec: (Array with: (Smalltalk at: aSpecClass) new) |
|
3768 |
||
3769 |
! |
|
3770 |
||
3771 |
addWidgetOfSpec: aSpec |
|
3772 |
"adds a widget from aSpec to the current widget" |
|
3773 |
||
1521
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3774 |
|newSel| |
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3775 |
|
2077 | 3776 |
(newSel := painter pasteSpecifications:aSpec keepLayout:false at:0@0) notNil |
3777 |
ifTrue:[ |
|
3778 |
painter select: newSel |
|
3779 |
] ifFalse:[ |
|
1521
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3780 |
((treeView selection size = 0) or: [treeView selectedNode isNil]) |
2077 | 3781 |
ifTrue:[ |
1521
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3782 |
treeView selection: #(1). |
2077 | 3783 |
] ifFalse:[ |
1521
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3784 |
treeView selectNode: (treeView detectNode: [:n| n = treeView selectedNode parent]) |
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3785 |
]. |
2efd2b9419c4
undo: show type of undo in menu;
Claus Gittinger <cg@exept.de>
parents:
1499
diff
changeset
|
3786 |
self addWidgetOfSpec: aSpec |
765 | 3787 |
] |
3788 |
||
2077 | 3789 |
"Modified: / 05-09-2006 / 18:37:12 / cg" |
765 | 3790 |
! |
3791 |
||
3792 |
cancel |
|
3793 |
"cancels all modifications done to the attributes of the current section; |
|
3794 |
reread the old attributes" |
|
3795 |
||
3796 |
|spec key view| |
|
3797 |
||
3798 |
self isModified ifTrue:[ |
|
1188 | 3799 |
(spec := self painter specForSelection) notNil ifTrue:[ |
3800 |
key := spec activeHelpKey. |
|
3801 |
]. |
|
3802 |
self helpTool helpKey:key. |
|
3803 |
||
3804 |
treeView isCanvasSelected ifTrue: [ |
|
3805 |
spec := treeView canvasSpec. |
|
3806 |
]. |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
3807 |
|
1188 | 3808 |
self specTool specification:spec. |
3809 |
view := self layoutTool layoutView. |
|
3810 |
||
3811 |
self setViewInLayoutTool:view spec:spec. |
|
3812 |
spec class == DataSetSpec ifTrue:[ |
|
3813 |
view notNil ifTrue:[ |
|
3814 |
view columnDescriptors:(spec columns) |
|
3815 |
] |
|
3816 |
]. |
|
3817 |
self clearModifiedFlag. |
|
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
3818 |
self clearModified. |
765 | 3819 |
] |
3820 |
! |
|
3821 |
||
1940 | 3822 |
doAskAndReplaceWidgetBy |
3823 |
|widgetClass| |
|
3824 |
||
3825 |
widgetClass := Dialog requestClass:'Spec- or View-Class:' okLabel:'OK' initialAnswer:nil. |
|
3826 |
widgetClass isNil ifTrue:[ |
|
3827 |
^ self |
|
3828 |
]. |
|
3829 |
self replaceWidgetByClass:widgetClass |
|
3830 |
! |
|
3831 |
||
446 | 3832 |
doBrowseAspectMethods |
765 | 3833 |
"opens a browser on the aspect methods" |
3834 |
||
3835 |
|methods| |
|
446 | 3836 |
|
3837 |
self painter isModified ifTrue:[ |
|
1392
f6f7a70c5d41
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
1391
diff
changeset
|
3838 |
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 | 3839 |
]. |
765 | 3840 |
|
3841 |
(methods := self painter aspectMethods) isEmpty ifTrue:[ |
|
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3842 |
self warn:'No aspect methods found !!'. |
1392
f6f7a70c5d41
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
1391
diff
changeset
|
3843 |
^ self. |
446 | 3844 |
]. |
1684 | 3845 |
UserPreferences systemBrowserClass |
3846 |
browseMethods:methods |
|
3847 |
title:'Aspect methods'. |
|
446 | 3848 |
! |
3849 |
||
713 | 3850 |
doBrowseClass |
765 | 3851 |
"opens a System Browser on the specClass" |
713 | 3852 |
|
3853 |
self painter isModified ifTrue:[ |
|
1392
f6f7a70c5d41
browserClass from preferences
Claus Gittinger <cg@exept.de>
parents:
1391
diff
changeset
|
3854 |
self warn:'The current window spec has not yet been saved!!\\The System Browser will show the code of the old window spec.' withCRs. |
713 | 3855 |
]. |
765 | 3856 |
|
1983 | 3857 |
UserPreferences systemBrowserClass openInClass:(self resolveName:specClassName) |
743 | 3858 |
! |
3859 |
||
1742 | 3860 |
doBrowseViewClass |
3861 |
"opens a browser on the selected widgets class" |
|
3862 |
||
3863 |
|selection| |
|
3864 |
||
3865 |
((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[ |
|
3866 |
selection first class browse |
|
3867 |
] ifFalse: [ |
|
3868 |
selection class browse |
|
3869 |
] |
|
3870 |
! |
|
3871 |
||
755 | 3872 |
doDefineClassAndSelector |
765 | 3873 |
"launches a dialog for defining class, superclass, and selector of the application" |
755 | 3874 |
|
1819
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3875 |
|again readFromModelKeyed| |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3876 |
|
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3877 |
readFromModelKeyed := [:aKey| |ret| |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3878 |
ret := (self aspectFor:aKey) value. |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3879 |
ret isEmptyOrNil ifTrue:[ |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3880 |
ret := nil |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3881 |
] ifFalse:[ |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3882 |
ret isString ifTrue:[ |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3883 |
ret := ret string withoutSeparators. |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3884 |
ret := ret isEmpty ifTrue:[nil] ifFalse:[ret asSymbol]. |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3885 |
]. |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3886 |
]. |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3887 |
ret |
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3888 |
]. |
755 | 3889 |
|
3890 |
[ |
|
1188 | 3891 |
again := false. |
3892 |
||
1983 | 3893 |
aspects at:#classNameChannel put:(specClassName ? 'NewApplication') asValue. |
1819
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3894 |
aspects at:#methodNameChannel put:(specSelector ? 'windowSpec') asValue. |
1976 | 3895 |
aspects at:#superclassNameChannel put:(specSuperclassName ? 'ApplicationModel') asValue. |
1188 | 3896 |
|
3897 |
(self openDialogInterface:#dialogSpecForDefiningClassAndSelector) ifTrue:[ |
|
2206
1a7921b6c104
changed #doDefineClassAndSelector
Claus Gittinger <cg@exept.de>
parents:
2202
diff
changeset
|
3898 |
specClassName := readFromModelKeyed value:#classNameChannel. |
1819
cbf2079fd723
bugfix: test whether specClass is a symbol not a string
ca
parents:
1803
diff
changeset
|
3899 |
specSelector := readFromModelKeyed value:#methodNameChannel. |
1976 | 3900 |
specSuperclassName := readFromModelKeyed value:#superclassNameChannel. |
1188 | 3901 |
|
3902 |
(again := self checkClassAndSelector not) ifFalse:[ |
|
1983 | 3903 |
self painter className:specClassName |
1976 | 3904 |
superclassName:specSuperclassName |
1188 | 3905 |
selector:specSelector. |
1394
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3906 |
]. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3907 |
|
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3908 |
again ifFalse:[ |
1983 | 3909 |
((Smalltalk at:specClassName asSymbol) notNil |
3910 |
and:[ (Smalltalk at:specClassName asSymbol) class includesSelector:specSelector ]) |
|
1394
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3911 |
ifTrue:[ |
1983 | 3912 |
(self confirm:('%1 already implements %2. Overwrite ?' bindWith:specClassName with:specSelector)) |
1394
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3913 |
ifFalse:[ |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3914 |
again := true. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3915 |
]. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3916 |
]. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3917 |
]. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
3918 |
] ifFalse: [ |
1188 | 3919 |
^nil |
3920 |
] |
|
755 | 3921 |
|
3922 |
] doWhile:[again]. |
|
3923 |
||
1983 | 3924 |
specClassName := specClassName isBehavior ifTrue:[specClassName name] |
3925 |
ifFalse:[specClassName]. |
|
755 | 3926 |
|
1188 | 3927 |
self clearModifiedFlag. |
1983 | 3928 |
self helpTool buildAndMergeFromClass:specClassName. |
765 | 3929 |
self updateInfoLabel |
892
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3930 |
|
b200d2d9bf5e
avoid repeated send-sequences
Claus Gittinger <cg@exept.de>
parents:
890
diff
changeset
|
3931 |
"Modified: / 16.7.1998 / 18:26:33 / cg" |
755 | 3932 |
! |
3933 |
||
3934 |
doDefineGrid |
|
765 | 3935 |
"opens a dialog for the grid parameters" |
3936 |
||
755 | 3937 |
|hspace vspace bindings painter gridPara settings| |
3938 |
||
3939 |
painter := self painter. |
|
3940 |
bindings := IdentityDictionary new. |
|
3941 |
gridPara := painter gridParameters copy. |
|
1021 | 3942 |
settings := self class settings. |
3943 |
||
3944 |
bindings at:#showGrid put:((settings at: #GridShown ifAbsent: [painter gridShown]) asValue). |
|
3945 |
bindings at:#alignToGrid put:((settings at: #GridAlign ifAbsent: [painter gridAlign]) asValue). |
|
755 | 3946 |
bindings at:#hspace put:((gridPara at:1) asValue). |
3947 |
bindings at:#vspace put:((gridPara at:2) asValue). |
|
3948 |
||
3949 |
(self openDialogInterface:#dialogSpecForDefiningGridParameters withBindings:bindings) ifFalse:[ |
|
1803 | 3950 |
^ self |
755 | 3951 |
]. |
3952 |
||
3953 |
hspace := (bindings at:#hspace) value ? 5. |
|
3954 |
vspace := (bindings at:#vspace) value ? 5. |
|
3955 |
||
3956 |
gridPara at:1 put:hspace. |
|
3957 |
gridPara at:2 put:vspace. |
|
3958 |
gridPara at:5 put:hspace. |
|
3959 |
gridPara at:6 put:vspace. |
|
3960 |
||
3961 |
painter gridShown:false. |
|
3962 |
painter gridAlign:false. |
|
3963 |
painter gridParameters:gridPara. |
|
3964 |
painter gridAlign:(bindings at:#alignToGrid) value. |
|
3965 |
painter gridShown:(bindings at:#showGrid) value. |
|
1021 | 3966 |
|
755 | 3967 |
settings at: #GridShown put: (bindings at:#showGrid) value. |
3968 |
settings at: #GridAlign put: (bindings at:#alignToGrid) value. |
|
3969 |
settings at: #HGridSpace put: hspace. |
|
3970 |
settings at: #VGridSpace put: vspace. |
|
1803 | 3971 |
painter clearView. |
755 | 3972 |
|
1021 | 3973 |
"Modified: / 4.2.1999 / 15:36:34 / cg" |
755 | 3974 |
! |
3975 |
||
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3976 |
doGenerateAspectMethodFor |
1684 | 3977 |
|cls code aspectList displayedList selectorsToGenerateCode |
3978 |
doBrowse methods| |
|
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3979 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3980 |
self askForSectionModification. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3981 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3982 |
cls := self targetClass. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3983 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3984 |
aspectList := OrderedCollection new. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3985 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3986 |
self aspectSelectorsAndTypesDo: |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3987 |
[:selector :type | |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3988 |
( #(#modelAspect channelAspect actionSelector valueSelector) includes:type) ifTrue:[ |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3989 |
(cls includesSelector:selector) ifFalse:[ |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3990 |
aspectList add:( Array with:selector with:type ). |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3991 |
] |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3992 |
] |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3993 |
]. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3994 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3995 |
aspectList isEmpty ifTrue:[ |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3996 |
self information:'All aspect methods exist.'. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3997 |
^ self. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3998 |
]. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
3999 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4000 |
displayedList := aspectList collect:[:entry | (((entry first) paddedTo:25) contractTo:25) , ' -> ' , entry second ]. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4001 |
aspectList := aspectList collect:[:each | each first]. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4002 |
|
1684 | 4003 |
doBrowse := false. |
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4004 |
selectorsToGenerateCode := Dialog |
1684 | 4005 |
choose:'Select aspect(s) for which code shall be generated:' |
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4006 |
fromList:displayedList |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4007 |
values:aspectList |
1684 | 4008 |
initialSelection:nil |
4009 |
buttons:nil |
|
4010 |
values:nil |
|
4011 |
lines:15 |
|
4012 |
cancel:nil |
|
4013 |
multiple:true |
|
4014 |
postBuildBlock:[:dialog | |
|
4015 |
|b| |
|
4016 |
||
4017 |
b := Button label:'Generate & Browse'. |
|
4018 |
b action:[doBrowse := true. dialog okPressed]. |
|
4019 |
b := dialog addButton:b before:dialog okButton. |
|
4020 |
]. |
|
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4021 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4022 |
selectorsToGenerateCode isEmptyOrNil ifTrue:[^ self]. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4023 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4024 |
code := self painter generateAspectMethodCodeFiltering:selectorsToGenerateCode. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4025 |
code readStream fileIn. |
1684 | 4026 |
|
1689
5d02658c548a
must refetch class after adding instVars (when generating aspects)
Claus Gittinger <cg@exept.de>
parents:
1688
diff
changeset
|
4027 |
"/ refetch - cls is now obsolete |
5d02658c548a
must refetch class after adding instVars (when generating aspects)
Claus Gittinger <cg@exept.de>
parents:
1688
diff
changeset
|
4028 |
cls := self targetClass. |
5d02658c548a
must refetch class after adding instVars (when generating aspects)
Claus Gittinger <cg@exept.de>
parents:
1688
diff
changeset
|
4029 |
|
1684 | 4030 |
doBrowse ifTrue:[ |
4031 |
methods := selectorsToGenerateCode |
|
1739
f7baa10ebb1c
Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents:
1719
diff
changeset
|
4032 |
collect:[:sel | cls compiledMethodAt:sel] |
1684 | 4033 |
thenSelect:[:m | m notNil]. |
4034 |
||
4035 |
UserPreferences systemBrowserClass |
|
4036 |
browseMethods:methods |
|
4037 |
title:'Some Aspect methods'. |
|
4038 |
]. |
|
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4039 |
! |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4040 |
|
743 | 4041 |
doGenerateAspectMethods |
765 | 4042 |
"generates aspect and action methods for the application class" |
4043 |
||
4044 |
self askForSectionModification. |
|
1683
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4045 |
self withWaitCursorDo:[ |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4046 |
|code| |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4047 |
|
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4048 |
code := self painter generateAspectMethodCode. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4049 |
code readStream fileIn. |
f95658463570
added selective aspect method generation.
Claus Gittinger <cg@exept.de>
parents:
1671
diff
changeset
|
4050 |
] |
446 | 4051 |
! |
4052 |
||
1357 | 4053 |
doGenerateAspectSelectorsMethod |
4054 |
"generates aspectSelectors method for the exported aspects" |
|
4055 |
||
4056 |
||
4057 |
self askForSectionModification. |
|
4058 |
||
4059 |
(ReadStream on:self painter generateAspectSelectorsMethod) fileIn. |
|
4060 |
||
4061 |
! |
|
4062 |
||
743 | 4063 |
doGenerateHookMethods |
765 | 4064 |
"generates hook methods for the application class" |
4065 |
||
4066 |
self askForSectionModification. |
|
4067 |
||
4068 |
(ReadStream on:self painter generateHookMethods) fileIn. |
|
4069 |
||
4070 |
! |
|
4071 |
||
966
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4072 |
doGenerateMenuMethods |
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4073 |
"generates menu stub methods for the application class" |
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4074 |
|
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4075 |
self askForSectionModification. |
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4076 |
|
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4077 |
(ReadStream on:self painter generateMenuMethods) fileIn. |
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4078 |
|
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4079 |
"Created: / 23.8.1998 / 16:10:04 / cg" |
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4080 |
! |
bbea01c1de98
added menu-action code generation
Claus Gittinger <cg@exept.de>
parents:
964
diff
changeset
|
4081 |
|
765 | 4082 |
doInspectSpec |
4083 |
"opens an inspector on the spec of the selected widget" |
|
4084 |
||
4085 |
|spec| |
|
4086 |
||
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
4087 |
(spec := self painter specForSelection) isNil ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
4088 |
treeView isCanvasSelected ifTrue:[ |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
4089 |
spec := treeView canvasSpec. |
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
4090 |
] |
446 | 4091 |
]. |
765 | 4092 |
spec notNil ifTrue:[ |
2198
804e778590fc
slightly refactored to allow for more redefinition in a subclass
Claus Gittinger <cg@exept.de>
parents:
2175
diff
changeset
|
4093 |
spec inspect |
765 | 4094 |
] |
4095 |
! |
|
4096 |
||
4097 |
doInspectView |
|
4098 |
"opens an inspector on the view of the selected widget" |
|
4099 |
||
4100 |
|selection| |
|
4101 |
||
4102 |
((selection := self painter selection) isCollection and: [selection size >= 1]) ifTrue:[ |
|
2208 | 4103 |
selection first inspect |
765 | 4104 |
] ifFalse: [ |
2208 | 4105 |
selection inspect |
765 | 4106 |
] |
4107 |
||
446 | 4108 |
! |
4109 |
||
713 | 4110 |
doLoad |
765 | 4111 |
"opens a ResourceSelectionBrowser for loading a window spec from a class" |
713 | 4112 |
|
729 | 4113 |
self askForModification ifFalse: [^nil]. |
4114 |
||
713 | 4115 |
self loadFromMessage: |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4116 |
(ResourceSelectionBrowser |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4117 |
request: 'Load Window Spec From Class' |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4118 |
onSuperclass: nil |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4119 |
andClass: self specClass |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4120 |
andSelector: specSelector ? #windowSpec |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4121 |
withResourceTypes: #(canvas)) |
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4122 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4123 |
"Modified: / 31-08-2006 / 10:14:01 / cg" |
713 | 4124 |
! |
4125 |
||
4126 |
doLoadSubspec |
|
765 | 4127 |
"opens a ResourceSelectionBrowser for loading a sub spec from a class" |
713 | 4128 |
|
1976 | 4129 |
|classAndSelector class selector| |
729 | 4130 |
|
765 | 4131 |
self askForSectionModification. |
729 | 4132 |
|
1976 | 4133 |
classAndSelector := ResourceSelectionBrowser |
4134 |
request: 'Load Subspec From Class' |
|
4135 |
onSuperclass: nil |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4136 |
andClass: self specClass |
1976 | 4137 |
andSelector: specSelector |
4138 |
withResourceTypes: #(canvas). |
|
4139 |
||
4140 |
classAndSelector isNil ifTrue:[^ self]. |
|
4141 |
class := classAndSelector methodClass. |
|
4142 |
selector := classAndSelector methodSelector. |
|
1983 | 4143 |
(class == specClassName and: [selector == specSelector]) ifTrue: [ |
1976 | 4144 |
self warn: 'Current interface as subspec not allowed!!'. |
4145 |
^ self. |
|
4146 |
]. |
|
4147 |
(class respondsTo:selector) ifTrue:[ |
|
4148 |
self addWidgetOfSpec:(Array with: (UISubSpecification new majorKey: class name; minorKey: selector)) |
|
713 | 4149 |
] |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4150 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4151 |
"Modified: / 31-08-2006 / 10:13:56 / cg" |
446 | 4152 |
! |
4153 |
||
4154 |
doNew |
|
765 | 4155 |
"removes all widgets, specClass, and specSelector" |
729 | 4156 |
|
4157 |
self askForModification ifFalse: [^nil]. |
|
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4158 |
specClass := specClassName := specSelector := nil. |
572 | 4159 |
self painter removeAll. |
729 | 4160 |
treeView canvas topView name: UIPainter defaultNameOfCanvas. |
4161 |
treeView canvas topView label: UIPainter defaultNameOfCanvas. |
|
755 | 4162 |
self helpTool doNew. |
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
4163 |
self treeSelectionChanged. |
785 | 4164 |
treeView selectedNode changed. |
4165 |
self tabModel value: self tabList value first. |
|
729 | 4166 |
self updateInfoLabel. |
2072
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4167 |
|
0b0a24d7b198
class vs. className confusion
Claus Gittinger <cg@exept.de>
parents:
2040
diff
changeset
|
4168 |
"Modified: / 31-08-2006 / 10:14:10 / cg" |
446 | 4169 |
! |
4170 |
||
765 | 4171 |
doOpenWidgetDocumentation |
4172 |
"opens documentation for the selected widget" |
|
4173 |
||
4174 |
|spec document| |
|
4175 |
||
4176 |
(spec := self specForSelection) isNil ifTrue:[ |
|
1940 | 4177 |
"/ treeView isCanvasSelected ifTrue:[ |
4178 |
"/ spec := nil |
|
4179 |
"/ ] |
|
765 | 4180 |
]. |
4181 |
spec notNil ifTrue:[ |
|
1204 | 4182 |
document := 'tools/uipainter/', spec documentFileName,'.html' |
765 | 4183 |
] ifFalse: [ |
1204 | 4184 |
document := 'tools/uipainter/WindowSpec.html' |
765 | 4185 |
]. |
4186 |
HTMLDocumentView openFullOnDocumentationFile: document |
|
4187 |
! |
|
4188 |
||
446 | 4189 |
doPickAView |
765 | 4190 |
"changes the cursor for picking a view and builds a window spec from it" |
4191 |
||
4192 |
|view| |
|
446 | 4193 |
|
729 | 4194 |
self askForModification ifFalse: [^nil]. |
446 | 4195 |
|
4196 |
(view := Screen current viewFromUser) notNil ifTrue:[ |
|
2208 | 4197 |
view == Screen current rootView ifFalse:[ |
4198 |
self painter setupFromSpec:(UISpecification fromView:view topView). |
|
4199 |
] |
|
729 | 4200 |
]. |
4201 |
||
4202 |
self updateInfoLabel |
|
4203 |
||
446 | 4204 |
! |
4205 |
||
713 | 4206 |
doSave |
765 | 4207 |
"saves the window spec" |
1850
410f98d259b7
kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents:
1827
diff
changeset
|
4208 |
|
2001 | 4209 |
|code painter specClass| |
713 | 4210 |
|
765 | 4211 |
self askForSectionModification. |
713 | 4212 |
self hasSpecClassAndSelector ifFalse:[ |
1850
410f98d259b7
kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents:
1827
diff
changeset
|
4213 |
self doDefineClassAndSelector isNil ifTrue:[ |
410f98d259b7
kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents:
1827
diff
changeset
|
4214 |
^ nil |
410f98d259b7
kludge to raise the ui-painters control window
Claus Gittinger <cg@exept.de>
parents:
1827
diff
changeset
|
4215 |
] |
713 | 4216 |
]. |
2001 | 4217 |
|
4218 |
specClass := self resolveName:specClassName. |
|
4219 |
(specClass notNil and:[ specClass isClass ]) ifFalse:[ |
|
1983 | 4220 |
self warn:('Oops - cannot save - class not found: ' , specClassName). |
1976 | 4221 |
^ nil |
4222 |
]. |
|
2001 | 4223 |
|
713 | 4224 |
painter := self painter. |
1177 | 4225 |
painter |
2001 | 4226 |
class:specClass |
1976 | 4227 |
superclassName:specSuperclassName |
1341 | 4228 |
selector:specSelector. |
1851
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4229 |
|
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4230 |
"/ Transcript showCR:'generating windowSpec code...'. |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4231 |
|
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4232 |
(painter topView extent > (800 @ 600)) ifTrue:[ |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4233 |
Dialog |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4234 |
warn:(resources |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4235 |
stringWithCRs:'The application''s default window-size is taken from the current size and will be %1.\\This may be too small on some displays - if required, resize and save again.' |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4236 |
with:painter topView extent printString allBold) |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4237 |
]. |
d036350188f5
warn if spec is saved too large
Claus Gittinger <cg@exept.de>
parents:
1850
diff
changeset
|
4238 |
|
713 | 4239 |
code := painter generateWindowSpecMethodSource withCRs. |
4240 |
(ReadStream on:code) fileIn. |
|
1357 | 4241 |
self doGenerateAspectSelectorsMethod. |
1669 | 4242 |
self helpTool doSave. |
713 | 4243 |
self updateInfoLabel. |
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
4244 |
self clearModified. |
1177 | 4245 |
painter resetModification. |
2001 | 4246 |
(specClass respondsTo:specSelector) ifTrue:[ |
4247 |
self addHistoryEntryForClass:specClass selector:specSelector. |
|
713 | 4248 |
]. |
4249 |
! |
|
4250 |
||
4251 |
doSaveAs |
|
765 | 4252 |
"opens a ResourceSelectionBrowser for saving the window spec on a class" |
713 | 4253 |
|
1976 | 4254 |
|classAndSelector| |
713 | 4255 |
|
765 | 4256 |
self askForSectionModification. |
1976 | 4257 |
self askForModification ifFalse:[^ false]. |
4258 |
||
4259 |
classAndSelector := ResourceSelectionBrowser |
|
4260 |
request: 'Save Window Spec In Class' |
|
4261 |
onSuperclass: #Object |
|
1983 | 4262 |
andClass: (specClassName ? #ApplicationModel) asSymbol |
1976 | 4263 |
andSelector: specSelector ? #windowSpec |
4264 |
withResourceTypes: #(canvas). |
|
4265 |
||
4266 |
classAndSelector isNil ifTrue:[^ false]. |
|
4267 |
||
2007
77cf7ecc9ecf
embedding as special editors
Claus Gittinger <cg@exept.de>
parents:
2001
diff
changeset
|
4268 |
self clearModified. |
1976 | 4269 |
self painter resetModification. |
4270 |
||
1983 | 4271 |
specClassName := classAndSelector methodClass. |
1976 | 4272 |
specSelector := classAndSelector methodSelector. |
1983 | 4273 |
specSuperclassName := specClassName superclass name. |
1976 | 4274 |
self doSave. |
4275 |
^ true |
|
713 | 4276 |
! |
4277 |
||
446 | 4278 |
doStartApplication |
765 | 4279 |
"starts the application on the editing window spec" |
4280 |
||
1177 | 4281 |
|cls application| |
765 | 4282 |
|
4283 |
self hasSpecClassAndSelector ifFalse:[ |
|
1442
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4284 |
self doSave isNil ifTrue: [^nil]. |
765 | 4285 |
] ifTrue: [ |
1442
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4286 |
self askForSectionModification. |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4287 |
(modified or: [self painter isModified or: [self helpTool modified]]) |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4288 |
ifTrue: |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4289 |
[ |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4290 |
((YesNoBox title:'Window Spec was modified!!') |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4291 |
noText:'Cancel'; |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4292 |
yesText:'Save it and start'; |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4293 |
showAtPointer; |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4294 |
accepted) ifFalse: [^nil]. |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4295 |
self doSave isNil ifTrue: [^nil] |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4296 |
] |
446 | 4297 |
]. |
4298 |
||
1983 | 4299 |
cls := self resolveName:specClassName. |
1177 | 4300 |
cls isNil ifTrue:[ |
1983 | 4301 |
self warn:'Oops cannot start application - no class:' , specClassName. |
1442
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4302 |
^ nil |
1177 | 4303 |
]. |
4304 |
((application := cls new) respondsTo:#openInterface:) ifFalse:[ |
|
1442
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4305 |
(self confirm:('The application does not respond to the ''openInterface:'' message.\(maybe the spec is supposed to be used as subApplication/subCanvas)\\Shall I try to open this as a standAlone dialog ?') withCRs) |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4306 |
ifTrue:[ |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4307 |
SimpleDialog new openSpec:(cls perform:specSelector) withBindings:nil. |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4308 |
]. |
ed108e53c783
allow opening a dialog for a non-dialog/appmodel class
Claus Gittinger <cg@exept.de>
parents:
1439
diff
changeset
|
4309 |
^ self. |
446 | 4310 |
]. |
765 | 4311 |
application openInterface:specSelector |
446 | 4312 |
! |
4313 |
||
222 | 4314 |
doStepDown |
765 | 4315 |
"moves the selected widget one step down in the hierarchy" |
4316 |
||
222 | 4317 |
treeView doStepOver:1 |
4318 |
! |
|
4319 |
||
4320 |
doStepIn |
|
765 | 4321 |
"moves the selected widget into the next widget as child" |
4322 |
||
222 | 4323 |
treeView doStepIn |
4324 |
! |
|
4325 |
||
4326 |
doStepOut |
|
765 | 4327 |
"moves the selected widget out of the parent widget" |
4328 |
||
222 | 4329 |
treeView doStepOut |
4330 |
! |
|
4331 |
||
4332 |
doStepUp |
|
765 | 4333 |
"moves the selected widget one step up in the hierarchy" |
4334 |
||
222 | 4335 |
treeView doStepOver:-1 |
743 | 4336 |
! |
4337 |
||
4338 |
doWindowSpec |
|
765 | 4339 |
"opens a code view with the contents of the window spec" |
4340 |
||
4341 |
self askForSectionModification. |
|
4342 |
||
4343 |
CodeView |
|
2208 | 4344 |
openWith: self painter generateWindowSpecMethodSource |
4345 |
title: 'Window Spec' |
|
743 | 4346 |
|
1940 | 4347 |
! |
4348 |
||
4349 |
replaceWidgetByClass:aSpecOrWidgetClass |
|
4350 |
|specClass oldSpec newSpec sel painter| |
|
4351 |
||
4352 |
(aSpecOrWidgetClass isSubclassOf:UISpecification) ifTrue:[ |
|
4353 |
specClass := aSpecOrWidgetClass. |
|
4354 |
] ifFalse:[ |
|
4355 |
(aSpecOrWidgetClass isSubclassOf:View) ifTrue:[ |
|
4356 |
specClass := aSpecOrWidgetClass basicNew specClass. |
|
4357 |
] ifFalse:[ |
|
4358 |
]. |
|
4359 |
]. |
|
4360 |
specClass isNil ifTrue:[ |
|
4361 |
Dialog warn:'Invalid Spec- or View-Class: ' , aSpecOrWidgetClass name. |
|
4362 |
^ self. |
|
4363 |
]. |
|
4364 |
||
4365 |
treeView isCanvasSelected ifTrue:[ |
|
4366 |
^ self |
|
4367 |
]. |
|
4368 |
oldSpec := self selectedSpec. |
|
4369 |
newSpec := specClass cloneFrom:oldSpec. |
|
4370 |
||
4371 |
painter := self painter. |
|
4372 |
painter deleteSelectionBuffered:false. |
|
4373 |
sel := painter pasteSpecifications:(Array with:newSpec) keepLayout:false. |
|
4374 |
painter select:sel. |
|
222 | 4375 |
! ! |
4376 |
||
4377 |
!UIPainter::TreeView class methodsFor:'documentation'! |
|
4378 |
||
4379 |
documentation |
|
4380 |
" |
|
4381 |
selection in tree view; only used by the UIPainter |
|
4382 |
||
4383 |
[see also:] |
|
2208 | 4384 |
SelectionInTreeView |
4385 |
SelectionInTree |
|
4386 |
TreeItem |
|
4387 |
UIPainter |
|
222 | 4388 |
|
4389 |
[author:] |
|
2208 | 4390 |
Claus Atzkern |
222 | 4391 |
" |
4392 |
||
4393 |
||
4394 |
! ! |
|
4395 |
||
4396 |
!UIPainter::TreeView methodsFor:'accessing'! |
|
4397 |
||
4398 |
canvas |
|
765 | 4399 |
"returns the canvas (UIPainterView)" |
4400 |
||
4401 |
^ model root contents view |
|
222 | 4402 |
|
4403 |
||
4404 |
! |
|
4405 |
||
4406 |
canvas:aCanvas |
|
765 | 4407 |
"install canvas (UIPainterView)" |
4408 |
||
1396 | 4409 |
self canvas:aCanvas specName:nil |
281 | 4410 |
! |
4411 |
||
1394
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4412 |
canvas:aCanvas specName:nameOfSpec |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4413 |
"install canvas (UIPainterView)" |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4414 |
|
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4415 |
|props| |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4416 |
|
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4417 |
props := UIPainterView::ViewProperty new. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4418 |
props view:aCanvas. |
1396 | 4419 |
model root:(TreeItem name:(nameOfSpec ? UIPainter defaultNameOfCanvas) asBoldText contents:props). |
1394
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4420 |
model root expand. |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4421 |
self enableChannel:(aCanvas enableChannel). |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4422 |
! |
97a7eeabae40
overwriting existing method check (in #defineClass & selector);
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
4423 |
|
281 | 4424 |
canvasSpec |
765 | 4425 |
"returns spec assigned to canvas" |
4426 |
||
1574 | 4427 |
|spec list cls canvas| |
281 | 4428 |
|
1466
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4429 |
spec := self windowSpecClass new. |
1356 | 4430 |
canvas := self canvas. |
4431 |
||
4432 |
spec fromView:(canvas topView) callBack:nil. |
|
4433 |
||
311 | 4434 |
windowSpec notNil ifTrue:[ |
1356 | 4435 |
spec copyValuesFromSpec:windowSpec. |
311 | 4436 |
]. |
1356 | 4437 |
|
4438 |
spec exportedAspects isNil ifTrue:[ |
|
4439 |
( (cls := canvas className) notNil |
|
1357 | 4440 |
and:[(cls := canvas resolveName:cls) notNil] |
1356 | 4441 |
) ifTrue:[ |
1357 | 4442 |
list := cls perform:#aspectSelectors ifNotUnderstood:nil. |
1356 | 4443 |
]. |
1357 | 4444 |
spec setExportedAspectsFrom:list. |
1360 | 4445 |
windowSpec notNil ifTrue:[ |
4446 |
windowSpec exportedAspects:(spec exportedAspects). |
|
4447 |
] |
|
1356 | 4448 |
]. |
4449 |
||
1466
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4450 |
self propertiesDo:[:aProp| |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4451 |
|propsSpec| |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4452 |
|
1357 | 4453 |
spec exportedAspectsAddKey:(aProp model) type:nil. |
1466
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4454 |
propsSpec := aProp spec. |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4455 |
propsSpec aspectSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:nil]. |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4456 |
propsSpec actionSelectors do:[:aKey|spec exportedAspectsAddKey:aKey type:#action]. |
1356 | 4457 |
]. |
4458 |
^ spec |
|
282 | 4459 |
! |
4460 |
||
311 | 4461 |
canvasSpec:aSpec |
765 | 4462 |
"update canvas from spec" |
4463 |
||
311 | 4464 |
|spec| |
4465 |
||
4466 |
self setAttributesFromWindowSpec:aSpec. |
|
4467 |
spec := aSpec copy. |
|
4468 |
spec menu:nil. |
|
4469 |
spec flags:nil. |
|
4470 |
||
394 | 4471 |
spec setAttributesIn:(self canvas topView) with:(UIBuilder new isEditing:true). |
311 | 4472 |
! |
4473 |
||
1357 | 4474 |
exportedAspects |
4475 |
"returns spec assigned to canvas" |
|
4476 |
||
4477 |
windowSpec isNil ifTrue:[^ #()]. |
|
4478 |
^ windowSpec exportedAspects ? #() |
|
4479 |
||
4480 |
! |
|
4481 |
||
282 | 4482 |
itemOfView:aView |
765 | 4483 |
"returns item assigned to view or nil" |
4484 |
||
282 | 4485 |
aView notNil ifTrue:[ |
2208 | 4486 |
self allItemsDo:[:anItem| |
4487 |
(anItem contents view == aView) ifTrue:[^ anItem] |
|
4488 |
] |
|
282 | 4489 |
]. |
765 | 4490 |
^ nil |
282 | 4491 |
|
4492 |
||
755 | 4493 |
! |
4494 |
||
4495 |
lastDrawnMaster |
|
765 | 4496 |
"returns the lastDrawnMaster" |
4497 |
||
4498 |
^ lastDrawnMaster |
|
755 | 4499 |
|
4500 |
||
1466
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4501 |
! |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4502 |
|
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4503 |
windowSpecClass |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4504 |
"returns the default windowSpecClass (WindowSpec)" |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4505 |
|
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4506 |
^ windowSpecClass ? WindowSpec |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4507 |
! |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4508 |
|
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4509 |
windowSpecClass:aClass |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4510 |
"set the default windowSpecClass" |
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4511 |
|
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4512 |
^ windowSpecClass := aClass |
222 | 4513 |
! ! |
4514 |
||
1661 | 4515 |
!UIPainter::TreeView methodsFor:'accessing-property'! |
222 | 4516 |
|
4517 |
propertiesDo:aOneArgBlock |
|
765 | 4518 |
"evaluates the argument a block on each property" |
4519 |
||
222 | 4520 |
self allItemsDo:[:anItem| aOneArgBlock value:(anItem contents)] |
4521 |
||
4522 |
||
4523 |
! |
|
4524 |
||
4525 |
propertyDetect:aOneArgBlock |
|
765 | 4526 |
"evaluates the block on each property" |
4527 |
||
222 | 4528 |
self allItemsDo:[:anItem| |
2208 | 4529 |
(aOneArgBlock value:(anItem contents)) ifTrue:[^ anItem contents] |
222 | 4530 |
]. |
765 | 4531 |
^ nil |
222 | 4532 |
|
4533 |
! |
|
4534 |
||
4535 |
propertySelected |
|
4536 |
"returns current selected property or nil in case of multi selection |
|
765 | 4537 |
or empty selection " |
4538 |
||
222 | 4539 |
|idx| |
4540 |
||
4541 |
selection size == 1 ifTrue:[ |
|
2208 | 4542 |
(idx := selection first) ~~ 1 ifTrue:[ "canvas: not yet supported" |
4543 |
^ (listOfNodes at:idx) contents |
|
4544 |
] |
|
222 | 4545 |
]. |
765 | 4546 |
^ nil |
222 | 4547 |
|
4548 |
! ! |
|
4549 |
||
4550 |
!UIPainter::TreeView methodsFor:'adding & removing'! |
|
4551 |
||
4552 |
addProperty:aProperty |
|
765 | 4553 |
"adds a new item" |
4554 |
||
533 | 4555 |
|parent| |
295 | 4556 |
|
1870 | 4557 |
parent := self detectItemCorespondingToView:(aProperty view superView). |
295 | 4558 |
|
4559 |
parent notNil ifTrue:[ |
|
1870 | 4560 |
model add:(TreeItem new contents:aProperty) below:parent |
295 | 4561 |
] |
222 | 4562 |
! |
4563 |
||
4564 |
removeAll |
|
765 | 4565 |
"removes all items other than canvas" |
4566 |
||
222 | 4567 |
lastDrawnMaster := nil. |
311 | 4568 |
windowSpec := nil. |
222 | 4569 |
|
4570 |
self canvas subViews copy do:[:aView| |
|
2208 | 4571 |
"/ care to not destroy the transparent input view |
4572 |
(aView isInputOnly) ifFalse:[aView destroy] |
|
222 | 4573 |
]. |
713 | 4574 |
model root name: UIPainter defaultNameOfCanvas asBoldText. |
774 | 4575 |
model removeAllOtherThanRoot. |
222 | 4576 |
|
4577 |
! |
|
4578 |
||
4579 |
removeView:aView |
|
765 | 4580 |
"removes a view" |
4581 |
||
282 | 4582 |
|item prnt| |
4583 |
||
4584 |
((item := self itemOfView:aView) notNil and:[(prnt := item parent) notNil]) ifTrue:[ |
|
2208 | 4585 |
aView destroy. |
4586 |
prnt contents view sizeChanged:nil. |
|
4587 |
model remove:item |
|
222 | 4588 |
] |
4589 |
||
4590 |
||
4591 |
! ! |
|
4592 |
||
311 | 4593 |
!UIPainter::TreeView methodsFor:'building'! |
4594 |
||
1058 | 4595 |
generateFullSpecForComponents:aSpecArray named:specNameSymbol |
765 | 4596 |
"generates a full spec from aSpecArray" |
4597 |
||
351 | 4598 |
|fullSpec winSpec| |
311 | 4599 |
|
4600 |
fullSpec := FullSpec new. |
|
1058 | 4601 |
fullSpec name:specNameSymbol. |
311 | 4602 |
|
4603 |
fullSpec fromBuilder:(self canvas topView) |
|
2208 | 4604 |
components:(SpecCollection new collection:aSpecArray). |
311 | 4605 |
|
4606 |
windowSpec notNil ifTrue:[ |
|
2208 | 4607 |
winSpec := fullSpec window. |
4608 |
winSpec copyValuesFromSpec:windowSpec. |
|
4609 |
winSpec name: winSpec label. |
|
311 | 4610 |
]. |
4611 |
^ fullSpec literalArrayEncoding. |
|
351 | 4612 |
|
311 | 4613 |
! |
4614 |
||
4615 |
setAttributesFromWindowSpec:aWindowSpec |
|
1172
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4616 |
"sets a window spec from aWindowSpec and applies some attributes |
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4617 |
to the canvas." |
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4618 |
|
1391 | 4619 |
|name canvasView builder| |
765 | 4620 |
|
1466
6fecdd5341dc
allow for windowSpecClass to be customized
Claus Gittinger <cg@exept.de>
parents:
1461
diff
changeset
|
4621 |
windowSpec := (self windowSpecClass) new copyValuesFromSpec:aWindowSpec. |
1172
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4622 |
canvasView := self canvas. |
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4623 |
|
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4624 |
builder := UIBuilder new isEditing:true. |
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4625 |
aWindowSpec setAttributesIn:canvasView with:builder. |
e22253cb348f
set the top attributes (especially: viewbackground)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
4626 |
|
1391 | 4627 |
name := aWindowSpec label. |
4628 |
canvasView topView name:name. |
|
4629 |
self canvasNameChanged:name. |
|
1710
4d81ff7b3412
autoAccept on selectionChange; ok -> apply;
Claus Gittinger <cg@exept.de>
parents:
1698
diff
changeset
|
4630 |
self application treeSelectionChanged. |
311 | 4631 |
! ! |
4632 |
||
222 | 4633 |
!UIPainter::TreeView methodsFor:'canvas selection'! |
4634 |
||
4635 |
cvsSelection:aSelection |
|
4636 |
"canvas changed its selection |
|
4637 |
" |
|
805 | 4638 |
|sel list size| |
4639 |
||
4640 |
((sel := aSelection) isNil or:[sel isCollection]) ifFalse:[ |
|
2208 | 4641 |
sel := Array with:sel |
774 | 4642 |
]. |
805 | 4643 |
|
4644 |
(size := sel size) ~~ 0 ifTrue:[ |
|
2208 | 4645 |
list := OrderedCollection new:size. |
4646 |
||
4647 |
sel do:[:aView||item| |
|
4648 |
(item := self itemOfView:aView) notNil ifTrue:[ |
|
4649 |
list add:item. |
|
4650 |
model doMakeVisible:item. |
|
4651 |
] |
|
4652 |
]. |
|
4653 |
sel := list collect:[:anItem| self indexOfNode:anItem ]. |
|
774 | 4654 |
]. |
222 | 4655 |
self cvsEventsDisabledDo:[ self selection:sel ]. |
4656 |
||
4657 |
||
4658 |
||
4659 |
||
4660 |
! |
|
4661 |
||
4662 |
cvsSelectionAdd:aView |
|
4663 |
"canvas adds a view to current selection |
|
4664 |
" |
|
774 | 4665 |
|item index oldSel| |
222 | 4666 |
|
4667 |
item := self itemOfView:aView. |
|
4668 |
||
4669 |
item notNil ifTrue:[ |
|
2208 | 4670 |
model doMakeVisible:item. |
4671 |
||
4672 |
(index := self indexOfNode:item) ~~ 0 ifTrue:[ |
|
4673 |
oldSel := selection copy. |
|
4674 |
self addToSelection:index. |
|
4675 |
self selectionChangedFrom:oldSel |
|
4676 |
] |
|
774 | 4677 |
] |
222 | 4678 |
|
4679 |
||
4680 |
||
4681 |
! |
|
4682 |
||
4683 |
cvsSelectionRemove:aView |
|
4684 |
"canvas removes a view from current selection |
|
4685 |
" |
|
774 | 4686 |
|item index oldSel| |
4687 |
||
4688 |
( (item := self itemOfView:aView) notNil |
|
4689 |
and:[(index := self indexOfNode:item) ~~ 0 |
|
4690 |
and:[self isInSelection:index]] |
|
4691 |
) ifTrue:[ |
|
2208 | 4692 |
oldSel := selection copy. |
4693 |
self removeFromSelection:index. |
|
4694 |
self selectionChangedFrom:oldSel. |
|
774 | 4695 |
]. |
222 | 4696 |
|
4697 |
||
4698 |
! ! |
|
4699 |
||
4700 |
!UIPainter::TreeView methodsFor:'change & update'! |
|
4701 |
||
281 | 4702 |
canvasNameChanged:aName |
4703 |
"called if identification name assigned to window (canvas) changed |
|
4704 |
" |
|
4705 |
|name node| |
|
4706 |
||
4707 |
node := listOfNodes at:1. |
|
4708 |
||
4709 |
( aName size ~~ 0 |
|
4710 |
and:[(name := aName string withoutSeparators) size ~~ 0 |
|
4711 |
and:[(self propertyDetect:[:p| p name = name]) isNil |
|
4712 |
and:[node name ~= name]]] |
|
4713 |
) ifTrue:[ |
|
2208 | 4714 |
node name: name asBoldText. |
4715 |
node changed. |
|
281 | 4716 |
]. |
4717 |
! |
|
4718 |
||
222 | 4719 |
layoutChanged |
4720 |
"layout of any component changed; in case of single selection, the |
|
4721 |
application will be informed to update its layout |
|
4722 |
" |
|
4723 |
selection size == 1 ifTrue:[ |
|
2208 | 4724 |
self application layoutChanged |
222 | 4725 |
] |
4726 |
||
4727 |
||
4728 |
! |
|
4729 |
||
4730 |
propertyChanged:aProperty |
|
4731 |
"property of view derived from argument a property changed |
|
4732 |
" |
|
4733 |
|item idx end| |
|
4734 |
||
4735 |
item := self itemOfView:(aProperty view). |
|
4736 |
||
4737 |
item notNil ifTrue:[ |
|
2208 | 4738 |
item contents:aProperty. |
4739 |
||
4740 |
item name = aProperty name ifFalse:[ |
|
4741 |
idx := self firstLineShown. |
|
4742 |
||
4743 |
(end := self lastLineShown) > listOfNodes size ifTrue:[ |
|
4744 |
end := listOfNodes size |
|
4745 |
]. |
|
4746 |
item changed. |
|
4747 |
||
4748 |
[idx <= end] whileTrue:[ |
|
4749 |
(listOfNodes at:idx) == item ifTrue:[ |
|
4750 |
self redrawLine:idx. "/ is visible; redraw line |
|
4751 |
end := 0 |
|
4752 |
] ifFalse:[ |
|
4753 |
idx := idx + 1 |
|
4754 |
] |
|
4755 |
] |
|
4756 |
]. |
|
4757 |
||
4758 |
self selectedNode == item ifTrue:[ "/ inform application |
|
4759 |
self application propertyChanged |
|
4760 |
] |
|
222 | 4761 |
]. |
4762 |
||
4763 |
||
4764 |
! ! |
|
4765 |
||
4766 |
!UIPainter::TreeView methodsFor:'drag & drop'! |
|
4767 |
||
2117 | 4768 |
canDrop:aDropContext |
1953 | 4769 |
"can drop ? -> delegate to canvas" |
4770 |
||
2117 | 4771 |
^ self canvas canDrop:aDropContext |
4772 |
||
4773 |
"Modified: / 13-10-2006 / 16:08:43 / cg" |
|
222 | 4774 |
! |
4775 |
||
2117 | 4776 |
canDrop:aDropContext at:aPoint |
2114 | 4777 |
"can drop ? -> delegate to canvas" |
4778 |
||
2117 | 4779 |
^ self canvas canDrop:aDropContext at:aPoint |
2114 | 4780 |
|
4781 |
"Created: / 13-10-2006 / 12:35:53 / cg" |
|
2117 | 4782 |
"Modified: / 13-10-2006 / 16:08:46 / cg" |
2114 | 4783 |
! |
4784 |
||
2117 | 4785 |
canDropObjects:aCollectionOfDropObjects |
4786 |
"can drop ? -> delegate to canvas" |
|
4787 |
||
4788 |
^ self canvas canDropObjects:aCollectionOfDropObjects |
|
4789 |
||
4790 |
"Created: / 13-10-2006 / 16:08:31 / cg" |
|
4791 |
! |
|
4792 |
||
4793 |
canDropObjects:aCollectionOfDropObjects at:aPoint |
|
4794 |
"can drop ? -> delegate to canvas" |
|
4795 |
||
4796 |
^ self canvas canDropObjects:aCollectionOfDropObjects at:aPoint |
|
4797 |
||
4798 |
"Created: / 13-10-2006 / 16:08:35 / cg" |
|
4799 |
! |
|
4800 |
||
4801 |
drop:aDropContext |
|
2114 | 4802 |
"drop objects -> delegate to canvas" |
4803 |
||
2117 | 4804 |
self canvas drop:aDropContext |
2114 | 4805 |
|
4806 |
"Created: / 13-10-2006 / 12:35:59 / cg" |
|
2117 | 4807 |
"Modified: / 13-10-2006 / 16:09:04 / cg" |
2114 | 4808 |
! |
4809 |
||
2117 | 4810 |
drop:aDropContext at:aPoint |
4811 |
"drop objects -> delegate to canvas" |
|
4812 |
||
4813 |
self canvas drop:aDropContext at:aPoint |
|
4814 |
||
4815 |
"Modified: / 13-10-2006 / 16:09:07 / cg" |
|
4816 |
! |
|
4817 |
||
4818 |
dropObjects:aCollectionOfDropObjects |
|
1953 | 4819 |
"drop objects -> delegate to canvas" |
4820 |
||
2117 | 4821 |
self canvas dropObjects:aCollectionOfDropObjects |
4822 |
||
4823 |
"Created: / 13-10-2006 / 16:08:51 / cg" |
|
4824 |
! |
|
4825 |
||
4826 |
dropObjects:aCollectionOfDropObjects at:aPoint |
|
4827 |
"drop objects -> delegate to canvas" |
|
4828 |
||
4829 |
self canvas dropObjects:aCollectionOfDropObjects at:aPoint |
|
4830 |
||
4831 |
"Created: / 13-10-2006 / 16:08:56 / cg" |
|
222 | 4832 |
! ! |
4833 |
||
282 | 4834 |
!UIPainter::TreeView methodsFor:'enumerating'! |
4835 |
||
4836 |
allItemsDo:aOneArgBlock |
|
765 | 4837 |
"evaluates the argument a block on each item other than the canvas" |
4838 |
||
282 | 4839 |
model root allChildrenDo:aOneArgBlock |
4840 |
||
4841 |
||
4842 |
! ! |
|
4843 |
||
1719 | 4844 |
!UIPainter::TreeView methodsFor:'event handling'! |
222 | 4845 |
|
4846 |
cvsEventsDisabledDo:aBlock |
|
765 | 4847 |
"evaluates the block without raising selection changed notifications |
4848 |
to canvas" |
|
4849 |
||
222 | 4850 |
|restoreCvsEvents| |
4851 |
||
4852 |
restoreCvsEvents := cvsEventsDisabled. |
|
4853 |
cvsEventsDisabled := true. |
|
4854 |
aBlock value. |
|
4855 |
cvsEventsDisabled := restoreCvsEvents. |
|
4856 |
||
4857 |
||
4858 |
! |
|
4859 |
||
4860 |
doubleClicked |
|
765 | 4861 |
"disables collapsing of the root item" |
4862 |
||
222 | 4863 |
self selectedNode == model root ifFalse:[ |
2208 | 4864 |
super doubleClicked |
222 | 4865 |
] |
4866 |
||
4867 |
||
805 | 4868 |
! |
4869 |
||
852 | 4870 |
redrawLabelAt:x y:yTop index:anIndex |
805 | 4871 |
"draws a tiny rectangle for indicating the master node (first selected node)" |
4872 |
||
4873 |
|dX| |
|
4874 |
||
852 | 4875 |
super redrawLabelAt:x y:yTop index:anIndex. |
805 | 4876 |
|
4877 |
((selection size > 1) and: [selection first == anIndex]) ifTrue:[ |
|
2208 | 4878 |
dX := textInset - 1. |
4879 |
self paint:(Color red). "/ self application painter handleMasterColor. |
|
4880 |
self fillRectangleX:(x - dX - 2) |
|
4881 |
y:yTop + ((fontHeight - dX) // 2) |
|
4882 |
width:dX |
|
4883 |
height:dX |
|
805 | 4884 |
] |
222 | 4885 |
! ! |
4886 |
||
4887 |
!UIPainter::TreeView methodsFor:'initialization'! |
|
4888 |
||
4889 |
initialize |
|
765 | 4890 |
"initialize the tree view; multiple select and tree item actions" |
4891 |
||
222 | 4892 |
super initialize. |
564 | 4893 |
|
222 | 4894 |
self multipleSelectOk:true. |
368 | 4895 |
cvsEventsDisabled := false. |
440 | 4896 |
self showDirectoryIndicator: true. |
656 | 4897 |
self showDirectoryIndicatorForRoot: false. |
4898 |
||
4899 |
self model iconAction: |
|
4900 |
[:aNode| |
|
2208 | 4901 |
|specClass| |
4902 |
(specClass := aNode contents spec) isNil |
|
4903 |
ifTrue: [WindowSpec icon] |
|
4904 |
ifFalse:[specClass class icon] |
|
656 | 4905 |
]. |
4906 |
||
713 | 4907 |
self model labelAction: |
4908 |
[:aNode| |
|
2208 | 4909 |
|spec| |
4910 |
(spec := aNode contents spec) notNil |
|
4911 |
ifTrue: [self nameForSpecInList:spec] |
|
4912 |
ifFalse:[aNode name] |
|
713 | 4913 |
] |
222 | 4914 |
! ! |
4915 |
||
4916 |
!UIPainter::TreeView methodsFor:'private'! |
|
4917 |
||
713 | 4918 |
nameForSpecInList:aSpec |
765 | 4919 |
"returns the tree item label for aSpec" |
4920 |
||
713 | 4921 |
^ aSpec name asBoldText, ': [', aSpec viewClass name , ']' |
222 | 4922 |
! |
4923 |
||
4924 |
selectionChangedFrom:oldSelection |
|
4925 |
"selection has changed. update master selection and raise notification |
|
4926 |
to canvas in case of enabled cvs events |
|
4927 |
" |
|
282 | 4928 |
|sel size| |
222 | 4929 |
|
4930 |
super selectionChangedFrom:oldSelection. |
|
282 | 4931 |
size := selection size. |
222 | 4932 |
|
4933 |
cvsEventsDisabled ifFalse:[ |
|
2208 | 4934 |
(size ~~ 0 and:[size ~~ 1 or:[selection first ~~ 1]]) ifTrue:[ |
4935 |
sel := OrderedCollection new. |
|
4936 |
||
4937 |
selection do:[:i| |
|
4938 |
i ~~ 1 ifTrue:[sel add:(listOfNodes at:i) contents view] |
|
4939 |
] |
|
4940 |
]. |
|
4941 |
self canvas updateSelectionFromModel:sel |
|
778 | 4942 |
]. |
713 | 4943 |
size = 1 ifTrue:[ |
2208 | 4944 |
oldSelection size > 1 ifTrue: [ |
4945 |
(listOfNodes at:lastDrawnMaster) retrieveLabel. |
|
4946 |
self redrawLine: lastDrawnMaster. |
|
4947 |
lastDrawnMaster := selection first |
|
4948 |
] |
|
713 | 4949 |
]. |
4950 |
size > 1 ifTrue:[ |
|
2208 | 4951 |
selection first ~~ lastDrawnMaster ifTrue: [ |
4952 |
(listOfNodes at:selection first) retrieveLabel. |
|
4953 |
lastDrawnMaster notNil ifTrue: [(listOfNodes at:lastDrawnMaster) retrieveLabel]. |
|
4954 |
self redrawLine: lastDrawnMaster. |
|
4955 |
self redrawLine: (lastDrawnMaster := selection first) |
|
4956 |
] |
|
785 | 4957 |
] |
713 | 4958 |
ifFalse: [ |
2208 | 4959 |
lastDrawnMaster := nil |
785 | 4960 |
] |
222 | 4961 |
! ! |
4962 |
||
4963 |
!UIPainter::TreeView methodsFor:'queries'! |
|
4964 |
||
565 | 4965 |
canChangeOrderInContainer |
4966 |
"returns true if any selection exists and all widgets in the selection |
|
765 | 4967 |
can change their layout through to a move or align operation" |
565 | 4968 |
|
889 | 4969 |
^(selection size == 1) and: |
4970 |
[(selection at: 1) ~~ 1 and: |
|
4971 |
[self selectedNode parent children size > 1]] |
|
4972 |
||
4973 |
||
565 | 4974 |
! |
4975 |
||
1230
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4976 |
canExchangeSelectionLayouts |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4977 |
"returns true if the selections size is exactly 2 |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4978 |
and all widgets in the selection |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4979 |
can change their layout through to a move or align operation" |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4980 |
|
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4981 |
selection size == 2 ifFalse:[ |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4982 |
^ false |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4983 |
]. |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4984 |
^ self canMoveOrAlignSelection |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4985 |
! |
23e5d0c133e8
added exchangeLayouts function
Claus Gittinger <cg@exept.de>
parents:
1211
diff
changeset
|
4986 |
|
282 | 4987 |
canMoveOrAlignSelection |
4988 |
"returns true if any selection exists and all widgets in the selection |
|
765 | 4989 |
can change their layout through to a move or align operation" |
282 | 4990 |
|
4991 |
selection size == 0 ifTrue:[ |
|
2208 | 4992 |
^ false |
282 | 4993 |
]. |
4994 |
||
4995 |
selection do:[:i| |
|
2208 | 4996 |
i == 1 ifTrue:[^ false]. |
4997 |
||
4998 |
(self canvas canChangeLayoutOfView:((listOfNodes at:i) contents view)) ifFalse:[ |
|
4999 |
^ false |
|
5000 |
] |
|
282 | 5001 |
]. |
5002 |
^ true |
|
5003 |
! |
|
5004 |
||
5005 |
canMoveSelectionIntoContainer |
|
765 | 5006 |
"returns true in case that one widget is selected and can change its container |
5007 |
widget to the next element in the list which will have the same container" |
|
5008 |
||
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5009 |
|item prnt container| |
222 | 5010 |
|
5011 |
( (item := self selectedNode) isNil |
|
5012 |
or:[(prnt := item parent) isNil |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5013 |
or:[(container := prnt childAt:((prnt indexOfChild:item) + 1)) isNil |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5014 |
or:[container contents spec class supportsSubComponents not]]] |
222 | 5015 |
) ifTrue:[ |
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5016 |
^ false |
222 | 5017 |
]. |
765 | 5018 |
^ true |
222 | 5019 |
! |
5020 |
||
282 | 5021 |
canMoveSelectionOutOfContainer |
765 | 5022 |
"returns true in case that one widget is selected which is contained within |
5023 |
another widget" |
|
5024 |
||
222 | 5025 |
|item prnt| |
5026 |
||
5027 |
( (item := self selectedNode) isNil |
|
5028 |
or:[(prnt := item parent) isNil |
|
5029 |
or:[prnt parent isNil]] |
|
5030 |
) ifTrue:[ |
|
2208 | 5031 |
^ false |
222 | 5032 |
]. |
765 | 5033 |
^ true |
222 | 5034 |
! |
5035 |
||
301 | 5036 |
canResizeSelectedWidget |
5037 |
"returns true in case of one widget selected and is contained |
|
765 | 5038 |
within a widget which allows to resize sub components" |
5039 |
||
5040 |
|selectedNode| |
|
5041 |
||
5042 |
(selectedNode := self selectedNode) notNil ifTrue:[ |
|
2208 | 5043 |
(selectedNode := selectedNode parent) notNil ifTrue:[ |
5044 |
^ (selectedNode parent isNil or:[selectedNode contents spec class canResizeSubComponents]) |
|
5045 |
] |
|
301 | 5046 |
]. |
5047 |
^ false |
|
5048 |
! |
|
5049 |
||
282 | 5050 |
hasOneSelectionOtherThanCanvas |
765 | 5051 |
"returns true in case that one selection exists other than the canvas" |
5052 |
||
5053 |
^ selection size == 1 and:[selection first ~~ 1] |
|
281 | 5054 |
! |
5055 |
||
5056 |
isCanvasSelected |
|
5057 |
"returns true in case of a single selection and the |
|
765 | 5058 |
selection is the canvas (index 1)" |
5059 |
||
5060 |
^ selection size == 1 and:[self isInSelection:1] |
|
222 | 5061 |
! ! |
5062 |
||
765 | 5063 |
!UIPainter::TreeView methodsFor:'searching'! |
282 | 5064 |
|
1870 | 5065 |
detectItemCorespondingToView:aView |
5066 |
"detects the item coresponding to the view. The item of the view or the first |
|
282 | 5067 |
subview providing the item is returned. If no property is detected nil is |
765 | 5068 |
returned" |
5069 |
||
282 | 5070 |
|view item| |
5071 |
||
5072 |
(view := aView) notNil ifTrue:[ |
|
1870 | 5073 |
[(item := self itemOfView:view) isNil] whileTrue:[ |
5074 |
(view := view superView) isNil ifTrue:[^ listOfNodes at:1] |
|
5075 |
]. |
|
282 | 5076 |
]. |
5077 |
^ item |
|
5078 |
! ! |
|
5079 |
||
1439 | 5080 |
!UIPainter::TreeView methodsFor:'user interaction'! |
222 | 5081 |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5082 |
askForSelectionChangeAllowed |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5083 |
selectConditionBlock notNil ifTrue:[ |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5084 |
^ selectConditionBlock value:nil |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5085 |
]. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5086 |
^ true |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5087 |
! |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5088 |
|
774 | 5089 |
doChangeHierarchyOf:anItem |
5090 |
||
5091 |
|canvas| |
|
5092 |
||
5093 |
anItem isNil ifTrue:[ |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5094 |
^ self |
774 | 5095 |
]. |
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5096 |
self askForSelectionChangeAllowed ifFalse:[^ self]. |
774 | 5097 |
self setSelection:nil. |
5098 |
||
5099 |
canvas := self canvas. |
|
5100 |
canvas deleteSelection. |
|
5101 |
canvas setSelection:(anItem contents view) withRedraw:false. |
|
5102 |
canvas pasteWithLayout. |
|
5103 |
! |
|
5104 |
||
222 | 5105 |
doStepIn |
774 | 5106 |
|item prnt| |
222 | 5107 |
|
5108 |
( (item := self selectedNode) isNil |
|
5109 |
or:[(prnt := item parent) isNil |
|
5110 |
or:[(prnt := prnt childAt:((prnt indexOfChild:item) + 1)) isNil |
|
5111 |
or:[prnt contents spec class supportsSubComponents not]]] |
|
5112 |
) ifFalse:[ |
|
2208 | 5113 |
self doChangeHierarchyOf:prnt |
222 | 5114 |
] |
5115 |
! |
|
5116 |
||
5117 |
doStepOut |
|
774 | 5118 |
|item| |
5119 |
||
5120 |
((item := self selectedNode) notNil and:[(item := item parent) notNil]) ifTrue:[ |
|
2208 | 5121 |
self doChangeHierarchyOf:(item parent) |
222 | 5122 |
]. |
5123 |
! |
|
5124 |
||
5125 |
doStepOver:anIndex |
|
765 | 5126 |
"moves child 'anOffset' forward or backward in list of children" |
5127 |
||
282 | 5128 |
|item idx size prnt spVw view canvas| |
222 | 5129 |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5130 |
self askForSelectionChangeAllowed ifFalse:[^ self]. |
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5131 |
|
222 | 5132 |
( (item := self selectedNode) isNil |
5133 |
or:[(prnt := item parent) isNil |
|
282 | 5134 |
or:[(size := prnt children size) < 2 |
5135 |
or:[(idx := prnt indexOfChild:item) == 0]]] |
|
5136 |
) ifTrue:[ |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5137 |
^ self |
282 | 5138 |
]. |
5139 |
idx := idx + anIndex. |
|
5140 |
||
5141 |
idx < 1 ifTrue:[idx := size] |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5142 |
ifFalse:[idx > size ifTrue:[idx := 1]]. |
282 | 5143 |
|
774 | 5144 |
self setSelection:nil. |
5145 |
model remove:item. |
|
282 | 5146 |
model add:item beforeIndex:idx below:prnt. |
774 | 5147 |
|
282 | 5148 |
idx := prnt indexOfChild:item. |
5149 |
view := item contents view. |
|
5150 |
spVw := prnt contents view. |
|
5151 |
canvas := self canvas. |
|
5152 |
||
5153 |
canvas hideSelection. |
|
5154 |
||
5155 |
spVw changeSequenceOrderFor:view to:idx. |
|
5156 |
||
5157 |
spVw specClass isLayoutContainer ifFalse:[ |
|
1621
112670159075
cg: check if selection change is allowed BEFORE changing the
tm
parents:
1608
diff
changeset
|
5158 |
spVw subViews do:[:v| v raise ]. |
282 | 5159 |
]. |
5160 |
canvas showSelection. |
|
5161 |
self selectNode:item. |
|
222 | 5162 |
! ! |
5163 |
||
60 | 5164 |
!UIPainter class methodsFor:'documentation'! |
5165 |
||
5166 |
version |
|
5167 |
^ '$Header$' |
|
5168 |
! ! |