Copyright (C) 2000-2012 |
Manpages cdk_menuSection: C Library Functions (3)Updated: 24 April 1997 Index Return to Main Contents NAMEnewCDKMenu, activateCDKMenu, injectCDKMenu, setCDKMenu, setCDKMenuCurrentItem, getCDKMenuCurrentItem setCDKMenuTitleHighlight, getCDKMenuTitleHighlight setCDKMenuSubTitleHighlight, getCDKMenuSubTitleHighlight, drawCDKMenu, eraseCDKMenu, destroyCDKMenu, setCDKMenuPreProcess, setCDKMenuPostProcess- Creates a managed curses menu widget. SYNOPSIScc [ flag ... ] file ... -lcdk [ library ... ] #include <cdk.h> CDKMENU *newCDKMenu (CDKSCREEN *cdkscreen, char ***menuList, int menuListLength, int *submenuListLength, int *menuLocation, int menuPos, chtype titleAttribute, chtype subtitleAttribute); int activateCDKMenu (CDKMENU *menu, chtype * actions); int injectCDKMenu (CDKMENU *menu, chtype input); void setCDKMenu (CDKMENU *menu, int menuItem, int submenuItem, chtype titleAttribute, chtype subtitleAttribute); void setCDKMenuCurrentItem (CDKMENU *menu, int menuItem, int submenuItem); void getCDKMenuCurrentItem (CDKMENU *menu, int *menuItem, int *submenuItem); void setCDKMenuTitleHighlight (CDKMENU *menu, chtype highlight); chtype getCDKMenuTitleHighlight (CDKMENU *menu); void setCDKMenuSubTitleHighlight (CDKMENU *menu, chtype highlight); chtype getCDKMenuSubTitleHighlight (CDKMENU *menu); void drawCDKMenu (CDKMENU *menu, boolean box); void eraseCDKMenu (CDKMENU *menu); void destroyCDKMenu (CDKMENU *menu); void setCDKMenuPreProcess (CDKMENU *menu, PROCESSFN callback, void * data); void setCDKMenuPostProcess (CDKMENU *menu, PROCESSFN callback, void * data); void bindCDKObject (EObjectType widgetType, void *object, chtype key, BINDFN function, void *data); DESCRIPTIONThe Cdk menu widget creates a pull-down menu list. The following are functions which create or manipulate the Cdk menu widget.AVAILABLE FUNCTIONSCDKMENU *newCDKMenu (CDKSCREEN *screen, char ***menuList, int f2menuListLength, int **submenuListLength, int *menuLocation, int menuPos, chtype titleAttribute, chtype subtitleAttribute);
int activateCDKMenu (CDKMENU *menu, chtype *actions); This function activates the menu widget and lets the user interact with the widget. The parameter menu is a pointer to a non-NULL menu widget. If the actions parameter is passed with a non-NULL value, the characters in the array will be injected into the widget. To activate the widget interactively pass in a NULL pointer for actions. If the character entered into this widget is RETURN then this then this function returns an integer value which is a value of the current menu list * 100 + the sub-menu number. It will also set the structure member exitType to vNORMAL. If the character entered into this widget was ESCAPE then the widget will return a value of -1 and the structure member exitType will be set to vESCAPE_HIT. int injectCDKMenu (CDKMENU *menu, chtype character);
void setCDKMenu (CDKMENU *menu, int menuItem, int submenuItem, chtype titleAttribute, chtype subtitleAttribute);
void setCDKMenuCurrentItem (CDKMENU *menu, int menuItem, int subMenuItem);
void getCDKMenuCurrentItem (CDKMENU *menu, int *menuItem, int *subMenuItem);
void setCDKMenuTitleHighlight (CDKMENU *menu, chtype highlight);
chtype getCDKMenuTitleHighlight (CDKMENU *menu);
void setCDKMenuSubTitleHighlight (CDKMENU *menu, chtype highlight);
chtype getCDKMenuSubTitleHighlight (CDKMENU *menu);
void drawCDKMenu (CDKMENU *menu, boolean box);
void eraseCDKMenu (CDKMENU *menu);
void destroyCDKMenu (CDKMENU *menu);
void setCDKMenuPreProcess (CDKMENU *menu, PROCESSFN function, void *data);
void bindCDKObject (EObjectType widgetType, void *object, char key, BINDFN function, void *data);
KEY BINDINGSWhen the widget is activated there are several default key bindings which will help the user enter or manipulate the information quickly. The following table outlines the keys and their actions for this widget.
SEE ALSOcdk(3), cdk_binding(3), cdk_display(3), cdk_screen(3)NOTESThe header file <cdk.h> automatically includes the header files <curses.h>, <stdlib.h>, <string.h>, <ctype.h>, <unistd.h>, <dirent.h>, <time.h>, <errno.h>, <pwd.h>, <grp.h>, <sys/stat.h>, and <sys/types.h>. The <curses.h> header file includes <stdio.h> and <unctrl.h>. If you have Ncurses installed on your machine add -DNCURSES to the compile line to include the Ncurses header files instead.
IndexThis document was created by man2html, using the manual pages. Time: 00:51:34 GMT, April 27, 2024 |