PROLOG and support functions
'
'
' ####################
' ##### PROLOG #####
' ####################
'
PROGRAM "name"
VERSION "0.0000"
'
IMPORT "xst"
IMPORT "xgr"
IMPORT "xui"
'
INTERNAL FUNCTION GridName ( )
INTERNAL FUNCTION GetDisplayGrid ( @label )
INTERNAL FUNCTION DisplayCallback ( grid, message$, v0, v1, v2, v3, kid, r1$ )
'
'
' #########################
' ##### GridName () ##### grid demonstration function goes here in complete program
' #########################
'
FUNCTION GridName ()
'
' function for each grid
'
END FUNCTION
'
'
' ###############################
' ##### GetDisplayGrid () #####
' ###############################
'
FUNCTION GetDisplayGrid ( label )
STATIC grid
'
IFZ grid THEN
XuiCreateWindow (@grid, @"XuiLabel", 100, 100, 512, 128, 0, "")
XuiSendStringMessage ( grid, @"SetColor", $$BrightCyan, -1, -1, -1, 0, 0)
XuiSendStringMessage ( grid, @"SetAlign", $$AlignUpperLeft, 0, 0, 0, 0, 0)
XuiSendStringMessage ( grid, @"SetJustify", $$JustifyLeft, 0, 0, 0, 0, 0)
XuiSendStringMessage ( grid, @"SetIndent", 6, 4, 0, 0, 0, 0)
XuiSendStringMessage ( grid, @"DisplayWindow", 0, 0, 0, 0, 0, 0)
END IF
label = grid
END FUNCTION
'
'
' ################################
' ##### DisplayCallback () #####
' ################################
'
FUNCTION DisplayCallback ( grid, message$, v0, v1, v2, v3, kid, r1$ )
'
XgrGetGridType (grid, @gridType)
XgrGridTypeNumberToName (gridType, @gridType$)
text$ = gridType$ + "\n"
text$ = text$ + " grid = " + HEX$ (grid,8) + "\n"
text$ = text$ + " message = " + message$ + "\n"
text$ = text$ + " v0 = " + HEX$ (v0,8) + "\n"
text$ = text$ + " v1 = " + HEX$ (v1,8) + "\n"
text$ = text$ + " v2 = " + HEX$ (v2,8) + "\n"
text$ = text$ + " v3 = " + HEX$ (v3,8) + "\n"
text$ = text$ + " kid = " + HEX$ (kid,8) + "\n"
text$ = text$ + " r1$ = " + r1$
'
GetDisplayGrid (@label)
XuiSendStringMessage (label, @"SetTextString", 0, 0, 0, 0, 0, @text$)
XuiSendStringMessage (label, @"Redraw", 0, 0, 0, 0, 0, 0)
END FUNCTION
END PROGRAM