XApp.IconChooserButton¶
- 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)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The default category. |
||
r/w/en |
The string representing the icon. |
||
r/w/en |
The preferred icon size. |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Fields¶
- Inherited:
Gtk.Button (6), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Class Details¶
- class XApp.IconChooserButton(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a newly created
XApp.IconChooserButton
- Return type:
Creates a new
XApp.IconChooserButton
and sets its icon to icon.
- classmethod new_with_size(icon_size)¶
- Parameters:
icon_size (
Gtk.IconSize
) – the size of icon to use in the button, orNone
to use the default value.- Returns:
a newly created
XApp.IconChooserButton
- Return type:
Creates a new
XApp.IconChooserButton
, and sets the sizes of the button image and the icons in the dialog. Note thatXApp.IconChooserButton.new_with_size
(None
,None
) is the same as callingXApp.IconChooserButton.new
().
- get_dialog()¶
- Returns:
- Return type:
Gets a reference to the icon chooser dialog for the
XApp.IconChooserButton
. This is useful for setting properties on the dialog.
- get_icon()¶
- Returns:
a string representing the icon. This may be an icon name or a file path.
- Return type:
Gets the icon from the
XApp.IconChooserButton
.
- set_default_category(category)¶
-
Sets the icon on the
XApp.IconChooserButton
.
- set_icon(icon)¶
- Parameters:
icon (
str
orNone
) – a string representing the icon to be set. This may be an icon name or a file path.
Sets the icon on the
XApp.IconChooserButton
.
- set_icon_size(icon_size)¶
- Parameters:
icon_size (
Gtk.IconSize
) – the size of icon to use in the button, or -1 to use the default value.
Sets the icon size used in the button.
Property Details¶
- XApp.IconChooserButton.props.category¶
- Name:
category
- Type:
- Default Value:
''
- Flags:
The category selected by default.
- XApp.IconChooserButton.props.icon¶
- Name:
icon
- Type:
- Default Value:
''
- Flags:
The preferred size to use when looking up icons. This only works with icon names. Additionally, there is no guarantee that a selected icon name will exist in a particular size.
- XApp.IconChooserButton.props.icon_size¶
- Name:
icon-size
- Type:
- Default Value:
- Flags:
The size to use when displaying the icon.