ITT Rule IDL Version 7.0 User Manual Page 207

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 206
Chapter 8: Creating a Manipulator 207
iTool Developer’s Guide Creating a New Manipulator
Creating the Manipulator Class Structure Definition
When any IDL object is created, IDL looks for an IDL class structure definition that
specifies the instance data fields needed by an instance of the object, along with the
data types of those fields. The object class structure must be defined before any
objects of the type are created. In practice, when the IDL OBJ_NEW function
attempts to create an instance of a specified object class, it executes a procedure
named
ObjectClass
__define (where ObjectClass is the name of the object),
which is expected to define an IDL structure variable with the correct name and
structure fields. For additional information on how IDL creates object instances, see
“The Object Lifecycle (Chapter 13, Object Programming).
Note
The class structure definition is generally the last routine in the
.pro file that
defines an object class.
Subclassing From the IDLitManipulator Class
The IDLitManipulator class is the base class for all iTool manipulators. In almost all
cases, new manipulators will be subclassed either from the IDLitManipulator class or
from a class that is a subclass of IDLitManipulator.
Note
If you are implementing a number of manipulators that provide similar
functionality, and you want the user to choose one out of the group of items, you
may want to create a manipulator container. See “Manipulators and Manipulator
Containers” on page 194 for an introduction to these objects.
See “IDLitManipulator” (IDL Reference Guide) for details on the methods and
properties available to classes that subclass from IDLitManipulator.
Example Class Structure Definition
The following is the class structure definition for the ExampleManip operation class.
This procedure should be the last procedure in a file named
examplemanip__define.pro.
; Class Definition.
PRO ExampleManip__define
; Define the MyManipulator class structure, which inherits the
; IDLitManipulator class.
struct = { ExampleManip, $
Page view 206
1 2 ... 202 203 204 205 206 207 208 209 210 211 212 ... 429 430

Comments to this Manuals

No comments