user manual
Chapter 6: Creating a Visualization 127
iTool Developer’s Guide Creating a New Visualization Type
Setting Property Attributes
If a property has already been registered, perhaps by a superclass of your
visualization class, you can change the registered attribute values using the
SetPropertyAttribute method of the IDLitComponent class:
self->SetPropertyAttribute,
Identifier
where Identifier is the name of the keyword to the GetProperty and SetProperty
methods used to retrieve or change the value of this property. (The Identifier is
specified in the call to RegisterProperty either via the PropertyName argument or the
IDENTIFIER keyword.) See “Property Attributes” on page 78 for additional details.
Adding Graphics Objects to the Visualization
An iTool visualization type must contain at least one IDLit* visualization object or
IDLgr* graphics object. To add a visualization or graphics object, you must first
create an instance of the object using the OBJ_NEW function, then add the object
instance to the visualization using the Add method of the IDLitVisualization class:
Graphics_Object = OBJ_NEW('
IDLitVisObject
')
self->Add, Graphics_Object
where IDLitVisObject is an actual IDL iTool visualization class, such as
IDLitVisPlot.
In practice, you should also consider the following when adding a visualization or
graphics object to a visualization type:
• The visualization or graphics object reference should generally be placed in a
specific field of the visualization type’s class structure. This allows you access
to the object when you have the reference to the visualization object itself.
• In most cases, you will want to include the REGISTER_PROPERTIES
keyword in the call to OBJ_NEW when creating a visualization or graphics
object instance. This keyword does the work of registering all registrable
properties of the object automatically, relieving you from the need to manually
register the properties you want to show up in the visualization’s property
sheet.
• Including the PRIVATE keyword in the call to OBJ_NEW indicates that the
visualization or graphics object should not appear in the iTools visualization
browser itself; users gain access to the object’s properties via the visualization
to which the object is being added.
A typical addition of a graphics object to a visualization looks like this:
self._oPlot = OBJ_NEW('IDLitVisPlot', /REGISTER_PROPERTIES, $