C++ GUI Library


What is it?

Often it is useful for a program to display a graphical interface to the user (a GUI). There are many libraries that provide GUI facilities, but most of them are not particularly portable. Those that are tend not to utilize the more advanced features of C++. This library fills that niche - it is intended to be portable, and to use modern C++ techniques to ease development.

When should I use it?

You will probably be interested in the library under one or more of the following circumstances:

I like examples. Show me one.

This is a very simple "hello, world" type program:

#include <gui/gui.hpp>

using namespace gui;

int main(int argc, char* argv[])
    window w("Hello, world!");            // create a window
    button b("click me");                 // create a button belonging to w
    w.contain(b);                         // w contains b
    wait_for_signal(b.clicked_signal());  // wait until the button is clicked
}                                         // the window is automatically cleaned up


Future directions

In the short term, there are some more widgets to be added:


The author is David Turner, who can be reached at davidturner@sourceforge.net.