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