button press events missing on gnome canvas items
- From: Jamie Wilkinson <jaq spacepants org>
- To: gnomemm-list gnome org
- Subject: button press events missing on gnome canvas items
- Date: Tue, 18 Jan 2005 14:22:06 +1100
Is there a trick to it? I reported a bug at
http://bugzilla.gnome.org/show_bug.cgi?id=162326 but I'm sure it can't have
been overlooked.
My code looks like this:
View inherits from Bakery::View and Gnome::Canvas::Canvas
Node inherits from Gnome::Canvas::Group and contains a pixbuf and text
I can add and remove Nodes from the View with no problems, they display as
expected.
The signal handler in Node, Node::on_event, receives all the simulated
events from the Canvas, bar button press events. This behaviour surprised
me and for a while I hacked around it by moving the button press handler
into the canvas itself; but as Canvas::get_item_at() returns an Item*, the
only way to call the right methods in Node is to dynamic_cast it, which
feels dirty :-)
So I'm wondering if there's a trick to it. The only other post I can find
about this problem is
http://mail.gnome.org/archives/gtkmm-list/2004-July/msg00083.html but the
recommended workaround is impossible as I described in the bug report.
So, ideas? Is it impossible for a Group to receive button press events,
even though it gets button release, motion notify, enter, exit and even
focus change events? If so should I instead be binding my handler to the
pixbuf and text's own signals?
Thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]