|
C-Menu 0.2.9
A User Interface Toolkit
|
Headder for C-Menu Menu, Form, Pick, and View components. More...
#include <ncursesw/ncurses.h>#include <cm.h>#include <form.h>#include <menu.h>#include <pick.h>#include <view.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | Init |
| Gathers runtime information for C-Menu Menu, Form, Pick, and View components, used for passing common data and state during initialization and processing of these componentsi. More... | |
Macros | |
| #define | _GNU_SOURCE |
| #define | _XOPEN_SOURCE_EXTENDED 1 |
| #define | ABOUT ".about" |
| #define | ACCEPT_PROMPT_CHAR '_' |
| #define | COLOR_LEN 8 |
| #define | DEFAULTEDITOR "vi" |
| #define | destroy_cmenu() |
| #define | EIGHT 8 |
| #define | FORM_HELP_FILE "form.help" |
| #define | MAPP_DIR "~/menuapp" |
| #define | MAX_PICK_OBJS 1024 |
| #define | MAX_WIDE_LEN 1024 |
| #define | MAXOPTS 50 |
| #define | MENU_HELP_FILE "menu.help" |
| #define | MIN_COLS 40 |
| #define | MINITRC ".minitrc" |
| #define | NCURSES_WIDECHAR 1 |
| #define | new_cmenu() |
| #define | P_READ 0 |
| #define | P_WRITE 1 |
| #define | PICK_HELP_FILE "pick.help" |
| #define | PICK_MAX_ARG_LEN 256 |
| #define | PRINTCMD "lp -c -s" |
| #define | TRUE 1 |
| #define | USE_PAD TRUE |
| #define | VIEW_HELP_FILE "view.help" |
| #define | VIEW_PRT_FILE "prtout" |
Typedefs | |
| typedef Form | Form |
| typedef Menu | Menu |
| typedef Pick | Pick |
| typedef View | View |
Enumerations | |
| enum | Caller { VIEW , FORM , PICK , MENU } |
| enum | OptGroup { OG_FILES , OG_DIRS , OG_SPECS , OG_MISC , OG_PARMS , OG_FLAGS , OG_COL } |
| option groups More... | |
| enum | OptType { OT_STRING , OT_INT , OT_BOOL , OT_HEX } |
| option types More... | |
Functions | |
| int | cmd_processor (Init *) |
| bool | derive_file_spec (char *, char *, char *) |
| Derive full file specification from directory and file name. | |
| Form * | destroy_form (Init *init) |
| Destroy Form structure. | |
| Init * | destroy_init (Init *init) |
| Destroy Init structure. | |
| Menu * | destroy_menu (Init *init) |
| Destroy Menu structure. | |
| Pick * | destroy_pick (Init *init) |
| Destroy Pick structure. | |
| View * | destroy_view (Init *init) |
| Destroy View structure. | |
| int | init_form (Init *, int, char **, int, int) |
| Initialize form data structure and parse description file. | |
| bool | init_menu_files (Init *, int, char **) |
| Initialize Menu file specifications. | |
| int | init_pick (Init *, int, char **, int, int) |
| Initializes pick structure and opens pick input file or pipe. | |
| int | init_view_boxwin (Init *, char *) |
| Initialize the C-Menu View in box window mode. | |
| int | init_view_full_screen (Init *) |
| Initialize C-Menu View in full screen mode. | |
| void | mapp_initialization (Init *, int, char **) |
| Main initialization function for MAPP - Menu Application. | |
| unsigned int | menu_engine (Init *) |
| The main loop of the menu system. | |
| Form * | new_form (Init *, int, char **, int, int) |
| Create and initialize Form structure. | |
| Init * | new_init (int, char **) |
| Create and initialize Init structure. | |
| Menu * | new_menu (Init *, int, char **, int, int) |
| Create and initialize Menu structure. | |
| Pick * | new_pick (Init *, int, char **, int, int) |
| Create and initialize Pick structure. | |
| View * | new_view (Init *) |
| Create and initialize View structure. | |
| int | open_pick_win (Init *) |
| Initializes the pick window based on the parameters specified in the Pick structure. | |
| unsigned int | parse_menu_description (Init *) |
| Parse menu description file and create Menu. | |
| int | parse_opt_args (Init *, int, char **) |
| Parse command-line options and set Init struct values accordingly. | |
| int | pick_engine (Init *) |
| Initializes pick interface, calculates window size and position, and enters picker loop. | |
| int | popup_ckeys () |
| Display Curses Keys Responds to curses keys and mouse events, displaying the key code and description. | |
| int | popup_form (Init *, int, char **, int, int) |
| instantiate a form popup window | |
| int | popup_menu (Init *, int, char **, int, int) |
| instantiate a menu popup window | |
| int | popup_pick (Init *, int, char **, int, int) |
| instantiate a pick popup window | |
| int | popup_view (Init *, int, char **, int, int, int, int) |
| instantiate a view popup window | |
| void | view_calc_full_screen_dimensions (Init *) |
| Calculate the dimensions for full screen mode. | |
| void | view_calc_win_dimensions (Init *, char *title) |
| Calculate the dimensions and position of the box window for C-Menu View. | |
| int | view_file (Init *) |
| Start view. | |
| void | view_full_screen_resize (Init *) |
| Resize the full screen view and its components. | |
| int | view_init_input (View *, char *) |
| Initialize the input for a C-Menu View. | |
| void | view_win_resize (Init *, char *) |
| Resize the current window and its box, and update the title. | |
| int | write_config (Init *) |
| Write the current configuration to a file specified in init->minitrc. | |
| void | zero_opt_args (Init *) |
| Initialize optional arguments in the Init struct to default values. | |
Variables | |
| Init * | init |
| int | init_cnt |
| char | minitrc [MAXLEN] |
Headder for C-Menu Menu, Form, Pick, and View components.
Definition in file common.h.
| #define destroy_cmenu | ( | ) |
Definition at line 64 of file common.h.
| #define new_cmenu | ( | ) |
Definition at line 51 of file common.h.
| enum OptGroup |
| enum OptType |
|
extern |
|
extern |
Display Curses Keys Responds to curses keys and mouse events, displaying the key code and description.
Definition at line 23 of file curskeys.c.
References box_new(), display_error(), em0, em1, em2, handle_signal(), Perror(), sig_received, strnz__cat(), strnz__cpy(), win_box, win_del(), win_ptr, and win_win.
Referenced by main(), and menu_cmd_processor().
|
extern |
instantiate a form popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| begy | the y coordinate for the form window |
| begx | the x coordinate for the form window |
begy and begx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 113 of file popups.c.
References Init::argc, Init::argv, destroy_form(), form, Init::form, init_form(), parse_opt_args(), and zero_opt_args().
Referenced by enter_file_spec(), and menu_cmd_processor().
|
extern |
instantiate a menu popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| begy | the y coordinate for the menu window |
| begx | the x coordinate for the menu window |
begy and begx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 53 of file popups.c.
References Init::argc, Init::argv, destroy_menu(), Init::menu, menu_engine(), new_menu(), parse_opt_args(), and zero_opt_args().
Referenced by menu_cmd_processor().
|
extern |
instantiate a pick popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| begy | the y coordinate for the pick window |
| begx | the x coordinate for the pick window |
begy and begx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 83 of file popups.c.
References Init::argc, Init::argv, destroy_pick(), init_pick(), parse_opt_args(), Init::pick, pick, and zero_opt_args().
Referenced by menu_cmd_processor().
|
extern |
instantiate a view popup window
| init | the Init struct pointer |
| argc | the number of command line arguments |
| argv | the command line arguments |
| lines | the number of lines for the view window |
| cols | the number of columns for the view window |
| begy | the y coordinate for the view window |
| begx | the x coordinate for the view window |
lines, cols, begy, and begx may also be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
lines, cols, begy, and begx may be set by
1. the calling function
or
2. command line arguments
Non-zero command line arguments will override the calling function's
arguments.
Definition at line 146 of file popups.c.
References Init::begx, View::begx, Init::begy, View::begy, Init::cols, View::cols, destroy_view(), View::f_full_screen, init_view_boxwin(), Init::lines, View::lines, new_view(), parse_opt_args(), View::title, Init::view, view, view_calc_win_dimensions(), view_file(), win_del(), and zero_opt_args().
Referenced by display_pick_help(), exec_objects(), form_engine(), form_exec_receiver(), menu_cmd_processor(), and view_display_help().
|
extern |
Definition at line 43 of file mem.c.
Referenced by destroy_init(), and new_init().