Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ menu_driver(3x) — Atari System V ue12

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

curses(3X)

menus(3X)





   menu_driver(3X)                                             menu_driver(3X)


   NAME
         menudriver - command processor for the menus subsystem

   SYNOPSIS
         #include <menu.h>

         int menudriver(MENU *menu, int c);

   DESCRIPTION
         menudriver is the workhorse of the menus subsystem.  It checks to
         determine whether the character c is a menu request or data.  If c is
         a request, the menu driver executes the request and reports the
         result.  If c is data (a printable ASCII character), it enters the
         data into the pattern buffer and tries to find a matching item.  If
         no match is found, the menu driver deletes the character from the
         pattern buffer and returns ENOMATCH.  If the character is not
         recognized, the menu driver assumes it is an application-defined
         command and returns EUNKNOWNCOMMAND.

         Menu driver requests:
         REQLEFTITEM     Move left to an item.
         REQRIGHTITEM    Move right to an item.
         REQUPITEM       Move up to an item.
         REQDOWNITEM     Move down to an item.
         REQSCRULINE     Scroll up a line.
         REQSCRDLINE     Scroll down a line.
         REQSCRDPAGE     Scroll up a page.
         REQSCRUPAGE     Scroll down a page.
         REQFIRSTITEM    Move to the first item.
         REQLASTITEM     Move to the last item.
         REQNEXTITEM     Move to the next item.
         REQPREVITEM     Move to the previous item.
         REQTOGGLEITEM   Select/de-select an item.
         REQCLEARPATTERN Clear the menu pattern buffer.
         REQBACKPATTERN  Delete the previous character from pattern buffer.
         REQNEXTMATCH    Move the next matching item.
         REQPREVMATCH    Move to the previous matching item.

   RETURN VALUE
         menudriver returns one of the following:
         EOK              - The routine returned successfully.
         ESYSTEMERROR    - System error.
         EBADARGUMENT    - An incorrect argument was passed to the routine.
         EBADSTATE       - The routine was called from an initialization or
                             termination function.
         ENOTPOSTED      - The menu has not been posted.
         EUNKNOWNCOMMAND - An unknown request was passed to the menu
                             driver.
         ENOMATCH        - The character failed to match.
         ENOTSELECTABLE  - The item cannot be selected.
         EREQUESTDENIED  - The menu driver could not process the request.


   7/91                                                                 Page 1









   menu_driver(3X)                                             menu_driver(3X)


   NOTES
         Application defined commands should be defined relative to (greater
         than) MAXCOMMAND, the maximum value of a request listed above.

         The header file <menu.h> automatically includes the header files
         <eti.h> and <curses.h>.

   SEE ALSO
         curses(3X), menus(3X).












































   Page 2                                                                 7/91





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026