[−][src]Trait gtk::ImageExt
Required methods
fn clear(&self)
Resets the image to be empty.
fn get_animation(&self) -> Option<PixbufAnimation>
Gets the gdk_pixbuf::PixbufAnimation
being displayed by the Image
.
The storage type of the image must be ImageType::Empty
or
ImageType::Animation
(see ImageExt::get_storage_type
).
The caller of this function does not own a reference to the
returned animation.
Returns
the displayed animation, or None
if
the image is empty
fn get_gicon(&self) -> (Icon, IconSize)
Gets the gio::Icon
and size being displayed by the Image
.
The storage type of the image must be ImageType::Empty
or
ImageType::Gicon
(see ImageExt::get_storage_type
).
The caller of this function does not own a reference to the
returned gio::Icon
.
gicon
place to store a
gio::Icon
, or None
size
place to store an icon size
(IconSize
), or None
fn get_pixbuf(&self) -> Option<Pixbuf>
Gets the gdk_pixbuf::Pixbuf
being displayed by the Image
.
The storage type of the image must be ImageType::Empty
or
ImageType::Pixbuf
(see ImageExt::get_storage_type
).
The caller of this function does not own a reference to the
returned pixbuf.
Returns
the displayed pixbuf, or None
if
the image is empty
fn get_pixel_size(&self) -> i32
fn get_storage_type(&self) -> ImageType
Gets the type of representation being used by the Image
to store image data. If the Image
has no image data,
the return value will be ImageType::Empty
.
Returns
image representation being used
fn set_from_animation<P: IsA<PixbufAnimation>>(&self, animation: &P)
Causes the Image
to display the given animation (or display
nothing, if you set the animation to None
).
animation
the gdk_pixbuf::PixbufAnimation
fn set_from_file<P: AsRef<Path>>(&self, filename: P)
fn set_from_gicon<P: IsA<Icon>>(&self, icon: &P, size: IconSize)
fn set_from_icon_name(&self, icon_name: Option<&str>, size: IconSize)
See Image::new_from_icon_name
for details.
icon_name
an icon name or None
size
an icon size (IconSize
)
fn set_from_pixbuf(&self, pixbuf: Option<&Pixbuf>)
fn set_from_resource(&self, resource_path: Option<&str>)
fn set_from_surface(&self, surface: Option<&Surface>)
fn set_pixel_size(&self, pixel_size: i32)
Sets the pixel size to use for named icons. If the pixel size is set
to a value != -1, it is used instead of the icon size set by
ImageExt::set_from_icon_name
.
pixel_size
the new pixel size
fn get_property_file(&self) -> Option<GString>
fn set_property_file(&self, file: Option<&str>)
fn set_property_gicon<P: IsA<Icon> + SetValueOptional>(&self, gicon: Option<&P>)
The GIcon displayed in the Image
. For themed icons,
If the icon theme is changed, the image will be updated
automatically.
fn get_property_icon_name(&self) -> Option<GString>
The name of the icon in the icon theme. If the icon theme is changed, the image will be updated automatically.
fn set_property_icon_name(&self, icon_name: Option<&str>)
The name of the icon in the icon theme. If the icon theme is changed, the image will be updated automatically.
fn get_property_icon_size(&self) -> i32
fn set_property_icon_size(&self, icon_size: i32)
fn set_property_pixbuf(&self, pixbuf: Option<&Pixbuf>)
fn get_property_pixbuf_animation(&self) -> Option<PixbufAnimation>
fn set_property_pixbuf_animation<P: IsA<PixbufAnimation> + SetValueOptional>(
&self,
pixbuf_animation: Option<&P>
)
&self,
pixbuf_animation: Option<&P>
)
fn get_property_resource(&self) -> Option<GString>
A path to a resource file to display.
fn set_property_resource(&self, resource: Option<&str>)
A path to a resource file to display.
fn get_property_surface(&self) -> Option<Surface>
fn set_property_surface(&self, surface: Option<&Surface>)
fn get_property_use_fallback(&self) -> bool
Whether the icon displayed in the Image
will use
standard icon names fallback. The value of this property
is only relevant for images of type ImageType::IconName
and ImageType::Gicon
.
fn set_property_use_fallback(&self, use_fallback: bool)
Whether the icon displayed in the Image
will use
standard icon names fallback. The value of this property
is only relevant for images of type ImageType::IconName
and ImageType::Gicon
.
fn connect_property_file_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_gicon_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_pixbuf_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_pixbuf_animation_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_pixel_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_resource_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_storage_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_surface_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_use_fallback_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Image>> ImageExt for O
[src]
fn clear(&self)
[src]
fn get_animation(&self) -> Option<PixbufAnimation>
[src]
fn get_gicon(&self) -> (Icon, IconSize)
[src]
fn get_pixbuf(&self) -> Option<Pixbuf>
[src]
fn get_pixel_size(&self) -> i32
[src]
fn get_storage_type(&self) -> ImageType
[src]
fn set_from_animation<P: IsA<PixbufAnimation>>(&self, animation: &P)
[src]
fn set_from_file<P: AsRef<Path>>(&self, filename: P)
[src]
fn set_from_gicon<P: IsA<Icon>>(&self, icon: &P, size: IconSize)
[src]
fn set_from_icon_name(&self, icon_name: Option<&str>, size: IconSize)
[src]
fn set_from_pixbuf(&self, pixbuf: Option<&Pixbuf>)
[src]
fn set_from_resource(&self, resource_path: Option<&str>)
[src]
fn set_from_surface(&self, surface: Option<&Surface>)
[src]
fn set_pixel_size(&self, pixel_size: i32)
[src]
fn get_property_file(&self) -> Option<GString>
[src]
fn set_property_file(&self, file: Option<&str>)
[src]
fn set_property_gicon<P: IsA<Icon> + SetValueOptional>(&self, gicon: Option<&P>)
[src]
fn get_property_icon_name(&self) -> Option<GString>
[src]
fn set_property_icon_name(&self, icon_name: Option<&str>)
[src]
fn get_property_icon_size(&self) -> i32
[src]
fn set_property_icon_size(&self, icon_size: i32)
[src]
fn set_property_pixbuf(&self, pixbuf: Option<&Pixbuf>)
[src]
fn get_property_pixbuf_animation(&self) -> Option<PixbufAnimation>
[src]
fn set_property_pixbuf_animation<P: IsA<PixbufAnimation> + SetValueOptional>(
&self,
pixbuf_animation: Option<&P>
)
[src]
&self,
pixbuf_animation: Option<&P>
)
fn get_property_resource(&self) -> Option<GString>
[src]
fn set_property_resource(&self, resource: Option<&str>)
[src]
fn get_property_surface(&self) -> Option<Surface>
[src]
fn set_property_surface(&self, surface: Option<&Surface>)
[src]
fn get_property_use_fallback(&self) -> bool
[src]
fn set_property_use_fallback(&self, use_fallback: bool)
[src]
fn connect_property_file_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_gicon_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_pixbuf_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_pixbuf_animation_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_pixel_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_resource_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_storage_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_surface_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_use_fallback_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId