CLASS_NAME: itoolwatpmgr PURPOSE (one line): To define, edit, and manage itool photometry templates. CATEGORY: Widgets SUPERCLASSES: SUBCLASSES: CREATION: See itoolwatpmgr::init METHODS: itoolwatpmgr::cleanup itoolwatpmgr::getproperty itoolwatpmgr::setproperty itoolwatpmgr::refreshobjects itoolwatpmgr::realize itoolwatpmgr::init itoolwatpmgr::refreshtemplates itoolwatpmgr::addtemplate itoolwatpmgr::purgetemplates itoolwatpmgr::load itoolwatpmgr::save MODIFICATION HISTORY: Written by Doug Loucks, consultant for Lowell Observatory, March / April 2004. Adapted from cw_tpmgr.pro and cw_tplat.pro. Removed all remnants of compound-widget code; replaced with stand-alone code that is compaitble with the new object-oriented version of itool. Modified the usage of the state-structure variable. A pointer to the state structure is stored in the object instance of this tool and this tool's object reference is stored in its top-level base. ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::cleanup PURPOSE: Self-explanatory CALLING SEQUENCE: obj_destroy, oref INPUTS: oref : An itoolwatpmgr object reference. OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::getproperty PURPOSE: To retrieve "properties" defined for the itoolwatpmgr object class. Properties are specified as keyword arguments. CALLING SEQUENCE: oref->getproperty INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: NUM_TPLATES : Set this keyword to a named variable into which will be placed the number of templates currently defined. OITOOL : Set this keyword to a named variable into which will be placed a copy of the object reference of a host instance of the "itool" object class. PIDX_TPLATES : Set this keyword to a named variable into which will be placed a pointer to the array of sorted indices of the templates. Templates are sorted by their names. PSTATE : Set this keyword to a named variable into which will be placed a pointer to the state structure. PTPLATES : Set this keyword to a named variable into which will be placed a pointer to the array of template-reference structures. SELECTED : Set this keyword to a named variable into which will be placed the sorted index of the selected template. If a template has not been selected, -1 will be returned. The user selects a template by clicking in the list widget that displays the list of templates. TPLATE : Set this keyword to a named variable into which will be placed a copy of the currently-selected template reference. If a template has not been selected, a blank template-reference structure will be returned (null name string and null object reference). A template reference is defined by the itool_templatelist object class. The object-reference tag in a template- reference structure is used to access the template data and to call method routines that operate on the template data. OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::setproperty PURPOSE: To set "properties" defined for the itoolwatpmgr object class. Properties are specified as keyword arguments. CALLING SEQUENCE: INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: NUM_TPLATES : The number of templates currently defined. SELECTED : The sorted index of the currently-selected template. OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::refreshobjects PURPOSE: To refresh the list widget that displays the list of objects. CALLING SEQUENCE: oref->refreshobjects INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::realize PURPOSE: To realize a new, managed instance of the itoolwatpmgr object class. CALLING SEQUENCE: oref->realize INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: NO_BLOCK : Set this keyword to cause the widget application to run in non-blocked mode. OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::init PURPOSE: To initialize a new instance of the itoolwatpmgr object class. CALLING SEQUENCE: oref = obj_new('itoolwatpmgr', oitool) INPUTS: oitool : An object reference of a host instance of the object class "itool." OPTIONAL INPUTS: KEYWORD PARAMETERS: GROUP_LEADER : The group leader for this tool. TMPLFILE : The name of a file containing a list templates. OUTPUTS: oref = The object reference of the new instance of the itoolwatpmgr object class. OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: After creating a new instance of this object-oriented widget application, it must be realized. EXAMPLE: oref = obj_new('itoolwatpmgr', oitool, GROUP_LEADER=group_leader) oref->realize MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::refreshtemplates PURPOSE: To refresh the list widget that displays the list of templates. CALLING SEQUENCE: INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::addtemplate PURPOSE: To add a template. CALLING SEQUENCE: oref->addtemplate, name, objnam, x, y INPUTS: name : String scalar containing the name of the template. objnam : String array containing the names of the objects. x : Array of x-coordinates of the objects. y : Array of y-coordinates of the objects. OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::purgetemplates PURPOSE: To purge the current list of templates. CALLING SEQUENCE: oref->purgetemplates INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::load PURPOSE: To load a set of templates from a file. CALLING SEQUENCE: oref->load INPUTS: OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: The file name is taken from the tmplfile tag of the state structure. EXAMPLE: MODIFICATION HISTORY: ----------------------------------------------------------------------------- METHOD NAME: itoolwatpmgr::save PURPOSE: To save the current list of templates to a file. CALLING SEQUENCE: oref->save, fname INPUTS: fname : Scalar string containing the name of the template file to to be written. OPTIONAL INPUTS: KEYWORD PARAMETERS: OUTPUTS: OPTIONAL OUTPUTS: COMMON BLOCKS: SIDE EFFECTS: RESTRICTIONS: PROCEDURE: EXAMPLE: MODIFICATION HISTORY: