A gnome canvas question...



Hello,

     I have a programming question about the gnome canvas. I've
a good knowledge of the tk canvas widget and what is possible to
do with it, so I wonder how I can make the gnome canvas events
on gnome canvas background behaves like events on canvas items
or groups. The current behavior is that signal handler on the canvas
overrides events management on canvas items. How can I deal with
this problem ?

To initialize events handler for the canvas widget, I use :

  gtk_signal_connect (GTK_OBJECT(canvas),"event",
            GTK_SIGNAL_FUNC(diagram_event), (void*)this);

To initialize events handler for canvas items, I use :

  gtk_signal_connect (GTK_OBJECT(canvasItem),"event",
        (GtkSignalFunc)event_handler, (void*)this);

I tried to use the gtk_signal_connect_after to change the order
of event handlers but it doesn't solve the problem.

The workaround I can use is to create a big rectangular (lower) item as
the canvas background and then I won't have anymore events
handler mismatch, but it's only a workaround :( Any one has
an idea ?

Thanks for all,
David.


--
// David CROSSON
// mailto:david.crosson@wanadoo.fr
// mailto:david.crosson@vx.cit.alcatel.fr
// http://perso.wanadoo.fr/david-crosson-w3



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