Main
''
'' COPYRIGHT (C) 1993, CACI Products Company.
'' AUTHOR: Steve Bailey
'' DATE: 9-22-93
'' DESCRIPTION:
''     Main routine to start up the simulation.
''

define INTROFORM as a pointer variable
define BUTTON.ID as a text variable

  '' open up a graphics window of a particular size
let VXFORM.V = 1
call OPENWINDOW.R(4096, 32768-4096, 4096, 32768, "Bouncing Balls", 0)
  yielding WINDOW.ID
call SETWINDOW.R(WINDOW.ID)   '' assign current VXFORM.V to this window

  '' show the dialog box containing the introduction
show INTROFORM with "intro.frm"
let BUTTON.ID = ACCEPT.F(INTROFORM, 0)

  '' set up process to bounce all balls (OUTPUT)
activate a OUTPUT now

  '' set up the processes to handle asyncronous mouse events (INPUT)
activate a MENU now
activate a PALETTE now
activate a POPUP.MENU now

start simulation

  '' hush warnings
let BUTTON.ID = BUTTON.ID

End
