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