wt - a C++ widget toolkit using SDL, SDL_ttf, and sigc++
The library is licensed under the LGPL (see COPYING.LIB). The configure
scripts are GPL, except otherwise stated (see COPYING for the GPL)
History:
--------
The libwt is based on the library 'libwftk' known as the Worldforge toolkit.
which was based on the library 'libuta', by Karsten O. Laux. libwftk began
as a fork of libuta 0.4.4.
libwt contains almost no code from the original libwftk, with region.* being
the exception.
See AUTHORS for the people involved.
Depends:
--------
libwt depends on the following libraries:
libsigc (for signals and slots)
libSDL_ttf (requires freetype)
libSDL_image (requires libpng, libz)
libSDL_gfx (for rotozoom)
libSDL_mixer (optional, requires smpeg for mp3 support)
libSDL_Net (via included Net2 for network access)
In a future version we will offer smpeg or ffmpeg wrappers for multimedia playback
Note that smpeg is not available on modern (8.0 and later) versions of Red
Hat Linux.
If the SDL_mixer library is present, wt uses it for sound and music
playback. SDL_mixer's site is http://www.libsdl.org/projects/SDL_mixer/ MP3
and OGG support are available through SDL_mixer.
Rationale & Features:
---------------------
It all began when I was looking for a SDL toolkit. There were lots of them.
The main problem for me was that there was no layout manager. The only
toolkits that had one, were libwftk and Agar. Agar is C based and I am not
so hot about doing widgets in C, so I turned to libwftk.
libwftk was ok. It had a reasonable API but it had also a fatal problem. It
was extremely slow. The reason of the perceived slowness was excessive
redrawing. libwftk didn't optimize redraws in order to avoid redundant repaints.
Actually in order to do that a fully asynchronous event system was required.
So I implemented one, and a layout manager and a Qt like API to bind all
this together. Why a Qt API you may ask? Well, for starters Qt has a really
nice API, very close to the libwftk one, so it was not big departure for me.
Secondly, I already have a hands on experience with the Qt API and I find it
coherent and internally consistent.
So libwt offers the following classes
-signal and slots made right (in the C++ way via libsigc++-2.0)<br>
-timer
-datetime
-layout layout manager generic class
-boxlayout vertical or horizontal layout
-gridlayout table layout
-cascadelayout
-spacer to force space between
managed widgets
-widget that you can subclass from
-frame a widget with a frame
-window
-label
-button
-pushbutton
-togglebutton
-box a widget with a box layout
-grid a widget with a grid layout
-cascade a widget with a cascade layout
-painter to draw stuff (lines and
rects) in a widget
-application takes over the event loop
-audio for playing and mixing sounds
-font for ttf support
-generic SDL wrapper classes
-wvar a framework to help you avoid
get/set methods for simple variables
-transparency all widget can be transparent
Future:
-------
Future work should be around the following areas:
-python bindings (via swig)
-multimedia playback (via smpeg or ffmpeg)
-more graphics primitives i.e. circles, ellipses, brushes etc.
-OpenGL
-more widgets
-more platforms (win32, freebsd)
Build:
------
libwt demos and tests are in the subdirectory 'tests' and are not built by
default - to build them, run 'make tests'.
Documentation comes in two flavors. User guide is built with doxygen if it
exists if you run 'make doc' in toplevel directory. However if you want
programmer's guide you need to 'cd doc; make pguide'. The resulting
subdirectories are doc/uguide and doc/pguide respectively.
Enjoy!
-Vassilis Virvilis <vasvir2@fastmail.fm>