Introduction
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:
- You don't plan to target a specific platform.
- You don't want to micro-manage the appearance of your program.
- You don't want to spend hours learning a new API.
- You're a C++ fan, and don't like the design of existing libraries.
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
Documentation
Future directions
In the short term, there are some more widgets to be added:
- List (almost done)
- Selection
- Menu
- Tabset
- Divider
- Radio button
- Checkbox
Author
The author is David Turner, who can be reached at davidturner@sourceforge.net.