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