Boost logo

Boost :

From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2004-03-04 11:18:48

David Turner wrote:
> window w("Test");
> button b = w.spawn("button");
> b.label("Click me");
> w.contain(b);

Excuse me butting in, but this is redundant information:
  // b belongs to w
  button b = w.spawn("button");
  // b belongs to w

It seems to me that you're trying to fit two concepts into one box,
the widget and its properties. All this jumping through hoops occurs
because you're trying to manipulate a "widget that must belong to a
window" when in actual fact you're interested only in its properties:

  button_properties bp;
  bp.label("Click me");

  window w;

Persumably, therefore, the button_widget's constructor would be
  struct button_widget {
    button_widget(window const &, button_properties const &);


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