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
GtkFontSelection
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
font_selection_ptr
Default implementationTyped pointer to the underlying
GtkFontSelection
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkFontSelection
instance.Declaration
Swift
var font_selection_ptr: UnsafeMutablePointer<GtkFontSelection>! { get }
-
Required Initialiser for types conforming to
FontSelectionProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:
Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
FontSelectionPropertyName
source 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 : ObjectProtocol
Parameters
source_property
the source property to bind
target
the target object to bind to
target_property
the target property to bind to
flags
the flags to pass to the
Binding
transform_from
ValueTransformer
to use for forward transformationtransform_to
ValueTransformer
to use for backwards transformationReturn Value
binding reference or
nil
in case of an error -
get(property:
Extension method) Get the value of a FontSelection property
Declaration
Swift
@inlinable func get(property: FontSelectionPropertyName) -> GLibObject.Value
Parameters
property
the 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
property
the property to get the value for
Return Value
the value of the named property
-
getFace()
Extension methodGets the
PangoFontFace
representing 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
GtkTreeView
which 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
PangoFontFamily
representing the selected font family.get_family is deprecated: Use #GtkFontChooser
Declaration
Swift
@available(*, deprecated) @inlinable func getFamily() -> Pango.FontFamilyRef!
-
getFamilyList()
Extension methodThis returns the
GtkTreeView
that 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
GtkEntry
used 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
GtkEntry
used 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
GtkTreeView
used 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
fontsel
needs to know the screen in which it will appear for this to work; this can be guaranteed by simply making sure that thefontsel
is 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
text
is 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>!)
-
face
Extension methodGets the
PangoFontFace
representing 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 }
-
faceList
Extension methodThis returns the
GtkTreeView
which 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 }
-
family
Extension methodGets the
PangoFontFamily
representing the selected font family.get_family is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var family: Pango.FontFamilyRef! { get }
-
familyList
Extension methodThis returns the
GtkTreeView
that lists font families, for example, “Sans”, “Serif”, etc.get_family_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var familyList: WidgetRef! { get }
-
fontName
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
@inlinable var fontName: String! { get nonmutating set }
-
previewEntry
Extension methodThis returns the
GtkEntry
used to display the font as a preview.get_preview_entry is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var previewEntry: WidgetRef! { get }
-
previewText
Extension methodGets the text displayed in the preview area.
get_preview_text is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var previewText: String! { get nonmutating set }
-
size
Extension methodThe selected font size.
get_size is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var size: Int { get }
-
sizeEntry
Extension methodThis returns the
GtkEntry
used 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 }
-
sizeList
Extension methodThis returns the
GtkTreeView
used to list font sizes.get_size_list is deprecated: Use #GtkFontChooser
Declaration
Swift
@inlinable var sizeList: WidgetRef! { get }
-
parentInstance
Extension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GtkBox { get }