author | tz |
Mon, 23 Mar 1998 22:41:56 +0100 | |
changeset 872 | a1606dcbd38b |
parent 871 | 5d3b1dd9bac5 |
child 876 | 585929b1fec2 |
permissions | -rw-r--r-- |
756 | 1 |
" |
784 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
756 | 3 |
All Rights Reserved |
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
753 | 15 |
ApplicationModel subclass:#ToolApplicationModel |
782 | 16 |
instanceVariableNames:'timeBlock' |
753 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
834 | 19 |
category:'Interface-Framework' |
753 | 20 |
! |
21 |
||
850 | 22 |
ToolApplicationModel class instanceVariableNames:'history clipboard settings showHelp' |
753 | 23 |
|
24 |
" |
|
25 |
The following class instance variables are inherited by this class: |
|
26 |
||
27 |
ApplicationModel - ClassResources |
|
28 |
Model - |
|
29 |
Object - |
|
30 |
" |
|
31 |
! |
|
32 |
||
33 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
34 |
||
756 | 35 |
copyright |
36 |
" |
|
784 | 37 |
COPYRIGHT (c) 1997 by eXept Software AG |
756 | 38 |
All Rights Reserved |
39 |
||
40 |
This software is furnished under a license and may be used |
|
41 |
only in accordance with the terms of that license and with the |
|
42 |
inclusion of the above copyright notice. This software may not |
|
43 |
be provided or otherwise made available to, or used by, any |
|
44 |
other person. No title to or ownership of the software is |
|
45 |
hereby transferred. |
|
46 |
" |
|
47 |
||
48 |
||
49 |
! |
|
50 |
||
753 | 51 |
documentation |
52 |
" |
|
869 | 53 |
Framework class for tool applications. |
54 |
Provides hooks for history management, |
|
782 | 55 |
showing help texts, about menu, help menu etc. |
753 | 56 |
|
57 |
[author:] |
|
58 |
Thomas Zwick |
|
59 |
" |
|
60 |
! ! |
|
61 |
||
62 |
!ToolApplicationModel class methodsFor:'accessing'! |
|
63 |
||
800 | 64 |
authorLinesForAboutBox |
65 |
"extract the author(s) from the documentation method." |
|
66 |
||
67 |
|firstClassWithDocumentation src s line lines| |
|
753 | 68 |
|
800 | 69 |
firstClassWithDocumentation := self class withAllSuperclasses detect:[:metacls| metacls implements:#documentation]. |
70 |
firstClassWithDocumentation notNil ifTrue:[ |
|
71 |
(firstClassWithDocumentation inheritsFrom:ToolApplicationModel class) ifTrue:[ |
|
72 |
src := (firstClassWithDocumentation compiledMethodAt:#documentation) source. |
|
73 |
src notNil ifTrue:[ |
|
74 |
s := src readStream. |
|
75 |
s upToAll:'[author:]'. |
|
76 |
s nextLine. "/ skip to end |
|
77 |
line := s nextLine. "/ line after [author:] |
|
78 |
lines := OrderedCollection new. |
|
79 |
[line notNil and:[line notEmpty]] whileTrue:[ |
|
80 |
line := line trimBlanks. |
|
81 |
line size > 1 ifTrue:[ |
|
82 |
lines add:line trimBlanks. |
|
83 |
line := s nextLine. |
|
84 |
] ifFalse:[ |
|
85 |
line := nil |
|
86 |
] |
|
87 |
]. |
|
88 |
^ lines. |
|
89 |
] |
|
90 |
] |
|
91 |
]. |
|
92 |
^ #('unnown') |
|
93 |
||
94 |
"Created: / 1.2.1998 / 15:41:43 / cg" |
|
95 |
"Modified: / 1.2.1998 / 15:59:10 / cg" |
|
753 | 96 |
! |
97 |
||
98 |
label |
|
99 |
||
100 |
|label| |
|
101 |
label := ''. |
|
102 |
self name do: |
|
103 |
[:c| |
|
104 |
c isUppercase ifTrue: [label := label, $ ]. |
|
105 |
label := label, c |
|
106 |
]. |
|
107 |
^label trimBlanks |
|
782 | 108 |
! |
109 |
||
850 | 110 |
settings |
111 |
||
872 | 112 |
settings isNil ifTrue: [settings := IdentityDictionary new]. |
113 |
^settings |
|
850 | 114 |
! |
115 |
||
782 | 116 |
showHelp |
117 |
||
872 | 118 |
showHelp isNil ifTrue: [showHelp := true]. |
119 |
^showHelp |
|
782 | 120 |
! |
121 |
||
122 |
showHelp: aBoolean |
|
123 |
||
124 |
^showHelp := aBoolean |
|
753 | 125 |
! ! |
126 |
||
756 | 127 |
!ToolApplicationModel class methodsFor:'clipboard'! |
128 |
||
129 |
clipboard |
|
130 |
||
131 |
^clipboard |
|
132 |
! |
|
133 |
||
134 |
clipboard: anEditObject |
|
135 |
||
136 |
clipboard := anEditObject |
|
137 |
! ! |
|
138 |
||
762 | 139 |
!ToolApplicationModel class methodsFor:'help specs'! |
140 |
||
141 |
helpSpec |
|
869 | 142 |
"This resource specification was automatically generated |
143 |
by the UIHelpTool of ST/X." |
|
144 |
||
145 |
"Do not manually edit this!! If it is corrupted, |
|
146 |
the UIHelpTool may not be able to read the specification." |
|
762 | 147 |
|
148 |
" |
|
869 | 149 |
UIHelpTool openOnClass:ToolApplicationModel |
762 | 150 |
" |
151 |
||
869 | 152 |
<resource: #help> |
153 |
||
154 |
^super helpSpec addPairsFrom:#( |
|
762 | 155 |
|
823 | 156 |
#about |
834 | 157 |
'About functions.' |
823 | 158 |
|
762 | 159 |
#aboutSTX |
763 | 160 |
'Opens an InfoBox about running ST/X.' |
762 | 161 |
|
162 |
#aboutThisAppliaction |
|
763 | 163 |
'Opens an InfoBox about release and author of current application.' |
762 | 164 |
|
823 | 165 |
#add |
834 | 166 |
'Add functions.' |
823 | 167 |
|
168 |
#commitCancel |
|
851 | 169 |
'Cancels last edit action.' |
823 | 170 |
|
171 |
#commitOK |
|
851 | 172 |
'Accepts last edit action.' |
823 | 173 |
|
174 |
#edit |
|
834 | 175 |
'Edit functions.' |
823 | 176 |
|
177 |
#editCopy |
|
853 | 178 |
'Copies the selected item(s) to the clipboard.' |
762 | 179 |
|
782 | 180 |
#editCut |
853 | 181 |
'Cuts the selected item(s) and places it to the clipboard.' |
182 |
||
183 |
#editDelete |
|
184 |
'Deletes the selected item(s).' |
|
782 | 185 |
|
823 | 186 |
#editMoveDown |
834 | 187 |
'Moves the selected item one step down.' |
823 | 188 |
|
189 |
#editMoveIn |
|
834 | 190 |
'Moves the selected item into next item as child item.' |
823 | 191 |
|
192 |
#editMoveOut |
|
834 | 193 |
'Moves the selected item out of parent item.' |
823 | 194 |
|
195 |
#editMoveUp |
|
834 | 196 |
'Moves the selected item one step up.' |
782 | 197 |
|
198 |
#editPaste |
|
834 | 199 |
'Pastes the contents of the clipboard.' |
782 | 200 |
|
201 |
#editUndo |
|
202 |
'Reverses the last action.' |
|
203 |
||
823 | 204 |
#file |
834 | 205 |
'File functions.' |
805 | 206 |
|
823 | 207 |
#fileBrowseClass |
208 |
'Opens a System Browser on current class and selector.' |
|
805 | 209 |
|
823 | 210 |
#fileDefineClass |
211 |
'Opens a dialog to define current class.' |
|
805 | 212 |
|
213 |
#fileDefineClassAndSelector |
|
214 |
'Opens a dialog to define current class and selector.' |
|
215 |
||
823 | 216 |
#fileExit |
217 |
'Exits current application.' |
|
218 |
||
219 |
#help |
|
834 | 220 |
'Help functions.' |
823 | 221 |
|
222 |
#helpShowHelp |
|
223 |
'Turns on/off displaying help texts.' |
|
224 |
||
225 |
#helpTutorial |
|
846 | 226 |
'Opens a HTML-Browser on the documentation file of the current application.' |
823 | 227 |
|
228 |
#history |
|
834 | 229 |
'History functions.' |
803 | 230 |
|
231 |
#historyEmptyMenu |
|
232 |
'Deletes all items of the history.' |
|
233 |
||
823 | 234 |
#historyMenuItem |
235 |
'Evaluates the text of the menu item for loading.' |
|
762 | 236 |
|
823 | 237 |
#test |
834 | 238 |
'Test functions.' |
762 | 239 |
|
240 |
) |
|
241 |
! ! |
|
242 |
||
753 | 243 |
!ToolApplicationModel class methodsFor:'history'! |
244 |
||
245 |
getHistory |
|
246 |
||
761
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
247 |
history isNil ifTrue: [history := OrderedCollection new]. |
cc0404f8aec6
#getHistory changed because here #? doesn't work correctly
tz
parents:
760
diff
changeset
|
248 |
^history |
753 | 249 |
|
250 |
! |
|
251 |
||
252 |
historyMaxSize |
|
253 |
||
254 |
^10 |
|
255 |
||
256 |
! ! |
|
257 |
||
869 | 258 |
!ToolApplicationModel class methodsFor:'image specs'! |
259 |
||
260 |
copyIcon |
|
261 |
"This resource specification was automatically generated |
|
262 |
by the ImageEditor of ST/X." |
|
263 |
||
264 |
"Do not manually edit this!! If it is corrupted, |
|
265 |
the ImageEditor may not be able to read the specification." |
|
266 |
||
267 |
" |
|
268 |
ImageEditor openOnClass:self andSelector:#copyIcon |
|
269 |
" |
|
270 |
||
271 |
<resource: #image> |
|
272 |
||
273 |
^Icon |
|
274 |
constantNamed:#'ToolApplicationModel copyIcon' |
|
275 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@AUUUW@@@A???>@@@A???>O@@A???>@@@A???>@@@@@@?>@EUUU\?>@G???8?>@G???8?>@G???8?>@G???8?>@G???8?>IG???8?>@G???8**MG???8@@@G???8@@KG???8@@@G???8@@@G???8@@HN***(@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@_?<@_?<@_?<@_?<@_?<@_?<???<???<???<???<???<???<???<???<???<???<??8@??8@??8@??8@??8@??8@') ; yourself); yourself]! |
|
276 |
||
277 |
cutIcon |
|
278 |
"This resource specification was automatically generated |
|
279 |
by the ImageEditor of ST/X." |
|
280 |
||
281 |
"Do not manually edit this!! If it is corrupted, |
|
282 |
the ImageEditor may not be able to read the specification." |
|
283 |
||
284 |
" |
|
285 |
ImageEditor openOnClass:self andSelector:#cutIcon |
|
286 |
" |
|
287 |
||
288 |
<resource: #image> |
|
289 |
||
290 |
^Icon |
|
291 |
constantNamed:#'ToolApplicationModel cutIcon' |
|
292 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@DQDQDP0AL@@L@@@SL3L3CBL @B0@@AL3L3LL0B@@3@@@D3L3L0KB@@KB@@@SL3L3LL0@CL@@@AL3L3L0KB@,H@@@D3L3L3LL0L0@@@@SL3L3L0K@0 @@@AL3L3L3LL3@@@@@D3L3L3L03L@@@@@SL3L3L0CL0@@@@AL3L3L3@,CB@@@@D3L3L3@L0L0@@@@2H"H H"0 KBH @@@@@@KL3@@L3LH@@@@@CBCB@@K@K@@@@@@L@LH@@,@L@@@@@@0@0 @B0@0@@@@@CBC@@@C@K@@@@@@@3@@@@@3@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?<@_=\P_=<0_=,0_=50_>5 _>; _?[@_?[@_?.@_?.@_?N@_?[@_>[@_;;8_75<@F1,@D1$@D1$@F ,@C@X@@@@') ; yourself); yourself]! |
|
293 |
||
294 |
deleteIcon |
|
295 |
"This resource specification was automatically generated |
|
296 |
by the ImageEditor of ST/X." |
|
297 |
||
298 |
"Do not manually edit this!! If it is corrupted, |
|
299 |
the ImageEditor may not be able to read the specification." |
|
300 |
||
301 |
" |
|
302 |
ImageEditor openOnClass:self andSelector:#deleteIcon |
|
303 |
" |
|
304 |
||
305 |
<resource: #image> |
|
306 |
||
307 |
^Icon |
|
308 |
constantNamed:#'ToolApplicationModel deleteIcon' |
|
309 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@DQDQDQDQL@@@@@@SL3L3L3L @@@@@AL3L3L3L2@@@@@@D3L3L3L3H@@@H@@SL3L3L3L @@H@@AL3L3L3L2@@@@@@D3L3L3L3@@@@@@@SL3L3L0@ @@@ @AL3L3L3@@@@@@@@D3L3L3L@D@@@H@@SL3L3L0@QL3H @AL3L3L3@A@3LB@@D3L3L3L@DC@0H@@2H"H"H @PLC@ @@@@@@@@@A@0LB@@@@@@@@@@DC@0H@@@@@@@@@@PLC@ @@@@@@@@@A@0LB@@@@@@@@@@DS@2H@@@@@@@@@HAL3HB@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?<@_?<@_?<P_?<P_?<X_?<X_?<H_?0H_?O<_?XL_?_<_?_<_?_<_?_<_?_<_?_<@@_<@@_<@@_<@@_<@@_<@@G0') ; yourself); yourself]! |
|
310 |
||
311 |
desktopIcon |
|
312 |
||
313 |
^Icon |
|
314 |
constantNamed:#'ToolApplicationModel desktopIcon' |
|
315 |
ifAbsentPut: |
|
316 |
[ |
|
317 |
|desktopIcon| |
|
318 |
desktopIcon := self stxIcon. |
|
319 |
desktopIcon magnifiedBy: Display preferredIconSize/desktopIcon extent |
|
320 |
] |
|
321 |
||
322 |
||
323 |
||
324 |
||
325 |
! |
|
326 |
||
327 |
downIcon |
|
328 |
"This resource specification was automatically generated |
|
329 |
by the ImageEditor of ST/X." |
|
330 |
||
331 |
"Do not manually edit this!! If it is corrupted, |
|
332 |
the ImageEditor may not be able to read the specification." |
|
333 |
||
334 |
" |
|
335 |
ImageEditor openOnClass:self andSelector:#downIcon |
|
336 |
" |
|
337 |
||
338 |
<resource: #image> |
|
339 |
||
340 |
^Icon |
|
341 |
constantNamed:#'ToolApplicationModel downIcon' |
|
342 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUT@AUUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUT@*$AUPUT***%UPUU***UUPUUZ*)UUPUUV*%UUPUUU*UUUPUUUYUUUP') ; colorMapFromArray:#[255 255 255 0 0 0 0 127 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@A?>@A?>@@?<@@_8@@O0@@G @@C@@') ; yourself); yourself]! |
|
343 |
||
344 |
downRightIcon |
|
345 |
"This resource specification was automatically generated |
|
346 |
by the ImageEditor of ST/X." |
|
347 |
||
348 |
"Do not manually edit this!! If it is corrupted, |
|
349 |
the ImageEditor may not be able to read the specification." |
|
350 |
||
351 |
" |
|
352 |
ImageEditor openOnClass:self andSelector:#downRightIcon |
|
353 |
" |
|
354 |
||
355 |
<resource: #image> |
|
356 |
||
357 |
^Icon |
|
358 |
constantNamed:#'ToolApplicationModel downRightIcon' |
|
359 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPP@EUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUUUUPR*UUTEUPR*UUT!!UPR*UUT(UPR*P@@*EPR*****!!PR*****(PR*****)PR*****%PQUUUU*UPUUUUT)UPUUUUT%UPUUUUTUUP') ; colorMapFromArray:#[255 255 255 0 0 0 0 127 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ @@_ L@_ N@_ O@_?? _??0_??8_??8_??0_?? @@O@@@N@@@L@') ; yourself); yourself]! |
|
360 |
||
361 |
helpIcon |
|
362 |
"This resource specification was automatically generated |
|
363 |
by the ImageEditor of ST/X." |
|
364 |
||
365 |
"Do not manually edit this!! If it is corrupted, |
|
366 |
the ImageEditor may not be able to read the specification." |
|
367 |
||
368 |
" |
|
369 |
ImageEditor openOnClass:self andSelector:#helpIcon |
|
370 |
" |
|
371 |
||
372 |
<resource: #image> |
|
373 |
||
374 |
^Icon |
|
375 |
constantNamed:#'ToolApplicationModel helpIcon' |
|
376 |
ifAbsentPut:[(Depth1Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@O0A@_8@@?<@@8\C@8\A@@\@@@8@@A8@@C0@@G @@G@@@G@@@G@C@@@@@@@@@G@@@G@@@G@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 127 0 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@O0@@_8@@?<@@8\@@8\@@@\@@@8@@A8@@C0@@G @@G@@@G@@@G@@@@@@@@@@@G@@@G@@@G@@@@@@@@@@') ; yourself); yourself]! |
|
377 |
||
378 |
leftDownIcon |
|
379 |
"This resource specification was automatically generated |
|
380 |
by the ImageEditor of ST/X." |
|
381 |
||
382 |
"Do not manually edit this!! If it is corrupted, |
|
383 |
the ImageEditor may not be able to read the specification." |
|
384 |
||
385 |
" |
|
386 |
ImageEditor openOnClass:self andSelector:#leftDownIcon |
|
387 |
" |
|
388 |
||
389 |
<resource: #image> |
|
390 |
||
391 |
^Icon |
|
392 |
constantNamed:#'ToolApplicationModel leftDownIcon' |
|
393 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPU@@@@@@PUJ****)PUJ****)PUJ****)PUJ****)PUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUPUJ)UUUUP@J*@UUUPJ**)UUUPR**%UUUPT**UUUUPUJ)UUUUPUR%UUUUPUTUUUUUPUUUUUUUP') ; colorMapFromArray:#[255 255 255 0 0 0 0 127 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@G??8G??8G??8G??8G??8G??8G8@@G8@@G8@@G8@@G8@@G8@@G8@@??@@??@@_>@@O<@@G8@@C0@@A @@@@@@') ; yourself); yourself]! |
|
394 |
||
395 |
leftIcon |
|
396 |
"This resource specification was automatically generated |
|
397 |
by the ImageEditor of ST/X." |
|
398 |
||
399 |
"Do not manually edit this!! If it is corrupted, |
|
400 |
the ImageEditor may not be able to read the specification." |
|
401 |
||
402 |
" |
|
403 |
ImageEditor openOnClass:self andSelector:#leftIcon |
|
404 |
" |
|
405 |
||
406 |
<resource: #image> |
|
407 |
||
408 |
^Icon |
|
409 |
constantNamed:#'ToolApplicationModel leftIcon' |
|
410 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUTUUUUUPURUUUUUPUJUUUUUPT*P@@@@PR******PJ******PZ******PV******PU*UUUUUPUZUUUUUPUVUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[255 255 255 0 0 0 0 127 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@A @@C @@G @@O??<_??<???<???<_??<O??<G @@C @@A @@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]! |
|
411 |
||
412 |
loadIcon |
|
413 |
"This resource specification was automatically generated |
|
414 |
by the ImageEditor of ST/X." |
|
415 |
||
416 |
"Do not manually edit this!! If it is corrupted, |
|
417 |
the ImageEditor may not be able to read the specification." |
|
418 |
||
419 |
" |
|
420 |
ImageEditor openOnClass:self andSelector:#loadIcon |
|
421 |
" |
|
422 |
||
423 |
<resource: #image> |
|
424 |
||
425 |
^Icon |
|
426 |
constantNamed:#'ToolApplicationModel loadIcon' |
|
427 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUU?UPUUUUW*5PU???>*/PU:****)PUUUUUUZPP@@@@@EPS?????&PS?????%PS?????&PS?????%PT?????9PT?????9PT?????9PT?????9PT?????9PT?????9PUO????>PUO????>PUO????>PU:*****PUUUUUUUP') ; colorMapFromArray:#[255 255 255 0 0 0 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@G@@@O G??8O??<O??<_??<???<???<???<???<???<_??<_??<_??<_??<_??<_??<O??<O??<O??<O??<O??<') ; yourself); yourself]! |
|
428 |
||
429 |
menuIcon |
|
430 |
||
431 |
^Icon |
|
432 |
constantNamed:#'ToolApplicationModel menuIcon' |
|
433 |
ifAbsentPut: |
|
434 |
[ |
|
435 |
|menuIcon| |
|
436 |
menuIcon := self stxIcon. |
|
437 |
menuIcon magnifiedBy: MenuPanel defaultFont height/menuIcon height |
|
438 |
] |
|
439 |
! |
|
440 |
||
441 |
newIcon |
|
442 |
"This resource specification was automatically generated |
|
443 |
by the ImageEditor of ST/X." |
|
444 |
||
445 |
"Do not manually edit this!! If it is corrupted, |
|
446 |
the ImageEditor may not be able to read the specification." |
|
447 |
||
448 |
" |
|
449 |
ImageEditor openOnClass:self andSelector:#newIcon |
|
450 |
" |
|
451 |
||
452 |
<resource: #image> |
|
453 |
||
454 |
^Icon |
|
455 |
constantNamed:#'ToolApplicationModel newIcon' |
|
456 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUUP@@A????2@@A????2 @A????0@@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@A?????8@C*****(@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@_??@_?? _??0_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8') ; yourself); yourself]! |
|
457 |
||
458 |
pasteIcon |
|
459 |
"This resource specification was automatically generated |
|
460 |
by the ImageEditor of ST/X." |
|
461 |
||
462 |
"Do not manually edit this!! If it is corrupted, |
|
463 |
the ImageEditor may not be able to read the specification." |
|
464 |
||
465 |
" |
|
466 |
ImageEditor openOnClass:self andSelector:#pasteIcon |
|
467 |
" |
|
468 |
||
469 |
<resource: #image> |
|
470 |
||
471 |
^Icon |
|
472 |
constantNamed:#'ToolApplicationModel pasteIcon' |
|
473 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@KLH@@@@@@@@@@@CL3@@@@@@@@@@@CBH"0@@@@@@@@QD,3L3BDQ@@@@@ADQDQDQDQD@@@@@DQDQDQDQDP@@@@@@@@@@DQDQ@ADQDQDQDS@QDQD@D3L3L3L3HADQDP@SL3L3L3L DQDQ@AL3L3L3L2@QDQD@D3L3L3L3HADQDP@SL3L3L3L DQDQ@AL3L3L3L2@QDQD@D3L3L3L3HADQDP@SL3L3L3L DQDQ@AL3L3L3L2@QDQD@D3L3L3L3HADQDP@SL3L3L3L DQDQ@AL3L3L3L2@@@@@@L"H"H"H"H@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@<@@@<@@??<@??<@??<@??<???<???<???<???<???<???<???<???<???<???<???<???<???<???<??8@??8@') ; yourself); yourself]! |
|
474 |
||
475 |
rightIcon |
|
476 |
"This resource specification was automatically generated |
|
477 |
by the ImageEditor of ST/X." |
|
478 |
||
479 |
"Do not manually edit this!! If it is corrupted, |
|
480 |
the ImageEditor may not be able to read the specification." |
|
481 |
||
482 |
" |
|
483 |
ImageEditor openOnClass:self andSelector:#rightIcon |
|
484 |
" |
|
485 |
||
486 |
<resource: #image> |
|
487 |
||
488 |
^Icon |
|
489 |
constantNamed:#'ToolApplicationModel rightIcon' |
|
490 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUEUPUUUUUIUPUUUUUJUP@@@@@J%PJ*****)PJ******PJ******PJ*****)PEUUUUZ%PUUUUUJUPUUUUUIUPUUUUUEUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[255 255 255 0 0 0 0 127 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@F@@@G@@@G ???0???8???<???<???8???0@@G @@G@@@F@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]! |
|
491 |
||
492 |
saveIcon |
|
493 |
"This resource specification was automatically generated |
|
494 |
by the ImageEditor of ST/X." |
|
495 |
||
496 |
"Do not manually edit this!! If it is corrupted, |
|
497 |
the ImageEditor may not be able to read the specification." |
|
498 |
||
499 |
" |
|
500 |
ImageEditor openOnClass:self andSelector:#saveIcon |
|
501 |
" |
|
502 |
||
503 |
<resource: #image> |
|
504 |
||
505 |
^Icon |
|
506 |
constantNamed:#'ToolApplicationModel saveIcon' |
|
507 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'AL3L3L@PM3L3L0?PML3L3L=PM3L3L0=PML3L3L?PM3L3L0?PML3L3L?PM3L3L0?PML3L3L?PM3L3L0?PML3L3L?PM@@@@@?PO??????PO??????PO??????PO=UUUU?PO=???[?PO=5O?Z?PO=6O?Z?PO=6O?Z?PO=0O?Z?P5U***U5P') ; colorMapFromArray:#[255 255 255 0 0 0 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???<???8') ; yourself); yourself]! |
|
508 |
||
509 |
startIcon |
|
510 |
"This resource specification was automatically generated |
|
511 |
by the ImageEditor of ST/X." |
|
512 |
||
513 |
"Do not manually edit this!! If it is corrupted, |
|
514 |
the ImageEditor may not be able to read the specification." |
|
515 |
||
516 |
" |
|
517 |
ImageEditor openOnClass:self andSelector:#startIcon |
|
518 |
" |
|
519 |
||
520 |
<resource: #image> |
|
521 |
||
522 |
^Icon |
|
523 |
constantNamed:#'ToolApplicationModel startIcon' |
|
524 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@N8@@@@@@@@@@@@N<^@@@@@@@@@@@@;.;.;.;.@@@@@@C/G @@@@8^@@@@@N<^@@@@@A@@@@@@;18@@@@@D@@@@@C.;.;.; @P@@@@@N<^@@@@@@@@@@@@;18@@@C!!G.@@@@C/G @@@@G>@@@@@N;.;.; @_8@@@@@;18@@@@A? @@@@C/G @@@@G>@@@@@N<^@@@@@_8@@@@@;.;.;.@A? @@@@C/G @@@@G>@@@@@N<^@@@@@_8@@@@@;18@@@@@@@@@@@C.; @@@@DQ@@@@C ; 8@@@A&X@@@C 8@8N@@@"H"@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@AC@DAG DAG?<@G N@G N@G N@G?.@G N@G _@G _@G?_@G _@G _@G _@G?_@G ? G!!?0G!!?0G!!.PKQNPT(_@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]! |
|
525 |
||
526 |
stxIcon |
|
527 |
"This resource specification was automatically generated |
|
528 |
by the ImageEditor of ST/X." |
|
529 |
||
530 |
"Do not manually edit this!! If it is corrupted, |
|
531 |
the ImageEditor may not be able to read the specification." |
|
532 |
||
533 |
" |
|
534 |
ImageEditor openOnClass:self andSelector:#stxIcon |
|
535 |
" |
|
536 |
||
537 |
<resource: #image> |
|
538 |
||
539 |
^Icon |
|
540 |
constantNamed:#'ToolApplicationModel stxIcon' |
|
541 |
ifAbsentPut:[(Depth2Image new) width: 48; height: 48; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@U@@@@@@@AP@@@@@AUP@@@@@@E@@@@@@AUP@@@@@@T@@@@@@AUP@@@@@EP@@@@@@AUP@@@@@DP@@@@@@AUD@@@@AU@@@@@@@@UT@@@@@T@@@@@@@@UT@@@@QP@@@@@@@@EU@@@@U@@@@@@@@@AU@@@AD@@@@@@@@@ATP@@UP@@@@@@@@@AUP@@Q@@@@@@@@@@@UT@AD@@@@@@@@@@@AQ@DP@@@@@@@@@@@EU@Q@@@@@@@@@@@@ATQT@@@@@@@@@@@@AUTP@@@@@@@@@@@@@EPP@@@@@@@@@@@@@QU@@@@@@@@@@@@@@EU@@@@@@@@@@@@@@UT@@@@@@@@@@@@@AUE@@@@@@@@@@@@@EUU@@@@@@@@@@@@@UPEP@@@@@@@@@@@AUPAT@@@@@@@@@@@EE@AU@@@@@@@@@@AET@@E@@@@@@@@@@AUP@@EP@@@@@@@@@UU@@@AP@@@@@@@@AUP@@@AT@@@@@@@@EUP@@@@T@@@@@@@AUU@@@@@E@@@@@@@EUT@@@@@DP@@@@@@UUP@@@@@AP@@@@@@UUP@@@@@@T@@@@@@UU@@@@@@@E@@@@@@ET@@@@@@@A@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[25 25 25 0 204 51 0 0 0 255 255 255]; yourself]! |
|
542 |
||
543 |
upIcon |
|
544 |
"This resource specification was automatically generated |
|
545 |
by the ImageEditor of ST/X." |
|
546 |
||
547 |
"Do not manually edit this!! If it is corrupted, |
|
548 |
the ImageEditor may not be able to read the specification." |
|
549 |
||
550 |
" |
|
551 |
ImageEditor openOnClass:self andSelector:#upIcon |
|
552 |
" |
|
553 |
||
554 |
<resource: #image> |
|
555 |
||
556 |
^Icon |
|
557 |
constantNamed:#'ToolApplicationModel upIcon' |
|
558 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUQUUUPUUUJUUUPUUT*%UUPUUR*)UUPUUJ**UUPUT***%UPUTV*%UUPUUT*%UUPUUT*%UUP_UT*%UUP_UT*%UUP_5T*%UUPWUT*%UUPWWT*%UUPWUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUT*%UUPUUTUUUUP') ; colorMapFromArray:#[255 255 255 0 0 0 0 127 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@C@@@G @@O0@@_8@@?<@A?>@A?>@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@@O0@') ; yourself); yourself]! ! |
|
559 |
||
753 | 560 |
!ToolApplicationModel class methodsFor:'interface specs'! |
561 |
||
797 | 562 |
windowSpecForCommit |
869 | 563 |
"This resource specification was automatically generated |
564 |
by the UIPainter of ST/X." |
|
565 |
||
566 |
"Do not manually edit this!! If it is corrupted, |
|
567 |
the UIPainter may not be able to read the specification." |
|
568 |
||
569 |
" |
|
570 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit |
|
571 |
ToolApplicationModel new openInterface:#windowSpecForCommit |
|
572 |
" |
|
797 | 573 |
|
574 |
<resource: #canvas> |
|
575 |
||
576 |
^ |
|
859 | 577 |
|
797 | 578 |
#(#FullSpec |
859 | 579 |
#window: |
797 | 580 |
#(#WindowSpec |
859 | 581 |
#name: 'Commit Buttons' |
869 | 582 |
#layout: #(#LayoutFrame 344 0 371 0 643 0 430 0) |
859 | 583 |
#label: 'Commit Buttons' |
584 |
#min: #(#Point 100 22) |
|
585 |
#max: #(#Point 1152 900) |
|
869 | 586 |
#bounds: #(#Rectangle 344 371 644 431) |
859 | 587 |
#usePreferredExtent: false |
797 | 588 |
) |
859 | 589 |
#component: |
797 | 590 |
#(#SpecCollection |
859 | 591 |
#collection: |
797 | 592 |
#( |
593 |
#(#ActionButtonSpec |
|
859 | 594 |
#name: 'cancelButton' |
595 |
#layout: #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
596 |
#activeHelpKey: #commitCancel |
|
597 |
#label: 'Cancel' |
|
598 |
#tabable: true |
|
599 |
#model: #cancel |
|
600 |
#enableChannel: #valueOfEnablingCommitButtons |
|
797 | 601 |
) |
602 |
#(#ActionButtonSpec |
|
859 | 603 |
#name: 'okButton' |
604 |
#layout: #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
605 |
#activeHelpKey: #commitOK |
|
606 |
#label: 'OK' |
|
607 |
#tabable: true |
|
608 |
#model: #accept |
|
609 |
#enableChannel: #valueOfEnablingCommitButtons |
|
797 | 610 |
) |
611 |
) |
|
612 |
) |
|
613 |
) |
|
614 |
! |
|
615 |
||
616 |
windowSpecForCommitWithoutChannels |
|
869 | 617 |
"This resource specification was automatically generated |
618 |
by the UIPainter of ST/X." |
|
619 |
||
620 |
"Do not manually edit this!! If it is corrupted, |
|
621 |
the UIPainter may not be able to read the specification." |
|
622 |
||
623 |
" |
|
624 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels |
|
625 |
ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels |
|
626 |
" |
|
797 | 627 |
|
628 |
<resource: #canvas> |
|
629 |
||
630 |
^ |
|
859 | 631 |
|
797 | 632 |
#(#FullSpec |
859 | 633 |
#window: |
797 | 634 |
#(#WindowSpec |
859 | 635 |
#name: 'Commit Buttons Without Channels' |
869 | 636 |
#layout: #(#LayoutFrame 500 0 326 0 799 0 385 0) |
859 | 637 |
#label: 'Commit Buttons Without Channels' |
638 |
#min: #(#Point 100 22) |
|
639 |
#max: #(#Point 1152 900) |
|
869 | 640 |
#bounds: #(#Rectangle 500 326 800 386) |
859 | 641 |
#usePreferredExtent: false |
797 | 642 |
) |
859 | 643 |
#component: |
797 | 644 |
#(#SpecCollection |
859 | 645 |
#collection: |
797 | 646 |
#( |
647 |
#(#ActionButtonSpec |
|
859 | 648 |
#name: 'cancelButton' |
649 |
#layout: #(#LayoutFrame 5 0 0 0 -2 0.5 0 1) |
|
650 |
#activeHelpKey: #commitCancel |
|
651 |
#label: 'Cancel' |
|
652 |
#tabable: true |
|
653 |
#model: #cancel |
|
797 | 654 |
) |
655 |
#(#ActionButtonSpec |
|
859 | 656 |
#name: 'okButton' |
657 |
#layout: #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0) |
|
658 |
#activeHelpKey: #commitOK |
|
659 |
#label: 'OK' |
|
660 |
#tabable: true |
|
661 |
#model: #accept |
|
797 | 662 |
) |
663 |
) |
|
664 |
) |
|
665 |
) |
|
666 |
! |
|
667 |
||
668 |
windowSpecForInfoBar |
|
869 | 669 |
"This resource specification was automatically generated |
670 |
by the UIPainter of ST/X." |
|
671 |
||
672 |
"Do not manually edit this!! If it is corrupted, |
|
673 |
the UIPainter may not be able to read the specification." |
|
674 |
||
675 |
" |
|
676 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBar |
|
677 |
ToolApplicationModel new openInterface:#windowSpecForInfoBar |
|
678 |
" |
|
797 | 679 |
|
680 |
<resource: #canvas> |
|
681 |
||
682 |
^ |
|
859 | 683 |
|
797 | 684 |
#(#FullSpec |
859 | 685 |
#window: |
797 | 686 |
#(#WindowSpec |
859 | 687 |
#name: 'Info Bar' |
869 | 688 |
#layout: #(#LayoutFrame 233 0 218 0 732 0 563 0) |
859 | 689 |
#label: 'Info Bar' |
690 |
#min: #(#Point 400 320) |
|
691 |
#max: #(#Point 1152 900) |
|
869 | 692 |
#bounds: #(#Rectangle 233 218 733 564) |
859 | 693 |
#menu: #menu |
694 |
#usePreferredExtent: false |
|
797 | 695 |
) |
859 | 696 |
#component: |
797 | 697 |
#(#SpecCollection |
859 | 698 |
#collection: |
797 | 699 |
#( |
820 | 700 |
#(#ViewSpec |
859 | 701 |
#name: 'view' |
702 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
703 |
#component: |
|
820 | 704 |
#(#SpecCollection |
859 | 705 |
#collection: |
820 | 706 |
#( |
707 |
#(#LabelSpec |
|
859 | 708 |
#name: 'infoLabel' |
709 |
#layout: #(#LayoutFrame 2 0.0 1 0.0 -1 1.0 -1 1.0) |
|
710 |
#labelChannel: #valueOfInfoLabel |
|
711 |
#level: -1 |
|
712 |
#adjust: #left |
|
869 | 713 |
#resizeForLabel: false |
820 | 714 |
) |
715 |
) |
|
716 |
) |
|
797 | 717 |
) |
718 |
) |
|
719 |
) |
|
720 |
) |
|
721 |
! |
|
722 |
||
723 |
windowSpecForInfoBarWithClock |
|
869 | 724 |
"This resource specification was automatically generated |
725 |
by the UIPainter of ST/X." |
|
726 |
||
727 |
"Do not manually edit this!! If it is corrupted, |
|
728 |
the UIPainter may not be able to read the specification." |
|
729 |
||
730 |
" |
|
731 |
UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForInfoBarWithClock |
|
732 |
ToolApplicationModel new openInterface:#windowSpecForInfoBarWithClock |
|
733 |
" |
|
797 | 734 |
|
735 |
<resource: #canvas> |
|
736 |
||
737 |
^ |
|
859 | 738 |
|
797 | 739 |
#(#FullSpec |
859 | 740 |
#window: |
797 | 741 |
#(#WindowSpec |
859 | 742 |
#name: 'Info Bar' |
872 | 743 |
#layout: #(#LayoutFrame 160 0 423 0 659 0 453 0) |
859 | 744 |
#label: 'Info Bar' |
745 |
#min: #(#Point 400 320) |
|
746 |
#max: #(#Point 1152 900) |
|
872 | 747 |
#bounds: #(#Rectangle 160 423 660 454) |
859 | 748 |
#menu: #menu |
749 |
#usePreferredExtent: false |
|
797 | 750 |
) |
859 | 751 |
#component: |
797 | 752 |
#(#SpecCollection |
859 | 753 |
#collection: |
797 | 754 |
#( |
820 | 755 |
#(#ViewSpec |
859 | 756 |
#name: 'view' |
757 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
758 |
#component: |
|
820 | 759 |
#(#SpecCollection |
859 | 760 |
#collection: |
820 | 761 |
#( |
762 |
#(#LabelSpec |
|
859 | 763 |
#name: 'infoLabel' |
764 |
#layout: #(#LayoutFrame 2 0 1 0.0 -81 1 -1 1.0) |
|
765 |
#labelChannel: #valueOfInfoLabel |
|
766 |
#level: -1 |
|
767 |
#adjust: #left |
|
872 | 768 |
#resizeForLabel: false |
820 | 769 |
) |
770 |
#(#LabelSpec |
|
859 | 771 |
#name: 'timeLabel' |
772 |
#layout: #(#LayoutFrame -79 1 1 0.0 -1 1.0 -1 1.0) |
|
773 |
#labelChannel: #valueOfTimeLabel |
|
774 |
#level: -1 |
|
775 |
#adjust: #right |
|
872 | 776 |
#resizeForLabel: false |
820 | 777 |
) |
778 |
) |
|
779 |
) |
|
797 | 780 |
) |
781 |
) |
|
782 |
) |
|
783 |
) |
|
784 |
! ! |
|
785 |
||
786 |
!ToolApplicationModel class methodsFor:'menu specs'! |
|
787 |
||
753 | 788 |
menuAbout |
869 | 789 |
"This resource specification was automatically generated |
790 |
by the MenuEditor of ST/X." |
|
791 |
||
792 |
"Do not manually edit this!! If it is corrupted, |
|
793 |
the MenuEditor may not be able to read the specification." |
|
794 |
||
795 |
" |
|
796 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout |
|
797 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp |
|
798 |
" |
|
753 | 799 |
|
800 |
<resource: #menu> |
|
801 |
||
802 |
^ |
|
859 | 803 |
|
753 | 804 |
#(#Menu |
805 |
||
806 |
#( |
|
807 |
#(#MenuItem |
|
859 | 808 |
#label: 'About Smalltalk/X...' |
809 |
#translateLabel: true |
|
810 |
#value: #openAbout |
|
811 |
#activeHelpKey: #aboutSTX |
|
753 | 812 |
) |
813 |
#(#MenuItem |
|
859 | 814 |
#label: '-' |
753 | 815 |
) |
816 |
#(#MenuItem |
|
859 | 817 |
#label: 'About This Application...' |
818 |
#translateLabel: true |
|
819 |
#value: #openAboutThisApplication |
|
820 |
#activeHelpKey: #aboutThisAppliaction |
|
753 | 821 |
) |
822 |
) nil |
|
823 |
nil |
|
824 |
) |
|
825 |
! |
|
826 |
||
869 | 827 |
menuFont |
828 |
"This resource specification was automatically generated |
|
829 |
by the MenuEditor of ST/X." |
|
830 |
||
831 |
"Do not manually edit this!! If it is corrupted, |
|
832 |
the MenuEditor may not be able to read the specification." |
|
833 |
||
834 |
" |
|
835 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuFont |
|
836 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuFont)) startUp |
|
837 |
" |
|
838 |
||
839 |
<resource: #menu> |
|
840 |
||
841 |
^ |
|
842 |
||
843 |
#(#Menu |
|
844 |
||
845 |
#( |
|
846 |
#(#MenuItem |
|
872 | 847 |
#label: 'Menu...' |
848 |
#value: #chooseFont: |
|
849 |
#argument: 'Menu Font' |
|
850 |
) |
|
851 |
#(#MenuItem |
|
852 |
#label: 'Label...' |
|
869 | 853 |
#value: #chooseFont: |
854 |
#argument: 'Label Font' |
|
855 |
) |
|
856 |
#(#MenuItem |
|
872 | 857 |
#label: 'Button...' |
869 | 858 |
#value: #chooseFont: |
859 |
#argument: 'Button Font' |
|
860 |
) |
|
861 |
#(#MenuItem |
|
872 | 862 |
#label: 'Edit...' |
869 | 863 |
#value: #chooseFont: |
864 |
#argument: 'Edit Font' |
|
865 |
) |
|
866 |
#(#MenuItem |
|
872 | 867 |
#label: 'List...' |
869 | 868 |
#value: #chooseFont: |
869 |
#argument: 'List Font' |
|
870 |
) |
|
871 |
#(#MenuItem |
|
872 | 872 |
#label: 'Tree List...' |
869 | 873 |
#value: #chooseFont: |
874 |
#argument: 'Tree List Font' |
|
875 |
) |
|
876 |
#(#MenuItem |
|
872 | 877 |
#label: 'Note Book...' |
878 |
#value: #chooseFont: |
|
879 |
#argument: 'Note Book Font' |
|
880 |
) |
|
881 |
#(#MenuItem |
|
882 |
#label: 'Framed Box...' |
|
883 |
#value: #chooseFont: |
|
884 |
#argument: 'Framed Box Font' |
|
885 |
) |
|
886 |
#(#MenuItem |
|
869 | 887 |
#label: '-' |
888 |
) |
|
889 |
#(#MenuItem |
|
872 | 890 |
#label: 'Reset' |
869 | 891 |
#value: #resetFonts |
892 |
) |
|
893 |
) nil |
|
894 |
nil |
|
895 |
) |
|
896 |
! |
|
897 |
||
753 | 898 |
menuHelp |
869 | 899 |
"This resource specification was automatically generated |
900 |
by the MenuEditor of ST/X." |
|
901 |
||
902 |
"Do not manually edit this!! If it is corrupted, |
|
903 |
the MenuEditor may not be able to read the specification." |
|
904 |
||
905 |
" |
|
906 |
MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp |
|
907 |
(Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp |
|
908 |
" |
|
753 | 909 |
|
910 |
<resource: #menu> |
|
911 |
||
912 |
^ |
|
859 | 913 |
|
753 | 914 |
#(#Menu |
915 |
||
916 |
#( |
|
917 |
#(#MenuItem |
|
859 | 918 |
#label: 'Open Documentation' |
919 |
#translateLabel: true |
|
920 |
#value: #openDocumentation |
|
921 |
#activeHelpKey: #helpTutorial |
|
922 |
#enabled: #valueOfHavingTutorial |
|
753 | 923 |
) |
924 |
#(#MenuItem |
|
859 | 925 |
#label: '-' |
753 | 926 |
) |
927 |
#(#MenuItem |
|
859 | 928 |
#label: 'Show Help Texts' |
929 |
#translateLabel: true |
|
930 |
#activeHelpKey: #helpShowHelp |
|
931 |
#indication: #showHelp: |
|
753 | 932 |
) |
933 |
) nil |
|
934 |
nil |
|
935 |
) |
|
936 |
! ! |
|
937 |
||
782 | 938 |
!ToolApplicationModel class methodsFor:'startup / release'! |
753 | 939 |
|
782 | 940 |
preSnapshot |
753 | 941 |
|
782 | 942 |
clipboard := nil |
753 | 943 |
! |
944 |
||
782 | 945 |
uninitialize |
760 | 946 |
|
869 | 947 |
settings := showHelp := history := clipboard := nil |
753 | 948 |
! ! |
949 |
||
782 | 950 |
!ToolApplicationModel methodsFor:'aspects'! |
951 |
||
822 | 952 |
valueOfCanCopy |
953 |
||
954 |
|holder| |
|
955 |
(holder := builder bindingAt:#valueOfCanCopy) isNil ifTrue:[ |
|
956 |
builder aspectAt:#valueOfCanCopy put:(holder := false asValue). |
|
957 |
]. |
|
958 |
^ holder |
|
959 |
||
960 |
! |
|
961 |
||
962 |
valueOfCanCut |
|
963 |
||
964 |
|holder| |
|
965 |
(holder := builder bindingAt:#valueOfCanCut) isNil ifTrue:[ |
|
966 |
builder aspectAt:#valueOfCanCut put:(holder := false asValue). |
|
967 |
]. |
|
968 |
^ holder |
|
969 |
||
970 |
! |
|
971 |
||
972 |
valueOfCanPaste |
|
973 |
||
974 |
|holder| |
|
975 |
(holder := builder bindingAt:#valueOfCanPaste) isNil ifTrue:[ |
|
976 |
builder aspectAt:#valueOfCanPaste put:(holder := false asValue). |
|
977 |
]. |
|
869 | 978 |
holder value: self class clipboard notNil. |
822 | 979 |
^ holder |
980 |
||
981 |
! |
|
982 |
||
983 |
valueOfCanUndo |
|
984 |
||
985 |
|holder| |
|
986 |
(holder := builder bindingAt:#valueOfCanUndo) isNil ifTrue:[ |
|
987 |
builder aspectAt:#valueOfCanUndo put:(holder := false asValue). |
|
988 |
]. |
|
989 |
^ holder |
|
990 |
||
991 |
! |
|
992 |
||
782 | 993 |
valueOfEnablingCommitButtons |
753 | 994 |
|
782 | 995 |
|holder| |
996 |
(holder := builder bindingAt:#valueOfEnablingCommitButtons) isNil ifTrue:[ |
|
997 |
builder aspectAt:#valueOfEnablingCommitButtons put:(holder := false asValue). |
|
998 |
]. |
|
999 |
^ holder |
|
753 | 1000 |
|
782 | 1001 |
! |
1002 |
||
858 | 1003 |
valueOfHavingDocumentation |
803 | 1004 |
|
1005 |
|holder| |
|
858 | 1006 |
(holder := builder bindingAt:#valueOfHavingDocumentation) isNil ifTrue:[ |
1007 |
builder aspectAt:#valueOfHavingDocumentation put:(holder := (self class implements: #openDocumentation) asValue). |
|
803 | 1008 |
]. |
1009 |
^ holder |
|
1010 |
||
1011 |
! |
|
1012 |
||
858 | 1013 |
valueOfHavingExamples |
1014 |
||
1015 |
|holder| |
|
1016 |
(holder := builder bindingAt:#valueOfHavingExamples) isNil ifTrue:[ |
|
1017 |
builder aspectAt:#valueOfHavingExamples put:(holder := (self class implements: #openExamples) asValue). |
|
1018 |
]. |
|
1019 |
^ holder |
|
1020 |
||
1021 |
! |
|
1022 |
||
1023 |
valueOfHavingTutorial |
|
1024 |
||
1025 |
^self valueOfHavingDocumentation |
|
1026 |
||
1027 |
! |
|
1028 |
||
782 | 1029 |
valueOfInfoLabel |
1030 |
||
1031 |
|holder| |
|
1032 |
(holder := builder bindingAt:#valueOfInfoLabel) isNil ifTrue:[ |
|
1033 |
builder aspectAt:#valueOfInfoLabel put:(holder := ValueHolder new). |
|
1034 |
]. |
|
1035 |
^ holder |
|
753 | 1036 |
|
782 | 1037 |
! |
1038 |
||
1039 |
valueOfTimeLabel |
|
753 | 1040 |
|
782 | 1041 |
|holder| |
1042 |
(holder := builder bindingAt:#valueOfTimeLabel) isNil ifTrue:[ |
|
1043 |
builder aspectAt:#valueOfTimeLabel put:(holder := ValueHolder new). |
|
1044 |
]. |
|
1045 |
^ holder |
|
753 | 1046 |
|
1047 |
! ! |
|
1048 |
||
782 | 1049 |
!ToolApplicationModel methodsFor:'clipboard'! |
753 | 1050 |
|
838 | 1051 |
clipboard |
1052 |
||
1053 |
^self class clipboard |
|
1054 |
! |
|
1055 |
||
782 | 1056 |
clipboard: anEditObject |
753 | 1057 |
|
782 | 1058 |
self class clipboard: anEditObject. |
753 | 1059 |
|
869 | 1060 |
self valueOfCanPaste value: anEditObject notNil |
782 | 1061 |
! ! |
1062 |
||
1063 |
!ToolApplicationModel methodsFor:'help'! |
|
753 | 1064 |
|
762 | 1065 |
defaultInfoLabel |
1066 |
||
1067 |
^'' |
|
1068 |
! |
|
1069 |
||
753 | 1070 |
openAbout |
1071 |
"show an about box" |
|
1072 |
||
1073 |
|box| |
|
1074 |
||
1075 |
box := AboutBox new. |
|
1076 |
box autoHideAfter:10 with:[]. |
|
1077 |
box showAtCenter |
|
1078 |
||
1079 |
! |
|
1080 |
||
1081 |
openAboutThisApplication |
|
1082 |
"show an about this application box" |
|
1083 |
||
1084 |
|rev box| |
|
1085 |
rev := ''. |
|
1086 |
self class revision notNil ifTrue: [rev := ' (rev: ', self class revision printString, ')']. |
|
1087 |
box := AboutBox title: |
|
800 | 1088 |
'\The application\\' withCRs |
850 | 1089 |
, self class name asBoldText, rev |
1090 |
, '\\has been designed and implemented by: \' withCRs |
|
1091 |
, ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
|
800 | 1092 |
, '\\' withCRs. |
753 | 1093 |
|
1094 |
box label:'About This Application'. |
|
1095 |
box autoHideAfter:10 with:[]. |
|
1096 |
box showAtCenter. |
|
1097 |
! |
|
1098 |
||
858 | 1099 |
openHTMLDocument: aHTMLFilename |
1100 |
||
1101 |
HTMLDocumentView openFullOnDocumentationFile: aHTMLFilename |
|
1102 |
! |
|
1103 |
||
803 | 1104 |
openTutorial: aHTMLFilename |
753 | 1105 |
|
858 | 1106 |
self openHTMLDocument: aHTMLFilename |
762 | 1107 |
! |
1108 |
||
782 | 1109 |
showHelp |
869 | 1110 |
"answer whether showing help is turned on/off" |
782 | 1111 |
|
783 | 1112 |
|currentActiveHelp| |
858 | 1113 |
|
783 | 1114 |
currentActiveHelp := ActiveHelp currentHelpListener. |
1115 |
||
1116 |
^self class showHelp |
|
858 | 1117 |
and: [currentActiveHelp notNil and: [masterApplication notNil |
1118 |
ifFalse: [currentActiveHelp interestedIn: self window] |
|
1119 |
ifTrue: [currentActiveHelp interestedIn: masterApplication window]]] |
|
782 | 1120 |
! |
1121 |
||
1122 |
showHelp: aValue |
|
1123 |
"toggle showing help" |
|
1124 |
||
1125 |
(self class showHelp: aValue) |
|
1126 |
ifTrue: [ActiveHelp startFor: self] |
|
822 | 1127 |
ifFalse: [ActiveHelp stopFor: self. self updateInfoLabel] |
782 | 1128 |
! |
1129 |
||
762 | 1130 |
showHelp:aHelpText for:view |
1131 |
"display aHelpText in the info label or if present detour to masterApplication." |
|
1132 |
||
782 | 1133 |
self showHelp ifFalse: [^true]. |
762 | 1134 |
self masterApplication notNil |
1135 |
ifTrue: |
|
1136 |
[ |
|
1137 |
^masterApplication showHelp: aHelpText for:view |
|
1138 |
] |
|
1139 |
ifFalse: |
|
1140 |
[ |
|
1141 |
aHelpText isNil |
|
822 | 1142 |
ifTrue: [self updateInfoLabel] |
869 | 1143 |
ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString readStream through: $.)]. |
762 | 1144 |
|
1145 |
^true |
|
1146 |
] |
|
822 | 1147 |
! |
1148 |
||
1149 |
updateInfoLabel |
|
1150 |
||
1151 |
self valueOfInfoLabel value: self defaultInfoLabel |
|
762 | 1152 |
! ! |
1153 |
||
753 | 1154 |
!ToolApplicationModel methodsFor:'history'! |
1155 |
||
1156 |
addToHistory: aHistoryEntry |
|
1157 |
||
782 | 1158 |
aHistoryEntry key size = 0 ifTrue: [^nil]. |
753 | 1159 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
1160 |
self history addFirst: aHistoryEntry. |
|
1161 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
1162 |
! |
|
1163 |
||
1164 |
emptyHistory |
|
1165 |
||
1166 |
^self history removeAll |
|
1167 |
! |
|
1168 |
||
1169 |
history |
|
1170 |
||
1171 |
^self class getHistory |
|
1172 |
! |
|
1173 |
||
844 | 1174 |
historyEntries |
1175 |
||
1176 |
^self history collect: [:asso| asso key] |
|
1177 |
! |
|
1178 |
||
753 | 1179 |
menuHistory |
1180 |
||
1181 |
|menu a| |
|
1182 |
menu := Menu new receiver: self. |
|
1183 |
(self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do: |
|
1184 |
[:historyEntryType| |
|
803 | 1185 |
menu addItemGroup: ((a := self history select: [:histEntry| histEntry value = historyEntryType]) collect: [:histEntry| MenuItem new label: histEntry key printString; value: histEntry value; argument: histEntry key; activeHelpKey: #historyMenuItem]). |
753 | 1186 |
]. |
803 | 1187 |
menu addItem: (MenuItem new label: 'Empty History'; value: #emptyHistory; activeHelpKey: #historyEmptyMenu). |
753 | 1188 |
|
1189 |
^menu |
|
1190 |
! |
|
1191 |
||
1192 |
removeFromHistory: aHistoryEntry |
|
1193 |
||
1194 |
self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil. |
|
1195 |
[self history size > self class historyMaxSize] whileTrue: [self history removeLast] |
|
1196 |
! ! |
|
1197 |
||
782 | 1198 |
!ToolApplicationModel methodsFor:'queries'! |
1199 |
||
1200 |
preferredExtent |
|
1201 |
"preferred extent of my window; top/main menu and top toolbar (named by 'menuToolbarView') |
|
1202 |
will be considered" |
|
1203 |
||
1204 |
|window menu menuToolbarView preferredExtentOfWindow| |
|
1205 |
||
1206 |
window := self builder window. |
|
1207 |
menu := window subViews first. |
|
1208 |
menuToolbarView := builder componentAt: #menuToolbarView. |
|
1209 |
||
1210 |
preferredExtentOfWindow := window extent. |
|
1211 |
menu class = MenuPanel ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menu preferredExtent]. |
|
1212 |
menuToolbarView notNil ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuToolbarView preferredExtent]. |
|
1213 |
||
1214 |
^window minExtent max: (preferredExtentOfWindow min: window maxExtent) |
|
1215 |
! ! |
|
1216 |
||
869 | 1217 |
!ToolApplicationModel methodsFor:'settings'! |
1218 |
||
872 | 1219 |
allFontViewsDo: aBlock |
1220 |
"evaluate aBlock for all views with fonts" |
|
1221 |
||
1222 |
|fontViews| |
|
1223 |
||
1224 |
fontViews := OrderedCollection new. |
|
1225 |
||
1226 |
self builder windowGroup views do: [:v| v class = MenuPanel ifTrue: [fontViews add: v]]. |
|
1227 |
||
1228 |
builder namedComponents do: |
|
1229 |
[:aView| |
|
1230 |
aView allSubViewsDo: |
|
1231 |
[:v| |
|
1232 |
v font notNil ifTrue: [fontViews add: v] |
|
1233 |
] |
|
1234 |
]. |
|
1235 |
fontViews do: aBlock |
|
1236 |
! |
|
1237 |
||
869 | 1238 |
chooseFont: viewFont |
1239 |
"choose a font for viewFont and put it into the settings dictionary; |
|
1240 |
finally update all my views" |
|
1241 |
||
1242 |
|defaultFont font| |
|
1243 |
||
872 | 1244 |
viewFont = 'Menu Font' ifTrue: [defaultFont := MenuPanel defaultFont]. |
1245 |
viewFont = 'Label Font' ifTrue: [defaultFont := Label defaultFont]. |
|
1246 |
viewFont = 'Button Font' ifTrue: [defaultFont := Button defaultFont]. |
|
1247 |
viewFont = 'Edit Font' ifTrue: [defaultFont := TextView defaultFont]. |
|
1248 |
viewFont = 'List Font' ifTrue: [defaultFont := ListView defaultFont]. |
|
1249 |
viewFont = 'Tree List Font' ifTrue: [defaultFont := SelectionInTreeView defaultFont]. |
|
1250 |
viewFont = 'Note Book Font' ifTrue:[defaultFont := NoteBookView defaultFont]. |
|
1251 |
viewFont = 'Framed Box Font' ifTrue: [defaultFont := FramedBox defaultFont]. |
|
869 | 1252 |
|
1253 |
(font := FontPanel |
|
1254 |
fontFromUserInitial: (self class settings at: viewFont asSymbol ifAbsent: nil) ? defaultFont |
|
1255 |
title: 'Choose ', viewFont) notNil |
|
1256 |
ifTrue: |
|
872 | 1257 |
[ |
869 | 1258 |
self class settings at: viewFont asSymbol put: (font on: device). |
1259 |
self updateFonts |
|
1260 |
]. |
|
1261 |
^font |
|
1262 |
! |
|
1263 |
||
1264 |
resetFonts |
|
1265 |
"set the fonts in the settings to nil and set the views to its default font" |
|
1266 |
||
872 | 1267 |
(self class settings) |
1268 |
removeKey: #'Menu Font' ifAbsent: nil; |
|
1269 |
removeKey: #'Label Font' ifAbsent: nil; |
|
1270 |
removeKey: #'Button Font' ifAbsent: nil; |
|
1271 |
removeKey: #'Edit Font' ifAbsent: nil; |
|
1272 |
removeKey: #'List Font' ifAbsent: nil; |
|
1273 |
removeKey: #'Tree List Font' ifAbsent: nil; |
|
1274 |
removeKey: #'Note Book Font' ifAbsent: nil; |
|
1275 |
removeKey: #'Framed Box Font' ifAbsent: nil. |
|
869 | 1276 |
|
872 | 1277 |
self allFontViewsDo: |
1278 |
[:v| |
|
1279 |
v font: v class defaultFont. |
|
1280 |
v invalidate |
|
869 | 1281 |
] |
872 | 1282 |
|
869 | 1283 |
! |
1284 |
||
1285 |
updateFonts |
|
1286 |
"take defined fonts from the settings and set them to the corresponding views" |
|
1287 |
||
872 | 1288 |
|settings labelFont buttonFont menuFont editFont listFont treeListFont noteBookFont framedBoxFont updateFontsBlock| |
871 | 1289 |
|
1290 |
settings := self class settings. |
|
869 | 1291 |
|
872 | 1292 |
labelFont := settings at: #'Label Font' ifAbsent: nil. |
1293 |
buttonFont := settings at: #'Button Font' ifAbsent: nil. |
|
1294 |
menuFont := settings at: #'Menu Font' ifAbsent: nil. |
|
1295 |
editFont := settings at: #'Edit Font' ifAbsent: nil. |
|
1296 |
listFont := settings at: #'List Font' ifAbsent: nil. |
|
1297 |
treeListFont := settings at: #'Tree List Font' ifAbsent: nil. |
|
1298 |
noteBookFont := settings at: #'Note Book Font' ifAbsent: nil. |
|
1299 |
framedBoxFont := settings at: #'Framed Box Font' ifAbsent: nil. |
|
869 | 1300 |
|
872 | 1301 |
updateFontsBlock := |
1302 |
[:v| |
|
1303 |
(labelFont notNil and: [v font ~= labelFont and: [(v class == Label) or: [v isKindOf: Toggle]]]) |
|
1304 |
ifTrue: [v font: labelFont; fixSize; sizeChanged:nil; invalidate]. |
|
1305 |
(buttonFont notNil and: [v font ~= buttonFont and: [v class == Button or: [v class == PopUpList]]]) |
|
1306 |
ifTrue: [v label isString ifTrue: [v sizeFixed: true. v font: buttonFont; invalidate]]. |
|
1307 |
(menuFont notNil and: [v font ~= menuFont and: [v class == MenuPanel]]) |
|
1308 |
ifTrue: [v font: menuFont; invalidate]. |
|
1309 |
(editFont notNil and: [v font ~= editFont and: [v isKindOf: TextView]]) |
|
1310 |
ifTrue: [v font: editFont; invalidate]. |
|
1311 |
(listFont notNil and: [v font ~= listFont and: [v class = SelectionInListView or: [v class = DataSetView]]]) |
|
1312 |
ifTrue: [v font: listFont. v invalidate]. |
|
1313 |
(treeListFont notNil and: [v font ~= treeListFont and: [v isKindOf: SelectionInTreeView]]) |
|
1314 |
ifTrue: [v font: treeListFont; invalidate]. |
|
1315 |
(noteBookFont notNil and: [v font ~= noteBookFont and: [v class == NoteBookView]]) |
|
1316 |
ifTrue: [v font: noteBookFont; invalidate]. |
|
1317 |
(framedBoxFont notNil and: [v font ~= framedBoxFont and: [v class == FramedBox]]) |
|
1318 |
ifTrue: [v font: framedBoxFont; invalidate] |
|
1319 |
]. |
|
1320 |
||
1321 |
self allFontViewsDo: [:v| updateFontsBlock value: v] |
|
1322 |
||
869 | 1323 |
! ! |
1324 |
||
753 | 1325 |
!ToolApplicationModel methodsFor:'startup / release'! |
1326 |
||
833 | 1327 |
allButOpenInterface:aSymbol |
1328 |
||
1329 |
super allButOpenInterface:aSymbol. |
|
1330 |
||
1331 |
builder window extent: self preferredExtent. |
|
1332 |
builder window label: self class label. |
|
1333 |
||
1334 |
^builder |
|
1335 |
! |
|
1336 |
||
753 | 1337 |
close |
1338 |
||
756 | 1339 |
self uninitialize. |
1340 |
||
753 | 1341 |
super close |
1342 |
! |
|
1343 |
||
1344 |
closeRequest |
|
1345 |
||
756 | 1346 |
self uninitialize. |
1347 |
||
753 | 1348 |
super closeRequest |
1349 |
! |
|
1350 |
||
790 | 1351 |
postOpenWith:aBuilder |
1352 |
||
1353 |
super postOpenWith:aBuilder. |
|
1354 |
||
791 | 1355 |
self class showHelp ifTrue: [ActiveHelp startFor: self]. |
822 | 1356 |
self updateInfoLabel. |
869 | 1357 |
self updateFonts |
790 | 1358 |
! |
1359 |
||
753 | 1360 |
reOpen |
1361 |
||
1362 |
self close. |
|
1363 |
||
1364 |
self class open |
|
1365 |
! |
|
1366 |
||
760 | 1367 |
removeAllTemporalViews |
1368 |
||
1369 |
self builder namedComponents keys copy do: |
|
1370 |
[:comp| |
|
1371 |
(comp includesString: '_Temporal') ifTrue: [self builder namedComponents removeKey: comp] |
|
1372 |
] |
|
1373 |
! |
|
1374 |
||
853 | 1375 |
startClockOnTimedBlock: aBlock |
1376 |
||
1377 |
timeBlock := aBlock. |
|
1378 |
aBlock value. |
|
1379 |
||
1380 |
! |
|
1381 |
||
756 | 1382 |
uninitialize |
1383 |
||
782 | 1384 |
self showHelp ifTrue: [ActiveHelp stopFor: self]. |
756 | 1385 |
Processor removeTimedBlock:timeBlock. |
1386 |
timeBlock := nil. |
|
753 | 1387 |
! ! |
1388 |
||
1389 |
!ToolApplicationModel class methodsFor:'documentation'! |
|
1390 |
||
1391 |
version |
|
872 | 1392 |
^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.49 1998-03-23 21:41:56 tz Exp $' |
753 | 1393 |
! ! |