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