|
Boost : |
From: Marco Oman (nimaca2001_at_[hidden])
Date: 2003-11-27 11:05:08
Hi all,
Most Gui toolkits have a rather deep hierarcy of widget objects
and one make new widget class by deriving from an existing class.
Object composition is never achieved by aggregation,
with the exception of the topmost level (a Form/Window is
usually an aggregate of several widgets)
Some time ago there has been some rumors on this mailing
list about combining functionalities of widgets by policy templates
(what ended up to the Notus project)
Now I ask if there is any C++ gui toolkit that makes heavy use of object
aggregation to build new widgets. For example one where a Button object is
build by combining something that has the behaviour of a button
(i.e. handles the click/event firing businness) with one that gives the
graphical appearance (ok, it is not so simple since there is not just
one appearance but there is some status information (is button pressed?)
that contributes to this). From what I know the one that gets
closer is Gtkmm, where it is possible to compose a Button with a bitmap
by inserting the bitmap in the Button (so building by composition),
while a lot of toolkits have the BitmapButton class.
Any link to a toolkit that makes extensive use of object composition
or any which are the reasons that make this difficult?
Marco
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk