ITT Rule IDL Version 7.0 Manual do Utilizador Página 353

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 430
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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.
Vista de página 352
1 2 ... 348 349 350 351 352 353 354 355 356 357 358 ... 429 430

Comentários a estes Manuais

Sem comentários