Re: [gtkmm] drawing area mouse events



On Sun, 2002-12-22 at 15:10, Milos Negovanovic wrote:
> Hi,
> 
> returns true ...  have typed in only important parts of the test code.
> 
> To make it clear:
> 
> I have a DrawingArea widget ... on it i "draw" Pixmap on which PangoLayout is being drawn.
> 
> Problem is: when i try to "catch" mouse press event (using the code
> supplied in original message), X&Y coordinates of the mouse press are
> always 0, while at the same time i am able to differentiate what mouse
> button was pressed.
> 
> Regards
> Milos
> 
> On Sun, 22 Dec 2002 10:52:15 -0500
> Paul Davis <paul linuxaudiosystems com> wrote:
> 
> > >//enable button press event
> > >add_events(Gdk::BUTTON_PRESS_MASK);
> > >
> > >//on_button_press implementation
> > >bool Test::on_button_press_event(GdkEventButton* event) {
> > >	printf("\nbutton: %i", event->button);
> > >	printf("\n   x : %i", event->x);
> > >	printf("\n   y : %i", event->y);
> > >	printf("\n");
> > 
> > and return what?
> > 
> > >}
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list


Remember that GdkEventButton x/y variables are gdouble!








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