Gnome::Gtk4::FontButton
Table of Contents
Description§
The Gnome::Gtk4::FontButton allows to open a font chooser dialog to change the font.
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/font-button.png> :width<30\%>It is suitable widget for selecting a font in a preference dialog.
CSS nodes§
Gnome::Gtk4::FontButton has a single CSS node with name fontbutton which contains a button node with the .font style class.
Uml Diagram§
UNKNOWN image§
=for image :class<inline> :src<asset_files/images/plantuml/FontButton.png> :width<70\%>Class initialization§
Note: The native version of this class is deprecated in gtk4-lib() since version 4.10
new§
:native-object§
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
new-fontbutton§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new font picker widget.
method new-fontbutton ( --> Gnome::Gtk4::FontButton )
new-with-font§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Creates a new font picker widget showing the given font.
method new-with-font ( Str $fontname --> Gnome::Gtk4::FontButton )
- $fontname; Name of font to display in font chooser dialog.
Methods§
get-modal§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Gets whether the dialog is modal.
method get-modal (--> Bool )
Return value; True if the dialog is modal.
get-title§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Retrieves the title of the font chooser dialog.
method get-title (--> Str )
Return value; an internal copy of the title string which must not be freed..
get-use-font§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether the selected font is used in the label.
method get-use-font (--> Bool )
Return value; whether the selected font is used in the label..
get-use-size§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Returns whether the selected size is used in the label.
method get-use-size (--> Bool )
Return value; whether the selected size is used in the label..
set-modal§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets whether the dialog should be modal.
method set-modal ( Bool() $modal )
- $modal; True to make the dialog modal.
set-title§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
Sets the title for the font chooser dialog.
method set-title ( Str $title )
- $title; a string containing the font chooser dialog title.
set-use-font§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
If $use-font is True, the font name will be written using the selected font.
method set-use-font ( Bool() $use-font )
- $use-font; If True, font name will be written using font chosen..
set-use-size§
Note: The native version of this routine is deprecated in gtk4-lib() since version 4.10
If $use-size is True, the font name will be written using the selected size.
method set-use-size ( Bool() $use-size )
- $use-size; If True, font name will be written using the selected size..
Signals§
activate§
Emitted to when the font button is activated.
The `::activate` signal on Gnome::Gtk4::FontButton is an action signal and emitting it causes the button to present its dialog.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::FontButton :$_widget, *%user-options )
- $_handle_id; The registered event handler id.
- $_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::FontButton object.
- %user-options; A list of named arguments provided by .register-signal() in class Object.
font-set§
Emitted when the user selects a font.
When handling this signal, use .get-font() in class FontChooser to find out which font was just selected.
Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify::font signal.
method handler ( Int :$_handle_id, N-GObject :$_native-object, Gnome::Gtk4::FontButton :$_widget, *%user-options )
- $_handle_id; The registered event handler id.
- $_native-object; The native object provided by the Raku object which registered this event. This is a native Gnome::Gtk4::FontButton object.
- %user-options; A list of named arguments provided by .register-signal() in class Object.
About my projects, examples and tutorials