ITT Rule IDL Version 7.0 Manuale Utente Pagina 353

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 430
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 352
Chapter 15: Creating a Custom iTool Widget Interface 353
iTool Developer’s Guide Handling Callbacks
PRO example2_wdtool_callback, wBase, strID, messageIn, userdata
; Retrieve a pointer to the state structure.
wChild = WIDGET_INFO(wBase, /CHILD)
WIDGET_CONTROL, wChild, GET_UVALUE = pState
; Handle the message that was passed in.
CASE STRUPCASE(messageIn) OF
'FILENAME': BEGIN
filename = FILE_BASENAME(userdata)
newTitle = (*pState).title + ' [' + filename + ']'
WIDGET_CONTROL, wBase, TLB_SET_TITLE = newTitle
END
ELSE: ; Do nothing
ENDCASE
Your callback routine may be more complex, handling any number of messages sent
to the user interface. In practice, the callback routine for a user interface is often quite
simple — the standard user interface used by the iTools in IDL 6.2 handles only three
messages.
Note
Your callback routine is also free to quietly ignore any messages. For example, you
may choose to do nothing when the FILENAME message is received.
Vedere la pagina 352
1 2 ... 348 349 350 351 352 353 354 355 356 357 358 ... 429 430

Commenti su questo manuale

Nessun commento