|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-11-03 16:29:44
Hajo Kirchhoff wrote:
> Hello all,
>
>> Considering the fact that some of the Boosters work on the GUI
>> library, I would like to throw something to the mix:
>
> I wasn't aware that some people here were into GUI work!
There are :). John Torjo has a Win32 specific library (www.torjo.com)
and I am currently working on a generic GUI framework.
The problem is that we have 4 or more people interested in developing a
GUI framework and the same number of GUI frameworks up for
consideration. The question is which platform do we use and who develops it?
With this in mind, it might be best if a sub-group with a specialist
list be created, aimed at creating a GUI framework for integration into
Boost with possible adoption by the next C++ standard.
My library is available at
http://uk.geocities.com/msclrhd/gui/gui.zip
It is not quite ready to be committed into the boost sandbox and lacks
documentation and a lot of functionality. It is buildable with gcc 3.3
and msvc 8.0, e.g.:
bjam release link=static gcc-3.3
The aims of my library are:
* provide a platform-independant programming model
* integrate with the platform for native functionality and
interoperability with existing code
The platform specific code is contained in a namespace associated with
the API for that platform (cocoa for MacOS, win for Win32/64, x11, gtk,
motif for *nix). In order to aid platform independant programming, the
API you are targeting is aliased as platf. This allows code like:
boost::io::platf::position pos;
without knowing whether you are targeting MacOS, Windows or *nix.
There is a platform independant interface with source files for the
specific APIs (currently only Win32/64 is supported). This includes a
platform independant entry point:
int gui_main( const boost::gui::platf::entry_data & ed );
where entry_data is specific to the target API. This allows you to
access WinMain specific data on Win32/64 and PilotMain specific data on
PalmPilot PalmOS.
I am also making use of properties (based on the Louis Goldthwaite
document on library properties at
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1615.pdf). This
allows:
gui::area a( gui::position( 5, 5 ), gui::size( 100, 50 ));
gui::size sz = a.size;
assert( sz.dx == 100 );
assert( a.width == 100 );
assert( a.center == gui::position( 55, 30 ));
Currently, I have area, size and position support in Cocoa, Win32/64 and
PalmOS.
Regards,
Reece
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk