--- a/FontPanel.st Wed Feb 18 13:05:15 2004 +0100
+++ b/FontPanel.st Wed Feb 18 13:06:05 2004 +0100
@@ -338,6 +338,20 @@
"open a fontPanel with title and font-filter
and return the selected font, or nil if abort is pressed"
+ ^ self fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock encoding:nil
+
+ "
+ FontPanel fontFromUserInitial:(Font family:'courier' size:12) title:'select some font'
+ "
+
+ "Created: 27.2.1996 / 00:59:46 / cg"
+ "Modified: 10.4.1997 / 09:53:03 / cg"
+!
+
+fontFromUserInitial:initialFont title:someTitle filter:aFilterBlock encoding:encoding
+ "open a fontPanel with title and font-filter
+ and return the selected font, or nil if abort is pressed"
+
|fontPanel selectedFont|
fontPanel := FontPanel new.
@@ -349,6 +363,7 @@
initialFont notNil ifTrue:[
fontPanel initialFont:initialFont.
].
+ fontPanel encoding:encoding.
fontPanel showAtPointer.
fontPanel destroy.
@@ -795,6 +810,11 @@
|pattern|
+ anEncodingPattern isNil ifTrue:[
+ self filter:nil.
+ ^ self.
+ ].
+
pattern := (anEncodingPattern upTo:$( ) withoutSeparators.
pattern = '?' ifTrue:[
@@ -958,5 +978,5 @@
!FontPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/FontPanel.st,v 1.66 2004-02-16 23:35:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/FontPanel.st,v 1.67 2004-02-18 12:06:05 cg Exp $'
! !