:right-sidebar: True WidgetPaintable =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: WidgetPaintable(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gdk.Paintable` :Constructors: :: WidgetPaintable(**properties) new(widget:Gtk.Widget=None) -> Gtk.WidgetPaintable Constructors ------------ .. rst-class:: interim-class .. class:: WidgetPaintable :no-index: .. classmethod:: new(widget: ~gi.repository.Gtk.Widget | None = None) -> ~gi.repository.Gtk.WidgetPaintable Creates a new widget paintable observing the given widget. :param widget: a ``GtkWidget`` Methods ------- .. rst-class:: interim-class .. class:: WidgetPaintable :no-index: .. method:: get_widget() -> ~gi.repository.Gtk.Widget | None Returns the widget that is observed or :const:`None` if none. .. method:: set_widget(widget: ~gi.repository.Gtk.Widget | None = None) -> None Sets the widget that should be observed. :param widget: the widget to observe Properties ---------- .. rst-class:: interim-class .. class:: WidgetPaintable :no-index: .. attribute:: props.widget :type: ~gi.repository.Gtk.Widget The observed widget or :const:`None` if none.