XApp.IconChooserButton

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Activatable Gtk.Activatable GObject.GInterface->Gtk.Activatable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Button Gtk.Button Gtk.Actionable->Gtk.Button Gtk.Activatable->Gtk.Button Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Button Gtk.Buildable->Gtk.Widget XApp.IconChooserButton XApp.IconChooserButton Gtk.Button->XApp.IconChooserButton Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget->Gtk.Container

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

new ()

class

new_with_size (icon_size)

get_dialog ()

get_icon ()

set_default_category (category)

set_icon (icon)

set_icon_size (icon_size)

Virtual Methods

Inherited:

Gtk.Button (6), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Actionable (4), Gtk.Activatable (2)

Properties

Inherited:

Gtk.Button (9), Gtk.Container (3), Gtk.Widget (39), Gtk.Actionable (2), Gtk.Activatable (2)

Name

Type

Flags

Short Description

category

str

r/w/en

The default category.

icon

str

r/w/en

The string representing the icon.

icon-size

Gtk.IconSize

r/w/en

The preferred icon size.

Style Properties

Inherited:

Gtk.Button (7), Gtk.Widget (17)

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:

Gtk.Button

Abstract:

No

Structure:

XApp.IconChooserButtonClass

classmethod new()
Returns:

a newly created XApp.IconChooserButton

Return type:

XApp.IconChooserButton

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, or None to use the default value.

Returns:

a newly created XApp.IconChooserButton

Return type:

XApp.IconChooserButton

Creates a new XApp.IconChooserButton, and sets the sizes of the button image and the icons in the dialog. Note that XApp.IconChooserButton.new_with_size (None, None) is the same as calling XApp.IconChooserButton.new ().

get_dialog()
Returns:

the XApp.IconChooserDialog

Return type:

XApp.IconChooserDialog

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:

str

Gets the icon from the XApp.IconChooserButton.

set_default_category(category)
Parameters:

category (str or None) – a string representing the category selected by default.

Sets the icon on the XApp.IconChooserButton.

set_icon(icon)
Parameters:

icon (str or None) – 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:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The category selected by default.

XApp.IconChooserButton.props.icon
Name:

icon

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

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:

Gtk.IconSize

Default Value:

Gtk.IconSize.DND

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The size to use when displaying the icon.