TouchWidgets is my widget library that is animation- and touch-friendly.
I originally started TouchWidgets as a C++ project, as I based it
on my previous related C++ and C projects, but as of release 0.28,
TouchWidgets is an Objective C library.
The next phase of TouchWidgets development will be a move away from Objective C.
Release 0.26: TouchWidgetsX11 coded in C++ and based on X-Windows
Release 0.28: TouchWidgetsX11 coded in Objective C and based on X-Windows
Release 0.29: TouchWidgetsGL coded in Objective C and based on OpenGL
TouchWidgetsX11: For 2D-only devices
TouchWidgets 0.28 is the release that sits on top of X Windows.
It works but is basically unfinished.
TouchWidgetsGL: For 3D-capable laptops and desktops
TouchWidgets 0.30 is OpenGL-based, and therefore should be more portable
across platforms. This change was inspired by
GLUI, which I began using in 2008
for the multi-platform Maxilla VRML viewer project.
GLUI provides a way to create a user interface that only sits on top of OpenGL.
It doesn't require anything else. It provides buttons, text fields,
and an OpenGL subwindow.
My aim with TouchWidgets is to produce something similar to GLUI
that is original code not borrowing from it (GLUI's source code is
less than ideally organized anyway). While TouchWidgets began as
a C++ project I've since moved on to Objective C.
TouchWidgets uses the Model-View-Controller paradigm, where the
model is your data, the views are representations of your data,
and the controllers are code that manages views. Responses to inputs are performed
by both views and controllers.
The class hierarchy is as follows, using namespace TouchWidgets:
Adding styles to widgets can be done programmatically
or it can be done using an external style file. This second method
is loosely based the idea of CSS but is far more rudimentary.
A view or container object can take styles of four levels:
Class e.g. ImageView
Style class name e.g. screen2labels
Instance name e.g. label3
Tap to embiggen.
Running on OS/X
The staticly-linked executable that produced this was about 240kB.