|
C-Menu 0.2.9
A User Interface Toolkit
|
Create, populate, and destroy main data structures for C-Menu. More...
Functions | |
| Init * | new_init (int argc, char **argv) |
| Create and initialize Init structure. | |
| Init * | destroy_init (Init *init) |
| Destroy Init structure. | |
| Menu * | new_menu (Init *init, int argc, char **argv, int begy, int begx) |
| Create and initialize Menu structure. | |
| Menu * | destroy_menu (Init *init) |
| Destroy Menu structure. | |
| Pick * | new_pick (Init *init, int argc, char **argv, int begy, int begx) |
| Create and initialize Pick structure. | |
| Pick * | destroy_pick (Init *init) |
| Destroy Pick structure. | |
| Form * | new_form (Init *init, int argc, char **argv, int begy, int begx) |
| Create and initialize Form structure. | |
| Form * | destroy_form (Init *init) |
| Destroy Form structure. | |
| View * | new_view (Init *init) |
| Create and initialize View structure. | |
| View * | destroy_view (Init *init) |
| Destroy View structure. | |
| bool | verify_spec_arg (char *spec, char *org_spec, char *dir, char *alt_dir, int mode) |
| Verify file specification argument. | |
| bool | init_menu_files (Init *init, int argc, char **argv) |
| Initialize Menu file specifications. | |
| bool | init_pick_files (Init *init, int argc, char **argv) |
| Initialize Pick file specifications. | |
| bool | init_form_files (Init *init, int argc, char **argv) |
| Initialize Form file specifications. | |
| bool | init_view_files (Init *init) |
| Initialize View file specifications. | |
Create, populate, and destroy main data structures for C-Menu.
C-Menu main data structures Init - main structure for initialization and global data Menu - menu description, help, and state Pick - pick description, help, and state Form - form description, help, and state View - view description, help, and state
Destroy Form structure.
| init | structure |
Definition at line 276 of file mem.c.
References Form::field, Init::form, Init::form_cnt, and Form::text.
Referenced by destroy_init(), init_form(), and popup_form().
Destroy Init structure.
| init | structure |
Definition at line 105 of file mem.c.
References Init::argc, Init::argv, destroy_argv(), destroy_form(), destroy_menu(), destroy_pick(), destroy_view(), Init::form, init_cnt, Init::menu, Init::pick, Init::sio, and Init::view.
Destroy Menu structure.
| init | structure |
Definition at line 169 of file mem.c.
References Line::choice_text, Line::command_str, Menu::item_count, Menu::line, Menu::line_idx, Init::menu, menu, Init::menu_cnt, and Line::raw_text.
Referenced by destroy_init(), menu_cmd_processor(), menu_engine(), and popup_menu().
Destroy Pick structure.
| init | structure |
Definition at line 230 of file mem.c.
References Pick::obj_cnt, Pick::obj_idx, Pick::object, Init::pick, pick, and Init::pick_cnt.
Referenced by destroy_init(), init_pick(), and popup_pick().
Destroy View structure.
| init | structure |
Definition at line 346 of file mem.c.
References View::argc, View::argv, destroy_argv(), View::ln_tbl, View::ln_win, Init::view, view, Init::view_cnt, and View::win.
Referenced by destroy_init(), mview(), and popup_view().
| bool init_form_files | ( | Init * | init, |
| int | argc, | ||
| char ** | argv ) |
Initialize Form file specifications.
| init | pointer to init structure |
| argc | - number of arguments in argv |
| argv | - Arguments may have been provided by command line ~/.minitrc, environment variables, or calling program interal to C-Menu |
Definition at line 631 of file mem.c.
References base_name(), Form::cmd, Init::cmd, Form::f_cmd, Form::f_erase_remainder, Init::f_erase_remainder, Form::f_help_spec, Form::f_in_spec, Form::f_mapp_spec, Form::f_out_spec, Form::f_provider_cmd, Form::f_receiver_cmd, form, Form::help_spec, Init::help_spec, Form::in_spec, Init::in_spec, locate_file_in_path(), Init::mapp_data, Init::mapp_help, Init::mapp_msrc, Form::mapp_spec, Init::mapp_spec, Form::out_spec, Init::out_spec, Form::provider_cmd, Init::provider_cmd, Form::receiver_cmd, Init::receiver_cmd, strip_quotes(), strnz__cpy(), Form::title, Init::title, and verify_spec_arg().
Referenced by new_form().
| bool init_menu_files | ( | Init * | init, |
| int | argc, | ||
| char ** | argv ) |
Initialize Menu file specifications.
| init | structure |
| argc | - number of arguments in argv |
| argv | - Arguments may have been provided by command line, ~/.minitrc, environment variables, or calling program interal to C-Menu |
Definition at line 486 of file mem.c.
References abend(), Menu::f_help_spec, Init::f_mapp_spec, Menu::f_mapp_spec, Menu::help_spec, Init::mapp_help, Init::mapp_msrc, Menu::mapp_spec, menu, strnz__cat(), strnz__cpy(), and verify_spec_arg().
Referenced by new_menu().
| bool init_pick_files | ( | Init * | init, |
| int | argc, | ||
| char ** | argv ) |
Initialize Pick file specifications.
| init | structure |
| argc | - number of arguments in argv |
| argv | - Arguments may have been provided by command line, ~/.minitrc, environment variables, or calling program interal to C-Menu |
Definition at line 534 of file mem.c.
References base_name(), Init::cmd, Pick::cmd, Pick::f_cmd, Pick::f_help_spec, Pick::f_in_spec, Init::f_multiple_cmd_args, Pick::f_multiple_cmd_args, Pick::f_out_spec, Pick::f_provider_cmd, Pick::f_receiver_cmd, Init::help_spec, Pick::help_spec, Init::in_spec, Pick::in_spec, locate_file_in_path(), Init::mapp_data, Init::mapp_help, Init::out_spec, Pick::out_spec, pick, Init::provider_cmd, Pick::provider_cmd, Init::receiver_cmd, Pick::receiver_cmd, Init::select_max, Pick::select_max, strnz__cpy(), Init::title, Pick::title, and verify_spec_arg().
Referenced by new_pick().
| bool init_view_files | ( | Init * | init | ) |
Initialize View file specifications.
| init | structure |
Definition at line 736 of file mem.c.
References View::argv, Init::cmd_all, View::cmd_all, Init::cols, View::cols, Init::f_at_end_remove, View::f_at_end_remove, View::f_help_spec, Init::f_ignore_case, View::f_ignore_case, Init::f_ln, View::f_ln, Init::f_squeeze, View::f_squeeze, View::help_spec, Init::lines, View::lines, Init::mapp_help, Init::mapp_home, Init::provider_cmd, View::provider_cmd, Init::receiver_cmd, View::receiver_cmd, strip_quotes(), strnz__cat(), strnz__cpy(), View::tab_stop, Init::title, View::title, verify_spec_arg(), Init::view, and view.
Referenced by new_view().
Create and initialize Form structure.
| init | structure |
| argc | - number of arguments in argv |
| argv | - Arguments may have been provided by command line, ~/.minitrc, environment variables, or calling program interal to C-Menu |
| begy,begx | - initial position of form window |
Definition at line 253 of file mem.c.
References abend(), Form::begx, Form::begy, Form::brackets, Init::brackets, Form::fill_char, Init::fill_char, form, Init::form, Init::form_cnt, init_form_files(), and strnz__cpy().
Referenced by init_form(), and popup_form().
| Init * new_init | ( | int | argc, |
| char ** | argv ) |
Create and initialize Init structure.
| argc,argv | - arguments idiomatic directory usage: |
Definition at line 70 of file mem.c.
References abend(), Init::argc, Init::argv, display_error(), em0, em1, em2, init_cnt, Perror(), Init::sio, and ssnprintf().
Referenced by main().
Create and initialize Menu structure.
| init | structure |
| argc | - number of arguments in argv |
| argv | - Arguments may have been provided by command line, ~/.minitrc, environment variables, or calling program interal to C-Menu |
| begy,begx | - initial position of menu window |
Definition at line 148 of file mem.c.
References abend(), Menu::begx, Menu::begy, init_menu_files(), Init::menu, menu, and Init::menu_cnt.
Referenced by main(), menu_cmd_processor(), and popup_menu().
Create and initialize Pick structure.
| init | structure |
| argc | - number of arguments in argv |
| argv | - Arguments may have been provided by command line, ~/.minitrc, environment variables, or calling program interal to C-Menu |
| begy,begx | - initial position of pick window |
Definition at line 200 of file mem.c.
References abend(), Pick::begx, Pick::begy, display_error(), em0, em1, init_pick_files(), Pick::object, Perror(), Init::pick, pick, Init::pick_cnt, and ssnprintf().
Referenced by init_pick(), and popup_pick().
Create and initialize View structure.
| init | structure |
Definition at line 300 of file mem.c.
References abend(), Init::argc, View::argc, Init::argv, View::argv, display_error(), em0, em1, em2, init_view_files(), ssnprintf(), strnz_dup(), Init::view, view, and Init::view_cnt.
Referenced by main(), and popup_view().
| bool verify_spec_arg | ( | char * | spec, |
| char * | org_spec, | ||
| char * | dir, | ||
| char * | alt_dir, | ||
| int | mode ) |
Verify file specification argument.
| spec | - menu->spec, form->spec, etc. |
| org_spec | - init->._spec | argv[optind] |
| dir | - init->._. directory |
| alt_dir | - literal, "~/menuapp/data", etc. |
| mode | - R_OK, W_OK, X_OK, WC_OK, S_QUIET |
preserve quotes
preserve quotes
Definition at line 373 of file mem.c.
References canonicalize_file_spec(), expand_tilde(), locate_file_in_path(), stripz_quotes(), strnz__cat(), strnz__cpy(), verify_dir(), and verify_file().
Referenced by enter_file_spec(), init_form_files(), init_menu_files(), init_pick_files(), and init_view_files().