Contents Previous Next Subchapters

Specifying A Graphics Window's Call Back Command
Syntax gaddwin(captiongeometrycall back)
See Also delwin , gplot , and gaddwin(caption, geometry, call back, style)
Menu Command Graphics | Add Window

Description
Adds a new graphics window with the specified caption , geometry , call back command, and selects it as the current window for plotting. The return value is an integer identifier for the new window. It can be used to reference the window in subsequent calls to the gwin function. The call back command is executed when the user attempts to close the window using its caption bar. This syntax uses the default setting for the argument style .

Example
If you enter
     clear
     caption  = "Test Plot"
     geometry = [200, 100, 200, 100]
     callback = "beep"
     id       = gaddwin(caption, geometry, callback)
     gplot(seq(3), seq(3))
O-Matrix will create a graphic window and plot a line in the window. If you attempt to close the window using its caption bar, O-Matrix will beep. You can delete the window by entering the command
     delwin(caption)
to which O-Matrix will respond
     T