[gtkmm] drawing area mouse events
- From: Milos Negovanovic <milosn xtra co nz>
- To: gtkmm-list gnome org
- Subject: [gtkmm] drawing area mouse events
- Date: Sat, 21 Dec 2002 20:51:21 +1300
Hello,
i am trying to capture mouse clicks on the DrawingArea and so far i
managed to get it working(partially) but X&Y seems never to change:
..............................................................
//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");
}
..................................................................
output is:
button: 1
x : 0
y : 0
button: 2
x : 0
y : 0
button: 3
x : 0
y : 0
Any suggestions? (GTKMM-2.0.2)
Regards
Milos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]