main

'' Open graphics windows with specified coordinates,
'' and a titles

   
   Define WINDOW1.ID as integer variable
   Define WINDOW2.ID as integer variable
   Define WINDOW3.ID as integer variable

   call OPENWINDOW.R given 4096, 28672, 16383, 32767,
                          " Simgraphics Upper Window ",
                          0
                          yielding WINDOW1.ID

   call OPENWINDOW.R given 4096, 16383, 0, 16383,
                          " Simgraphics Lower Window1 ",
                          0
                          yielding WINDOW2.ID

   call OPENWINDOW.R given 16383, 28672, 0, 16383,
                          " Simgraphics Lower  Window2 ",
                          0
                          yielding WINDOW3.ID



   let VXFORM.V = 1
   call SETWINDOW.R given WINDOW1.ID
   call SETWORLD.R ( -1000.0, 1000.0, 0.0, 1000.0)

   let VXFORM.V = 2
   call SETWINDOW.R given WINDOW2.ID
   call SETWORLD.R ( -1000.0, 0.0, -1000.0, 0.0)

   let VXFORM.V = 3
   call SETWINDOW.R given WINDOW3.ID
   call SETWORLD.R ( 0.0, 1000.0, -1000.0, 0.0)


   let VXFORM.V = 1
   show IMAGE1 with "car.icn"   at ( 100.0 , 200.0)
   show IMAGE2 with "plane.icn" at ( 100.0 , 800.0) 
   
   let VXFORM.V = 2
   call read.glib.r ("cart.sg2")
   show IMAGE4 with ("cart.icn") at (-500.0, -500.0)
    

   let VXFORM.V = 3
   show IMAGE3 with "image.icn" at ( 500.0, -500.0) 
     


'' This message will keep window open untill you click OK

   call MESSAGEBOX.R ("Exit", "End of the program")

end
