RE: [boost] Re: GUI Windowing Framework in C++

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Thomas Witt Sent: Friday, September 24, 2004 7:21 AM To: boost@lists.boost.org Subject: [boost] Re: GUI Windowing Framework in C++
David Abrahams wrote:
Reece Dunn <msclrhd@hotmail.com> 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

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<>
He he ;) That's exactly what win32gui does ;) Best, John -- John Torjo -- john@torjo.com Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -- v1.4 - save_dlg - true binding of your data to UI controls! + easily add validation rules (win32gui/examples/smart_dlg)
participants (2)
-
Brian Braatz
-
John Torjo