ITT Rule IDL Version 7.0 User Manual Page 370

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 369
370 Chapter 15: Creating a Custom iTool Widget Interface
Example: a Custom iTool Interface iTool Developers Guide
; Set the COLOR property on the plot line and commit the change.
void = (*pState).oTool->DoSetProperty(plotID, 'COLOR', $
newcolor)
(*pState).oTool->CommitActions
END
Discussion
This routine uses the same technique as the draw_plot_event routine to ensure that
our iTool is the current tool. It then retrieves the identifier of the plot line, ensures
that the line itself is selected, and sets the COLOR property on the line. For additional
information on retrieving component identifiers and changing property values, see
Appendix A, “Controlling iTools from the IDL Command Line.
filter_event
The filter_event routine is specified as the event handler for the “Filter this Plot
button in the custom section of the interface. The complete code for this event-
handler routine is shown below.
PRO filter_event, event
; Retrieve a pointer to the state structure.
wChild = WIDGET_INFO(event.top, /CHILD)
WIDGET_CONTROL, wChild, GET_UVALUE = pState
; Get the iTool identifier and make sure our iTool
; is the current tool.
toolID = (*pState).oTool->GetFullIdentifier()
ITCURRENT, toolID
; Select the first plot line visualization in the window.
; There should be only one line, but we select the first one
; just to be sure. Also retrieve the identifier for the Median
; filter operation.
plotID = (*pState).oTool->FindIdentifiers('*plot*', $
/VISUALIZATIONS)
medianID = (*pState).oTool ->FindIdentifiers('*median', $
/OPERATIONS)
plotObj = (*pState).oTool->GetByIdentifier(plotID[0])
plotObj->Select
; Apply the Median filter operation to the selected plot line
; and commit the change.
void = (*pState).oTool->DoAction(medianID)
(*pState).oTool->CommitActions
Page view 369
1 2 ... 365 366 367 368 369 370 371 372 373 374 375 ... 429 430

Comments to this Manuals

No comments