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


next up previous contents index
Next: deleteregions.done - Function Up: deleteregions - Tool Previous: deleteregions - Tool


deleteregions - Constructor



Package display
Module widgets
Tool deleteregions


Construct a deleteregions widget


Synopsis
deleteregions(parent, table, regions, source, widgetset)


Arguments

parent Parent for the widget
Allowed: Widget
table The table of interest
Allowed: Table tool, image tool or string
Default: ''
regions Regions or region names (for source 'record' or 'global'
Allowed: Record or vector of strings
Default: ""
source Source of the regions
Allowed: String from 'table', 'record', or 'global'
Default: 'table'
widgetset The widget server to use
Allowed: widgetserver tool
Default: dws


Returns
Agent


Description

This is the constructor. If parent=F, then the widget will make its own parent frame.

The argument source specifies what the source of the regions is.

If source='table' then the regions are to be found in the Table specified with the argument table. The argument regions is ignored in this case. If you leave table unspecified, then you can enter the Table into the entry box provided in the GUI.

The Table can be specified in many ways (at construction and via the entry box in the GUI); a Table tool, an Image) tool, the name of a Table (a string) which might be an AIPS++ image, or the name of a Glish symbol which is either a Table or an Image tool.

If source='global' then the regions are to be found in the global name space of Glish. The argument table is ignored in this case. You must specify the names of the regions as a vector of strings with the regions argument.

If source='record' then the regions are to be found in the record given by the argument regions. The argument table is ignored in this case.



Example
- include 'deleteregions.g'   
- include 'regionmanager.g'
- dr1 := deleteregions(table='hcn', source='table');
- whenever dr1->deleted do {
   print 'regions deleted from table';
  }
-
- r1 := drm.quarter();
- r2 := drm.box();
- r3 := drm.box([10,10],20,20]);
- dr2 := deleteregions(source='global', regions="r1 r2 r3");
- whenever dr2->deleted do {
   print 'regions deleted from Glish';
  }
-
- r1 := drm.quarter();
- r2 := drm.box();
- r3 := drm.box([10,10],[20,20]);
- rec := [=];
- rec['r1'] := r1; rec['r2'] := r2; rec['r3'] := r3;
- dr3 := deleteregions(source='record', regions=rec);
- whenever dr3->deleted do {
   print 'regions deleted from record';
  }
-
We show the three ways to source the regions.





next up previous contents index
Next: deleteregions.done - Function Up: deleteregions - Tool Previous: deleteregions - Tool   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