Package ch.bailu.gtk.gtk
Klasse FontChooser
- Alle implementierten Schnittstellen:
PointerInterface
`GtkFontChooser` is an interface that can be implemented by widgets
for choosing fonts.
In GTK, the main objects that implement this interface are
[class@Gtk.FontChooserWidget], [class@Gtk.FontChooserDialog] and
[class@Gtk.FontButton].
for choosing fonts.
In GTK, the main objects that implement this interface are
[class@Gtk.FontChooserWidget], [class@Gtk.FontChooserDialog] and
[class@Gtk.FontButton].
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interfacestatic interfacestatic interfaceVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify -
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic ClassHandlergetFont()Veraltet.Veraltet.Veraltet.Veraltet.Veraltet.Veraltet.intVeraltet.static intVeraltet.intgetLevel()Veraltet.static longstatic TypeSystem.TypeSizeVeraltet.booleanVeraltet.static longstatic TypeSystem.TypeSizeConnect to signal "font-activated".voidsetFilterFunc(FontChooser.OnFontFilterFunc filter, Pointer user_data, FontChooser.OnDestroyNotify destroy) Veraltet.voidVeraltet.voidVeraltet.voidsetFontDesc(FontDescription font_desc) Veraltet.voidsetFontMap(FontMap fontmap) Veraltet.voidsetLanguage(Str language) Veraltet.voidsetLanguage(String language) Veraltet.voidsetLevel(int level) Veraltet.voidsetPreviewText(Str text) Veraltet.voidsetPreviewText(String text) Veraltet.voidsetShowPreviewEntry(boolean show_preview_entry) Veraltet.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrPropertyVon Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnrefVon Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksVon Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
SIGNAL_ON_FONT_ACTIVATED
Veraltet.- Siehe auch:
-
-
Konstruktordetails
-
FontChooser
-
-
Methodendetails
-
getClassHandler
-
getFont
Veraltet.Gets the currently-selected font name.
Note that this can be a different string than what you set with
[method@Gtk.FontChooser.set_font], as the font chooser 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”.
Use [method@Pango.FontDescription.equal] if you want to compare two
font descriptions.- Gibt zurück:
- A string with the name of the current font
-
getFontDesc
Veraltet.Gets the currently-selected font.
Note that this can be a different string than what you set with
[method@Gtk.FontChooser.set_font], as the font chooser 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”.
Use [method@Pango.FontDescription.equal] if you want to compare two
font descriptions.- Gibt zurück:
- A `PangoFontDescription` for the current font
-
getFontFace
Veraltet.Gets the `PangoFontFace` representing the selected font group
details (i.e. family, slant, weight, width, etc).
If the selected font is not installed, returns %NULL.- Gibt zurück:
- A `PangoFontFace` representing the selected font group details
-
getFontFamily
Veraltet.Gets the `PangoFontFamily` representing the selected font family.
Font families are a collection of font faces.
If the selected font is not installed, returns %NULL.- Gibt zurück:
- A `PangoFontFamily` representing the selected font family
-
getFontFeatures
Veraltet.Gets the currently-selected font features.
The format of the returned string is compatible with the
[CSS font-feature-settings property](https://www.w3.org/TR/css-fonts-4/#font-rend-desc).
It can be passed to [func@Pango.AttrFontFeatures.new].- Gibt zurück:
- the currently selected font features
-
getFontMap
Veraltet.Gets the custom font map of this font chooser widget,
or %NULL if it does not have one.- Gibt zurück:
- a `PangoFontMap`
-
getFontSize
Veraltet.The selected font size.- Gibt zurück:
- A n integer representing the selected font size, or -1 if no font size is selected.
-
getLanguage
Veraltet.Gets the language that is used for font features.- Gibt zurück:
- the currently selected language
-
getLevel
Veraltet.Returns the current level of granularity for selecting fonts.- Gibt zurück:
- the current granularity level
-
getPreviewText
Veraltet.Gets the text displayed in the preview area.- Gibt zurück:
- the text displayed in the preview area
-
getShowPreviewEntry
Veraltet.Returns whether the preview entry is shown or not.- Gibt zurück:
- %TRUE if the preview entry is shown or %FALSE if it is hidden.
-
setFilterFunc
@Deprecated public void setFilterFunc(FontChooser.OnFontFilterFunc filter, @Nullable Pointer user_data, FontChooser.OnDestroyNotify destroy) Veraltet.Adds a filter function that decides which fonts to display
in the font chooser.- Parameter:
filter- a `GtkFontFilterFunc`user_data- data to pass to @filterdestroy- function to call to free @data when it is no longer needed
-
setFont
Veraltet.Sets the currently-selected font.- Parameter:
fontname- a font name like “Helvetica 12” or “Times Bold 18”
-
setFont
Veraltet.Sets the currently-selected font.- Parameter:
fontname- a font name like “Helvetica 12” or “Times Bold 18”
-
setFontDesc
Veraltet.Sets the currently-selected font from @font_desc.- Parameter:
font_desc- a `PangoFontDescription`
-
setFontMap
Veraltet.Sets a custom font map to use for this font chooser widget.
A custom font map can be used to present application-specific
fonts instead of or in addition to the normal system fonts.
```c
FcConfig *config;
PangoFontMap *fontmap;
config = FcInitLoadConfigAndFonts ();
FcConfigAppFontAddFile (config, my_app_font_file);
fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
pango_fc_font_map_set_config (PANGO_FC_FONT_MAP (fontmap), config);
gtk_font_chooser_set_font_map (font_chooser, fontmap);
```
Note that other GTK widgets will only be able to use the
application-specific font if it is present in the font map they use:
```c
context = gtk_widget_get_pango_context (label);
pango_context_set_font_map (context, fontmap);
```- Parameter:
fontmap- a `PangoFontMap`
-
setLanguage
Veraltet.Sets the language to use for font features.- Parameter:
language- a language
-
setLanguage
Veraltet.Sets the language to use for font features.- Parameter:
language- a language
-
setLevel
Veraltet.Sets the desired level of granularity for selecting fonts.- Parameter:
level- the desired level of granularity
-
setPreviewText
Veraltet.Sets the text displayed in the preview area.
The @text is used to show how the selected font looks.- Parameter:
text- the text to display in the preview area
-
setPreviewText
Veraltet.Sets the text displayed in the preview area.
The @text is used to show how the selected font looks.- Parameter:
text- the text to display in the preview area
-
setShowPreviewEntry
Veraltet.Shows or hides the editable preview entry.- Parameter:
show_preview_entry- whether to show the editable preview entry or not
-
onFontActivated
Connect to signal "font-activated".
SeeFontChooser.OnFontActivated.onFontActivated(ch.bailu.gtk.type.Str)for signal description.
FieldSIGNAL_ON_FONT_ACTIVATEDcontains original signal name and can be used as resource reference.- Parameter:
signal- callback function (lambda).- Gibt zurück:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-