home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name MNVDISP -- Display virtual menu in a viewport.
- *
- * Synopsis presult = mnvdisp(pmenu,pwhere,
- * view_h,view_w,origin_row,origin_col,
- * pborder);
- *
- * BWINDOW *presult Pointer to newly-displayed BMENU
- * structure, or NIL if failure.
- * BWINDOW *pmenu Pointer to BMENU structure to
- * display.
- * WHERE *pwhere Pointer to WHERE structure denoting
- * device, display page, and coordinates
- * where window is to be displayed.
- * int view_h,view_w Dimensions of viewport (not counting
- * border).
- * int origin_row,origin_col
- * Coordinates of menu location to be
- * displayed in upper left corner of
- * viewport.
- * BORDER *pborder Pointer to BORDER structure denoting
- * type of border to put around window.
- *
- * Description This function displays a menu on a given video device
- * and display page and adds a border.
- *
- * An error occurs if pmenu does not point to a valid menu
- * structure. An error also occurs if the location where
- * the menu is to be displayed is impossible, for example
- * if an unknown device is requested or if the dimensions
- * of the menu exceed the screen's dimensions.
- *
- * Returns presult Pointer to newly-displayed BMENU
- * structure, or NIL if failure.
- * b_pcurwin Pointer to newly-displayed BWINDOW
- * structure, or unchanged if failure.
- * *pmenu->pwin Several fields altered.
- * b_wnlist[][] Linked list altered.
- * b_pactnode[][] Window node with active cursor.
- * b_wnerr Possible values:
- * (No change) Success.
- * MN_BAD_MENU *pmenu is invalid.
- * WN_BAD_WIN *pmenu's window is
- * invalid.
- * WN_ALREADY_SHOWN Already shown.
- * WN_BAD_DEV Unknown device or
- * window dimensions
- * overflow screen.
- * WN_NO_MEMORY Insufficient memory.
- * WN_BAD_NODE Internal error.
- * WN_BAD_PAGE Internal error.
- * WN_COVERED Internal error.
- * WN_ILL_DIM Internal error.
- * WN_NOT_SHOWN Internal error.
- * WN_NULL_PTR Internal error.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1987,1989
- *
- **/
-
- #include <bmenu.h>
-
- BMENU *mnvdisp(pmenu,pwhere,view_h,view_w,origin_row,origin_col,pborder)
- BMENU *pmenu;
- const WHERE *pwhere;
- int view_h,view_w,origin_row,origin_col;
- const BORDER *pborder;
- {
- /* Validate menu data structure. */
- mnvalidm (pmenu);
-
- /* Display the menu. */
- return ((wnvdisp (pmenu->pwin, pwhere, view_h, view_w,
- origin_row, origin_col, pborder) == NIL)
- ? NIL
- : pmenu);
- }