X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fmenu.priv.h;h=4c2a22d1ff8e0443939ce36acbf4b094b3620c27;hp=fb39c77975fd55d3e040a24ccf3089b352d13c56;hb=refs%2Ftags%2Fv5.0;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/menu/menu.priv.h b/menu/menu.priv.h index fb39c779..4c2a22d1 100644 --- a/menu/menu.priv.h +++ b/menu/menu.priv.h @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -50,10 +50,12 @@ extern MENU _nc_Default_Menu; /* Normalize menu to default if none was given */ #define Normalize_Menu( menu ) ((menu)=(menu)?(menu):&_nc_Default_Menu) +/* Get the user defined (framing) window of the menu */ +#define Get_Menu_UserWin(menu) ((menu)->userwin ? (menu)->userwin : stdscr) + /* Normalize menu window */ #define Get_Menu_Window( menu ) \ - ( (menu)->usersub ? (menu)->usersub : (\ - (menu)->userwin ? (menu)->userwin : stdscr )) + ((menu)->usersub ? (menu)->usersub : Get_Menu_UserWin(menu)) /* menu specific status flags */ #define _LINK_NEEDED (0x04) @@ -83,7 +85,7 @@ extern MENU _nc_Default_Menu; /* This macro ensures, that the item becomes visible, if possible with the specified row as the top row of the window. If this is not possible, - the top row will be adjusted and the value is stored in the row argument. + the top row will be adjusted and the value is stored in the row argument. */ #define Adjust_Current_Item(menu,row,item) \ { if ((item)->y < row) \ @@ -98,7 +100,7 @@ extern MENU _nc_Default_Menu; { (menu)->pindex = 0; \ (menu)->pattern[0] = '\0'; } -/* Internal functions. */ +/* Internal functions. */ extern void _nc_Draw_Menu(const MENU *); extern void _nc_Show_Menu(const MENU *); extern void _nc_Calculate_Item_Length_and_Width(MENU *); @@ -108,3 +110,5 @@ extern void _nc_Disconnect_Items(MENU *); extern void _nc_New_TopRow_and_CurrentItem(MENU *,int, ITEM *); extern void _nc_Link_Items(MENU *); extern int _nc_Match_Next_Character_In_Item_Name(MENU*,int,ITEM**); +extern int _nc_menu_cursor_pos(const MENU* menu, const ITEM* item, + int* pY, int* pX);