adding button events to a gtkdrawingarea based gobject



Hi,

(forgive some imprecise names here, am writing from memory and in a
rush before work)

I'm adapting some code which uses gobject to create a widget. The code
previously used GtkWidget as the parent_class but I am trying to adapt
it to GtkDrawingArea as the parent_class.

However, the button_press_event code is no longer activated within the
custom widget now that it's a drawing area. How do I activate it?

I know with an ordinary GtkDrawingArea if I want to add
button-press-events to use gtk_add_events, but the code that uses the
custom widget shouldn't need to do this and besides the widget needs
to connect to it's own internal private implementation code anyway so
gtk_add_events is obviously wrong.

Can anyone provide some pointers please?

Thanks,
James.



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