Class
GtkWidgetPaintable
Description [src]
final class Gtk.WidgetPaintable : GObject.Object
implements Gdk.Paintable {
/* No available fields */
}
GtkWidgetPaintable
is a GdkPaintable
that displays the contents
of a widget.
GtkWidgetPaintable
will also take care of the widget not being in a
state where it can be drawn (like when it isn’t shown) and just draw
nothing or where it does not have a size (like when it is hidden) and
report no size in that case.
Of course, GtkWidgetPaintable
allows you to monitor widgets for size
changes by emitting the GdkPaintable::invalidate-size
signal
whenever the size of the widget changes as well as for visual changes by
emitting the GdkPaintable::invalidate-contents
signal whenever
the widget changes.
You can use a GtkWidgetPaintable
everywhere a GdkPaintable
is allowed,
including using it on a GtkPicture
(or one of its parents) that it was
set on itself via gtk_picture_set_paintable(). The paintable will take care
of recursion when this happens. If you do this however, ensure that the
GtkPicture:can-shrink
property is set to TRUE
or you might
end up with an infinitely growing widget.
Instance methods
Methods inherited from GdkPaintable (9)
gdk_paintable_compute_concrete_size
Compute a concrete size for the GdkPaintable
.
gdk_paintable_get_current_image
Gets an immutable paintable for the current contents displayed by paintable
.
gdk_paintable_get_flags
Get flags for the paintable.
gdk_paintable_get_intrinsic_aspect_ratio
Gets the preferred aspect ratio the paintable
would like to be displayed at.
gdk_paintable_get_intrinsic_height
Gets the preferred height the paintable
would like to be displayed at.
gdk_paintable_get_intrinsic_width
Gets the preferred width the paintable
would like to be displayed at.
gdk_paintable_invalidate_contents
Called by implementations of GdkPaintable
to invalidate their contents.
gdk_paintable_invalidate_size
Called by implementations of GdkPaintable
to invalidate their size.
gdk_paintable_snapshot
Snapshots the given paintable with the given width
and height
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Signals inherited from GdkPaintable (2)
GdkPaintable::invalidate-contents
Emitted when the contents of the paintable
change.
GdkPaintable::invalidate-size
Emitted when the intrinsic size of the paintable
changes.