Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-03-04 09:37:49

"David Turner" <dkturner_at_[hidden]> wrote in message

> As I explained in an earlier post to Peter Dimov, there are technical
> reasons why this isn't possible. Widgets have to be rooted in an owning
> window, and it's not possible to transfer widgets from one window to
> another.

ok, if you say so.

> Therefore, button has to take an owner-window parameter in its
> constructor.
> There is a precedent for this: look at the W3C DOM.
> The syntax I'm currently considering would make it:
> window w("Example Window");
> w.contain(button(w, "Click me"));

[note: just one little stupid question more :-)]

Why can't window::container be like

window::contain( const button& b )
   b.set_owner( this );
   add(b );

button::set_owner( window* w )
   owner_->remove( this );
   owner_ = w;




Boost list run by bdawes at, gregod at, cpdaniel at, john at