
25 Sep
2004
25 Sep
'04
12:48 p.m.
John Torjo <john.lists@torjo.com> writes:
Also, what if you have a large number of GUI components? Storing them in the frame class would just increase the size of the object to the point where it is unusable. Also, doing: frame.add( gui::button( "Boost!" )); frame.add( gui::textbox( "Hello", 25, true ));
What you could do is:
frame->add<gui::button>("Boost!"); frame->add<gui::textbox>("hello", 25, true);
Internally, they will map to new gui::button("boost") and new gui::textbox( "hello", 25, true)
Thus, there will NO copying whatsoever.
Or you could just build pimpl gui objects with shared reference semantics so people could copy them about naturally. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com