*******************************************************************************
**                             The GUI Toolkit                               **
*******************************************************************************

The Graphical User Interface (GUI) Toolkit is a suite of programming tools that 
gives you the ability to build an informative and interactive graphical user 
interface to monitor and control your instrument.  This file is taken from the
Programmers Guide to the QVGA Controller and introduces the structure of the 
GUI Toolkit
. 
The Structure of the GUI Toolkit
--------------------------------
A graphical user interface is created from building blocks such as bitmapped 
images and ASCII strings.  These building blocks, or data, must be organized 
in an intuitive way so users can easily run your instrument.  Object oriented 
concepts are the key to organizing this data and make it easy for you to design 
and implement your user interface.  Object oriented programming allows you to 
organize data hierarchically based on objects and manipulate the data using 
methods. With the GUI Toolkit, it is simple to create elementary objects such 
as graphics that contain bitmapped image data and textboxes that contain ASCII 
string data.  You can load those objects into other objects such as screens so 
that they can be shown on the display.  You can create yet another type of 
object, a control, which can execute functions that acquire data from a user or 
actuate hardware when a user touches the touchscreen.  A button is one kind of 
a control.

A Closer Look at Objects
------------------------
The two concepts of object oriented programming essential to modern programs 
with user interfaces are "Objects" and "Events".  An object is an association 
of properties and methods, and may respond to events.  An event is an external 
action that prompts an object into action.  GUI Toolkit objects that can 
respond to events are called controls.

Properties describe an objects physical attributes like its size, location, or 
image.  Objects contain a data structure that holds its properties.  Properties 
generally dont do anything by themselves; they are more like read/write 
variables.  However, properties may qualify the objects behavior when the 
object does do something or has something done to it. 

Some properties may be read only while others may be read/write.  GUI Toolkit 
properties are always 32-bit numbers and are accessed or modified by calling 
the methods Get_Property or Set_Property.  Set_Property requires a reference 
to an object, its property, and the new value, while Get_Property requires a 
reference to an object and its property as parameters and returns the property 
value.  

Methods are actions the object can do or have done to it.  Many methods, like 
Load, are overloaded; that is, they are applicable to several different types 
of objects.  For example, you can Load buttons, graphics, and textboxes into 
a screen.  Overloaded methods allow you to use a single simple syntax with 
respect to many different objects.

Events are external actions that an object responds to by executing a user 
defined function called an event procedure.  Objects automatically recognize 
a predefined set of events, it is up to you to decide if and how they respond 
to those events.  You specify the event procedure called when the event 
happens (or fires) by storing your function into the appropriate property 
using Set_Property.  Event procedures are written, for example, to specify 
the program actions that occur in response to the press of a button.

The GUI Toolkit Objects
-----------------------
The following lists all of the objects in the GUI Toolkit. 

Object	                        Description
------                          -----------
GUI_TOOLKIT                     The central object that contains properties 
                                relevant to all other objects.

GUI_DISPLAY                     The object tied to the physical display.

GUI_SCREEN0 to GUI_SCREEN5      An object that contains a collection of other 
                                functionally related objects such as graphics, 
                                textboxes, buttons, and plots.

GUI_TOUCHSCREEN	                The object tied to the physical touchscreen.

GUI_PEN                         A tool object that is used in conjunction with 
                                the Draw method to draw lines and geometrical 
                                figures onto screens.

GUI_BUZZER                      The object tied to the physical buzzer.

GUI_FONT                        The 8-pixel wide by 10-pixel tall Courier New 
                                font that is used to render strings in textboxes 
                                by default for the GUI Toolkit.

GRAPHIC                         An object that contains a single image as a property.

FONT                            An object that contains a single image of 
                                the 95 ASCII characters that is used to render 
                                strings in textboxes.

TEXTBOX                         An object that uses a font object to render 
                                strings onto a screen.

BUTTON                          An object with an associated graphic that 
                                responds to a users touch on the touchscreen.

PLOT                            An object used to render numerical data into 
                                graphical form onto a screen.

Some of these objects are created when you initialize the GUI Toolkit while others 
are created by functions that you write.  All GUI objects reside in their own task 
with their own heap and some respond to events.  In the documentation, well show you 
how to create your user interface and then how to write your application using the 
GUI Toolkit.
