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