ITT Rule IDL Version 7.0 User Manual Page 361

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 360
Chapter 15: Creating a Custom iTool Widget Interface 361
iTool Developer’s Guide Example: a Custom iTool Interface
Note
The code for this example is provided in the IDL distribution, in the
examples/doc/itools subdirectory of the main IDL directory. You can run the
example code directly by entering example2tool at the IDL prompt.
Widget Interface Creation Routine
This section describes the widget interface creation routine for the example interface.
Example Code
The example consists of several routines and is quite long. As a result, this
discussion deals with individual chunks and may skip briefly over sections that
have more to do with widget programming and are not explicitly related to the
creation of an iTool interface. To see the routine in its entirety, inspect the file
example2_wdtool.pro in the examples/doc/itools subdirectory of the IDL
distribution. Run the example procedure by entering
example2_wdtool at the
IDL command prompt or view the file in an IDL Editor window by entering
.EDIT
example2_wdtool.pro.
Individual routines in the interface definition are discussed here in the order they
appear in the source file. The routines are:
example2_wdtool_callback (page 362)
example2_wdtool_resize (page 363)
example2_wdtool_cleanup (page 365)
example2_wdtool_event (page 365)
draw_plot_event (page 367)
linesize_event (page 368)
color_event (page 369)
filter_event (page 370)
example2_wdtool (page 371)
In our interface definition, we store the state structure for the entire widget interface
in a pointer (named
pState) that is itself stored in the user value of the first child
widget of the top-level base widget. This is a standard technique that allows us to
pass information about the interface between the interface routines. (Handling of
widget state information is discussed in detail in “Managing Application State” and
“Creating a Compound Widget” (Chapter 2, Widget Application Programming).) If
Page view 360
1 2 ... 356 357 358 359 360 361 362 363 364 365 366 ... 429 430

Comments to this Manuals

No comments