Re: [gtkmm] Get parent window of any Widget for use in Dialog constructor



On Thu, 2004-06-03 at 20:00 +0200, Christian Neumann wrote:
> Hi,
> I need to get a reference or pointer to the root window of some
> Gtk::Widget to create a transient Gtk::Dialog.
> Gtk::Widget::get_parent_window() or Gtk::Widget::get_root_window() won't
> work because they return a Glib::RefPtr (which I can't dereference if I
> understood the docs correctly). I can't use *this because the dialog
> creating function is not member of the root window.
> The situation:
> The Widget which creates the dialog is member of some container, which
> itself is member of some other container [...]
> Is there a convenient solution to this problem (other then passing the
> root window pointer to each underlying widget?)?

I think you want Gtk::Widget::get_toplevel().

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]