An Introduction to GUI* Programming (from a Historical Perspective)

GUI = Graphical User Interface (pronounced "gooey")

Windows
Windows are the fundamental user-interface object through which information is presented to the user and the user is allowed to interact with that information.

Menus
Menus present the list of commands that the user can issue to the application.

Controls
Controls are standard user-interface objects used to gather user input, and, less frequently, to display information.

Dialogs
Dialog boxes present controls to the user to gather additional information needed to complete a user request.

"Classic" Native Window System #1:  Macintosh

Mac GUI

Menubars and application windows

Window manager characteristics

Platform-specific characteristics

"Classic" Native Window System #2: OSF/Motif (X11)

OSF/Motif X Windows GUI

Menubars and application windows

Window manager characteristics

Platform-specific characteristics

"Classic" Native Window System #3:
MS-Windows (3.x), OS/2 1.x and NT 3.x

Windows 3.x,NT 3.x,OS/2 GUI

Menubars and application windows

Window manager characteristics

Platform-specific characteristics

"Classic" Native Window System #4:
Windows 95/98/NT4/ME/2000/XP/2003/Vista

GUI Applications:
Event-Driven Programming

Every GUI application needs:

  1. a way to manage and store data

  2. a way to display the data and allow the user to interact with it

  3. a way to control the program

Applications are often designed using a "Model-View-Controller" architecture.  Microsoft uses a slight variation of this model:  "Document-View" architecture.

The essential point is that there is a dependency relationship between the model component and the view component:  when the data stored in the model is changed, the view must be notified so that it can update itself to reflect the new setting of the model.  The change itself is caused by the controller component.

Modern GUI's are typically event-driven, meaning they spend much of their time waiting for an event to occur.  An event occurs when something external to the program happens:

Back to CTEC1638