GUI library for D

Michel Fortin michel.fortin at michelf.com
Mon Apr 4 18:25:20 PDT 2011


On 2011-04-04 19:55:44 -0400, Adam Ruppe <destructionator at gmail.com> said:

> Michel Fortin wrote:
>> On the other hand, one thing that is missing right now, in D and in
>> most languages, is a standard way to display graphics.
> 
> Actually, I wrote something to do that last year, but I thought
> it was too trivial to share.
> 
> What you do is just draw some RGB stuff to a big memory buffer. Then
> you can save as bmp, png, or create a window to display it.
> 
> There was no interaction with the window, except closing it. You'd
> pop up the window so the user can review the picture, then he closes
> it and your program continues where it left off.
> 
> Changing it to allow some updating and interaction shouldn't be
> too hard.
> 
> It worked for both win32 and x11, no libraries required.

Reminds me of David Simcha's plot2kill, which also has such a layer on 
top of which it implements plot drawing.
<http://www.dsource.org/projects/plot2kill>


> The reason I wrote it was that I really miss the simplicity of DOS
> programming, where with just a few lines of inline asm, you have
> a dead-simple video buffer to play with.

Indeed. Today you generally have to pile up a lot of GUI code just to 
be able to draw a square; all the simplicity is lost and portability is 
hard.

I think such a module would be a great addition to Phobos.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d mailing list