Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: pgplotter.tool - Function Up: pgplotter - Tool Previous: pgplotter.editgui - Function


pgplotter.addtool - Function



Package display
Module plotter
Tool pgplotter


Add a tool to the Tools menu


Synopsis
addtool(name, start, suspend)


Description
This command is only of interest if you want to customize the Tools menu.

This command creates a ``Tool'' - a custom GUI that the user can interact with to perform some functionality. The tool might be used purely to manipulate the plot (for example the standard zoom tool), or it might be used to perform some data analysis.

Typically the tool will operate by finding some plot commands in the displaylist, and then changing or adding to them appropriately.

The tool is defined by supplying a name and two functions, one of which is called when the tool is invoked and the other of which is called when the tool is dismissed.

The arguments to these start nad suspend functions are:

frame
A Glish/Tk frame in which the Tool may put whatever buttons or other widgets it needs.
public
The pgplotter tool which is calling the Tool. Typically the Tool will use this to go through the displaylist and add additional plot commands.
state
This is a record which the Tool can use as a ``scratchpad'' to retain information between invocations. If the length of the state record is zero, then the Tool has not been initialized. Typically the Tool will put its GUI widgets (e.g. buttons in the state record) as well as state that needs to be remembered from invocation to invocation.

Typically a tool will be defined in a plugin.



Arguments

name   name of the tool
    Allowed: string
start   function to call when the Tool GUI becomes visible
    Allowed: function
suspend   function to call with the Tool GUI is dismissed
    Allowed: function


Returns
T or fail (if the tool has already been defined)




next up previous contents index
Next: pgplotter.tool - Function Up: pgplotter - Tool Previous: pgplotter.editgui - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15