Re: Gtk+3 general functions

If you connect to the Gtk::Widget signal_event and have enabled a button_press_mask you should get what you want. See (from the ref docs:

Glib::SignalProxy1< bool,GdkEventButton* > Gtk::Widget::signal_button_press_event (

The signal_button_press_event() signal will be emitted when a button (typically from a mouse) is pressed.

To receive this signal, the Gdk::Window associated to the widget needs to enable the Gdk::BUTTON_PRESS_MASK mask.

Assuming, of course, that you're looking for a mouse button press (although I don't know of anything else that will occur on a stage location that your program won't already know the coordinates of).

On 01/02/14 22:48, Juan Rafael García Blanco wrote:

I’m in need of using the equivalent to gtk_get_current_event(), inside a signal handler, so I can get where 
exactly the event occurred. I’ve search for it in gtkmm for a while but I found nothing. Isn’t it wrapped for 
a reason? Does other method exist to get the point (x,y) where the event occurred?

Thank you very much.

gtkmm-list mailing list
gtkmm-list gnome org

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