|
Programs - User InterfaceAimThe reson for writing this unit was to make it easy to draw boxes and buttons on the screen. Its supposed to look like windows and therefore be more user friendly. MethodIn the begining the programmer only wrote a unit to draw dialog boxes, but then as he sat back and watched his work, he decided that it needed to look even better. The programmer created buttons, but he felt this was still not enough so he created other controls like textboxes and labels. Yes this is what it was like, version one drew boxes, a very simple procedure that took the four co-ordinates nessary to define a window and drew it. You could even ask it to draw single or double lines. Later came buttons, added by Gary, they looked much better than plain menu options that you had to press keys for. The mouse unit was upgraded to support mouse interaction and two procedures were added to it. One to check the current mouse button state, and the other to decide if you just let go of the mouse button at the same place as you put it down. The buttons did not show whether they were pressed or not, i.e. the were non-animated. Now the whole unit is getting very much like the Turbo Vision unit. With dynamic allocation for the dialog and its controls. Several different types now: button, textbox, label, checkbox and option buttons. This makes it much easier just to let the program to do the work not the programmer! The interface exposes the following procedures / functions:
|