Re: Goocanvas::Widget - embedded widget events
- From: Murray Cumming <murrayc murrayc com>
- To: Damon Chaplin <damon karuna eclipse co uk>
- Cc: goocanvas-list gnome org
- Subject: Re: Goocanvas::Widget - embedded widget events
- Date: Tue, 11 Nov 2008 10:46:24 +0100
On Mon, 2008-11-10 at 23:36 +0000, Damon Chaplin wrote:
> On Mon, 2008-11-10 at 23:11 +0100, Robert Gruendler wrote:
> > Hi all,
> >
> > As i've found out in the old mailing list, events like button_press_event
> > won't be dispatched by the Goocanvas::Widget itself.
> >
> > i'm trying to handle events dispatched by the embedded widgets in a
> > Goocanvas::Widget, but my callback function doesn't get called:
> >
> >
> > Gtk::Button widget;
> > Glib::RefPtr<Goocanvas::Widget> wid;
> > wid = Goocanvas::Widget::create(widget,10,10,40,40);
> > _canvas->get_root_item()->add_child(wid);
> >
> > widget.signal_button_press_event().connect(sigc::mem_fun(*this,
> > &MyWindow::on_widget_button_press_event));
> >
> >
> > Has anyone a hint what i'm missing out here ?
>
> Maybe the button handler is being called first, and returns TRUE so the
> signal emission is stopped.
Robert, you should try connecting _before_, as with X event signals in
general. See "Signal handler sequence" here:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-xeventsignals.html
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]