Vermont Views processing functions, such as fm_proc(), mn_proc(), cl_proc(), and wn_proc(), all contain event loops to process user input. These functions check periodically for events, such as a keystroke or mouse event, and then search event tables to determine what to do based on the event received.
Vermont Views processes three types of events: key events, mouse events, and internal events. Key events are recorded when the user presses a key or a key combination; mouse events are recorded when the user clicks the mouse under PCDOS; and internal events are recorded when Vermont Views posts an event, or when you post an event from your code.
The processing functions in Vermont Views, such as fm_proc(), mn_proc(), and wn_browse(), use these recorded events to determine what the user wants to do next. For example, if the user presses the Exit key, the processing function receives this event and exits from the form or window. Vermont Views posts internal events to inform the processing function to perform certain actions. For example, when the user enters a data field, Vermont Views posts an internal event notifying the form editor to display the field message.
This chapter discusses how events are handled by the Vermont Views processing functions. You can also post and handle events in your code. For more information about handling events in your code, see Chapter 41, "Processing Events and Keystrokes in Your Code," and Chapter 42, "Posting Events from Your Code."