|
| WidgetPaintable (WidgetPaintable &&src) noexcept |
|
WidgetPaintable & | operator= (WidgetPaintable &&src) noexcept |
|
| ~WidgetPaintable () noexcept override |
|
GtkWidgetPaintable * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GtkWidgetPaintable * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GtkWidgetPaintable * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
|
Widget * | get_widget () |
| Returns the widget that is observed or nullptr if none.
|
|
const Widget * | get_widget () const |
| Returns the widget that is observed or nullptr if none.
|
|
void | set_widget (Widget &widget) |
| Sets the widget that should be observed.
|
|
void | unset_widget () |
|
Glib::PropertyProxy< Widget * > | property_widget () |
| The observed widget or nullptr if none.
|
|
Glib::PropertyProxy_ReadOnly< Widget * > | property_widget () const |
| The observed widget or nullptr if none.
|
|
| 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_with_c_callback (const Quark &key, void *data, GDestroyNotify notify) |
|
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.
|
|
const GdkPaintable * | gobj () const |
| Provides access to the underlying C GObject.
|
|
void | snapshot (const Glib::RefPtr< Gdk::Snapshot > & snapshot, double width, double height) |
| Snapshots the given paintable with the given width and height.
|
|
Glib::RefPtr< const Paintable > | get_current_image () const |
| Gets an immutable paintable for the current contents displayed by paintable.
|
|
Flags | get_flags () const |
| Get flags for the paintable.
|
|
int | get_intrinsic_width () const |
| Gets the preferred width the paintable would like to be displayed at.
|
|
int | get_intrinsic_height () const |
| Gets the preferred height the paintable would like to be displayed at.
|
|
double | get_intrinsic_aspect_ratio () const |
| Gets the preferred aspect ratio the paintable would like to be displayed at.
|
|
void | compute_concrete_size (double specified_width, double specified_height, double default_width, double default_height, double &concrete_width, double &concrete_height) const |
| Compute a concrete size for the Gdk::Paintable .
|
|
void | invalidate_contents () |
| Called by implementations of Gdk::Paintable to invalidate their contents.
|
|
void | invalidate_size () |
| Called by implementations of Gdk::Paintable to invalidate their size.
|
|
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: