main
''
''    AUTHOR: Steve Bailey
''    CREATED: 1-20-95
''    DESCRIPTION:
''        main routine for the window test program
''

define FIELD as a text variable
define PANE.WIDTHS as a 1-dim integer array

'' create the window
call OPENWINDOW.R given 16383, 32768, 8192, 24576, "Example Window...", 0
  yielding WIN.PTR

'' make the window scrollable
let DDVAL.A(DFIELD.F("HSCROLLABLE", WIN.PTR)) = 1
let DDVAL.A(DFIELD.F("VSCROLLABLE", WIN.PTR)) = 1

'' add a status bar to the window
reserve PANE.WIDTHS(*) as 4
let PANE.WIDTHS(1) = 15
let PANE.WIDTHS(2) = 15
let PANE.WIDTHS(3) = 15
let PANE.WIDTHS(4) = 15
let DARY.A(DFIELD.F("PANEWIDTH", WIN.PTR)) = PANE.WIDTHS(*)

'' set the control routine of the window
call SET.WINCONTROL.R(WIN.PTR, 'WIN.CTRL')

'' associate this window with the current viewing transformation
'' this operation will display the window
call SETWINDOW.R(WIN.PTR)

'' show the dialog box
show DLG.PTR with "dialog.frm"

let LOCATION.A(DLG.PTR) = LOCATION.F(0.0, 28000.0)
let FIELD = ACCEPT.F(DLG.PTR, 'DLG.CTRL')
let FIELD = FIELD '' prevent warnings.

end
