author | Claus Gittinger <cg@exept.de> |
Sat, 16 Jan 2016 01:35:54 +0100 | |
changeset 5548 | 3e9eea2e1109 |
parent 5532 | db6b004f8e1a |
child 5577 | 8f63100a2b2c |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
59 | 3 |
All Rights Reserved |
0 | 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 |
" |
|
2275 | 12 |
"{ Package: 'stx:libwidg' }" |
13 |
||
5446 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
77 | 16 |
DialogBox subclass:#FontPanel |
5187 | 17 |
instanceVariableNames:'previewField listOfEncodings allFonts fontsPerFamily familyList |
18 |
faceList sizeList revertButton currentFamily currentFace |
|
19 |
currentStyle currentFaceAndStyle currentSize sizeUnit |
|
20 |
currentEncoding selectedFont nameLabel encodingFilter |
|
21 |
encodingLabel filter combinedFilter encoding sizeLabelHolder |
|
5531 | 22 |
pixelPointSwitch xftFontsOnlyHolder changeFontInAllViewsHolder |
23 |
withChangeFontInAllViewsCheckBox |
|
24 |
withChangeFontInAllViewsCheckBoxVisibleHolder' |
|
251
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
25 |
classVariableNames:'' |
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
26 |
poolDictionaries:'' |
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
27 |
category:'Views-DialogBoxes' |
0 | 28 |
! |
29 |
||
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
30 |
!FontPanel class methodsFor:'documentation'! |
77 | 31 |
|
197 | 32 |
copyright |
33 |
" |
|
34 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
35 |
All Rights Reserved |
|
36 |
||
37 |
This software is furnished under a license and may be used |
|
38 |
only in accordance with the terms of that license and with the |
|
39 |
inclusion of the above copyright notice. This software may not |
|
40 |
be provided or otherwise made available to, or used by, any |
|
41 |
other person. No title to or ownership of the software is |
|
42 |
hereby transferred. |
|
43 |
" |
|
44 |
||
45 |
||
77 | 46 |
! |
47 |
||
48 |
documentation |
|
49 |
" |
|
5531 | 50 |
this class implements the font chooser. |
77 | 51 |
|
2826 | 52 |
Notice: |
53 |
this is a very old dialog; |
|
5531 | 54 |
it was written before the UI-framework was available and the UI is completely |
55 |
programmed manually (see initialize method). |
|
2826 | 56 |
Therefore, it desperately asks to be rewritten using the UIPainter... |
57 |
||
595 | 58 |
[author:] |
59 |
Claus Gittinger |
|
60 |
||
61 |
[see also:] |
|
62 |
Font FontDescription |
|
63 |
View Dialog |
|
64 |
" |
|
65 |
! |
|
66 |
||
67 |
examples |
|
68 |
" |
|
69 |
very simple: |
|
70 |
[exBegin] |
|
71 |
|font| |
|
72 |
||
73 |
font := FontPanel fontFromUser. |
|
655 | 74 |
Transcript showCR:font |
595 | 75 |
[exEnd] |
76 |
||
77 |
||
78 |
with initial font: |
|
79 |
[exBegin] |
|
80 |
|font| |
|
81 |
||
82 |
font := FontPanel |
|
83 |
fontFromUserInitial:(Font |
|
84 |
family:'courier' |
|
85 |
size:12). |
|
655 | 86 |
Transcript showCR:font |
595 | 87 |
[exEnd] |
88 |
||
89 |
||
90 |
with initial font & title: |
|
91 |
[exBegin] |
|
92 |
|font| |
|
93 |
||
94 |
font := FontPanel |
|
95 |
fontFromUserInitial:(Font |
|
96 |
family:'courier' |
|
97 |
size:12) |
|
98 |
title:'select a fooBar font'. |
|
655 | 99 |
Transcript showCR:font |
595 | 100 |
[exEnd] |
101 |
||
102 |
||
103 |
full setup; setting a filter to only present iso fonts |
|
104 |
and callBack action: |
|
105 |
[exBegin] |
|
0 | 106 |
|
585 | 107 |
|panel| |
77 | 108 |
|
585 | 109 |
panel := FontPanel new. |
595 | 110 |
panel label:'hi there - which iso font ?'. |
111 |
panel filter:[:fd | fd encoding notNil |
|
112 |
and:[fd encoding startsWith:'iso']]. |
|
113 |
panel action:[:family :face :style :size | |
|
655 | 114 |
Transcript showCR:'family:' , family. |
115 |
Transcript showCR:'face:' , face. |
|
116 |
Transcript showCR:'style:' , style. |
|
117 |
Transcript showCR:'size:' , size printString. |
|
595 | 118 |
]. |
119 |
panel open |
|
120 |
[exEnd] |
|
77 | 121 |
" |
122 |
! ! |
|
0 | 123 |
|
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
124 |
!FontPanel class methodsFor:'defaults'! |
0 | 125 |
|
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
126 |
defaultAsciiSampleString |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
127 |
^ (self sampleStringWithAllLetters) , ' |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
128 |
|
4944 | 129 |
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
130 |
1234567890 !!@#$%^&*(){}[]:"~;,./<>? |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
131 |
' |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
132 |
! |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
133 |
|
197 | 134 |
defaultExtent |
571 | 135 |
"return the default extent of my instances. |
136 |
The value returned here is usually ignored, and |
|
137 |
the value from preferredExtent taken instead." |
|
138 |
||
4944 | 139 |
^ (Screen current pixelPerMillimeter * (200 @ 150)) rounded |
571 | 140 |
|
141 |
"Modified: 22.4.1996 / 23:36:19 / cg" |
|
197 | 142 |
! |
143 |
||
2860 | 144 |
defaultJIS0201SampleString |
145 |
"return the sample jis preview text" |
|
146 |
||
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
147 |
^ (self defaultLatin1SampleString). |
2860 | 148 |
! |
149 |
||
382 | 150 |
defaultJISSampleString |
595 | 151 |
"return the sample jis preview text" |
152 |
||
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
153 |
^ |
2888 | 154 |
'The quick brown fox |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
155 |
jumps over the lazy dog. |
2860 | 156 |
|
2939 | 157 |
' , #(16r65E5 16r672C 16r8A9E) asUnicodeString |
382 | 158 |
! |
159 |
||
2847 | 160 |
defaultLatin1SampleString |
161 |
"return the sample latin1 preview text" |
|
162 |
||
5524 | 163 |
^ (self defaultAsciiSampleString) , 'äöüÄÖÜßéèêå©' |
2847 | 164 |
! |
165 |
||
2899 | 166 |
defaultSampleStringForEncoding:enc |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
167 |
|string lines| |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
168 |
|
2899 | 169 |
enc notNil ifTrue:[ |
170 |
((enc startsWith:'unicode') or:[enc startsWith:'iso10646-']) ifTrue:[ |
|
171 |
^ self defaultUnicodeSampleString. |
|
172 |
]. |
|
173 |
(enc startsWith:'ms-ansi') ifTrue:[ |
|
174 |
^ self defaultUnicodeSampleString. |
|
175 |
]. |
|
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
176 |
|
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
177 |
(enc startsWith:'jis') ifTrue:[ |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
178 |
(enc includesString:'0201') ifTrue:[ |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
179 |
string := self defaultJIS0201SampleString |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
180 |
] ifFalse:[ |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
181 |
string := self defaultJISSampleString |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
182 |
] |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
183 |
] ifFalse:[ |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
184 |
] |
2899 | 185 |
]. |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
186 |
string isNil ifTrue:[ |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
187 |
string := self defaultLatin1SampleString. |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
188 |
]. |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
189 |
lines := string asStringCollection. |
3481
a1fbc8d2494d
Catch CharacterEncoderError instead of Error
Stefan Vogel <sv@exept.de>
parents:
3475
diff
changeset
|
190 |
[ |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
191 |
lines := lines encodeFrom:#unicode into:enc |
3481
a1fbc8d2494d
Catch CharacterEncoderError instead of Error
Stefan Vogel <sv@exept.de>
parents:
3475
diff
changeset
|
192 |
] on:CharacterEncoderError do:[:ex| |
a1fbc8d2494d
Catch CharacterEncoderError instead of Error
Stefan Vogel <sv@exept.de>
parents:
3475
diff
changeset
|
193 |
"substitute a default value for codes that cannot be represented |
a1fbc8d2494d
Catch CharacterEncoderError instead of Error
Stefan Vogel <sv@exept.de>
parents:
3475
diff
changeset
|
194 |
in the new character set" |
a1fbc8d2494d
Catch CharacterEncoderError instead of Error
Stefan Vogel <sv@exept.de>
parents:
3475
diff
changeset
|
195 |
ex proceedWith:ex defaultValue. |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
196 |
]. |
3481
a1fbc8d2494d
Catch CharacterEncoderError instead of Error
Stefan Vogel <sv@exept.de>
parents:
3475
diff
changeset
|
197 |
|
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
198 |
^ lines. |
2899 | 199 |
! |
200 |
||
2847 | 201 |
defaultUnicodeSampleString |
202 |
"return the sample unicode preview text" |
|
595 | 203 |
|
2275 | 204 |
|t| |
205 |
||
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
206 |
t := (self defaultAsciiSampleString) , ' |
5524 | 207 |
diaresis: äöüÄÖÜß |
208 |
accent: éèêåÅ |
|
5007 | 209 |
special: ' , #(16r20AC) asUnicodeString , ' |
210 |
math: ' , #(16r2200 16r2203 16r221E 16r2208 16r2209) asUnicodeString , ' |
|
211 |
cyrillic: ' , #(16r440 16r443 16r441 16r441 16r43A 16r438 16r439 16r20 16r44F 16r437 16r44B 16r43A) asUnicodeString , ' |
|
212 |
greek: ' , #(16r395 16r3BB 16r3BB 16r3B7 16r3BD 16r3B9 16r3BA 16r3AC) asUnicodeString , ' |
|
213 |
japanese: ' , #(16r65E5 16r672C 16r8A9E) asUnicodeString , ' |
|
4944 | 214 |
chinese: ' , |
215 |
#(16r4F60 16r597D 16r3002) asUnicodeString , ' ' , |
|
216 |
#(16r6211 16r4E0D 16r8BF4 16r4E2D 16r6587) asUnicodeString , ' |
|
5007 | 217 |
korean: ' , #( 50504 45397 54616 49464 50836 ) asUnicodeString , ' |
218 |
' ", 'hebrew: ' , #( 16r5E9 16r5dc 16r5d5 16r5dd 16r20 16r5e2 16r5d5 16r5dc 16r5dd ) asUnicodeString , ' (sorry: right-to-left writing is not supported) |
|
219 |
' ", ''. |
|
2276 | 220 |
^ t |
2933 | 221 |
|
4161
bda1fae34c83
changed: #defaultUnicodeSampleString
Claus Gittinger <cg@exept.de>
parents:
4147
diff
changeset
|
222 |
"Modified: / 10-08-2010 / 16:05:16 / cg" |
2930
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
223 |
! |
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
224 |
|
576e73803b46
correct display of non-unicode, non-8859 encoded fonts
Claus Gittinger <cg@exept.de>
parents:
2921
diff
changeset
|
225 |
sampleStringWithAllLetters |
4147
150b7dff3b6a
comment/format in: #sampleStringWithAllLetters
Claus Gittinger <cg@exept.de>
parents:
4094
diff
changeset
|
226 |
^ (self classResources |
150b7dff3b6a
comment/format in: #sampleStringWithAllLetters
Claus Gittinger <cg@exept.de>
parents:
4094
diff
changeset
|
227 |
at:'CHARSET_TEST_SENTENCE' |
150b7dff3b6a
comment/format in: #sampleStringWithAllLetters
Claus Gittinger <cg@exept.de>
parents:
4094
diff
changeset
|
228 |
ifAbsent:'The quick brown fox jumps over the lazy dog') withCRs |
0 | 229 |
! ! |
230 |
||
2852 | 231 |
!FontPanel class methodsFor:'menu specs'! |
232 |
||
233 |
previewMenu |
|
234 |
"This resource specification was automatically generated |
|
235 |
by the MenuEditor of ST/X." |
|
236 |
||
237 |
"Do not manually edit this!! If it is corrupted, |
|
238 |
the MenuEditor may not be able to read the specification." |
|
239 |
||
240 |
" |
|
241 |
MenuEditor new openOnClass:FontPanel andSelector:#previewMenu |
|
242 |
(Menu new fromLiteralArrayEncoding:(FontPanel previewMenu)) startUp |
|
243 |
" |
|
244 |
||
245 |
<resource: #menu> |
|
246 |
||
247 |
^ |
|
248 |
#(Menu |
|
249 |
( |
|
250 |
(MenuItem |
|
251 |
label: 'Copy' |
|
252 |
itemValue: previewCopySelection |
|
253 |
translateLabel: true |
|
254 |
) |
|
255 |
(MenuItem |
|
256 |
label: '-' |
|
257 |
) |
|
258 |
(MenuItem |
|
259 |
label: 'Show Character Set' |
|
260 |
itemValue: previewShowCharacterSet |
|
261 |
translateLabel: true |
|
3405
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
262 |
isVisible: characterSetViewClassAvailable |
2852 | 263 |
) |
2875 | 264 |
(MenuItem |
265 |
label: 'Show Character Set (Using xfd)' |
|
266 |
itemValue: previewShowCharacterSetUsingXFD |
|
267 |
translateLabel: true |
|
3405
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
268 |
isVisible: osIsUNIX |
2875 | 269 |
) |
2935 | 270 |
(MenuItem |
271 |
label: '-' |
|
3405
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
272 |
isVisible: characterSetViewClassAvailableOrOSIsUNIX |
2935 | 273 |
) |
274 |
(MenuItem |
|
275 |
label: 'Inspect Font' |
|
276 |
itemValue: previewInspectFont |
|
277 |
translateLabel: true |
|
278 |
) |
|
3604 | 279 |
(MenuItem |
280 |
label: 'Copy Fontname' |
|
281 |
itemValue: copyFontName |
|
282 |
translateLabel: true |
|
283 |
) |
|
2852 | 284 |
) |
285 |
nil |
|
286 |
nil |
|
287 |
) |
|
3405
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
288 |
|
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
289 |
"Modified: / 11-10-2006 / 21:51:02 / cg" |
2852 | 290 |
! ! |
291 |
||
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
292 |
!FontPanel class methodsFor:'startup'! |
0 | 293 |
|
294 |
fontFromUser |
|
5531 | 295 |
"open a fontPanel and return the selected font, |
296 |
or nil if abort is pressed" |
|
77 | 297 |
|
5531 | 298 |
^ self new fontFromUser |
410 | 299 |
|
300 |
" |
|
301 |
FontPanel fontFromUser |
|
302 |
" |
|
303 |
||
304 |
"Modified: 27.2.1996 / 00:51:59 / cg" |
|
305 |
! |
|
306 |
||
307 |
fontFromUserInitial:aFont |
|
595 | 308 |
"open a fontPanel showing aFont initially, |
309 |
and return the selected font, or nil if abort is pressed" |
|
410 | 310 |
|
5531 | 311 |
^ self new fontFromUserInitial:aFont |
413 | 312 |
|
313 |
" |
|
314 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) |
|
3740 | 315 |
FontPanel fontFromUserInitial:MenuPanel defaultFont |
413 | 316 |
" |
317 |
! |
|
318 |
||
319 |
fontFromUserInitial:aFont title:someTitle |
|
595 | 320 |
"open a fontPanel with title and return the selected font, |
321 |
or nil if abort is pressed" |
|
413 | 322 |
|
5531 | 323 |
^ self new |
324 |
fontFromUserInitial:aFont title:someTitle |
|
415 | 325 |
|
326 |
" |
|
327 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
328 |
" |
|
329 |
||
330 |
"Created: 27.2.1996 / 00:59:46 / cg" |
|
595 | 331 |
"Modified: 29.4.1996 / 09:45:34 / cg" |
415 | 332 |
! |
333 |
||
2849 | 334 |
fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock |
595 | 335 |
"open a fontPanel with title and font-filter |
336 |
and return the selected font, or nil if abort is pressed" |
|
415 | 337 |
|
5531 | 338 |
^ self new |
339 |
fontFromUserInitial:initialFont title:someTitle |
|
340 |
filter:aFilterBlock |
|
2887 | 341 |
|
342 |
" |
|
343 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
344 |
" |
|
345 |
||
346 |
"Created: 27.2.1996 / 00:59:46 / cg" |
|
347 |
"Modified: 10.4.1997 / 09:53:03 / cg" |
|
348 |
! |
|
349 |
||
350 |
fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock encoding:encoding |
|
351 |
"open a fontPanel with title and font-filter |
|
352 |
and return the selected font, or nil if abort is pressed" |
|
353 |
||
5531 | 354 |
^ self new |
355 |
fontFromUserInitial:initialFont title:someTitle |
|
356 |
filter:aFilterBlock encoding:encoding |
|
3740 | 357 |
|
358 |
" |
|
359 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
360 |
" |
|
361 |
! |
|
362 |
||
363 |
fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock encoding:encoding enabled:enabled |
|
364 |
"open a fontPanel with title and font-filter |
|
365 |
and return the selected font, or nil if abort is pressed" |
|
366 |
||
5531 | 367 |
^ self new |
368 |
fontFromUserInitial:initialFont title:someTitle |
|
369 |
filter:aFilterBlock encoding:encoding |
|
370 |
enabled:enabled |
|
0 | 371 |
|
77 | 372 |
" |
413 | 373 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
77 | 374 |
" |
410 | 375 |
|
413 | 376 |
"Created: 27.2.1996 / 00:59:46 / cg" |
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
377 |
"Modified: 10.4.1997 / 09:53:03 / cg" |
3740 | 378 |
! |
379 |
||
380 |
openOn:aFont |
|
381 |
"open a fontPanel showing aFont initially. |
|
382 |
This panel is for information only - no font selection is possible." |
|
383 |
||
384 |
^ self |
|
385 |
fontFromUserInitial:aFont |
|
386 |
title:(aFont userFriendlyName) |
|
387 |
filter:nil |
|
388 |
encoding:nil |
|
389 |
enabled:false |
|
390 |
||
391 |
" |
|
392 |
FontPanel openOn:(Font family:'courier' size:12) |
|
393 |
FontPanel openOn:MenuPanel defaultFont |
|
5466 | 394 |
FontPanel fontFromUser |
3740 | 395 |
" |
0 | 396 |
! ! |
397 |
||
398 |
!FontPanel methodsFor:'accessing'! |
|
399 |
||
595 | 400 |
action:aFourArgBlock |
401 |
"set the action to be evaluated on ok. |
|
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
402 |
The block will be evaluated with family, face, style, size and encoding." |
595 | 403 |
|
404 |
okAction := aFourArgBlock |
|
405 |
||
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
406 |
"Modified: 10.4.1997 / 09:49:58 / cg" |
197 | 407 |
! |
408 |
||
5531 | 409 |
changeFontInAllViews |
410 |
"valid after closing" |
|
411 |
||
412 |
^ self changeFontInAllViewsHolder value |
|
413 |
! |
|
414 |
||
415 |
changeFontInAllViewsHolder |
|
416 |
changeFontInAllViewsHolder isNil ifTrue:[ |
|
417 |
changeFontInAllViewsHolder := false asValue |
|
418 |
]. |
|
419 |
^ changeFontInAllViewsHolder |
|
420 |
! |
|
421 |
||
434
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
422 |
encoding:aPattern |
595 | 423 |
"set the encoding goal" |
424 |
||
434
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
425 |
encoding := aPattern. |
2843 | 426 |
encodingFilter contents:encoding. |
427 |
||
428 |
self encodingFilterSelected:encoding. |
|
434
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
429 |
shown ifTrue:[ |
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
430 |
self updateFamilyList |
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
431 |
]. |
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
432 |
|
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
433 |
"Created: 29.2.1996 / 04:05:31 / cg" |
595 | 434 |
"Modified: 29.4.1996 / 09:40:18 / cg" |
434
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
435 |
! |
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
436 |
|
4944 | 437 |
filter:aOneArgBlockOrNil |
595 | 438 |
"set a filter; if non-nil, only fonts for which the filterBlock |
439 |
returns true will be offered" |
|
440 |
||
4944 | 441 |
filter := aOneArgBlockOrNil. |
442 |
filter isNil ifTrue:[ |
|
443 |
xftFontsOnlyHolder value |
|
444 |
ifTrue:[ combinedFilter := [:fd | fd isXftFont] ] |
|
445 |
ifFalse:[ combinedFilter := [:fd | true] ] |
|
446 |
] ifFalse:[ |
|
447 |
xftFontsOnlyHolder value |
|
448 |
ifTrue:[ combinedFilter := [:fd | fd isXftFont and:[filter value:fd]] ] |
|
449 |
ifFalse:[ combinedFilter := filter ] |
|
450 |
]. |
|
451 |
||
2826 | 452 |
familyList list:nil. |
415 | 453 |
shown ifTrue:[ |
454 |
self updateFamilyList |
|
455 |
]. |
|
456 |
||
457 |
"Created: 27.2.1996 / 01:40:08 / cg" |
|
595 | 458 |
"Modified: 29.4.1996 / 09:40:49 / cg" |
415 | 459 |
! |
460 |
||
0 | 461 |
initialFont:aFont |
128 | 462 |
"set the font to be selected initially" |
0 | 463 |
|
5187 | 464 |
|fontEncoding| |
2849 | 465 |
|
128 | 466 |
selectedFont := aFont. |
5008 | 467 |
currentFamily := aFont family. |
468 |
currentFace := aFont face. |
|
469 |
currentStyle := aFont style. |
|
470 |
currentFaceAndStyle := currentFace,'-',currentStyle. |
|
471 |
||
5466 | 472 |
"/ self xftFontsOnlyHolder value:(aFont isXftFont). |
5187 | 473 |
fontEncoding := aFont encoding. |
3841 | 474 |
sizeUnit := aFont sizeUnit. |
5187 | 475 |
sizeUnit = #px ifTrue:[ |
5188 | 476 |
currentSize := aFont pixelSize asString , 'px'. |
5187 | 477 |
] ifFalse:[ |
478 |
currentSize := aFont size asString. |
|
479 |
]. |
|
3841 | 480 |
|
2849 | 481 |
"/ self halt. |
5187 | 482 |
encodingFilter contents:fontEncoding. |
483 |
self encodingFilterSelected:fontEncoding. |
|
382 | 484 |
self showSelectedFont. |
485 |
||
486 |
"Modified: 23.2.1996 / 00:51:32 / cg" |
|
4983 | 487 |
! |
488 |
||
5531 | 489 |
withChangeFontInAllViewsCheckBoxVisibleHolder |
490 |
withChangeFontInAllViewsCheckBoxVisibleHolder isNil ifTrue:[ |
|
491 |
withChangeFontInAllViewsCheckBoxVisibleHolder := false asValue |
|
492 |
]. |
|
493 |
^ withChangeFontInAllViewsCheckBoxVisibleHolder |
|
494 |
! |
|
495 |
||
496 |
withChangeFontInViewsAllCheckBox:aBoolean |
|
497 |
"to make that check box visible; |
|
498 |
call before opening" |
|
499 |
||
500 |
self withChangeFontInAllViewsCheckBoxVisibleHolder value:true |
|
501 |
! |
|
502 |
||
4983 | 503 |
xftFontsOnlyHolder |
504 |
xftFontsOnlyHolder isNil ifTrue:[ |
|
505 |
xftFontsOnlyHolder := true asValue |
|
506 |
]. |
|
507 |
^ xftFontsOnlyHolder |
|
101 | 508 |
! ! |
509 |
||
77 | 510 |
!FontPanel methodsFor:'initialization'! |
511 |
||
3740 | 512 |
enabled:aBoolean |
513 |
familyList enabled:aBoolean. |
|
514 |
faceList enabled:aBoolean. |
|
515 |
sizeList enabled:aBoolean. |
|
3817 | 516 |
encodingFilter notNil ifTrue:[ |
517 |
encodingFilter enabled:aBoolean. |
|
5531 | 518 |
]. |
519 |
aBoolean ifTrue:[ |
|
520 |
self abortButton label:(resources string:'Cancel'). |
|
521 |
self okButton beVisible. |
|
522 |
] ifFalse:[ |
|
523 |
self abortButton label:(resources string:'Close'). |
|
524 |
self okButton beInvisible. |
|
525 |
]. |
|
526 |
||
527 |
" |
|
528 |
FontPanel openOn:(Font family:'courier' size:12) |
|
529 |
FontPanel openOn:MenuPanel defaultFont |
|
530 |
FontPanel fontFromUser |
|
531 |
" |
|
3740 | 532 |
! |
533 |
||
77 | 534 |
initialize |
5531 | 535 |
"sigh: hand-crafted box creation; TODO: rewrite using UI painter" |
536 |
||
5466 | 537 |
|familyLabel faceLabel sizeLabel panel panel2 fontBrowserView fp v1 v2 v3 |
5548 | 538 |
mm fH l box1 box2 showFontNameLabel xftCheckBox vPanel changeInAllCheckBox |
539 |
xftFlushFontList| |
|
77 | 540 |
|
541 |
super initialize. |
|
542 |
||
4982 | 543 |
showFontNameLabel := self graphicsDevice isWindowsPlatform not. |
3837 | 544 |
sizeUnit := #pt. |
2847 | 545 |
|
382 | 546 |
mm := ViewSpacing. |
547 |
||
1763 | 548 |
self addAbortAndOkButtons. |
77 | 549 |
|
390
1d54a9b41463
say Hello world in JIS font ;-)
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
550 |
panel := View origin:0.0@0.0 corner:1.0@1.0 in:self. |
3607
242d08639bcc
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3604
diff
changeset
|
551 |
panel bottomInset:(buttonPanel preferredHeight |
5466 | 552 |
+ (mm) |
553 |
"+ (showFontNameLabel ifTrue:24 ifFalse:0)" ). |
|
554 |
||
555 |
vPanel := VariableVerticalPanel in:panel. |
|
556 |
vPanel origin:0.0@0.0 corner:1.0@1.0. |
|
557 |
||
558 |
previewField := HVScrollableView for:TextView in:vPanel. |
|
559 |
fontBrowserView := View in:vPanel. |
|
560 |
fp := View in:fontBrowserView. |
|
561 |
fp layout:(0.0@0.0 corner:1.0@1.0) asFractionalLayout. |
|
5531 | 562 |
fp layout bottomOffset:-150. |
77 | 563 |
|
150 | 564 |
label := resources string:'Font dialog'. |
77 | 565 |
|
5466 | 566 |
panel2 := VerticalPanelView in:fontBrowserView. |
567 |
panel2 layout:(0.0@1.0 corner:1.0@1.0) asFractionalLayout. |
|
5531 | 568 |
panel2 layout topOffset:-150. |
5466 | 569 |
|
570 |
panel2 horizontalLayout:#fit. |
|
571 |
panel2 verticalLayout:#top. |
|
2842 | 572 |
|
5531 | 573 |
box2 := HorizontalPanelView in:panel2. |
574 |
box2 height:25. |
|
575 |
box2 horizontalLayout:#right. |
|
576 |
||
5466 | 577 |
box1 := HorizontalPanelView in:panel2. |
578 |
box1 height:25. |
|
579 |
box1 horizontalLayout:#leftSpace. |
|
580 |
||
3832 | 581 |
l := Label label:(resources string:'Encoding:') in:box1. |
2842 | 582 |
l borderWidth:0. |
583 |
l adjust:#left. |
|
584 |
||
3832 | 585 |
encodingFilter := ComboBoxView in:box1. |
2942 | 586 |
"/ encodingFilter font:l font. |
2826 | 587 |
encodingFilter level:-1. |
588 |
encodingFilter contents:'*'. |
|
2842 | 589 |
encodingFilter list:(self listOfEncodingsInFilterCombo). |
2826 | 590 |
encodingFilter action:[:pattern | self encodingFilterSelected:pattern]. |
591 |
encodingFilter immediateAccept:true. |
|
2942 | 592 |
"/ encodingFilter editor font:l font. |
2842 | 593 |
|
5466 | 594 |
self showEncodingFilter ifFalse:[ |
3817 | 595 |
encodingFilter beInvisible |
596 |
]. |
|
2842 | 597 |
|
2826 | 598 |
"/ encodingFilter acceptOnReturn:true. |
599 |
"/ encodingFilter acceptOnTab:true. |
|
600 |
"/ encodingFilter acceptOnLeave:true. |
|
601 |
"/ encodingFilter acceptOnLostFocus:true. |
|
602 |
"/ encodingFilter acceptOnPointerLeave:true. |
|
603 |
||
3832 | 604 |
encodingLabel := Label label:' ' in:box1. |
5466 | 605 |
|
2842 | 606 |
encodingLabel level:0; adjust:#left. |
607 |
encodingLabel adjust:#right. |
|
3817 | 608 |
self showEncodingFilter ifFalse:[ |
609 |
encodingLabel beInvisible |
|
610 |
]. |
|
382 | 611 |
|
5184 | 612 |
Screen current supportsXFTFonts ifTrue:[ |
5466 | 613 |
self xftFontsOnlyHolder value: (UserPreferences current useXftFontsOnly). |
5531 | 614 |
xftCheckBox := CheckBox label:(resources string:'XFT Fonts Only') in:box1. |
5466 | 615 |
xftCheckBox model:xftFontsOnlyHolder. |
616 |
xftFontsOnlyHolder onChangeEvaluate:[ self xftFontsOnlyChanged ]. |
|
5548 | 617 |
|
618 |
xftFlushFontList := Button label:(resources string:'Flush Cached List of Fonts') in:box1. |
|
619 |
xftFlushFontList action:[ self flushListOfAvailableFonts]. |
|
4944 | 620 |
]. |
621 |
||
4892 | 622 |
"/ sep := View in:box1. |
623 |
"/ sep width:10 height:10. |
|
3832 | 624 |
|
625 |
pixelPointSwitch := ComboListView in:box2. |
|
626 |
"/ encodingFilter font:l font. |
|
627 |
pixelPointSwitch level:-1. |
|
3841 | 628 |
pixelPointSwitch contents:'pt'. |
3837 | 629 |
pixelPointSwitch list:#(#pt #px). |
3832 | 630 |
pixelPointSwitch action:[:sizeUnit | self sizeUnitSelected:sizeUnit]. |
5466 | 631 |
"/ box2 topInset:(pixelPointSwitch preferredHeight negated-4); horizontalInset:mm. |
3832 | 632 |
"/ encodingFilter editor font:l font. |
633 |
||
5466 | 634 |
"/ self showEncodingFilter ifFalse:[ |
635 |
"/ encodingFilter beInvisible |
|
636 |
"/ ]. |
|
3832 | 637 |
|
5531 | 638 |
(View in:panel2) height:8. "/ separator |
5532 | 639 |
changeInAllCheckBox := CheckBox label:(resources string:'Change all Textviews and Default for New Views') in:panel2. |
5531 | 640 |
changeInAllCheckBox model:self changeFontInAllViewsHolder. |
641 |
changeInAllCheckBox visibilityChannel:self withChangeFontInAllViewsCheckBoxVisibleHolder. |
|
642 |
||
2847 | 643 |
showFontNameLabel ifTrue:[ |
5531 | 644 |
(View in:panel2) height:8. "/ separator |
5466 | 645 |
nameLabel := Label label:'' in:panel2. |
646 |
"/ nameLabel origin:0.0@1.0 corner:1.0@1.0. |
|
647 |
"/ nameLabel bottomInset:(buttonPanel preferredHeight + (mm*2)). |
|
648 |
"/ nameLabel topInset:(buttonPanel preferredHeight + (mm*2) + 24) negated; horizontalInset:mm. |
|
2847 | 649 |
nameLabel level:0; adjust:#left. |
650 |
]. |
|
382 | 651 |
|
5007 | 652 |
"/ previewField origin:0.0@0.0 corner:1.0@0.4. |
2842 | 653 |
previewField autoHideScrollBars:true. |
654 |
previewField := previewField scrolledView. |
|
382 | 655 |
previewField inset:mm. |
77 | 656 |
|
657 |
self is3D ifTrue:[ |
|
251
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
658 |
previewField level:-1. |
77 | 659 |
] ifFalse:[ |
251
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
660 |
previewField borderWidth:1. |
77 | 661 |
]. |
662 |
||
5466 | 663 |
v1 := View origin:0.0@0.0 corner:0.4@1.0 in:fp. |
664 |
||
2842 | 665 |
familyLabel := Label label:(resources string:'Family') in:v1. |
77 | 666 |
familyLabel borderWidth:0. |
667 |
familyLabel origin:(0.0 @ 0.0) extent:(1.0 @ nil). |
|
3607
242d08639bcc
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
3604
diff
changeset
|
668 |
fH := familyLabel preferredHeight. |
77 | 669 |
|
670 |
familyList := ScrollableView for:SelectionInListView in:v1. |
|
382 | 671 |
familyList origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
672 |
familyList inset:mm. |
|
673 |
familyList topInset:fH. |
|
674 |
||
128 | 675 |
familyList := familyList scrolledView. |
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
676 |
self makeTabable:familyList. |
77 | 677 |
|
5466 | 678 |
v2 := View origin:0.4@0.0 corner:0.8@1.0 in:fp. |
77 | 679 |
|
2842 | 680 |
faceLabel := Label label:(resources string:'Typeface') in:v2. |
77 | 681 |
faceLabel borderWidth:0. |
682 |
faceLabel origin:(0.0 @ 0.0) extent:(1.0 @ nil). |
|
683 |
||
684 |
faceList := ScrollableView for:SelectionInListView in:v2. |
|
382 | 685 |
faceList origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
686 |
faceList inset:mm. |
|
687 |
faceList topInset:fH. |
|
128 | 688 |
faceList := faceList scrolledView. |
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
689 |
self makeTabable:faceList. |
77 | 690 |
|
5466 | 691 |
v3 := View origin:0.8@0.0 corner:1.0@1.0 in:fp. |
77 | 692 |
|
3832 | 693 |
sizeLabelHolder := (resources string:'Size') asValue. |
694 |
sizeLabel := Label in:v3. |
|
695 |
sizeLabel labelChannel:sizeLabelHolder. |
|
77 | 696 |
sizeLabel borderWidth:0. |
697 |
sizeLabel origin:(0.0 @ 0.0)extent:(1.0 @ nil). |
|
698 |
||
699 |
sizeList := ScrollableView for:SelectionInListView in:v3. |
|
382 | 700 |
sizeList origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
701 |
sizeList inset:mm. |
|
702 |
sizeList topInset:fH. |
|
128 | 703 |
sizeList := sizeList scrolledView. |
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
704 |
self makeTabable:sizeList. |
77 | 705 |
|
706 |
familyList action:[:lineNr | self familySelected:(familyList selectionValue)]. |
|
707 |
faceList action:[:lineNr | self faceSelected:(faceList selectionValue)]. |
|
708 |
sizeList action:[:lineNr | self sizeSelected:(sizeList selectionValue)]. |
|
709 |
||
2852 | 710 |
previewField menuHolder:self previewMenu. |
711 |
||
77 | 712 |
" |
713 |
FontPanel new showAtPointer |
|
5466 | 714 |
FontPanel fontFromUser |
77 | 715 |
" |
251
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
716 |
|
740
2d5cb01c7e11
no need for focusSequence - DialogBox does it
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
717 |
"Modified: 31.5.1996 / 22:01:45 / cg" |
77 | 718 |
! |
719 |
||
2842 | 720 |
listOfEncodingsInFilterCombo |
2878 | 721 |
|availableEncodings listPresentedToUser| |
2842 | 722 |
|
2878 | 723 |
listOfEncodings := OrderedCollection new. |
4982 | 724 |
self graphicsDevice isWindowsPlatform ifTrue:[ |
2878 | 725 |
listOfEncodings |
2849 | 726 |
addAll: |
727 |
#( |
|
728 |
'*' |
|
729 |
nil |
|
730 |
). |
|
731 |
] ifFalse:[ |
|
2878 | 732 |
listOfEncodings |
2849 | 733 |
addAll: |
734 |
#( |
|
735 |
'*' |
|
4429
671a2fc8798f
changed: #listOfEncodingsInFilterCombo
Stefan Vogel <sv@exept.de>
parents:
4161
diff
changeset
|
736 |
#'iso8859-1' |
671a2fc8798f
changed: #listOfEncodingsInFilterCombo
Stefan Vogel <sv@exept.de>
parents:
4161
diff
changeset
|
737 |
#'iso10646-1' |
2849 | 738 |
'jis*' |
739 |
nil |
|
740 |
). |
|
741 |
]. |
|
2842 | 742 |
|
743 |
availableEncodings := Set new. |
|
4897 | 744 |
self graphicsDevice listOfAvailableFonts do:[:f | availableEncodings add:(f encoding ? '?')]. |
2842 | 745 |
availableEncodings := availableEncodings asSortedCollection. |
2878 | 746 |
listOfEncodings addAll:availableEncodings. |
747 |
||
748 |
listPresentedToUser := listOfEncodings collect:[:enc | |
|
749 |
|encoder userFriendlyName| |
|
750 |
||
2938 | 751 |
"/ |
752 |
"/ disabled to avoid autoloading of encoders. |
|
753 |
"/ (enc notNil and:[enc ~= '*']) ifTrue:[ |
|
754 |
"/ encoder := CharacterEncoder encoderFor:enc ifAbsent:nil. |
|
755 |
"/ encoder notNil ifTrue:[ |
|
756 |
"/ userFriendlyName := encoder userFriendlyNameOfEncoding. |
|
757 |
"/ ]. |
|
758 |
"/ ]. |
|
2937 | 759 |
(userFriendlyName notNil and:[(userFriendlyName sameAs: enc) not]) ifTrue:[ |
2878 | 760 |
enc , ' (' , userFriendlyName , ')' |
761 |
] ifFalse:[ |
|
762 |
enc |
|
763 |
] |
|
764 |
]. |
|
765 |
^ listPresentedToUser. |
|
2842 | 766 |
! |
767 |
||
1277 | 768 |
postRealize |
197 | 769 |
"kludge for sco - xlsfont fails sometimes - try again here" |
770 |
||
415 | 771 |
self updateFamilyList. |
1277 | 772 |
super postRealize |
415 | 773 |
|
774 |
"Modified: 27.2.1996 / 01:40:47 / cg" |
|
1277 | 775 |
"Created: 24.7.1997 / 18:12:42 / cg" |
2852 | 776 |
! |
777 |
||
778 |
previewMenu |
|
779 |
<resource: #programMenu > |
|
780 |
||
781 |
|menu| |
|
782 |
||
3475 | 783 |
menu := Menu decodeFromLiteralArray:(self class previewMenu). |
2852 | 784 |
menu findGuiResourcesIn:self. |
3405
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
785 |
^ menu |
2875 | 786 |
|
3475 | 787 |
"Modified: / 27-03-2007 / 11:15:53 / cg" |
3817 | 788 |
! |
789 |
||
790 |
showEncodingFilter |
|
791 |
^ true |
|
77 | 792 |
! ! |
793 |
||
0 | 794 |
!FontPanel methodsFor:'private'! |
795 |
||
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
796 |
clearPreview |
595 | 797 |
"clear the preview subview" |
798 |
||
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
799 |
shown ifTrue:[ |
1297
f5ea02391a59
use #contents: instead of #clear
Claus Gittinger <cg@exept.de>
parents:
1284
diff
changeset
|
800 |
previewField contents:nil. |
3817 | 801 |
encodingLabel notNil ifTrue:[ |
802 |
encodingLabel label:''. |
|
803 |
]. |
|
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
804 |
]. |
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
805 |
|
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
806 |
"Created: 17.4.1996 / 15:19:16 / cg" |
1297
f5ea02391a59
use #contents: instead of #clear
Claus Gittinger <cg@exept.de>
parents:
1284
diff
changeset
|
807 |
"Modified: 11.8.1997 / 03:01:42 / cg" |
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
808 |
! |
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
809 |
|
197 | 810 |
extractFaceAndStyleFrom:aString |
595 | 811 |
"given a string, extract currentFace and currentStyle" |
812 |
||
197 | 813 |
|index| |
814 |
||
815 |
index := aString indexOf:$-. |
|
4944 | 816 |
currentFaceAndStyle := aString. |
197 | 817 |
(index ~~ 0) ifTrue:[ |
595 | 818 |
currentFace := aString copyTo:(index - 1). |
819 |
currentStyle := aString copyFrom:(index + 1) |
|
4944 | 820 |
] ifFalse:[ |
821 |
currentFace := aString. |
|
822 |
currentStyle := nil. |
|
823 |
]. |
|
197 | 824 |
|
595 | 825 |
"Modified: 29.4.1996 / 09:41:47 / cg" |
197 | 826 |
! |
827 |
||
3817 | 828 |
fontForPreview |
829 |
"get the preview font" |
|
830 |
||
5189 | 831 |
|fontShown familyFonts fonts sz szUnitUsed| |
3817 | 832 |
|
3853 | 833 |
currentSize isNil ifTrue:[ |
834 |
^ nil. |
|
835 |
]. |
|
5189 | 836 |
sz := Number readFrom:currentSize. |
5187 | 837 |
szUnitUsed := sizeUnit. |
5446 | 838 |
(currentSize endsWith:#px) ifTrue:[ |
5187 | 839 |
szUnitUsed := #px. |
840 |
]. |
|
3841 | 841 |
|
5189 | 842 |
familyFonts := fontsPerFamily at:currentFamily ifAbsent:nil. |
843 |
familyFonts isNil ifTrue:[ |
|
844 |
familyFonts := fontsPerFamily at:currentFamily asUppercaseFirst ifAbsent:nil. |
|
845 |
familyFonts isNil ifTrue:[ |
|
846 |
^ nil |
|
847 |
]. |
|
848 |
]. |
|
849 |
fonts := familyFonts |
|
5187 | 850 |
select:[:fntDescr | |
851 |
fntDescr face = currentFace |
|
5446 | 852 |
and:[fntDescr style = currentStyle |
853 |
and:[fntDescr isScaledFont |
|
854 |
or:[sz = (szUnitUsed == #px |
|
855 |
ifTrue:[fntDescr pixelSize] ifFalse:[fntDescr size])]]] |
|
5187 | 856 |
]. |
4944 | 857 |
|
5189 | 858 |
fonts isEmpty ifTrue:[ |
859 |
^ nil |
|
860 |
]. |
|
861 |
||
5187 | 862 |
fonts size > 1 ifTrue:[ |
863 |
'FontPanel [info]: huh - multiple entries: ' infoPrint. fonts infoPrintCR. |
|
5466 | 864 |
"/ self halt. |
5187 | 865 |
]. |
866 |
fontShown := fonts first. |
|
867 |
fontShown isScaledFont ifTrue:[ |
|
868 |
szUnitUsed == #px ifTrue:[ |
|
869 |
fontShown := fontShown asPixelSize:sz |
|
870 |
] ifFalse:[ |
|
871 |
fontShown := fontShown asSize:sz |
|
872 |
]. |
|
873 |
]. |
|
874 |
^ fontShown onDevice:self graphicsDevice |
|
3817 | 875 |
|
5187 | 876 |
"/ fontShown := |
877 |
"/ ((Screen current supportsXFTFonts and:[selectedFont isXftFont "self xftFontsOnlyHolder value" ]) |
|
878 |
"/ ifTrue:[XftFontDescription] |
|
879 |
"/ ifFalse:[Font]) |
|
880 |
"/ family:currentFamily |
|
881 |
"/ face:currentFace |
|
882 |
"/ style:currentStyle |
|
883 |
"/ size:currentSize |
|
884 |
"/ sizeUnit:sizeUnit |
|
885 |
"/ encoding:encoding. |
|
886 |
"/ |
|
887 |
"/ fontShown notNil ifTrue:[^ fontShown]. |
|
888 |
"/ |
|
889 |
"/ allFonts := self graphicsDevice |
|
890 |
"/ fontsInFamily:(currentFamily ? '*') |
|
891 |
"/ face:(currentFace ? '*') |
|
892 |
"/ style:(currentStyle ? '*') |
|
893 |
"/ filtering:combinedFilter. |
|
894 |
"/ |
|
895 |
"/ sizeUnit == #px ifTrue:[ |
|
896 |
"/ fonts := allFonts select:[:f | f pixelSize = currentSize]. |
|
897 |
"/ ] ifFalse:[ |
|
898 |
"/ fonts := allFonts select:[:f | f size = currentSize]. |
|
899 |
"/ ]. |
|
900 |
"/ fonts notEmpty ifTrue:[ |
|
901 |
"/ fontShown := fonts anElement. |
|
902 |
"/ ] ifFalse:[ |
|
903 |
"/ "/ mhmh: |
|
904 |
"/ "/ size=0 is returned for scalable fonts. |
|
905 |
"/ "/ Any size is possible. |
|
906 |
"/ "/ |
|
907 |
"/ fonts := allFonts select:[:f | f size = 0]. |
|
908 |
"/ fonts notEmpty ifTrue:[ |
|
909 |
"/ fontShown := Font family:currentFamily |
|
910 |
"/ face:currentFace |
|
911 |
"/ style:currentStyle |
|
912 |
"/ size:currentSize |
|
913 |
"/ sizeUnit:sizeUnit |
|
914 |
"/ encoding:(fonts anElement encoding). |
|
915 |
"/ ] |
|
916 |
"/ ]. |
|
917 |
"/ ^ fontShown |
|
3817 | 918 |
! |
919 |
||
920 |
getFacesForFamily:aFamilyName filtering:filter |
|
921 |
"the list of font faces for a given family" |
|
922 |
||
5187 | 923 |
|familyFonts| |
924 |
||
925 |
familyFonts := fontsPerFamily at:aFamilyName ifAbsent:nil. |
|
926 |
familyFonts isEmptyOrNil ifTrue:[^ nil]. |
|
927 |
||
928 |
^ familyFonts |
|
929 |
select:[:fntDescr | |
|
930 |
(filter isNil or:[filter value:fntDescr]) |
|
931 |
] |
|
932 |
thenCollect:[:fntDescr | |
|
933 |
fntDescr face. |
|
934 |
] |
|
935 |
||
936 |
"/ ^ self graphicsDevice facesInFamily:aFamilyName filtering:filter. |
|
3817 | 937 |
! |
938 |
||
939 |
getFamilyList |
|
940 |
"the list of font families" |
|
941 |
||
5466 | 942 |
|d sav_useXftFontsOnly sav_useXFontsOnly| |
5187 | 943 |
|
5466 | 944 |
sav_useXftFontsOnly := UserPreferences current useXftFontsOnly. |
945 |
sav_useXFontsOnly := UserPreferences current useXFontsOnly. |
|
946 |
[ |
|
947 |
UserPreferences current useXftFontsOnly:(xftFontsOnlyHolder value). |
|
948 |
UserPreferences current useXFontsOnly:false. |
|
949 |
allFonts := self graphicsDevice listOfAvailableFonts. |
|
950 |
] ensure:[ |
|
951 |
UserPreferences current useXftFontsOnly:sav_useXftFontsOnly. |
|
952 |
UserPreferences current useXFontsOnly:sav_useXFontsOnly. |
|
953 |
]. |
|
5187 | 954 |
allFonts isNil ifTrue:[^ nil]. |
955 |
||
956 |
d := Dictionary new. |
|
957 |
allFonts do:[:fntDescr | |
|
958 |
|family| |
|
959 |
||
960 |
(combinedFilter isNil or:[combinedFilter value:fntDescr]) ifTrue:[ |
|
961 |
family := fntDescr family. |
|
962 |
family isNil ifTrue:[ |
|
5190 | 963 |
family := fntDescr name ? 'unnamed' |
5187 | 964 |
]. |
965 |
(d at:family ifAbsentPut:[Set new]) add:fntDescr |
|
966 |
] |
|
967 |
]. |
|
968 |
fontsPerFamily := d. |
|
969 |
^ d keys asOrderedCollection sort |
|
970 |
"/ |
|
971 |
"/ ^ self graphicsDevice fontFamiliesFiltering:combinedFilter. |
|
3817 | 972 |
! |
973 |
||
974 |
getSizesInFamily:aFamilyName face:face style:style filtering:filter |
|
5187 | 975 |
|familyFonts faceAndStyleFonts sizes hasScalableFont| |
976 |
||
977 |
familyFonts := fontsPerFamily at:aFamilyName ifAbsent:nil. |
|
978 |
familyFonts isEmptyOrNil ifTrue:[^ nil]. |
|
979 |
||
980 |
hasScalableFont := false. |
|
981 |
||
982 |
faceAndStyleFonts := |
|
983 |
familyFonts |
|
984 |
select:[:fntDescr | |
|
985 |
(filter isNil or:[filter value:fntDescr]) |
|
986 |
and:[ fntDescr face = face |
|
987 |
and:[ fntDescr style = style ]] |
|
988 |
]. |
|
989 |
||
990 |
sizes := |
|
991 |
faceAndStyleFonts |
|
992 |
collect:[:fntDescr | |
|
993 |
fntDescr isScaledFont ifTrue:[ |
|
994 |
hasScalableFont := true. |
|
995 |
]. |
|
996 |
sizeUnit == #px |
|
997 |
ifTrue:[ fntDescr pixelSize ] |
|
998 |
ifFalse:[ fntDescr size ] |
|
999 |
]. |
|
1000 |
||
1001 |
hasScalableFont ifTrue:[ |
|
1002 |
sizeUnit == #px ifTrue:[ |
|
1003 |
^ #(10 16 20 24 28 32 48 56 64 72 80 92 128) |
|
1004 |
]. |
|
1005 |
^ #(4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 48 64 72 96 144 192 288) |
|
3834 | 1006 |
]. |
5187 | 1007 |
(sizes size == 1 and:[sizes first == 0]) ifTrue:[ |
1008 |
"/ some font may only be available in certain pixel sizes... |
|
1009 |
sizeUnit == #pt ifTrue:[ |
|
1010 |
^ (faceAndStyleFonts collect:[:fontDescr | fontDescr pixelSize]) asOrderedCollection |
|
1011 |
sort collect:[:sz | sz asString , 'px' ]. |
|
1012 |
]. |
|
1013 |
^ (faceAndStyleFonts collect:[:fontDescr | fontDescr size]) asOrderedCollection |
|
1014 |
sort collect:[:sz | sz asString , 'pt' ]. |
|
1015 |
]. |
|
1016 |
||
1017 |
^ sizes asOrderedCollection sort. |
|
1018 |
||
1019 |
"/ sizeUnit == #px ifTrue:[ |
|
1020 |
"/ ^ self graphicsDevice |
|
1021 |
"/ pixelSizesInFamily:(currentFamily ? '*') |
|
1022 |
"/ face:(currentFace ? '*') |
|
1023 |
"/ style:(currentStyle ? '*') |
|
1024 |
"/ filtering:filter. |
|
1025 |
"/ ] ifFalse:[ |
|
1026 |
"/ ^ self graphicsDevice |
|
1027 |
"/ sizesInFamily:(currentFamily ? '*') |
|
1028 |
"/ face:(currentFace ? '*') |
|
1029 |
"/ style:(currentStyle ? '*') |
|
1030 |
"/ filtering:filter. |
|
1031 |
"/ ]. |
|
3817 | 1032 |
! |
1033 |
||
1034 |
getStylesInFamily:aFamilyName face:aFace filtering:filter |
|
1035 |
"the list of font styles for a given family-face" |
|
1036 |
||
5187 | 1037 |
|familyFonts| |
1038 |
||
1039 |
familyFonts := fontsPerFamily at:aFamilyName ifAbsent:nil. |
|
1040 |
familyFonts isEmptyOrNil ifTrue:[^ nil]. |
|
1041 |
||
1042 |
^ familyFonts |
|
1043 |
select:[:fntDescr | |
|
1044 |
(filter isNil or:[filter value:fntDescr]) |
|
1045 |
and:[fntDescr face = aFace] |
|
1046 |
] |
|
1047 |
thenCollect:[:fntDescr | |
|
1048 |
fntDescr style. |
|
1049 |
] |
|
1050 |
||
1051 |
"/ ^ self graphicsDevice stylesInFamily:aFamilyName face:aFace filtering:filter. |
|
3817 | 1052 |
! |
1053 |
||
197 | 1054 |
showPreview |
595 | 1055 |
"show the preview text" |
1056 |
||
3817 | 1057 |
|font deviceFont enc fontName| |
382 | 1058 |
|
4949 | 1059 |
"/ self clearPreview. |
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
1060 |
|
197 | 1061 |
" |
1062 |
show a wait cursor: for some fonts (kanji etc) the |
|
2890 | 1063 |
X-server needs quite some time to load the font |
197 | 1064 |
" |
255 | 1065 |
self withWaitCursorDo:[ |
3817 | 1066 |
font := self fontForPreview. |
2843 | 1067 |
font notNil ifTrue:[ |
4897 | 1068 |
deviceFont := font onDevice:self graphicsDevice. |
2890 | 1069 |
enc := deviceFont encoding. |
2916 | 1070 |
enc isNil ifTrue:[enc := #'fontspecific']. |
434
22586d8221e1
dont get confused by same-name but different encoding
Claus Gittinger <cg@exept.de>
parents:
415
diff
changeset
|
1071 |
|
2874 | 1072 |
previewField font:deviceFont. |
1073 |
previewField characterEncoding:enc. |
|
1074 |
||
2287
b33ad40d7538
preview fixed when font is bad
Claus Gittinger <cg@exept.de>
parents:
2286
diff
changeset
|
1075 |
encodingLabel label:enc. |
2843 | 1076 |
currentEncoding := enc. |
1077 |
fontName := deviceFont fullName. |
|
4925 | 1078 |
(font isKindOf:XftFontDescription) ifTrue:[fontName := fontName,' (xft)']. |
4951 | 1079 |
previewField contents:(font userFriendlyName,'\\' withCRs,(self class defaultSampleStringForEncoding:enc) asString). |
382 | 1080 |
] ifFalse:[ |
2842 | 1081 |
previewField contents:nil. |
1082 |
encodingLabel label:nil. |
|
2843 | 1083 |
currentEncoding := nil. |
2842 | 1084 |
fontName := nil. |
382 | 1085 |
]. |
2842 | 1086 |
nameLabel notNil ifTrue:[nameLabel label:fontName]. |
197 | 1087 |
] |
255 | 1088 |
|
1257 | 1089 |
"Modified: 30.6.1997 / 17:26:22 / cg" |
197 | 1090 |
! |
1091 |
||
128 | 1092 |
showSelectedFont |
2843 | 1093 |
|fam face faceAndStyle style sz| |
128 | 1094 |
|
1095 |
fam := selectedFont family. |
|
2843 | 1096 |
currentEncoding := selectedFont encoding. |
1097 |
||
5188 | 1098 |
fontsPerFamily isNil ifTrue:[ |
5466 | 1099 |
self updateFamilyList |
1100 |
"/ self getFamilyList |
|
5188 | 1101 |
]. |
1102 |
||
2888 | 1103 |
self familySelected:fam showPreview:false. |
128 | 1104 |
fam notNil ifTrue:[ |
2842 | 1105 |
face := selectedFont face. |
1106 |
(face notNil and:[(style := selectedFont style) notNil]) ifTrue:[ |
|
1107 |
faceAndStyle := face , '-' , style. |
|
1108 |
]. |
|
2888 | 1109 |
self faceSelected:faceAndStyle showPreview:false. |
2842 | 1110 |
faceAndStyle notNil ifTrue:[ |
5188 | 1111 |
sz := sizeUnit == #px ifTrue:[selectedFont pixelSize asString,'px'] ifFalse:[selectedFont size asString]. |
3841 | 1112 |
pixelPointSwitch contents:sizeUnit. |
2888 | 1113 |
self sizeSelected:sz showPreview:false. |
2842 | 1114 |
] |
1115 |
]. |
|
2888 | 1116 |
|
1117 |
self showPreview |
|
2826 | 1118 |
! |
1119 |
||
1120 |
updateFamilyList |
|
1121 |
"update the list of font families" |
|
1122 |
||
1123 |
|families| |
|
1124 |
||
1125 |
familyList list isNil ifTrue:[ |
|
3817 | 1126 |
families := self getFamilyList. |
2826 | 1127 |
families notNil ifTrue:[ |
4943 | 1128 |
families := families asNewOrderedCollection sort |
2826 | 1129 |
]. |
1130 |
familyList list:families |
|
1131 |
]. |
|
1132 |
selectedFont notNil ifTrue:[ |
|
1133 |
self showSelectedFont |
|
1134 |
]. |
|
1135 |
||
1136 |
"Modified: 27.2.1996 / 01:39:42 / cg" |
|
1137 |
"Created: 27.2.1996 / 01:40:37 / cg" |
|
4944 | 1138 |
! |
1139 |
||
1140 |
updateSizeList |
|
5188 | 1141 |
|sizes sizeStrings oldSize newSize| |
4944 | 1142 |
|
1143 |
sizes := self |
|
1144 |
getSizesInFamily:(currentFamily ? '*') |
|
1145 |
face:(currentFace ? '*') |
|
1146 |
style:(currentStyle ? '*') |
|
1147 |
filtering:combinedFilter. |
|
1148 |
||
1149 |
(sizes isEmptyOrNil) ifTrue:[ |
|
1150 |
sizeList list:nil. |
|
1151 |
currentSize := nil. |
|
1152 |
"/ self halt. |
|
1153 |
^ self |
|
1154 |
]. |
|
1155 |
||
1156 |
sizes := sizes asOrderedCollection. |
|
1157 |
selectedFont notNil ifTrue:[ |
|
4947 | 1158 |
oldSize := currentSize. |
5188 | 1159 |
newSize := (selectedFont sizeUnit == #px) |
4944 | 1160 |
ifTrue:[ selectedFont pixelSize ] |
1161 |
ifFalse:[ selectedFont size ]. |
|
5188 | 1162 |
newSize == 0 ifTrue:[ |
4947 | 1163 |
currentSize := oldSize |
5188 | 1164 |
] ifFalse:[ |
1165 |
currentSize := newSize asString. |
|
1166 |
(selectedFont sizeUnit == #px) ifTrue:[ |
|
1167 |
currentSize := currentSize , 'px' |
|
1168 |
] |
|
4947 | 1169 |
]. |
5187 | 1170 |
"/ currentSize notNil ifTrue:[ |
1171 |
"/ (sizes includes:currentSize) ifFalse:[ |
|
1172 |
"/ sizes add:currentSize |
|
1173 |
"/ ]. |
|
1174 |
"/ ]. |
|
1175 |
]. |
|
1176 |
"/ sizes sort. |
|
1177 |
||
1178 |
sizeStrings := sizes collect:[:entry | entry asString]. |
|
1179 |
sizeList list:sizeStrings. |
|
1180 |
currentSize notNil ifTrue:[ |
|
1181 |
(sizeStrings includes:(currentSize asString)) ifTrue:[ |
|
1182 |
sizeList setSelectElement:currentSize asString. |
|
1183 |
] ifFalse:[ |
|
1184 |
sizeStrings notEmpty ifTrue:[ |
|
1185 |
sizeList setSelectElement:sizeStrings first. |
|
1186 |
currentSize := sizeStrings first. |
|
1187 |
] ifFalse:[ |
|
1188 |
currentSize := nil |
|
4948 | 1189 |
]. |
4944 | 1190 |
]. |
1191 |
]. |
|
1192 |
! |
|
1193 |
||
1194 |
xftFontsOnlyChanged |
|
1195 |
self filter:filter. "/ will update combinedFilter |
|
197 | 1196 |
! ! |
128 | 1197 |
|
197 | 1198 |
!FontPanel methodsFor:'queries'! |
0 | 1199 |
|
3405
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1200 |
characterSetViewClassAvailable |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1201 |
^ CharacterSetView notNil |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1202 |
|
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1203 |
"Created: / 11-10-2006 / 21:27:51 / cg" |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1204 |
! |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1205 |
|
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1206 |
characterSetViewClassAvailableOrOSIsUNIX |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1207 |
^ self characterSetViewClassAvailable or:[self osIsUNIX] |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1208 |
|
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1209 |
"Created: / 11-10-2006 / 21:29:20 / cg" |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1210 |
! |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1211 |
|
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1212 |
osIsUNIX |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1213 |
^ OperatingSystem isUNIXlike |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1214 |
|
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1215 |
"Modified: / 11-10-2006 / 21:28:59 / cg" |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1216 |
! |
9a03bc64e285
dont offer special-character display in menu, if its not available.
Claus Gittinger <cg@exept.de>
parents:
3274
diff
changeset
|
1217 |
|
197 | 1218 |
preferredExtent |
595 | 1219 |
"return the boxes preferredExtent" |
572 | 1220 |
|
3769
758f8b0b6cf2
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3740
diff
changeset
|
1221 |
"/ If I have an explicit preferredExtent.. |
758f8b0b6cf2
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3740
diff
changeset
|
1222 |
explicitExtent notNil ifTrue:[ |
758f8b0b6cf2
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3740
diff
changeset
|
1223 |
^ explicitExtent |
758f8b0b6cf2
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3740
diff
changeset
|
1224 |
]. |
797 | 1225 |
|
3769
758f8b0b6cf2
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3740
diff
changeset
|
1226 |
"/ If I have a cached preferredExtent value.. |
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
690
diff
changeset
|
1227 |
preferredExtent notNil ifTrue:[ |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
690
diff
changeset
|
1228 |
^ preferredExtent |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
690
diff
changeset
|
1229 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
690
diff
changeset
|
1230 |
|
4944 | 1231 |
"/ ^ 450@350 |
1232 |
^ self class defaultExtent. |
|
572 | 1233 |
|
797 | 1234 |
"Modified: 19.7.1996 / 20:44:08 / cg" |
0 | 1235 |
! ! |
77 | 1236 |
|
5531 | 1237 |
!FontPanel methodsFor:'startup'! |
1238 |
||
1239 |
fontFromUser |
|
1240 |
"open this fontPanel and return the selected font, |
|
1241 |
or nil if abort is pressed" |
|
1242 |
||
1243 |
^ self |
|
1244 |
fontFromUserInitial:nil |
|
1245 |
title:nil |
|
1246 |
filter:nil |
|
1247 |
encoding:nil |
|
1248 |
enabled:true |
|
1249 |
||
1250 |
" |
|
1251 |
FontPanel fontFromUser |
|
1252 |
||
1253 |
FontPanel new |
|
1254 |
withChangeFontInViewsAllCheckBox:true; |
|
1255 |
fontFromUser |
|
1256 |
" |
|
1257 |
||
1258 |
"Modified: 27.2.1996 / 00:51:59 / cg" |
|
1259 |
! |
|
1260 |
||
1261 |
fontFromUserInitial:aFont |
|
1262 |
"open this fontPanel showing aFont initially, |
|
1263 |
and return the selected font, or nil if abort is pressed" |
|
1264 |
||
1265 |
^ self |
|
1266 |
fontFromUserInitial:aFont |
|
1267 |
title:nil |
|
1268 |
filter:nil |
|
1269 |
encoding:nil |
|
1270 |
enabled:true |
|
1271 |
||
1272 |
" |
|
1273 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) |
|
1274 |
FontPanel fontFromUserInitial:MenuPanel defaultFont |
|
1275 |
" |
|
1276 |
! |
|
1277 |
||
1278 |
fontFromUserInitial:aFont title:someTitle |
|
1279 |
"open this fontPanel with title and return the selected font, |
|
1280 |
or nil if abort is pressed" |
|
1281 |
||
1282 |
^ self |
|
1283 |
fontFromUserInitial:aFont |
|
1284 |
title:someTitle |
|
1285 |
filter:nil |
|
1286 |
encoding:nil |
|
1287 |
enabled:true |
|
1288 |
||
1289 |
" |
|
1290 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
1291 |
" |
|
1292 |
||
1293 |
"Created: 27.2.1996 / 00:59:46 / cg" |
|
1294 |
"Modified: 29.4.1996 / 09:45:34 / cg" |
|
1295 |
! |
|
1296 |
||
1297 |
fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock |
|
1298 |
"open this fontPanel with title and font-filter |
|
1299 |
and return the selected font, or nil if abort is pressed" |
|
1300 |
||
1301 |
^ self |
|
1302 |
fontFromUserInitial:initialFont |
|
1303 |
title:someTitle |
|
1304 |
filter:aFilterBlock |
|
1305 |
encoding:nil |
|
1306 |
enabled:true |
|
1307 |
||
1308 |
" |
|
1309 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
1310 |
" |
|
1311 |
||
1312 |
"Created: 27.2.1996 / 00:59:46 / cg" |
|
1313 |
"Modified: 10.4.1997 / 09:53:03 / cg" |
|
1314 |
! |
|
1315 |
||
1316 |
fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock encoding:encoding |
|
1317 |
"open this fontPanel with title and font-filter |
|
1318 |
and return the selected font, or nil if abort is pressed" |
|
1319 |
||
1320 |
^ self |
|
1321 |
fontFromUserInitial:initialFont |
|
1322 |
title:someTitle |
|
1323 |
filter:aFilterBlock |
|
1324 |
encoding:encoding |
|
1325 |
enabled:true |
|
1326 |
||
1327 |
" |
|
1328 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
1329 |
" |
|
1330 |
! |
|
1331 |
||
1332 |
fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock encoding:encoding enabled:enabled |
|
1333 |
"open this fontPanel with title and font-filter |
|
1334 |
and return the selected font, or nil if abort is pressed" |
|
1335 |
||
1336 |
|selectedFont| |
|
1337 |
||
1338 |
self filter:aFilterBlock. |
|
1339 |
someTitle notNil ifTrue:[ |
|
1340 |
self label:someTitle |
|
1341 |
]. |
|
1342 |
self action:[:aFontDescription | selectedFont := aFontDescription]. |
|
1343 |
initialFont notNil ifTrue:[ |
|
1344 |
self initialFont:initialFont. |
|
1345 |
]. |
|
1346 |
encoding notNil ifTrue:[ |
|
1347 |
self encoding:encoding. |
|
1348 |
] ifFalse:[ |
|
1349 |
initialFont notNil ifTrue:[ |
|
1350 |
self encoding:initialFont encoding |
|
1351 |
]. |
|
1352 |
]. |
|
1353 |
self enabled:enabled. |
|
1354 |
self showAtPointer. |
|
1355 |
self destroy. |
|
1356 |
^ selectedFont |
|
1357 |
||
1358 |
" |
|
1359 |
FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font'. |
|
1360 |
||
1361 |
FontPanel new |
|
1362 |
withChangeFontInViewsAllCheckBox:true; |
|
1363 |
fontFromUserInitial:(Font family:'courier' size:12) title:'select some font' |
|
1364 |
" |
|
1365 |
||
1366 |
"Created: 27.2.1996 / 00:59:46 / cg" |
|
1367 |
"Modified: 10.4.1997 / 09:53:03 / cg" |
|
1368 |
! ! |
|
1369 |
||
77 | 1370 |
!FontPanel methodsFor:'user interaction'! |
1371 |
||
3604 | 1372 |
copyFontName |
1373 |
self setClipboardText:(previewField font storeString). |
|
1374 |
! |
|
1375 |
||
2826 | 1376 |
encodingFilterSelected:anEncodingPattern |
1377 |
"another encoding was selected; find available fonts and update lists" |
|
1378 |
||
1379 |
|pattern| |
|
1380 |
||
2887 | 1381 |
anEncodingPattern isNil ifTrue:[ |
1382 |
self filter:nil. |
|
1383 |
^ self. |
|
1384 |
]. |
|
1385 |
||
2878 | 1386 |
pattern := (anEncodingPattern upTo:$( ) withoutSeparators. |
1387 |
||
1388 |
pattern = '?' ifTrue:[ |
|
2845 | 1389 |
pattern := '' |
1390 |
] ifFalse:[ |
|
2878 | 1391 |
pattern := (pattern isEmptyOrNil ifTrue:'*' ifFalse:pattern). |
2845 | 1392 |
]. |
2826 | 1393 |
self |
1394 |
filter: |
|
1395 |
[:f | |
|
3899
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1396 |
|doesMatch encoding| |
2826 | 1397 |
|
3899
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1398 |
"/ k&d hack for mswindows names... |
3848 | 1399 |
"/ Transcript showCR:f encoding. |
3899
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1400 |
encoding := f encoding ? ''. |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1401 |
doesMatch := (pattern match:encoding). |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1402 |
doesMatch ifFalse:[ |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1403 |
encoding = 'ms-ansi' ifTrue:[ |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1404 |
doesMatch := (pattern = 'iso8859-1') |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1405 |
or:[ (pattern = 'iso10646-1') |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1406 |
or:[ (pattern = 'unicode') ]] |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1407 |
]. |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1408 |
(encoding = 'iso8859-1' |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1409 |
or:[encoding = 'iso10646-1' |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1410 |
or:[encoding = 'unicode']]) ifTrue:[ |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1411 |
doesMatch := (pattern = 'ms-ansi') |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1412 |
]. |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1413 |
]. |
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1414 |
doesMatch |
2826 | 1415 |
]. |
1416 |
! |
|
1417 |
||
197 | 1418 |
faceSelected:aFaceAndStyleName |
2826 | 1419 |
"a fonts face was selected; find available sizes and update lists" |
595 | 1420 |
|
2842 | 1421 |
self faceSelected:aFaceAndStyleName showPreview:true |
1422 |
! |
|
1423 |
||
1424 |
faceSelected:aFaceAndStyleName showPreview:showPreview |
|
1425 |
"a fonts face was selected; find available sizes and update lists" |
|
1426 |
||
3740 | 1427 |
|sizes sizeStrings didShow| |
197 | 1428 |
|
1429 |
aFaceAndStyleName notNil ifTrue:[ |
|
251
25f76efaa547
oops - dont pass a collection of numbers to the size-view
Claus Gittinger <cg@exept.de>
parents:
243
diff
changeset
|
1430 |
self extractFaceAndStyleFrom:aFaceAndStyleName. |
197 | 1431 |
]. |
4944 | 1432 |
self updateSizeList. |
1433 |
showPreview ifTrue:[ |
|
1434 |
self showPreview. |
|
197 | 1435 |
]. |
4944 | 1436 |
^ self. |
1437 |
"/ |
|
1438 |
"/ sizes := self |
|
1439 |
"/ getSizesInFamily:(currentFamily ? '*') |
|
1440 |
"/ face:(currentFace ? '*') |
|
1441 |
"/ style:(currentStyle ? '*') |
|
1442 |
"/ filtering:combinedFilter. |
|
1443 |
"/ |
|
1444 |
"/ (sizes isEmptyOrNil) ifTrue:[ |
|
1445 |
"/ sizeList list:nil. |
|
1446 |
"/ currentSize := nil. |
|
1447 |
"/ self breakPoint:#cg. |
|
1448 |
"/ showPreview ifTrue:[ |
|
1449 |
"/ self showPreview. |
|
1450 |
"/ ]. |
|
1451 |
"/ ^ self |
|
1452 |
"/ ]. |
|
1453 |
"/ |
|
1454 |
"/ didShow := false. |
|
1455 |
"/ |
|
1456 |
"/ sizes := sizes asOrderedCollection. |
|
1457 |
"/ selectedFont notNil ifTrue:[ |
|
1458 |
"/ (sizes includes:selectedFont size) ifFalse:[ |
|
1459 |
"/ sizes add:selectedFont size |
|
1460 |
"/ ]. |
|
1461 |
"/ ]. |
|
1462 |
"/ sizes sort. |
|
1463 |
"/ |
|
1464 |
"/ sizeStrings := sizes collect:[:entry | entry printString]. |
|
1465 |
"/ sizeList list:sizeStrings. |
|
1466 |
"/ currentSize notNil ifTrue:[ |
|
1467 |
"/ (sizeStrings includes:(currentSize printString)) ifTrue:[ |
|
1468 |
"/ sizeList setSelectElement:currentSize printString. |
|
1469 |
"/ showPreview ifTrue:[ |
|
1470 |
"/ self showPreview. |
|
1471 |
"/ didShow := true. |
|
1472 |
"/ ] |
|
1473 |
"/ ] |
|
1474 |
"/ ]. |
|
1475 |
"/ didShow ifFalse:[ |
|
1476 |
"/ self clearPreview |
|
1477 |
"/ ]. |
|
1478 |
"/ |
|
1257 | 1479 |
"Modified: 30.6.1997 / 17:25:46 / cg" |
197 | 1480 |
! |
1481 |
||
77 | 1482 |
familySelected:aFamilyName |
2826 | 1483 |
"a fonts family was selected; find available faces and update lists" |
595 | 1484 |
|
2842 | 1485 |
self familySelected:aFamilyName showPreview:true |
1486 |
! |
|
1487 |
||
1488 |
familySelected:aFamilyName showPreview:showPreview |
|
1489 |
"a fonts family was selected; find available faces and update lists" |
|
1490 |
||
5466 | 1491 |
|familyNameUsed faces styles list idx| |
77 | 1492 |
|
5466 | 1493 |
familyNameUsed := aFamilyName. |
1494 |
||
1495 |
familyList setSelectElement:familyNameUsed. |
|
1496 |
familyList selection isNil ifTrue:[ |
|
1497 |
"/ mhm - maybe lowercase... |
|
1498 |
idx := familyList list indexOf:(familyNameUsed := aFamilyName asUppercaseFirst). |
|
1499 |
idx == 0 ifTrue:[ |
|
1500 |
idx := familyList list indexOf:(familyNameUsed := aFamilyName asLowercaseFirst). |
|
1501 |
]. |
|
1502 |
idx ~~ 0 ifTrue:[ |
|
1503 |
familyList selection:idx. |
|
1504 |
]. |
|
1505 |
]. |
|
1506 |
||
1507 |
currentFamily := familyNameUsed. |
|
1508 |
faces := self getFacesForFamily:currentFamily filtering:combinedFilter. |
|
3899
966270358179
care for different encoding names in windows
Claus Gittinger <cg@exept.de>
parents:
3853
diff
changeset
|
1509 |
faces isEmptyOrNil ifTrue:[ |
415 | 1510 |
currentFace := currentStyle := currentFaceAndStyle := nil. |
1511 |
faceList list:nil. |
|
2842 | 1512 |
self faceSelected:nil showPreview:showPreview. |
415 | 1513 |
^ self. |
77 | 1514 |
]. |
1515 |
||
2353 | 1516 |
list := SortedCollection new. |
77 | 1517 |
faces do:[:aFace | |
5466 | 1518 |
styles := (self getStylesInFamily:currentFamily face:aFace filtering:combinedFilter) ? #(). |
415 | 1519 |
styles do:[:aStyle | |
5524 | 1520 |
aFace isEmptyOrNil ifTrue:[ |
4944 | 1521 |
list add:(aStyle) |
1522 |
] ifFalse:[ |
|
1523 |
list add:(aFace , '-' , aStyle) |
|
1524 |
] |
|
415 | 1525 |
] |
77 | 1526 |
]. |
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
1527 |
|
77 | 1528 |
faceList list:list. |
1529 |
currentFaceAndStyle notNil ifTrue:[ |
|
5008 | 1530 |
(list includes:currentFaceAndStyle) ifFalse:[ |
1531 |
currentFaceAndStyle = 'normal-roman' ifTrue:[ |
|
1532 |
(list includes:'regular-roman') ifTrue:[ |
|
1533 |
currentFaceAndStyle := 'regular-roman'. |
|
1534 |
currentFace := 'regular'. |
|
1535 |
currentStyle := 'roman'. |
|
1536 |
]. |
|
1537 |
(list includes:'medium-roman') ifTrue:[ |
|
1538 |
currentFaceAndStyle := 'medium-roman'. |
|
1539 |
currentFace := 'medium'. |
|
1540 |
currentStyle := 'roman'. |
|
1541 |
]. |
|
1542 |
]. |
|
1543 |
]. |
|
415 | 1544 |
(list includes:currentFaceAndStyle) ifTrue:[ |
690 | 1545 |
faceList setSelectElement:currentFaceAndStyle. |
2842 | 1546 |
self faceSelected:currentFaceAndStyle showPreview:showPreview. |
415 | 1547 |
^ self |
1548 |
] |
|
77 | 1549 |
]. |
5007 | 1550 |
list notEmptyOrNil ifTrue:[ |
1551 |
"/ faceList setSelectElement:(list first). |
|
1552 |
faceList selectElement:(list first). |
|
1553 |
self faceSelected:(list first) showPreview:showPreview. |
|
5008 | 1554 |
self updateSizeList. |
5007 | 1555 |
^ self |
1556 |
]. |
|
2842 | 1557 |
|
541
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
1558 |
sizeList list:nil. |
76018ea821ca
clear preview & encoding when no font is shown
Claus Gittinger <cg@exept.de>
parents:
540
diff
changeset
|
1559 |
self clearPreview. |
415 | 1560 |
|
690 | 1561 |
"Modified: 26.5.1996 / 15:04:29 / cg" |
77 | 1562 |
! |
1563 |
||
5548 | 1564 |
flushListOfAvailableFonts |
1565 |
XftFontDescription flushListOfAvailableFonts. |
|
1566 |
self updateFamilyList |
|
1567 |
! |
|
1568 |
||
77 | 1569 |
okPressed |
595 | 1570 |
"ok was pressed; hide myself and evaluate the okAction, passing |
1571 |
family, face, style and size as arguments" |
|
1572 |
||
5187 | 1573 |
|sz szUnitUsed| |
1574 |
||
1575 |
szUnitUsed := (sizeUnit ? #pt). |
|
1576 |
sz := Number readFrom:currentSize. |
|
1577 |
(currentSize endsWith:'px') ifTrue:[ |
|
1578 |
szUnitUsed := #px |
|
1579 |
]. |
|
1580 |
||
77 | 1581 |
self hide. |
1582 |
okAction notNil ifTrue:[ |
|
410 | 1583 |
currentFamily notNil ifTrue:[ |
4946 | 1584 |
okAction value: |
5152 | 1585 |
(((Screen current supportsXFTFonts and:[ self xftFontsOnlyHolder value ]) |
4946 | 1586 |
ifTrue:[XftFontDescription] |
1587 |
ifFalse:[FontDescription]) |
|
1588 |
family:currentFamily |
|
1589 |
face:currentFace |
|
1590 |
style:currentStyle |
|
5187 | 1591 |
size:sz |
1592 |
sizeUnit:szUnitUsed |
|
4946 | 1593 |
encoding:(currentEncoding ? encoding)). |
410 | 1594 |
] |
77 | 1595 |
] |
410 | 1596 |
|
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
1597 |
"Modified: 10.4.1997 / 09:51:31 / cg" |
77 | 1598 |
! |
1599 |
||
2852 | 1600 |
previewCopySelection |
1601 |
previewField copySelection. |
|
1602 |
! |
|
1603 |
||
2935 | 1604 |
previewInspectFont |
1605 |
previewField font inspect. |
|
1606 |
! |
|
1607 |
||
2852 | 1608 |
previewShowCharacterSet |
1609 |
CharacterSetView openOn:(previewField font) |
|
1610 |
! |
|
1611 |
||
2875 | 1612 |
previewShowCharacterSetUsingXFD |
2878 | 1613 |
[ |
1614 |
OperatingSystem executeCommand:'xfd -fn ' , previewField font fullName. |
|
1615 |
] fork. |
|
2875 | 1616 |
! |
1617 |
||
77 | 1618 |
sizeSelected:aNumberOrString |
2826 | 1619 |
"a size was selected; update preview" |
595 | 1620 |
|
2842 | 1621 |
self sizeSelected:aNumberOrString showPreview:true. |
1622 |
! |
|
1623 |
||
1624 |
sizeSelected:aNumberOrString showPreview:showPreview |
|
1625 |
"a size was selected; update preview" |
|
1626 |
||
5187 | 1627 |
currentSize := aNumberOrString. |
1628 |
"/ aNumberOrString isNumber ifFalse:[ |
|
1629 |
"/ currentSize := Number readFromString:aNumberOrString onError:nil |
|
1630 |
"/ ]. |
|
2842 | 1631 |
showPreview ifTrue:[self showPreview] |
595 | 1632 |
|
1633 |
"Modified: 29.4.1996 / 09:43:23 / cg" |
|
3832 | 1634 |
! |
1635 |
||
1636 |
sizeUnitSelected:unitSymbol |
|
1637 |
sizeUnit := unitSymbol. |
|
1638 |
sizeLabelHolder value:(resources |
|
3837 | 1639 |
string:(sizeUnit == #px |
3832 | 1640 |
ifTrue:'Size (px)' |
1641 |
ifFalse:'Size')). |
|
3834 | 1642 |
|
1643 |
self showPreview |
|
77 | 1644 |
! ! |
197 | 1645 |
|
1185
3b8bd5ea8d62
action block is evaluated with a fontDescription
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
1646 |
!FontPanel class methodsFor:'documentation'! |
243 | 1647 |
|
1648 |
version |
|
5446 | 1649 |
^ '$Header$' |
4094 | 1650 |
! |
1651 |
||
1652 |
version_CVS |
|
5446 | 1653 |
^ '$Header$' |
243 | 1654 |
! ! |
4660 | 1655 |