Boost logo

Boost :

From: Brian Braatz (brianb_at_[hidden])
Date: 2004-09-24 10:20:17


> -----Original Message-----
> From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]]
> On Behalf Of Thomas Witt
> Sent: Friday, September 24, 2004 7:21 AM
> To: boost_at_[hidden]
> Subject: [boost] Re: GUI Windowing Framework in C++
>
> David Abrahams wrote:
> > Reece Dunn <msclrhd_at_[hidden]> writes:
> >
> >>[1] Support constructor-based window creation, e.g.:
> >>
> >> frame.add( new gui::button( "Boost!" ));
> >
> >
> > Get rid of the new operator, though. IMO there's no excuse for a
GUI
> > framework to expose users to unmanaged resources.
>
> Hmm, do you know of a C++ GUI framework that gets this right?
>
> Just curious
[Brian Braatz]
The problem is handling the "dual lifetimes" of "system" GUI objects and
C++ objects.

BeOS is the only system I know that does not have this issue, because
they extended C++ in such a way so that when you "create" a C++ window
object- you now have a window. In frameworks like MFC, they have to
internally track a windows resources "object" that the system
understands as the gui object.

You will always need a dynamic nature to things, but one could take a
Rogue Wave approach here and hide all those new's behind accessor type
objects which pass around by value and internally hold something like a
boost::shared_ptr<>

(my 2 cents)

Brian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk