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