Boost logo

Boost :

Subject: Re: [boost] [gui] Help with a little experiment.
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2011-06-18 10:55:57


----- Original Message ----
>
> Should be. Now, here is a small PoC of DSEL for GUI I had in mind for quite a
>while. Everythign in there is proto-ifable.
>
> windows<dialog, some_tag_for_selecting_gui_backend> w;
>
> w = frame("Choose a File to Open")
> [
> listbox<columns,no_icons>(pos_x,pos_y)
> [
> on_select = ...
> , on_move = ...
> ]
> ,
> button("&OK", on_click =&do_ok)
> | button("&Cancel", on_click =&do_cancel)
> ];
>
>
> where the on_xxx are terminal where = awaits for any callable object.
>
> Using [ ] to construct nesting is easier than << I think.
>
>
>

Please tell me how is this better, more readable, maintainable then
this code:

  http://doc.qt.nokia.com/4.3/tutorial-t5.html

But it rises many issues:

1. Where button is created and who owns it?
2. How do I connect signals afterward?
3. How would an average programmer would understand a error
   codes you would see?

Making a GUI library is not about providing
nice syntactic sugar for building layout.

Syntactic sugar is the last thing that should interest your.

For GUI you need a core... Once you get it running
on Windows/Unix/Mac OS X have full Unicode support,
that handles layouts provides nice sets of widgets.

This is what you should work...

This ^^^ would only the library less useful for average
programmer who actually needs to write a real code
for real application... Not in a fancy world of Proto...

---------------------------------------------------

And to be honest, there are two very good libraries
that already do it: Qt and GTKmm...

Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.sf.net/
CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/


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