IDL's object class library is documented in this section. The page or pages describing each class include references to any superclasses of the class, to the properties of the class, and to the methods associated with the class. Class methods are documented alphabetically following the description of the class itself.
A description of each method follows its name. Beneath the general description of the method are a number of sections that describe the Syntax for the method, its arguments (if any), its keywords (if any). These sections are described below.
The Syntax section shows the proper syntax for calling the method.
IDL procedure methods have the syntax:
Obj->Procedure_Name, Argument [, Optional_Arguments]
where Obj is a valid object reference, Procedure_Name is the name of the procedure method, Argument is a required parameter, and Optional_Argument is an optional parameter to the procedure method. The square brackets around optional arguments are not used in the actual call to the procedure, they are simply used to denote the optional nature of the arguments within this document.
IDL function methods have the syntax:
Result = Obj->Function_Name(Argument [, Optional_Arguments])
where Obj is a valid object reference, Result is the returned value of the function method, Function_Name is the name of the function method, Argument is a required parameter, and Optional_Argument is an optional parameter. The square brackets around optional arguments are not used in the actual call to the function, they are simply used to denote the optional nature of the arguments within this document.
The Arguments section describes each valid argument to the method.
Often, arguments that contain values upon return from the function or procedure method ("output arguments") are described as accepting "named variables." A named variable is simply a valid IDL variable name. This variable does not need to be defined before being used as an output argument. Note, however that when an argument calls for a named variable, only a named variable can be used-sending an expression causes an error.
The Keywords section describes each valid keyword argument to the method.
Keyword arguments are supplied to IDL methods by including the keyword name followed by an equal sign ("=") and the value to which the keyword should be set. Note that keywords can be abbreviated to their shortest unique length. For example, the XSTYLE keyword can be abbreviated to XST.
When the documentation for a keyword says something similar to, "Set this keyword to enable logarithmic plotting," the keyword is simply a switch that turns an option on and off. Usually, setting such keywords equal to 1 causes the option to be turned on. Explicitly setting the keyword to zero (or not including the keyword) turns the option off.
There is a "shortcut" that can be used to set a keyword equal to 1 without the usual syntax (i.e.,
KEYWORD=1). To "set" a keyword, simply preface it with a slash character ("/"). For example, to create a surface object with a skirt around it, set the SKIRT keyword to the SURFACE routine as follows:
mySurface = OBJ_NEW('IDLgrSurface', DIST(10), /SKIRT)
To create an object from the IDL object class library, use the OBJ_NEW function. See OBJ_NEW. The Init method for each class describes the arguments and keywords available when you are creating a new object.
For example, to create a new object from the IDLgrAxis class, use the following call to OBJ_NEW along with the arguments and keywords accepted by the IDLgrAxis::Init method:
myAxis = OBJ_NEW(IDLgrAxis, DIRECTION = 1, RANGE = [0.0, 40.0])