home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name MNHILITE -- Move or remove menu highlight bar
- * or item description.
- *
- * Synopsis presult = mnhilite(pmenu,row,col,option);
- *
- * BMENU *presult Pointer to newly-changed BMENU
- * structure, or NIL if failure.
- * int row,col Row and column of item to highlight.
- * Ignored if MN_UNHIGHLIGHT specified.
- * int option Option bits:
- *
- * MN_HIGHLIGHT
- * MN_UNHIGHLIGHT (ignores row and col)
- * MN_USE_DESCRIPTION
- * WN_UPDATE or WN_NO_UPDATE
- *
- * Description This function highlights a menu item or removes the
- * highlight bar. It optionally adds or removes the item's
- * Lotus-style description string.
- *
- * This function will not work on protected menu items.
- *
- * Returns presult Pointer to newly-changed BMENU
- * structure, or NIL if failure.
- * b_wnerr Possible values:
- * (No change) Success.
- * WN_BAD_OPT Unknown option.
- * MN_BAD_MENU pmenu is invalid.
- * WN_BAD_WIN pmenu->pwin is invalid.
- *
- * WN_NOT_SHOWN Internal error.
- * WN_BAD_DEV Internal error.
- * MN_BAD_ITEM Internal error.
- * WN_ILL_DIM Internal error.
- * WN_NULL_PTR Internal error.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1989
- *
- **/
-
- #include <bmenu.h>
-
- BMENU *mnhilite(pmenu,row,col,option)
- BMENU *pmenu;
- int row,col,option;
- {
- BITEM *pitem;
-
- mnvalidm(pmenu) /* Validate menu. */
-
- switch (option & (MN_HIGHLIGHT | MN_UNHIGHLIGHT))
- {
- case MN_HIGHLIGHT:
- if (NIL == (pitem = mnmchitm(pmenu,NIL,row,col,0,NIL)))
- return NIL;
- break;
-
- case MN_UNHIGHLIGHT:
- pitem = NIL;
- break;
-
- default:
- wnreterr(WN_BAD_OPT);
- }
-
- return mnhilit0(pmenu,pitem,option);
- }