About the Properties Interface

Object properties are used to store settings and values that relate to visualizations, data, and other components of an iTool. The iTools system presents a graphical property sheet interface to tool users; see iTool Property Sheets (iTool User's Guide) for a description of the property sheet interface. As a tool developer, you can manage individual property values, as well as the property set that is visible to users of your application, programmatically.

Note
In most cases, you do not need to manage updates to visualizations or data that result from a user's modifications to values in a property sheet. See Property Update Mechanism for details.

What is a Property?

A property is a value that is associated with an object instance. Examples of property values commonly associated with iTool objects are Boolean True/False flags, text strings, color values stored as RGB triplets, and integer and floating point values. For example, a plot visualization object might have a Color property that defines the line color as an RGB triplet, a Line thickness property that defines the thickness of the line drawn as an integer value in pixels, and a Name property that defines how the plot is referred to in iTool browser windows.

Properties vs. Preferences

In the case of objects that have a visual representation (plots, annotations, surfaces, axes, etc.), properties apply to a single instance of an object. When a new instance of the same type of object is created, any property changes applied to the first object are not applied to the second. For example, if you change the color of a plot line to red, subsequent plot lines will still be created with the default line color.

In the case of non-visual objects (operations, file readers and writers, and manipulators) only one instance of the object is created no matter how many times the object is requested. As a result, properties set on these objects will "stick" until changed again. For example, if you change the value of the Width property of the Smooth operation, the property will retain the value you set until you change it again or close that iTool.

Finally, properties that apply to all iTools and which are preserved between iTool sessions are known as preferences. Preferences include default values for properties of visual objects (default line style, colors, etc.), and default properties for file readers, and file writers.

How are Properties Displayed?

Any iTool object can have properties. Properties are always displayed via the iTool property sheet interface, which uses the IDL WIDGET_PROPERTYSHEET function to present property names and values in a columnar display. The way the property sheet interface is displayed to iTool users depends on the type of object for which properties are being displayed.

Setting and Retrieving Property Values

iTool property values are set and retrieved like all object property values, via SetProperty and GetProperty methods. See IDLitComponent::SetProperty and "IDLitComponent::GetProperty" (IDL Reference Guide) for details, but remember that your own object classes will be responsible for implementing these methods and handling the actual property values. See the chapters in Using the iTools Component Framework for examples of GetProperty and SetProperty methods.

Property Data Types

While object properties can contain any value that can be stored in IDL, the iTool property sheet interface (based on the WIDGET_PROPERTYSHEET routine) will only display properties of nine predefined property data types. (See Property Data Types for descriptions of the predefined types.) In addition, the property sheet interface allows developers to build and associate a separate widget-based user interface that allows iTool users to specify data values of any IDL data type. User-defined property values are discussed in User Defined Property Types.

Property Registration

In order for an object property to be displayed by the graphical property sheet interface, it must be registered with the iTool system. Properties are generally registered when an object is created; see Registering Properties for additional details.

Property Identifiers

Properties are referenced within the iTools system using property identifiers, which are simple scalar strings defined when the property is registered. See Property Identifiers for details.

Property Attributes

In addition to the property value, properties have attributes that affect the way the property is displayed in the property sheet user interface. See Property Attributes for details.

Property Aggregation

Visualization objects can be built from any number of atomic IDL graphic objects and iTool visualization objects. The property aggregation mechanism allows the properties of all of the objects in a visualization to be displayed in a single property sheet. See Property Aggregation for details.