Page 1 of 1
GUI in Pascal
Posted: Tue Jan 02, 2007 9:40 am
by Igor
Hi all! I want to ask you how to writing Gui in pascal?
Excuse for my English! I living in Ukraine!
Posted: Tue Jan 02, 2007 10:41 am
by Combuster
http://osdever.net/tutorials/GUI_tut.php
Although it is in C, the theory remains the same.
Posted: Tue Jan 02, 2007 5:59 pm
by 87ASC
I was wondering how to do a GUI in PASCAL also
.
Posted: Tue Jan 02, 2007 10:33 pm
by carbonBased
You should search for general GUI theory -- the language you implement it in is irrelevant.
A GUI, imo, can be described as a hierarchy of drawable elements. This is how I designed my first GUI. A tree structure was used to contain windows (I implemented an MDI-ish system where each window had a collection of 0 to many subwindows, recursively).
Each window then contained a tree of widgets. Each widget could contain 0 to many sub-widgets.
I used a relatively simple algorithm to figure out which parts of each window are visible. Effectively, each window contained a list of visible rectangles. To repaint the screen, I would loop through all windows, and draw the rectangles that are visible per each window. This was a simple method that was acceptable to me. There are definitely other more efficient ways.
One other thing I did with my windowing system was create a backbuffer for each window. This meant each window was always occupying some area in memory, even if not visible. This area could, potentially, be as large as the entire screen. This is not overly efficient in memory use. The advantage, however, is that is can be drawn incredibly quickly using a bit blit.
--Jeff
Posted: Wed Jan 03, 2007 4:39 am
by Igor
Thanks all for the theory!
I have found source codes GUI for Dos in Pascal!
http://bespin.org/~polit/h001src.zip
Posted: Wed Jan 03, 2007 11:26 am
by Dex