next up previous contents
Next: Voice Response System Management Up: C-Module Previous: Specific Voice Response Applications   Contents

Subsections

User Interface (UI_)

    #include "ui.h"
    #include "ui_menu.h"

The user interface to VoRDE is a Nested Menu Handler (NMH).

Nested Menu Handler

NMH interacts with the user through the console (Key Board and Screen). Application programs interface to NMH through two data structures.
  1. "MenuItem" A data abstraction describing a menu item. A MenuItem has associated with it either a function or a MenuDef.
  2. "MenuDef" A data abstraction describing a menu. A menu is a set of MenuItems.

Appendix 'A' has a description of the commands and features supported by NMH.

User of NMH defines a menu by creating a MenuDef and a set of MenuItems that go with it. Each MenuItem has associated with it either a pointer to a function or a pointer to a MenuDef. When the console user issues the command corresponding to a MenuItem which has a function associated with it. NMH indirectly invokes the user supplied function. Syntax of the invocation is:

    (*menuFunc)(argc, argv, env);
    Int argc;
    String *argv;
    UI_Environment *env;
argc and argv are the translated information that was obtained from the console user. env describes the user interface environment and must only be used in conjunction with UI_ facilities. It is the responsiblety of the application program to interpret argc and argv.


next up previous contents
Next: Voice Response System Management Up: C-Module Previous: Specific Voice Response Applications   Contents