|
| | WidgetPaintable (WidgetPaintable&& src) noexcept |
| |
| WidgetPaintable& | operator= (WidgetPaintable&& src) noexcept |
| |
| | ~WidgetPaintable () noexcept override |
| |
| GtkWidgetPaintable* | gobj () |
| | Provides access to the underlying C GObject. More...
|
| |
| const GtkWidgetPaintable* | gobj () const |
| | Provides access to the underlying C GObject. More...
|
| |
| GtkWidgetPaintable* | gobj_copy () |
| | Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
|
| |
| Widget* | get_widget () |
| | Returns the widget that is observed or nullptr if none. More...
|
| |
| const Widget* | get_widget () const |
| | Returns the widget that is observed or nullptr if none. More...
|
| |
| void | set_widget (Widget& widget) |
| | Sets the widget that should be observed. More...
|
| |
| void | unset_widget () |
| |
| Glib::PropertyProxy< Widget* > | property_widget () |
| | The observed widget or nullptr if none. More...
|
| |
| Glib::PropertyProxy_ReadOnly< Widget* > | property_widget () const |
| | The observed widget or nullptr if none. More...
|
| |
| | Object (const Object &)=delete |
| |
| Object & | operator= (const Object &)=delete |
| |
| | Object (Object &&src) noexcept |
| |
| Object & | operator= (Object &&src) noexcept |
| |
| void * | get_data (const QueryQuark &key) |
| |
| void | set_data (const Quark &key, void *data) |
| |
| void | set_data (const Quark &key, void *data, DestroyNotify notify) |
| |
| void | remove_data (const QueryQuark &quark) |
| |
| void * | steal_data (const QueryQuark &quark) |
| |
| Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
| |
| | ObjectBase (const ObjectBase &)=delete |
| |
| ObjectBase & | operator= (const ObjectBase &)=delete |
| |
| void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
| |
| void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
| |
| void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
| |
| void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
| |
| PropertyType | get_property (const Glib::ustring &property_name) const |
| |
| sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
| |
| sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
| |
| void | freeze_notify () |
| |
| void | thaw_notify () |
| |
| virtual void | reference () const |
| |
| virtual void | unreference () const |
| |
| GObject * | gobj () |
| |
| const GObject * | gobj () const |
| |
| GObject * | gobj_copy () const |
| |
| | trackable () noexcept |
| |
| | trackable (const trackable &src) noexcept |
| |
| | trackable (trackable &&src) noexcept |
| |
| | ~trackable () |
| |
| void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
| |
| void | notify_callbacks () |
| |
| trackable & | operator= (const trackable &src) |
| |
| trackable & | operator= (trackable &&src) noexcept |
| |
| void | remove_destroy_notify_callback (notifiable *data) const |
| |
| | Paintable (Paintable&& src) noexcept |
| |
| Paintable& | operator= (Paintable&& src) noexcept |
| |
| | ~Paintable () noexcept override |
| |
| GdkPaintable* | gobj () |
| | Provides access to the underlying C GObject. More...
|
| |
| const GdkPaintable* | gobj () const |
| | Provides access to the underlying C GObject. More...
|
| |
| void | snapshot (const Glib::RefPtr< Gdk::Snapshot >& snapshot, double width, double height) |
| | Snapshots the given paintable with the given width and height at the current (0,0) offset of the snapshot. More...
|
| |
| Glib::RefPtr< const Paintable > | get_current_image () const |
| | Gets an immutable paintable for the current contents displayed by paintable. More...
|
| |
| Flags | get_flags () const |
| | Get flags for the paintable. More...
|
| |
| int | get_intrinsic_width () const |
| | Gets the preferred width the paintable would like to be displayed at. More...
|
| |
| int | get_intrinsic_height () const |
| | Gets the preferred height the paintable would like to be displayed at. More...
|
| |
| double | get_intrinsic_aspect_ratio () const |
| | Gets the preferred aspect ratio the paintable would like to be displayed at. More...
|
| |
| void | compute_concrete_size (double specified_width, double specified_height, double default_width, double default_height, double& concrete_width, double& concrete_height) const |
| | Applies the sizing algorithm outlined in https://drafts.csswg.org/css-images-3/#default-sizing to the given paintable. More...
|
| |
| void | invalidate_contents () |
| | Called by implementations of Gdk::Paintable to invalidate their contents. More...
|
| |
| void | invalidate_size () |
| | Called by implementations of Gdk::Paintable to invalidate their size. More...
|
| |
| Glib::SignalProxy< void()> | signal_invalidate_contents () |
| |
| Glib::SignalProxy< void()> | signal_invalidate_size () |
| |
| | Interface () |
| |
| | Interface (Interface &&src) noexcept |
| |
| Interface & | operator= (Interface &&src) noexcept |
| |
| | Interface (const Glib::Interface_Class &interface_class) |
| |
| | Interface (GObject *castitem) |
| |
| | ~Interface () noexcept override |
| |
| | Interface (const Interface &)=delete |
| |
| Interface & | operator= (const Interface &)=delete |
| |
| GObject * | gobj () |
| |
| const GObject * | gobj () const |
| |
Drawing a widget elsewhere.
Gtk::WidgetPaintable is an implementation of the Gdk::Paintable interface that allows displaying the contents of a Gtk::Widget.
WidgetPaintable 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, WidgetPaintable allows you to monitor widgets for size changes by emitting Gdk::Paintable::signal_invalidate_size() whenever the size of the widget changes as well as for visual changes by emitting Gdk::Paintable::signal_invalidate_contents() whenever the widget changes.
You can of course use a Gtk::WidgetPaintable everywhere a Gdk::Paintable is allowed, including using it on a Gtk::Picture (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 Gtk::Picture::property_can_shrink() is set to true or you might end up with an infinitely growing widget.
- Since gtkmm 3.94: