home *** CD-ROM | disk | FTP | other *** search
- '***********************************************************************
- ' TrigPlot.rlz
- '
- ' Realizer Reference Guide : Chapter 19
- '
- ' Copyright ⌐ 1991-1992 Computer Associates International, Inc.
- ' All rights reserved.
- '
- '***********************************************************************
-
- PROC formprocTrig(params)
- FormSelect(params[_FormNum])
- SELECT CASE params[_ItemNum]
- CASE 1 'Plot
- Formula = SubStr$(FormQStr(30), "()", "(x)")
- x = Index(360) * (3.1416/180)
- EXECUTE "Results = " + Formula
- PlotColor = PlotColor + 1
- ChartSetColor(PlotColor)
- ChartLine(Results)
- ChartSetKey(Formula)
- CASE 40 'Clear
- ChartControlPane(_Clear)
- ChartControlKey(_Clear)
- PlotColor = _Red
- CASE 50 'Quit
- FormControl(_Close)
- END SELECT
- END PROC
-
- formTrig = FormQUnique
- FormNew(formTrig; "Trigonometric Graphs", _Title)
- FormControl(_Size; _Center, _Center, 80 pct, 80 pct)
- FormSetObject(10, _Chart, "", 5 pct, 5 pct, 90 pct, 50 pct)
- FormSetObject(20, _CaptionLeft, "Formula: ", 20 pct, 71 pct)
- FormSetObject(30, _TextBox, "sin()", 35 pct, 70 pct, 45 pct, _Default)
- FormSetObject(1, _DefButton, "Plot", _Left, _Bottom)
- FormSetObject(40, _Button, "Clear", _Center, _Bottom)
- FormSetObject(50, _Button, "Quit", _Right, _Bottom)
- FormSetProc(formprocTrig)
-
- PlotColor = _Red
- FormControl(_Show)
- ChartControlKey(_Show)
-