gltk
0.3
a C++ widget library built on GLUT
|
Simple application with a button.
/* This example parallels the "Hello World in gtkmm": http://developer.gnome.org/gtkmm-tutorial/unstable/sec-helloworld.html.en */ #include <gltk.hh> #include <iostream> using namespace gltk; class HelloWorld : public Window { protected: void on_button_clicked() { std::cout << "Hello World" << std::endl; } Button btn; public: HelloWorld() : btn("Hello World") { set_border_width(10); btn.signal_clicked() .connect(sigc::mem_fun(this, & HelloWorld::on_button_clicked)); add(btn); btn.show(); } virtual ~HelloWorld() {} }; int main(int argc, char *argv[]) { Main kit(argc, argv); HelloWorld helloworld; Main::run(helloworld); return 0; }