Libxfce4panel.PanelImage

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface 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.Buildable->Gtk.Widget Libxfce4panel.PanelImage Libxfce4panel.PanelImage Gtk.Widget->Libxfce4panel.PanelImage

Subclasses:

None

Methods

Inherited:

Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

class

new_from_pixbuf (pixbuf)

class

new_from_source (source)

clear ()

get_size ()

set_from_pixbuf (pixbuf)

set_from_source (source)

set_size (size)

Virtual Methods

Inherited:

Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Widget (39)

Name

Type

Flags

Short Description

pixbuf

GdkPixbuf.Pixbuf

r/w

Pixbuf image deprecated

size

int

r/w

Pixel size of the image deprecated

source

str

r/w

Icon or filename deprecated

Style Properties

Inherited:

Gtk.Widget (17)

Name

Type

Default

Flags

Short Description

force-gtk-icon-sizes

bool

False

r/w

Force the image to fix to GtkIconSizes

Signals

Inherited:

Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Widget (69), GObject.Object (1)

Class Details

class Libxfce4panel.PanelImage(**kwargs)
Bases:

Gtk.Widget

Abstract:

No

Structure:

Libxfce4panel.PanelImageClass

This struct contain private data only and should be accessed by the functions below.

classmethod new()
Returns:

a newly created Libxfce4panel.PanelImage widget.

Return type:

Gtk.Widget

Creates a new empty Libxfce4panel.PanelImage widget.

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.new() instead.

classmethod new_from_pixbuf(pixbuf)
Parameters:

pixbuf (GdkPixbuf.Pixbuf or None) – a GdkPixbuf.Pixbuf, or None.

Returns:

a newly created Libxfce4panel.PanelImage widget.

Return type:

Gtk.Widget

Creates a new Libxfce4panel.PanelImage displaying pixbuf. Libxfce4panel.PanelImage will add its own reference rather than adopting yours. You don’t need to scale the pixbuf to the correct size, the Libxfce4panel.PanelImage will take care of that based on the allocation of the widget or the size set with Libxfce4panel.PanelImage.set_size().

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.new_from_pixbuf() instead.

classmethod new_from_source(source)
Parameters:

source (str or None) – source of the image. This can be an absolute path or an icon-name or None.

Returns:

a newly created Libxfce4panel.PanelImage widget.

Return type:

Gtk.Widget

Creates a new Libxfce4panel.PanelImage displaying source. Libxfce4panel.PanelImage will detect if source points to an absolute file or it and icon-name. For icon-names it will also look for files in the pixbuf folder or strip the extensions, which makes it suitable for usage with icon keys in .desktop files.

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.new() and Libxfce4panel.panel_set_image_from_source() instead.

clear()

Resets the image to be empty.

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.clear() instead.

get_size()
Returns:

icon size in pixels of the image or -1.

Return type:

int

The size of the image, set by Libxfce4panel.PanelImage.set_size() or -1 if no size is forced and the image is scaled to the allocation size.

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.get_pixel_size() or get the size from the Gtk.Image storage type instead.

set_from_pixbuf(pixbuf)
Parameters:

pixbuf (GdkPixbuf.Pixbuf or None) – a GdkPixbuf.Pixbuf, or None.

See Libxfce4panel.PanelImage.new_from_pixbuf() for details.

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.set_from_pixbuf().

set_from_source(source)
Parameters:

source (str or None) – source of the image. This can be an absolute path or an icon-name or None.

See Libxfce4panel.PanelImage.new_from_source() for details.

New in version 4.8.

Deprecated since version 4.18.1: Use Libxfce4panel.panel_set_image_from_source() instead.

set_size(size)
Parameters:

size (int) – a new size in pixels.

This will force an image size, instead of looking at the allocation size, see introduction for more details. You can set a size of -1 to turn this off.

New in version 4.8.

Deprecated since version 4.18.1: Use Gtk.Image.set_pixel_size() or set the size from the Gtk.Image storage type instead.

Property Details

Libxfce4panel.PanelImage.props.pixbuf
Name:

pixbuf

Type:

GdkPixbuf.Pixbuf

Default Value:

None

Flags:

READABLE, WRITABLE

Pixbuf image

Deprecated since version 4.18.1: Use Gtk.Image :pixbuf instead.

Libxfce4panel.PanelImage.props.size
Name:

size

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

Pixel size of the image

Deprecated since version 4.18.1: Use Gtk.Image :pixel-size instead.

Libxfce4panel.PanelImage.props.source
Name:

source

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Icon or filename

Deprecated since version 4.18.1: Use Gtk.Image :storage-type instead.