Boost logo

Boost :

From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2004-03-04 15:25:18


On Thu, 4 Mar 2004, Arvid Norberg wrote:
> David Turner wrote:
> > Okay... I have an idea for how this could be done.
> >
> > I confess I'm biased against it, due to the difficulties and
> > inefficiencies it raises in the implementation.
> >
> > How's this (syntax as of tonight - I'll upload it tomorrow):
> >
> >
> > window w("Test Window");
> > grid g(2, 2);
> > w.contain(g);
> > g.contain(button("Click me", on_click), 1, 1);
> > g.contain(label("Enter your name:"), 0, 0);
> > textentry t();
> > g.contain(t, 1, 0);
> > wait_for_signal(w.delete_signal()); // note () after delete_signal
>
> You don't have any comments on the syntax suggestion I posted?
>
> http://article.gmane.org/gmane.comp.lib.boost.devel/34441

I do :)

I'm solidly behind the proposals to use a DSEL for describing GUI
elements. It's the right level of abstraction for the task. I'm not sure
I'm a big fan of the '+' syntax you propose, if only because it requires a
lot of discipline to make it look "right", whereas an approach that uses,
e.g., [] or () to perform grouping will at least make my editor do the
right thing.

        Doug


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