FontSelectionProtocol
public protocol FontSelectionProtocol : BoxProtocol
The FontSelectionProtocol protocol exposes the methods and properties of an underlying GtkFontSelection instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see FontSelection.
Alternatively, use FontSelectionRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkFontSelectioninstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
font_selection_ptrDefault implementationTyped pointer to the underlying
GtkFontSelectioninstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkFontSelectioninstance.Declaration
Swift
var font_selection_ptr: UnsafeMutablePointer<GtkFontSelection>! { get } -
Required Initialiser for types conforming to
FontSelectionProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
FontSelectionPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: FontSelectionPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a FontSelection property
Declaration
Swift
@inlinable func get(property: FontSelectionPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a FontSelection property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: FontSelectionPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
getFace()Extension methodGets the
PangoFontFacerepresenting the selected font group details (i.e. family, slant, weight, width, etc).get_face is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getFace() -> Pango.FontFaceRef! -
getFaceList()Extension methodThis returns the
GtkTreeViewwhich lists all styles available for the selected font. For example, “Regular”, “Bold”, etc.get_face_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getFaceList() -> WidgetRef! -
getFamily()Extension methodGets the
PangoFontFamilyrepresenting the selected font family.get_family is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getFamily() -> Pango.FontFamilyRef! -
getFamilyList()Extension methodThis returns the
GtkTreeViewthat lists font families, for example, “Sans”, “Serif”, etc.get_family_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getFamilyList() -> WidgetRef! -
getFontName()Extension methodGets the currently-selected font name.
Note that this can be a different string than what you set with
gtk_font_selection_set_font_name(), as the font selection widget may normalize font names and thus return a string with a different structure. For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”. Usepango_font_description_equal()if you want to compare two font descriptions.get_font_name is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getFontName() -> String! -
getPreviewEntry()Extension methodThis returns the
GtkEntryused to display the font as a preview.get_preview_entry is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getPreviewEntry() -> WidgetRef! -
getPreviewText()Extension methodGets the text displayed in the preview area.
get_preview_text is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getPreviewText() -> String! -
getSize()Extension methodThe selected font size.
get_size is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getSize() -> Int -
getSizeEntry()Extension methodThis returns the
GtkEntryused to allow the user to edit the font number manually instead of selecting it from the list of font sizes.get_size_entry is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getSizeEntry() -> WidgetRef! -
getSizeList()Extension methodThis returns the
GtkTreeViewused to list font sizes.get_size_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getSizeList() -> WidgetRef! -
setFontName(fontname:Extension method) Sets the currently-selected font.
Note that the
fontselneeds to know the screen in which it will appear for this to work; this can be guaranteed by simply making sure that thefontselis inserted in a toplevel window before you call this function.set_font_name is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func setFontName(fontname: UnsafePointer<gchar>!) -> Bool -
setPreview(text:Extension method) Sets the text displayed in the preview area. The
textis used to show how the selected font looks.set_preview_text is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func setPreview(text: UnsafePointer<gchar>!) -
faceExtension methodGets the
PangoFontFacerepresenting the selected font group details (i.e. family, slant, weight, width, etc).get_face is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var face: Pango.FontFaceRef! { get } -
faceListExtension methodThis returns the
GtkTreeViewwhich lists all styles available for the selected font. For example, “Regular”, “Bold”, etc.get_face_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var faceList: WidgetRef! { get } -
familyExtension methodGets the
PangoFontFamilyrepresenting the selected font family.get_family is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var family: Pango.FontFamilyRef! { get } -
familyListExtension methodThis returns the
GtkTreeViewthat lists font families, for example, “Sans”, “Serif”, etc.get_family_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var familyList: WidgetRef! { get } -
fontNameExtension methodGets the currently-selected font name.
Note that this can be a different string than what you set with
gtk_font_selection_set_font_name(), as the font selection widget may normalize font names and thus return a string with a different structure. For example, “Helvetica Italic Bold 12” could be normalized to “Helvetica Bold Italic 12”. Usepango_font_description_equal()if you want to compare two font descriptions.get_font_name is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var fontName: String! { get nonmutating set } -
previewEntryExtension methodThis returns the
GtkEntryused to display the font as a preview.get_preview_entry is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var previewEntry: WidgetRef! { get } -
previewTextExtension methodGets the text displayed in the preview area.
get_preview_text is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var previewText: String! { get nonmutating set } -
sizeExtension methodThe selected font size.
get_size is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var size: Int { get } -
sizeEntryExtension methodThis returns the
GtkEntryused to allow the user to edit the font number manually instead of selecting it from the list of font sizes.get_size_entry is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var sizeEntry: WidgetRef! { get } -
sizeListExtension methodThis returns the
GtkTreeViewused to list font sizes.get_size_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var sizeList: WidgetRef! { get } -
parentInstanceExtension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GtkBox { get }
View on GitHub
Install in Dash
FontSelectionProtocol Protocol Reference