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

Tom S h3r3tic at remove.mat.uni.torun.pl
Wed Nov 28 17:27:52 PST 2007


Bill Baxter wrote:
>> It used/uses an event processing system called 'sinking and bubbling' 
>> which is superior to anything in existence ;)
> 
> Gee thanks, that really clears it up for me.  :-P
> 
> But you're wrong anyway.  Few people know it, but the most superior 
> event processing system ever was the 'skulking and babbling' system 
> invented at Xerox Parc, and promptly forgotten.  By everyone. :-P

LOL :D Well, the concept was explained here: 
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.dwt&artnum=61

As for event handling itself, most of it will happen in immediate mode, 
e.g. if (Button().stuff().clicked) { ... }


> Yeh, I'm not so concerned about rendering text as input.  Rendering is 
> pretty easy with FreeType.  But Asian languages tend to require special 
> input methods that guess which word you mean from the phonetics you 
> type.  And you just ain't gonna re-invent that.

Can't OS APIs do that? :o  Sorry, I'm not an Asian ;D



> Still, that's a pretty clever and fairly clean work-around.

Thanks :)



> Thanks for 'outing' yourself ;-).
> One thing I noticed last time you posted something about this library 
> was that the code for a gui is nested like 12 levels deep.  I'm guessing 
> it's possible to call out to actual separate functions for panels rather 
>  than using an in-line delegate for everything?

Sure thing! I used that in Deadlock. The nesting is mainly due to use of 
many VBoxes and HBoxes (like in GTK) for layout. If I figure out how to 
do layout better, that might as well get pretty flat.


> That would make it 
> easier to see the high-level organization of a big GUI I think.  And 
> maybe allow you to re-use a common panel on multiple screens, etc.  It's 
> just all in one honking huge function for demo purposes, I guess?

Yup, that's just a simple test. There's nothing magical about the code 
that may be used there.
On an additional note, the delegates passed to the overloaded opIndex 
are executed in the same context, so there are no worries about escaping 
references / lack of 'full' closures in D1.0.


-- 
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode



More information about the Digitalmars-d mailing list