The GUI to end all GUI libraries (Let's Dream!)

Knud Soerensen 4tuu4k002 at sneakemail.com
Thu Nov 29 08:24:00 PST 2007


Bill Baxter wrote:
> (with a nod to Don ;)
> No, I don't have the perfect GUI.
> I'm just throwing this out as a topic for discussion.  I've yet to find
> a GUI that isn't tedious to use.  With 2.0 const hopefully nearing
> completion, and the new closure support in 2.0, maybe it's a good time
> to dream again about what the ultimate D GUI would look like.
> 

I was thinking maybe we can learn something from Ruby on rails !

All the app needs to define is the model, then the framework define the
control and the view.

First the apps menues is just a way to call functions.
new appdata file_new();
void file_save(const appdata , filename afilename);
void file_save_as(const appdata , const filename afilename);
new (appdata,filename afilename)  file_open(filename);

Would define the file menu with new,save, save_as and open,
the app. should only specify the apps functionality every thing
else should be themed an styled via the gui framework or by the desktop
or window manager.


The first line:
new appdata file_new();
tell the framework that selecting the menu file->new create a new
container of type appdata, the styling of the gui framework decide if
this is done in a new window or tab.

The next line:
void file_save(const appdata , filename afilename);
tells the gui to open at dialog which allow a filename to be chosen
and use the content of afilename as a default.
const appdata tells the gui that the dialog should not edit appdata.

The line:
new (appdata, filename afilename)  file_open(filename);
tells the gui to open the file dialog and then load the file into a new
container.

Hope this is understandably.

Knud






More information about the Digitalmars-d mailing list