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