Gtk::Window and signal_button_release_event
- From: Christian Schaubschlaeger <cs gup uni-linz ac at>
- To: gtkmm-list gnome org
- Subject: Gtk::Window and signal_button_release_event
- Date: Tue, 12 May 2009 16:36:15 +0200
Hello List,
why does the following not work? on_window_clicked is not called
when I click into the window.
Thanks and best regards
Christian
#include <iostream>
#include <gtkmm.h>
bool on_window_clicked(GdkEventButton *b)
{
std::cout << "Window clicked\n";
return true;
}
int main(int argc, char **argv)
{
Gtk::Window *w;
Gtk::Main gtk_main(argc,argv);
w = new Gtk::Window();
w->show();
w->signal_button_release_event().connect(sigc::ptr_fun(on_window_clicked));
gtk_main.run();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]