ITT Rule IDL Version 7.0 Manuel d'utilisateur Page 219

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 430
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 218
Chapter 8: Creating a Manipulator 219
iTool Developer’s Guide Creating a New Manipulator
; the retrieved IDLitVisImage object.
self.oImage = (*self.pSelectionList)[0]
ENDIF ELSE BEGIN
RETURN
ENDELSE
; Record the current values for the selected images.
iStatus = self->RecordUndoValues()
; *** Interact with the visualization based upon key press.
; ...
; Commit this transaction.
iStatus = self->CommitUndoValues()
; Write information to the status bar
; using inherited IDLitIMessaging ProbeStatusMessage method.
self->ProbeStatusMessage, 'Some manpulation information'
; Update the window to reflect the changes made.
oWin->Draw
END
Discussion
The OnKeyboard method will customarily contain portions of code from any
implemented mouse transaction methods. In this example, if a button press event
occurred, access the list of selected items and verify that the first item is an image. If
so, call IDLitManipulator::RecordUndoValues, as was previously shown in the
OnMouseDown method. Interact with the visualization as defined in an
OnMouseDown or OnMouseMotion method. After making modifications, call
CommitUndoValues to commit the transaction to the undo/redo buffer, previously
shown in the OnMouseUp method. Use the IDLitIMessaging::ProbeStatusMessage
method to write information to the status bar of the iTool and access the
oWin
parameter to update the window, as was previously shown in the OnMouseMotion
method.
Creating a RegisterCursor Method
It is a useful visual indication to the user that a manipulator has been activated if the
cursor changes. You can define a pre-existing cursor for a manipulator using the
DEFAULT_CURSOR property during initialization as described in “Example Init
Method” on page 210 or using the SetProperty method. If none of the predefined
cursors suit your needs, you can create a custom cursor by calling a method that
Vue de la page 218
1 2 ... 214 215 216 217 218 219 220 221 222 223 224 ... 429 430

Commentaires sur ces manuels

Pas de commentaire