From: Brock Peabody (brock.peabody_at_[hidden])
Date: 2003-07-28 08:15:31
I'm using a library I developed here at work which I developed with the
1) hiding MFC
2) eliminating the repetitious and tedious nature of positioning and
manipulating various controls.
My library is far from boost ready (as it depends on other libraries of
mine and is only implemented for windows). It is greatly influenced by
The first phase of this was for the library to be able to position
boost::function<void,CRect> positioner =
row( edit_1, combo_1, column( edit_2, some_static_text));
Where positioner would position the controls inside the rectangle passed
to it. A control is positioned based on the fact that different types
of controls have preferred minimum and maximum (or no maximum) sizes. A
static text item, for instance has minimum and maximum equal to the
amount of space required to display its text, while a single line edit
box requires a fixed amount of vertical space, but could grow to any
Next, I changed the library so the returned object could automate other
tasks besides position such as the two-phase construction create call (a
windows anomaly I hope) and setting various callbacks (such as change
At this point a few tedious tasks are maintained, but the programmer
still has to maintain (or own) the various gui objects. It was easiest
to get rid of managing static text objects since there is no data to
exchange with them:
gui_manager gui =
row( edit_1, combo_1, column( edit_2, "some static text"));
Completely getting rid of the static controls was pretty exciting. In
the above code a static text GUI object with the text "some static text"
is created automatically.
It wasn't a great leap to progress further to:
gui_manager<employee> gui =
column( row("ssn: ", masked_edit<ssn_mask>(&employee::ssn),
column("name: ", edit(&employee::name)));
employee e = get_employee();
Does this seem like the right direction to take? At the very least it
has reduced screens that took over 500 lines of code for us down to
[mailto:boost-bounces_at_[hidden]] On Behalf Of E. Gladyshev
Sent: Friday, July 25, 2003 12:11 PM
Subject: [boost] GUI/GDI template library
I was thinking about designing a GUI/GDI template
The main ideas are:
1. Create a portable template abstraction for standard
GUI/GDI elements and dialog boxes.
2. Design an "iterator-like" interface.
3. The most important goal is design a natural
connection between STL containers and GUI elements, so
that STL data can be easily presented in the GUI
template < typename IT, typename PhysicalGuiLayer >
template < typename Filter, typename Format >
void push_back( IT& FirstIt,
Format& format )
for( IT it = FirstIt; it < EndIt; ++it )
if( filter(it) )
Does something similar exist already?
It seems like a challenging project. If anybody is
interested, let me know.
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk