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