|
C-Menu 0.2.9
A User Interface Toolkit
|
pick from a list of choices More...
#include "common.h"#include <fcntl.h>#include <stdbool.h>#include <string.h>#include <sys/mman.h>#include <sys/stat.h>#include <sys/wait.h>#include <termios.h>#include <unistd.h>Go to the source code of this file.
Functions | |
| void | deselect_object (Pick *pick) |
| Deselects the currently selected object in pick window. | |
| void | destroy_pick_view (Init *init) |
| Destroys pick view, unmaps file buffer, and cleans up resources. | |
| void | display_pick_help (Init *init) |
| Displays the help screen for the pick interface using view. | |
| void | display_pick_page (Pick *pick) |
| Displays current page of objects in pick window. | |
| void | end_pick_view (Init *) |
| int | exec_objects (Init *init) |
| Executes specified command with selected objects as arguments. | |
| int | init_pick (Init *init, int argc, char **argv, uint by, uint bx) |
| Initializes pick structure and opens pick input file or pipe. | |
| int | match_objects (Pick *pick, char *s) |
| Displays current page of objects in pick window. | |
| int | new_pick_view (Init *init) |
| Initializes a new view for displaying file contents in the pick interface. | |
| void | new_view_file (Init *init, char *file) |
| Initializes a new view for displaying the contents of a specified file in the pick interface. | |
| int | open_pick_win (Init *) |
| int | output_objects (Pick *pick) |
| Outputs selected objects to specified output file. | |
| int | pick_engine (Init *) |
| void | pick_std_chyron (Pick *pick) |
| Sets standard chyron key states based on pick structure. | |
| int | picker (Init *init, char *field) |
| Main loop for handling user input and interactions in the pick interface. | |
| int | read_pick_input (Init *init) |
| Reads pick input from file pointer and saves objects into pick structure. | |
| int | read_theme (Init *) |
| void | remove_right_angle (Pick *) |
| void | reverse_object (Pick *pick) |
| Reverses the display of the currently selected object in pick window. | |
| void | save_object (Pick *pick, char *s) |
| Saves a string as an object in the pick structure. | |
| void | toggle_object (Pick *pick) |
| Toggles the selection state of the currently selected object in pick window. | |
| void | unreverse_object (Pick *pick) |
| Unreverses the display of the currently selected object in pick window. | |
Variables | |
| int | calculated_idx |
| int | obj_idx |
| char const | pagers_editors [12][10] |
| int | pg_lines |
| int | pipe_fd [2] |
| int | tbl_col |
| int | tbl_cols |
| int | tbl_line |
| int | tbl_page |
| int | tbl_pages |
| UiMultiMedia | ui_mm |
| void end_pick_view | ( | Init * | ) |
| int open_pick_win | ( | Init * | init | ) |
Definition at line 247 of file pick_engine.c.
References Init::begx, Pick::begx, Init::begy, Pick::begy, Pick::chyron, Init::cols, Pick::d_cnt, Pick::d_idx, Pick::d_object, Init::lines, Pick::lines, Pick::m_cnt, Pick::m_idx, Pick::m_object, Pick::p_view_files, Init::pick, pick_std_chyron(), Pick::separator_line, sfc_ptr, ssnprintf(), Pick::surface, Pick::tbl_col_width, Pick::tbl_cols, Pick::tbl_lines, Pick::tbl_page, Pick::tbl_pages, Pick::title, ui_compile_chyron(), ui_get_screen_size(), ui_keypad(), ui_new_chyron(), ui_perror(), ui_scrollok(), ui_set_chyron_key(), ui_setscrreg(), ui_surface, ui_tracked_sfc_split_box(), Pick::width, and Pick::x.
Referenced by init_pick().
| int pick_engine | ( | Init * | init | ) |
Enter picker loop to handle user input and interactions
< Buffer for user input in the field
Definition at line 353 of file pick_engine.c.
References Pick::chyron, Pick::cmd, deselect_object(), display_pick_page(), exec_objects(), Pick::f_cmd, Pick::f_out_spec, Pick::f_read_theme, Pick::out_spec, output_objects(), Init::pick, picker(), read_theme(), Pick::select_cnt, Pick::surface, ui_destroy_chyron(), ui_mvwaddstr(), and ui_wclrtoeol().
Referenced by init_pick().
| int read_theme | ( | Init * | init | ) |
Definition at line 615 of file pick_engine.c.
References expand_tilde(), Init::mapp_theme, process_config_file(), Init::sio, ui_initialize_sio(), and ui_render().
Referenced by pick_engine().
| void remove_right_angle | ( | Pick * | pick | ) |
Definition at line 564 of file pick_engine.c.
References cell_chk, cell_sp, Pick::d_cnt, Pick::d_idx, Pick::f_selected, Pick::lines, Pick::surface, Pick::tbl_col, Pick::tbl_cols, Pick::tbl_line, Pick::tbl_page, ui_cursor_move(), ui_mvwadd_wchnstr(), Pick::y, and Pick::y_offset.
Referenced by picker().
| int calculated_idx |
Definition at line 24 of file pick_engine.c.
| int obj_idx |
Definition at line 24 of file pick_engine.c.
| char const pagers_editors |
Definition at line 50 of file pick_engine.c.
| int pg_lines |
Definition at line 23 of file pick_engine.c.
| int pipe_fd |
Definition at line 46 of file pick_engine.c.
Referenced by init_pick().
| int tbl_col |
Definition at line 23 of file pick_engine.c.
| int tbl_cols |
Definition at line 23 of file pick_engine.c.
| int tbl_line |
Definition at line 23 of file pick_engine.c.
| int tbl_page |
Definition at line 23 of file pick_engine.c.
| int tbl_pages |
Definition at line 23 of file pick_engine.c.
| UiMultiMedia ui_mm |
Definition at line 48 of file pick_engine.c.