Ideas for a brand new widget toolkit

Adam D. Ruppe destructionator at gmail.com
Tue Aug 20 06:30:50 PDT 2013


On Monday, 19 August 2013 at 21:01:49 UTC, Ramon wrote:
> - looking for some kind of GUI-kit that is less massive than 
> gtk, qt, etc. and runs pretty everywhere.

I'm now working on a minigui.d and pushed a very incomplete start 
to my github:

https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/minigui.d

Also depends on simpledisplay.d and color.d from the same repo. 
There's still a *lot* I have to finish and change in there, but 
you can see my basic direction:

1) somewhat thinly wrap Win32 controls, then DIY to similar 
functionality on X for cross platformness. If you add a manifest 
resource/file, this uses the theming api too, so on WinXP it 
looks like an XP app, on Vista it looks like vista, etc.

2) Minimal dependencies, I'm not even using Phobos in here. The 
result: my test program is a 205 KB exe on Windows, with no dlls 
needed at runtime (except those that come with Windows), and you 
can compile it with just my three files, no need for special 
instructions to build the library, just add them to your dmd 
command line. (I'm even considering merging it into two files.)

3) The event model is kinda like javascript and the widget layout 
is a simple stretchy thing based on max/min width/height and a 
stretchiness factor.

4) Drawing is possible through simpledisplay.d's ScreenPainter or 
Open GL functions.


I'm about halfway to where I want to be with this now. After 
making the Windows impl good and the X impl barely working, I'll 
go back and see about making the X one slightly prettier and 
better functioning, but my emphasis is still on small size so 
don't expect too much. (One option would be to do GTK similarly 
like Windows as an option for nicer X version.)

Then if I still have time, I'll look at my would be nice list: a 
text mode alternative backend, a html5 thingy, and my plans for 
network transparency and detaching as discussed earlier in the 
thread.

But for now, I'm aiming low.


More information about the Digitalmars-d mailing list