#include #include #include #include #include #include #include void on_button_clicked() { std::cout << "Bonjour " << std::endl; } int main(int argc, char **argv) { Gtk::Main app(argc, argv); Gtk::Window w; Gtk::VBox vb; Gtk::Label l; vb.pack_start(l); l.show(); Gtk::Entry e; vb.pack_start(e); e.show(); Gtk::Button b("Bonjour !"); b.signal_clicked().connect(SigC::slot(&on_button_clicked)); vb.pack_start(b); b.show(); w.add(vb); vb.show(); app.run(w); return 0; }