Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2004-09-25 06:55:12


>
> 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.

Best,
John

-- 
John Torjo
-- john_at_[hidden]
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)

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