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