ITT Rule IDL Version 7.0 User Manual Page 352

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 351
352 Chapter 15: Creating a Custom iTool Widget Interface
Handling Callbacks iTool Developer’s Guide
Handling Callbacks
User interface callback routines are executed when an iTool component, for which
the user interface has created an observer, generates a notification message. The
callback routine then uses the value of the notification message to determine what
action to take. Observers are created as described in “User Interface Registration” on
page 342. The iTool messaging system itself is discussed in “iTool Messaging
System on page 41.
Callback Routine Signature
A user interface widget callback routine has the following signature:
PRO
WidgetName_callback
,
Widget
,
IdOriginator
,
IdMessage
,
Value
where:
WidgetName_callback is the name of the callback routine.
Widget is the widget ID of the widget registered as an observer.
IdOriginator is a string identifying the source of the message (usually the
object identifier of an iTool component object, but it can be any string value).
IdMessage is a string that uniquely identifies the message being sent.
Val ue is a value that is associated with the message being sent.
See “iTool Messaging System on page 41 for more information on the IdMessage
and Valu e arguments.
Registration of Callback Routines
Callback routines are registered along with the user interface itself, in the call to the
RegisterWidget method of the IDLitUI object. See “User Interface Registration” on
page 342 for details.
Example Callback Routine
The following code segment illustrates a simple callback routine used in both the
idlitwdtool.pro interface and in the example custom interface developed later in
this chapter. This callback handles only one message, FILENAME, which is
generated when the user saves the current iTool with a new file name. When the
callback is executed, the title bar of the iTool interface is updated to reflect the new
file name.
Page view 351
1 2 ... 347 348 349 350 351 352 353 354 355 356 357 ... 429 430

Comments to this Manuals

No comments