ITT Rule IDL Version 7.0 User Manual Page 317

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 316
Chapter 14: Creating a User Interface Panel 317
iTool Developer’s Guide Creating a UI Panel Interface
The following statement retrieves an array of object references to all of the currently
selected items in the iTool:
oTargets = state.oTool->GetSelectedItems(COUNT = nTarg)
Note
Note that this example assumes that a reference to the iTool object is stored in the
oTool field of the state structure variable. The COUNT keyword to the
GetSelectedItems method returns the number of items selected.
Use the DoAction Method
In many cases, the user’s interaction with the user interface panel will instruct the
iTool to apply an iTool operation to the selected item. Where possible, use the
DoAction method of the operation to perform this task. Calling the DoAction method
ensures that the changes caused by the operation are properly inserted into the iTool
undo/redo system.
For example, the following statement:
success = state.oUI->DoAction('Operations/Rotate/RotateLeft')
calls the DoAction method on the IDLitUI object associated with the current iTool,
invoking the operation registered with the system with the operation identifier
'Operations/Rotate/RotateLeft'.
Redraw the iTool Window
Call the RefreshCurrentWindow method of the iTool object to force the iTool’s
window to update, displaying any changes that took place as the result of the
operations executed in your event handling routine:
state.oTool->RefreshCurrentWindow
Note
Note that this example assumes that a reference to the iTool object is stored in the
oTool field of the state structure variable.
Page view 316
1 2 ... 312 313 314 315 316 317 318 319 320 321 322 ... 429 430

Comments to this Manuals

No comments