|
C-Menu 0.2.9
A User Interface Toolkit
|
Headder for C-Menu Menu, Form, Pick, and View components. More...
#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 | 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_FORMS 10 |
| #define | MAX_MENUS 10 |
| #define | MAX_PICK_OBJS 1024 |
| #define | MAX_PICKS 10 |
| #define | MAX_VIEWS 10 |
| #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 | |
| void | build_prompt (View *) |
| Build Prompt String. | |
| 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. | |
| void | destroy_line_table (View *) |
| Menu * | destroy_menu (Init *init) |
| Destroy Menu structure. | |
| Pick * | destroy_pick (Init *init) |
| Destroy Pick structure. | |
| View * | destroy_view (Init *init) |
| Destroy View structure. | |
| void | destroy_view_win (Init *) |
| int | display_prompt (View *, char *) |
| Display Command Line Prompt. | |
| 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 *) |
| Initialize the C-Menu View in box window mode. | |
| int | init_view_full_screen (Init *) |
| Initialize C-Menu View in full screen mode. | |
| void | initialize_line_table (View *) |
| Initialize Line Table. | |
| void | initialize_local_colors (SIO *) |
| Initialize local color variables and color pairs based on SIO settings. | |
| 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. | |
| void | next_page (View *) |
| Advance to Next Page. | |
| int | open_pick_win (Init *) |
| Initializes the pick window based on the parameters specified in the Pick structure. | |
| int | pad_refresh (View *) |
| Refresh Pad and Line Number Window. | |
| 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 | |
| int | process_config_file (char *, Init *) |
| void | view_boxwin_resize (Init *) |
| Resize the current window and its box. | |
| void | view_calc_boxwin_dimensions (Init *) |
| Calculate the dimensions and position of the box window for C-Menu View. | |
| void | view_calc_full_screen_dimensions (Init *) |
| Calculate the dimensions for full screen mode. | |
| int | view_cmd_processor (Init *) |
| Main Command Processing Loop for 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 (Init *, char *) |
| Initialize the input for the C-Menu View. | |
| void | view_stack_free (ViewStack *) |
| Free View Stack. | |
| bool | view_stack_init (ViewStack *, size_t) |
| Initialize View Stack. | |
| bool | view_stack_peek (const ViewStack *, View *) |
| Peek at Top Item of View Stack. | |
| bool | view_stack_pop (ViewStack *, View *) |
| Pop Item from View Stack. | |
| bool | view_stack_push (ViewStack *, View) |
| Push Item onto View Stack. | |
| 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 | |
| int | init_cnt |
| char | minitrc [MAXLEN] |
| ViewStack | view_stack |
Headder for C-Menu Menu, Form, Pick, and View components.
Definition in file common.h.
| #define destroy_cmenu | ( | ) |
Definition at line 67 of file common.h.
| #define new_cmenu | ( | ) |
Definition at line 54 of file common.h.
| enum Caller |
| enum OptGroup |
| enum OptType |
|
extern |
|
extern |
Definition at line 1653 of file view_engine.c.
References View::ln, View::ln_max_pos, View::ln_tbl, and View::ln_tbl_size.
Referenced by destroy_pick_view(), new_view_file(), and view_file().
|
extern |
Definition at line 318 of file init_view.c.
References View::box_pan, View::box_win, View::cmdln_pan, View::cmdln_win, View::lnno_pan, View::lnno_win, View::pad, View::pad_view_pan, View::pad_view_win, Init::view, view_win_del(), View::win_pan, and View::win_win.
Referenced by destroy_pick_view(), view_boxwin_resize(), and view_file().
|
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(), CC_NT, CC_NT_REV, display_error(), em0, em1, em2, handle_signal(), Perror(), sig_received, strnz__cat(), strnz__cpy(), 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 |
| by | the y coordinate for the form window |
| bx | the x coordinate for the form window |
by and bx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
by, and bx 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 112 of file popups.c.
References Init::argc, Init::argv, destroy_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 |
| by | the y coordinate for the menu window |
| bx | the x coordinate for the menu window |
by and bx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
by, and bx 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 |
| by | the y coordinate for the pick window |
| bx | the x coordinate for the pick window |
by and bx may be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
by, and bx 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, 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 |
| ilines | the number of lines for the view window |
| icols | the number of columns for the view window |
| by | the y coordinate for the view window |
| bx | the x coordinate for the view window |
ilines, cols, by, and bx may also be set as command line option arguments, in which case, they will take precedence over arguments passed in the function arguments.
ilines, cols, by, and bx 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 144 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(), Init::view, view_file(), 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 631 of file init.c.
References SIO::bblack, SIO::bblue, SIO::bcyan, Init::begx, Init::begy, SIO::bg, SIO::bgreen, SIO::black, SIO::blue, SIO::blue_gamma, SIO::bmagenta, SIO::borange, SIO::box_bg, SIO::box_fg, Init::brackets, SIO::brackets_bg, SIO::brackets_fg, SIO::bred, SIO::bwhite, SIO::byellow, Init::cmd, Init::cmd_all, Init::cols, SIO::cyan, Init::editor, expand_tilde(), Init::f_at_end_remove, Init::f_erase_remainder, Init::f_ignore_case, Init::f_ln, Init::f_multiple_cmd_args, Init::f_read_theme, Init::f_squeeze, Init::f_strip_ansi, SIO::fg, Init::fill_char, SIO::fill_char_bg, SIO::fill_char_fg, SIO::gray_gamma, SIO::green, SIO::green_gamma, Init::h_shift, SIO::ind_bg, SIO::ind_fg, Init::lines, SIO::ln_bg, SIO::ln_fg, SIO::magenta, Init::mapp_data, Init::mapp_help, Init::mapp_home, Init::mapp_msrc, Init::mapp_spec, Init::mapp_theme, Init::mapp_user, Init::minitrc, SIO::nt_bg, SIO::nt_fg, SIO::nt_hl_bg, SIO::nt_hl_fg, SIO::nt_hl_rev_bg, SIO::nt_hl_rev_fg, SIO::nt_rev_bg, SIO::nt_rev_fg, SIO::orange, Init::p_view_files, Init::parent_cmd, process_config_file(), Init::provider_cmd, Init::receiver_cmd, SIO::red, SIO::red_gamma, Init::select_max, Init::sio, str_to_bool(), str_to_double(), strnz__cpy(), Init::tab_stop, Init::title, SIO::title_bg, SIO::title_fg, unstr_hex_clr(), wait_timeout, SIO::white, and SIO::yellow.
Referenced by process_config_file(), process_config_files(), and read_theme().
|
extern |
Definition at line 44 of file mem.c.
Referenced by destroy_init(), and new_init().
|
extern |
Definition at line 34 of file init_view.c.