Logo Search packages:      
Sourcecode: ardour version File versions

const Widget * Gtk::Widget::get_ancestor ( GType  widget_type  )  const [inherited]

Gets the first ancestor of widget with type widget_type . For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first Gtk::Box that's an ancestor of widget . No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel Gtk::Window in the docs for get_toplevel().

Note that unlike is_ancestor(), get_ancestor() considers widget to be an ancestor of itself.

widget_type Ancestor type.
The ancestor widget, or 0 if not found.

Definition at line 5328 of file widget.cc.

References Gtk::Widget::gobj().

  return Glib::wrap(gtk_widget_get_ancestor(const_cast<GtkWidget*>(gobj()), widget_type));

Generated by  Doxygen 1.6.0   Back to index