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