Re: [gtkmm] Mouse position



>I know this is in the archiv but even with that I am stuck.
>Just want to print the mouse position in a drawing area.
>
>Here is what I did (using glade)
>
>	bool print2(GdkEventMotion *event)
>	{
>	  int mouse_x, mouse_y;
>	  mouse_x = event->x;	
>	  mouse_y = event->y;

1) event coordinates are doubles.
2) you can't connect a signal with a GdkEventMotion* as its argument
   to a signal which takes a different kind of event.

--p



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