Gnm.FontButton¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Button (29), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Actionable (5), Gtk.Activatable (6), Gtk.FontChooser (19)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Button (6), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4), Gtk.Activatable (2), Gtk.FontChooser (7)
|
Properties¶
- Inherited:
Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2), Gtk.FontChooser (7)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The type of the dialog |
||
r/w |
The name of the selected |
||
r/w |
Whether selected |
||
r/w |
Whether the selected |
||
r/w |
The title of the |
||
r/w |
Whether the label is drawn in the selected |
||
r/w |
Whether the label is drawn with the selected |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.FontChooser (1)
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1), Gtk.FontChooser (1)
Name |
Type |
Access |
Description |
---|---|---|---|
button |
r |
Class Details¶
- class Gnm.FontButton(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Gnm.font
picker widget.- Return type:
Creates a new
Gnm.font
picker widget.New in version 2.4.
- classmethod new_with_font(fontname)¶
- Parameters:
fontname (
str
) – Name ofGnm.font
to display inGnm.font
chooser dialog- Returns:
a new
Gnm.font
picker widget.- Return type:
Creates a new
Gnm.font
picker widget.New in version 2.4.
- get_font_name()¶
- Returns:
an internal copy of the
Gnm.font
name which must not be freed.- Return type:
Retrieves the name of the currently selected
Gnm.font
. This name includes style and size information as well. If you want to render something with theGnm.font
, use this string withPango.FontDescription.from_string
() . If you’re interested in peeking certain values (family name, style, size, weight) just query these properties from thePango.FontDescription
object.New in version 2.4.
- get_show_size()¶
- Returns:
whether the
Gnm.font
size will be shown in the label.- Return type:
Returns whether the
Gnm.font
size will be shown in the label.New in version 2.4.
- get_show_style()¶
- Returns:
whether the
Gnm.font
style will be shown in the label.- Return type:
Returns whether the name of the
Gnm.font
style will be shown in the label.New in version 2.4.
- get_title()¶
- Returns:
an internal copy of the title string which must not be freed.
- Return type:
Retrieves the title of the
Gnm.font
chooser dialog.New in version 2.4.
- get_use_font()¶
- Returns:
whether the selected
Gnm.font
is used in the label.- Return type:
Returns whether the selected
Gnm.font
is used in the label.New in version 2.4.
- get_use_size()¶
- Returns:
whether the selected size is used in the label.
- Return type:
Returns whether the selected size is used in the label.
New in version 2.4.
- set_font_name(fontname)¶
- Parameters:
fontname (
str
) – Name ofGnm.font
to display inGnm.font
chooser dialog- Returns:
- Return type:
Sets or updates the currently-displayed
Gnm.font
inGnm.font
picker dialog.New in version 2.4.
- set_show_size(show_size)¶
-
If show_size is
True
, theGnm.font
size will be displayed along with the name of the selectedGnm.font
.New in version 2.4.
- set_show_style(show_style)¶
-
If show_style is
True
, theGnm.font
style will be displayed along with name of the selectedGnm.font
.New in version 2.4.
- set_title(title)¶
- Parameters:
title (
str
) – a string containing theGnm.font
chooser dialog title
Sets the title for the
Gnm.font
chooser dialog.New in version 2.4.
- set_use_font(use_font)¶
-
If use_font is
True
, theGnm.font
name will be written using the selectedGnm.font
.New in version 2.4.
- set_use_size(use_size)¶
-
If use_size is
True
, theGnm.font
name will be written using the selected size.New in version 2.4.
- do_font_set() virtual¶
Signal Details¶
- Gnm.FontButton.signals.font_set(font_button)¶
- Signal Name:
font-set
- Flags:
- Parameters:
font_button (
Gnm.FontButton
) – The object which received the signal
The
::font-set
signal is emitted when the user selects aGnm.font
. When handling this signal, useGnm.FontButton.get_font_name
() to find out whichGnm.font
was just selected.Note that this signal is only emitted when the user changes the
Gnm.font
. If you need to react to programmaticGnm.font
changes as well, use the notify::font-name signal.New in version 2.4.
Property Details¶
- Gnm.FontButton.props.dialog_type¶
- Name:
dialog-type
- Type:
- Default Value:
<GType GtkFontChooser>
- Flags:
The type of the dialog
- Gnm.FontButton.props.font_name¶
-
The name of the currently selected
Gnm.font
.New in version 2.4.
- Gnm.FontButton.props.show_size¶
-
If this property is set to
True
, the selectedGnm.font
size will be shown in the label. For a more WYSIWYG way to show the selected size, see the::use-size
property.New in version 2.4.
- Gnm.FontButton.props.show_style¶
-
If this property is set to
True
, the name of the selectedGnm.font
style will be shown in the label. For a more WYSIWYG way to show the selected style, see the::use-font
property.New in version 2.4.
- Gnm.FontButton.props.title¶
-
The title of the
Gnm.font
chooser dialog.New in version 2.4.