WtProcessEvent Function
Handles the dispatching of a Widget Toolbox event.
Usage
status = WtProcessEvent( )
Input Parameters
None.
Returned Value
status — Value indicating success or failure of processed event as follows:
1 — Indicates the event loop is stopped.
0 — Indicates the event was processed.
–1 — Indicates the keyboard was received.
Keywords
Drain — Causes all pending events to be flushed.
Discussion
WtProcessEvent processes one Widget Toolbox event. Use this function to process Widget Toolbox events in the user-customized event loop, or to temporarily halt the execution of the PV‑WAVE program while still processing Widget Toolbox events.
WtProcessEvent normally processes a single event. If there are no pending events, then it will wait (block) for the next event. If you use the Drain keyword, then WtProcessEvent will process all pending events and then return. If no events are pending, it returns immediately, without blocking.
Example
WtProcessEvent is used in the source code for the WwAlert function to process events until the user presses a button, or until the event processing fails. The source code for WwAlert is in:
Unix: WAVE_DIR/lib/std/motif/wwalert.pro
Windows: WAVE_DIR\lib\std\windows\wwalert.pro
Where WAVE_DIR
is the main PV‑WAVE directory.
See Also
For detailed information on GUI development, refer to the PV‑WAVE Application Developer’s Guide.
For more information about how to write an application program based on PV‑WAVE Widgets, refer to Using Wave Widgets in the PV‑WAVE Application Developer’s Guide.