>On 2001-06-20 14:43:51, Chris Tomlinson wrote:
>I was just wandering if anyone had any sites or
>tutorials for writing a GUI. I mean the very
>basics. I have my own theories about how I could
>create a GUI enviroment, but I imagine it wud be
>very slow and look crap!
>
>Any help is apreciated.
I wrote one a long time ago (for DOS and Linux) and
basically took a look at the current API's, like
Xlib and Qt.
Essentially, a standard GUI implies a set of
commands that allow associating a function with
each event (keypress, mouse click, etc).
Drawing is accomplished by rendering the windows
in your decor, and redrawing only the parts that
need be (I used an array of rectangles to take
care of this).
I never did get much of the button/scrollbar/etc
stuff done (mostly just a windowed environment),
but what I was planning on doing was specifying
a bunch of formatting "widgets":
hline, vline, box, etc, etc
Which would allow you to add other widgets inside
them. Hline, for example, would format all
buttons, etc, given to it in a horizontal line.
Then you'd have "scrolled_hline" which would
include a scrollbar for when it extended beyond
its physical limits.
etc, etc, etc.
Hope that helps! It's a pretty wide topic, and I
don't wanna go on and on and on
j.weeks