Registered Properties
In order for an object property to be displayed in the WIDGET_PROPERTYSHEET interface, which makes it possible for a user to interactively change the value of the property using the mouse and keyboard, the following two conditions must be met:
- The property must belong to an object that subclasses from the IDLitComponent class. IDLitComponent provides the infrastructure necessary to display property sheets.
- The property must be registered. Properties that are not registered will never be displayed in a property sheet. (Note that registered properties can also be hidden, which prevents them from being displayed in a property sheet.)
This section provides a brief overview of property registration. See Chapter 4, “Property Management” (iTool Developer’s Guide in the help/pdf
directory of your IDL installation) for a more in-depth discussion.
Registering a Property
To register a property, use the RegisterProperty method of the IDLitComponent class:
Obj->IDLitComponent::RegisterProperty, PropertyIdentifier, $
[, TypeCode] [, ATTRIBUTE = value]
where PropertyIdentifier is a string that uniquely identifies the property, TypeCode is an integer between 0 and 9 specifying the property data type, and ATTRIBUTE is a property attribute.
Property identifier strings must obey certain rules; see Property Identifiers (Chapter 4, iTool Developer’s Guide) for details. Property type codes are discussed in Registered Property Data Types. Property attributes are discussed in Property Attributes (Chapter 4, iTool Developer’s Guide).
Registering All Available Properties
Some of the classes in the IDL object class library include a mechanism to register all available properties in a single operation. If an object class has a REGISTER_PROPERTIES property, then setting that property to 1 when creating the object automatically registers all properties that can be registered. If a property contains a “Yes” in the Registered box of the property description table, it will be registered automatically if the REGISTER_PROPERTIES property is set when the object is created. (See Modifying Object Properties for a description of the property description table.)
Registered Property Data Types
Registered properties must be of one of the data types listed in the following table.
Note: Properties of objects that are not registered (that is, properties that cannot appear in a property sheet) can be of any IDL data type.
User Defined Property Types
The User Defined property type lets you create a custom interface that allow users of your iTool to select data of types other than the predefined iTool property types. Creating a user defined property type entails the following:
- Creating an EditUserDefProperty method for the iTool component (usually a visualization or operation) that uses the user defined property. See IDLitComponent::EditUserDefProperty for details.
- Creating user interface code to allow users to select a value. In the initial release of the iTool system, this means writing an IDL widget interface, but in future releases other users interfaces may be available.
- Creating a user interface service to display the interface. See Creating a User Interface Service (iTool Developer’s Guide) for details.