Page 1 of 1

Where can I find some docs about how to write GUI platform?

Posted: Sun Jul 04, 2004 11:00 pm
by zlh
Hi everybody,

I am trying to find some technic docs about how to write GUI platform, so that I can create windows, draw and move rectangles, circles? I searched on internet for a long time, but could not find such materials.

Please kindly give me some  clues about it?

Best regards,
Zhu Liheng

RE:Where can I find some docs about how to write GUI platfor

Posted: Sun Jul 04, 2004 11:00 pm
by carbonBased
I once wrote a GUI system which might be of interest; Smoke.  It can be downloaded on my web site (www.neuraldk.org).

The code was written some time ago (it was done for a highschool project) but should give a good idea on how to develop a GUI system.

My GUI supported MDI windows, was based extensively on the MacOS (lookswise, anyway) and was developed on top of my graphics library (Petal) and therefore ran on both DOS and Linux, so I would hope something can be grabbed from the code.

Essentially, you want to use a similar approach to virtual consoles.  Each window has its own graphics device abstraction, and writes to its window as if it's fully visible.  When the screen is painted (only those portions which have changed!) then you have a few alternatives:

- draw all windows, back to front, potentially overwritting the previous window
- maintain a linked list of "visible" rectanges per window, and display only those portions of the window that are actually visible (what my GUI does)
- do the same as above, but use a span buffer for visible portions, instead (this more easily allows shaped windows)
- and more, I'm sure...

One thing to note about my GUI is that if you're smart about it (or even make an interesting mistake) it's possible to draw onto the window border, which should never be possible.

And a better OO approach would be for the window itself to be a gui widget itself (like a button) rather then some other entity.

--Jeff

RE:Where can I find some docs about how to write GUI platfor

Posted: Sun Jul 04, 2004 11:00 pm
by GT
It should be noted that writing a GUI is a substantially larger and more complicated project than writing an operating system...

RE:Where can I find some docs about how to write GUI platfor

Posted: Mon Jul 05, 2004 11:00 pm
by jcmatias
try microwindows : www.microwindows.org