From: Alan Gutierrez (alan-boost_at_[hidden])
Date: 2004-12-24 02:16:40
The OS Direction
I'm looking over wxWindows. I'd like to avoid this sort of
thing, yet another wrapper library.
They seem to have done as Andy Little and Reece Dunn have
cautioned against, and started with a particular OS as a model,
rather than starting with a model.
As I look closer, or stand back and squint, the object heirarchy
appears to be a usual-suspects collection of GUI objects, wxPen,
wxWindow, wxFocusEvent, et al. Oh, and wxObject. *sigh*
Perhaps they didn't start with an particular OS, but they
certialy started at the OS and worked their way up, rather than
starting at application and working their way back.
It is vital to address the design of the primitives.
It is a mistake to think of a GUI as merely a collection of
After thirty years, the GUI has begun to develop a set of
canonical forms. Any new GUI library should recognize these
forms, and cater to the needs of the developer who must
- The Dialog
A collection of widgets, gathered together in a window that
usually of a fixed size, usually presented to the user in a
modal state. Hence the term dialog, indicating a back and forth
between the user and the application.
Most dialog systems include a means to specify the layout of a
dialog from a resource file.
Dialog applications include setting preferences, choosing files,
notification of errors, specification of search criteria.
- The Grid
A collection of widgets, arranged in scrollable rows and
columns, in a resizable window, where widgets can be added or
removed as the inserts or deletes data.
Newer windowing libraries such as Delphi's VCL or Swing provide
a grid library, for a time it seemed to be a defining
characteristic of a new entry into the GUI arena.
Grid heavy applications include spreadsheets, databases, and
- The Document
Text with a flow direction, broken by whitespace and
hyphenation, along with imagry, and object, grouped by blocks,
gathered into columns and tables.
Most recent application frameworks provide support for the
document model by making a component of a web browser, or
providing a rich text edit control.
Document applications include web browsering, word processing,
- The Canvas
A blank surface onto which shapes are input, usually through
manipulation of the mouse, as in drag and drop, and grabbing
handles, or else output but still responsive to mouse clicks.
There are many shape libraries available, but this is generally
the sort of thing that gets written time and again.
Canvas applications include illustration, diagraming, charting.
- An Example
A contemporary personal finance program uses The Dialog to set
preferences and to open files, The Grid to display a check
register for editing, The Document to display a nicely formatted
balance sheet and a hyperlinked start page, and The Canvas to
render a pie chart of spending by category.
What did I miss?
The Application Direction
I'm representing this taxonomy since in discussion I'm finding
that there are different needs for different problems, and we
should know which problems we are addressing.
Hit-testing a widget in a dialog or a grid ought to be a trivial
operation, hit-testing a line of text in a document somewhat
more difficult, and hit-testing a partially exposed polygon on a
canvas a real challenge.
One should not pay for what one does not need.
Validation is a concern for dialogs and grids, but it isn't a
concern of a bar chart.
Even if when developing a full-blown drawing application, one
should not have to pick up the pen and draw out each tool-tip,
or call out, when those could be rendered as little documents.
-- Alan Gutierrez - alan_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk