Receiving button press events
- From: Philipp Klaus Krause <pkk spth de>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Receiving button press events
- Date: Tue, 04 Sep 2007 11:26:43 +0200
I want to receive button press evvents from a widget, so far it doesn't
work though.
in main.c:
Gtk::Image *paint_tileset = 0;
refXml->get_widget("paint_tileset", paint_tileset);
paint_tileset->add_events(Gdk::BUTTON_PRESS_MASK);
paint_tileset->signal_button_press_event().connect(sigc::mem_fun(display,
&Display::set_paint_tile));
kit.run(*main_win);
in display.cc:
bool Display::set_paint_tile(GdkEventButton *ev)
{
std::cout << "Tile chosen";
std::cout.flush();
return(true);
}
However Display::set_paint_tile() is not called when I click on
paint_tileset.
Philipp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]