Cppgui

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

This library is not part of Boost libraries

This library allows for rapid platform independent graphical user interface creation with C++. It uses generic programming and object-oriented design to deliver easy-to-use RAII objects representing the most variety of graphical interface resources.

It intents to provide a high level abstraction for graphical interfaces, allowing user-code to easy extend it, as well as deliver an interface that makes users create very easy-to-maintain code.

All code examples assume these lines are included before it:

#include <gui/gui.hpp>

#include <boost/bind.hpp>

using gui::weak_wnd;
using gui::wnd;
using gui::create;
using namespace gui::keywords;

The cppgui library has been designed with the following requirements:

  1. Seamless integration with STL
  2. RAII for GUI resources, e.g. windows
  3. User-code should be easy to write and read
  4. Writing platform agnostic code should be .... (synonym to normal)
  5. It should be easy to write and use platform-specific extensions
  6. Windows should look and feel appropriately on each platform it runs

There are several GUI libraries out there. But none meet all requirements outlined in the previous section.

wxWidgets is a strong candidate, but fails providing RAII and integration with STL.

Gtkmm provides only GTK+ look and feel, which is inappropriate in a variety of platforms.

Qt has the same problem as Gtkmm, it also has a dual license, meaning that proprietary code has to pay to use it.

In spite of all this, most of these libraries meet all these requirements when used by a implementation layer within a higher abstraction. GTK+ or gtkmm for example can be used conditionally where their look and feel are desirable, e.g. Linux, and yet provide all other requirements in a higher layer.

That's what CppGui tries to deliver.