Libxfce4panel.PanelImage¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Pixbuf image |
||
r/w |
Pixel size of the image |
||
r/w |
Icon or filename |
Style Properties¶
- Inherited:
Name |
Type |
Default |
Flags |
Short Description |
---|---|---|---|---|
|
r/w |
Force the image to fix to GtkIconSizes |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Libxfce4panel.PanelImage(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
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
orNone
) – aGdkPixbuf.Pixbuf
, orNone
.- Returns:
a newly created
Libxfce4panel.PanelImage
widget.- Return type:
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, theLibxfce4panel.PanelImage
will take care of that based on the allocation of the widget or the size set withLibxfce4panel.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
orNone
) – source of the image. This can be an absolute path or an icon-name orNone
.- Returns:
a newly created
Libxfce4panel.PanelImage
widget.- Return type:
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
() andLibxfce4panel.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:
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 theGtk.Image
storage type instead.
- set_from_pixbuf(pixbuf)¶
- Parameters:
pixbuf (
GdkPixbuf.Pixbuf
orNone
) – aGdkPixbuf.Pixbuf
, orNone
.
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
orNone
) – source of the image. This can be an absolute path or an icon-name orNone
.
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 theGtk.Image
storage type instead.
Property Details¶
- Libxfce4panel.PanelImage.props.pixbuf¶
- Name:
pixbuf
- Type:
- Default Value:
- Flags:
Pixbuf image
- Libxfce4panel.PanelImage.props.size¶
-
Pixel size of the image
Deprecated since version 4.18.1: Use
Gtk.Image
:pixel-size
instead.