C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
View Struct Reference

#include <view.h>

Collaboration diagram for View:
[legend]

Data Fields

int fg_clr_idx
int bg_clr_idx
int bo_clr_idx
int ln_clr_idx
int ln_bg_clr_idx
char fg_clr_x [COLOR_LEN]
char bg_clr_x [COLOR_LEN]
char bo_clr_x [COLOR_LEN]
char ln_clr_x [COLOR_LEN]
char ln_bg_clr_x [COLOR_LEN]
int lines
int cols
int begy
int begx
char provider_cmd [MAXLEN]
char receiver_cmd [MAXLEN]
char cmd [MAXLEN]
char cmd_all [MAXLEN]
char prompt_str [MAXLEN]
char title [MAXLEN]
int argc
char ** argv
int optind
bool f_ignore_case
bool f_at_end_remove
bool f_squeeze
bool f_strip_ansi
bool f_multiple_cmd_args
WINDOW * win
WINDOW * box
char tmp_prompt_str [MAXLEN]
int curr_argc
char cmd_arg [MAXLEN]
int tab_stop
int next_cmd_char
bool f_bod
bool f_eod
bool f_forward
bool f_is_pipe
char file_name [MAXLEN]
bool f_redisplay_page
bool f_displaying_help
bool f_first_iter
bool f_search_complete
bool f_full_screen
bool f_timer
bool f_cmd
bool f_cmd_all
char cur_file_str [MAXLEN]
char line_in_s [PAD_COLS]
char line_out_s [PAD_COLS]
char stripped_line_out [PAD_COLS]
cchar_t cmplx_buf [PAD_COLS]
char * line_out_p
char * line_in_beg_p
char * line_in_end_p
WINDOW * pad
int cury
int curx
int scroll_lines
int cmd_line
int maxcol
int pminrow
int pmincol
int sminrow
int smincol
int smaxrow
int smaxcol
int first_match_x
int last_match_x
char in_spec [MAXLEN]
char out_spec [MAXLEN]
char help_spec [MAXLEN]
bool f_in_spec
bool f_out_spec
bool f_help_spec
char * file_spec_ptr
char * next_file_spec_ptr
char * tmp_file_name_ptr
off_t file_size
off_t file_pos
off_t prev_file_pos
off_t page_top_pos
off_t page_bot_pos
off_t srch_curr_pos
off_t srch_beg_pos
off_t mark_tbl [NMARKS]
bool f_in_pipe
int in_fd
int out_fd
FILE * in_fp
int stdin_fd
FILE * stdin_fp
int stdout_fd
FILE * stdout_fp
char * buf
char * buf_curr_ptr
char * buf_end_ptr
char * lnbuf
char * lnbuf_curr_ptr
char * lnbuf_end_ptr
WINDOW * ln_win
int ln_win_lines
int ln_win_cols
bool f_ln
off_t ln
char ln_s [10]
off_t * ln_tbl
off_t ln_tbl_size
off_t ln_tbl_cnt
off_t ln_max_pos
off_t page_top_ln
off_t page_bot_ln

Detailed Description

Definition at line 37 of file view.h.

Field Documentation

◆ argc

int View::argc

command line arguments count

Definition at line 58 of file view.h.

Referenced by build_prompt(), destroy_view(), new_view(), view_cmd_processor(), and view_file().

◆ argv

char** View::argv

command line arguments vector

Definition at line 59 of file view.h.

Referenced by build_prompt(), destroy_view(), init_view_boxwin(), init_view_files(), new_view(), view_cmd_processor(), and view_file().

◆ begx

int View::begx

screen column upper left corner of window

Definition at line 51 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), mview(), popup_view(), and resize_page().

◆ begy

int View::begy

screen line upper left corner of window

Definition at line 50 of file view.h.

Referenced by enter_file_spec(), init_view_boxwin(), init_view_full_screen(), mview(), popup_view(), and resize_page().

◆ bg_clr_idx

int View::bg_clr_idx

background_color

Definition at line 39 of file view.h.

◆ bg_clr_x

char View::bg_clr_x[COLOR_LEN]

background_color in hex, e.g. "#RRGGBB"

Definition at line 44 of file view.h.

◆ bo_clr_idx

int View::bo_clr_idx

bold_color

Definition at line 40 of file view.h.

◆ bo_clr_x

char View::bo_clr_x[COLOR_LEN]

bold_color in hex, e.g. "#RRGGBB"

Definition at line 45 of file view.h.

◆ box

WINDOW* View::box

ncurses window used by View for box around win

Definition at line 68 of file view.h.

◆ buf

char* View::buf

pointer to first byte of virtual buffer

Definition at line 144 of file view.h.

Referenced by view_file(), and view_init_input().

◆ buf_curr_ptr

char* View::buf_curr_ptr

pointer to current position in virtual buffer

Definition at line 145 of file view.h.

Referenced by view_init_input().

◆ buf_end_ptr

char* View::buf_end_ptr

pointer to first byte after end of data in virtual buffer

Definition at line 146 of file view.h.

◆ cmd

char View::cmd[MAXLEN]

command to execute in foreground, e.g. an editor

Definition at line 54 of file view.h.

Referenced by view_cmd_processor(), and view_init_input().

◆ cmd_all

char View::cmd_all[MAXLEN]

View - command to execute at start of program

Definition at line 55 of file view.h.

Referenced by init_view_files(), and view_init_input().

◆ cmd_arg

char View::cmd_arg[MAXLEN]

argument string

Definition at line 73 of file view.h.

Referenced by get_cmd_arg(), get_cmd_char(), and view_cmd_processor().

◆ cmd_line

int View::cmd_line

command line location on pad

Definition at line 103 of file view.h.

Referenced by display_prompt(), get_cmd_arg(), get_cmd_char(), init_view_boxwin(), init_view_full_screen(), remove_file(), resize_page(), and view_cmd_processor().

◆ cmplx_buf

cchar_t View::cmplx_buf[PAD_COLS]

complex character buffer

Definition at line 95 of file view.h.

Referenced by display_line(), and fmt_line().

◆ cols

int View::cols

number of columns for window size

Definition at line 49 of file view.h.

Referenced by get_cmd_arg(), init_view_boxwin(), init_view_files(), init_view_full_screen(), mview(), popup_view(), resize_page(), and view_cmd_processor().

◆ cur_file_str

char View::cur_file_str[MAXLEN]

file currently open for viewing

Definition at line 91 of file view.h.

Referenced by remove_file(), view_cmd_processor(), view_file(), and view_init_input().

◆ curr_argc

int View::curr_argc

current argument count when processing multiple arguments

Definition at line 71 of file view.h.

Referenced by build_prompt(), view_cmd_processor(), and view_file().

◆ curx

int View::curx

curx is the pad column of the cursor location

Definition at line 101 of file view.h.

Referenced by display_prompt(), get_cmd_arg(), get_cmd_char(), and search().

◆ cury

int View::cury

cury is the pad row of the cursor location

Definition at line 100 of file view.h.

Referenced by display_line(), get_cmd_arg(), go_to_eof(), next_page(), prev_page(), scroll_down_n_lines(), scroll_up_n_lines(), search(), view_cmd_processor(), and view_display_page().

◆ f_at_end_remove

bool View::f_at_end_remove

obsolete, unneeded

Definition at line 62 of file view.h.

Referenced by init_view_files(), and remove_file().

◆ f_bod

bool View::f_bod

beginning of data

Definition at line 77 of file view.h.

Referenced by get_pos_prev_line(), scroll_down_n_lines(), and view_file().

◆ f_cmd

bool View::f_cmd

cmd is verified

Definition at line 89 of file view.h.

◆ f_cmd_all

bool View::f_cmd_all

cmd_all is verified

Definition at line 90 of file view.h.

◆ f_displaying_help

bool View::f_displaying_help

currently didsplaying help information

Definition at line 83 of file view.h.

Referenced by view_cmd_processor().

◆ f_eod

◆ f_first_iter

bool View::f_first_iter

first iteration of search

Definition at line 84 of file view.h.

Referenced by search(), and view_cmd_processor().

◆ f_forward

bool View::f_forward

motion flag forward

Definition at line 79 of file view.h.

◆ f_full_screen

bool View::f_full_screen

default mode if lines and columns not specified

Definition at line 86 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), mview(), popup_view(), and resize_page().

◆ f_help_spec

bool View::f_help_spec

output file verified

Definition at line 124 of file view.h.

Referenced by init_view_files(), and view_display_help().

◆ f_ignore_case

bool View::f_ignore_case

View - ignore case in search

Definition at line 61 of file view.h.

Referenced by init_view_files(), search(), and view_cmd_processor().

◆ f_in_pipe

bool View::f_in_pipe

input is from a pipe

Definition at line 136 of file view.h.

Referenced by view_init_input().

◆ f_in_spec

bool View::f_in_spec

input file verified

Definition at line 122 of file view.h.

◆ f_is_pipe

bool View::f_is_pipe

input is from a pipe

Definition at line 80 of file view.h.

Referenced by build_prompt(), and view_cmd_processor().

◆ f_ln

bool View::f_ln

flag - number lines

Definition at line 155 of file view.h.

Referenced by display_line(), init_view_files(), pad_refresh(), scroll_down_n_lines(), scroll_up_n_lines(), and view_cmd_processor().

◆ f_multiple_cmd_args

bool View::f_multiple_cmd_args

View - put multiple arguments in a single string

Definition at line 65 of file view.h.

◆ f_out_spec

bool View::f_out_spec

output file verified

Definition at line 123 of file view.h.

◆ f_redisplay_page

bool View::f_redisplay_page

flag indicating page needs to be redisplayed

Definition at line 82 of file view.h.

Referenced by resize_page(), view_cmd_processor(), and view_display_help().

◆ f_search_complete

bool View::f_search_complete

Entire file has been searched

Definition at line 85 of file view.h.

Referenced by search(), and view_cmd_processor().

◆ f_squeeze

bool View::f_squeeze

View - print one line for each group of blank lines

Definition at line 63 of file view.h.

Referenced by get_next_line(), get_pos_next_line(), init_view_files(), and view_cmd_processor().

◆ f_strip_ansi

bool View::f_strip_ansi

strip ansi escape sequences when writing buffer

Definition at line 64 of file view.h.

Referenced by view_cmd_processor().

◆ f_timer

bool View::f_timer

time commands and display elapsed time in prompt

Definition at line 87 of file view.h.

◆ fg_clr_idx

int View::fg_clr_idx

foreground_color

Definition at line 38 of file view.h.

◆ fg_clr_x

char View::fg_clr_x[COLOR_LEN]

foreground_color in hex, e.g. "#RRGGBB"

Definition at line 43 of file view.h.

◆ file_name

char View::file_name[MAXLEN]

basename of file being viewed

Definition at line 81 of file view.h.

Referenced by build_prompt(), search(), and view_init_input().

◆ file_pos

◆ file_size

off_t View::file_size

size of file being viewed

Definition at line 128 of file view.h.

Referenced by build_prompt(), get_pos_next_line(), go_to_eof(), go_to_percent(), next_page(), scroll_down_n_lines(), search(), view_file(), and view_init_input().

◆ file_spec_ptr

char* View::file_spec_ptr

pointer to current file spec

Definition at line 125 of file view.h.

Referenced by view_cmd_processor(), and view_file().

◆ first_match_x

int View::first_match_x

first column of current search match in stripped_line_out

Definition at line 115 of file view.h.

Referenced by search().

◆ help_spec

char View::help_spec[MAXLEN]

help file spec

Definition at line 121 of file view.h.

Referenced by init_view_files(), and view_display_help().

◆ in_fd

int View::in_fd

input file descriptor

Definition at line 137 of file view.h.

Referenced by enter_file_spec(), and view_init_input().

◆ in_fp

FILE* View::in_fp

pointer to input stream data structure

Definition at line 139 of file view.h.

◆ in_spec

char View::in_spec[MAXLEN]

input file spec

Definition at line 119 of file view.h.

Referenced by view_cmd_processor(), and write_view_buffer().

◆ last_match_x

int View::last_match_x

last column of current search match in stripped_line_out

Definition at line 117 of file view.h.

Referenced by search().

◆ line_in_beg_p

char* View::line_in_beg_p

pointer used in matching search targets

Definition at line 97 of file view.h.

Referenced by get_next_line().

◆ line_in_end_p

char* View::line_in_end_p

pointer used in matching search targets

Definition at line 98 of file view.h.

Referenced by get_next_line().

◆ line_in_s

char View::line_in_s[PAD_COLS]

raw input line from buffer

Definition at line 92 of file view.h.

Referenced by fmt_line(), get_next_line(), and write_view_buffer().

◆ line_out_p

char* View::line_out_p

pointer to current position in line_out_s

Definition at line 96 of file view.h.

Referenced by search().

◆ line_out_s

char View::line_out_s[PAD_COLS]

scratch buffer

Definition at line 93 of file view.h.

Referenced by fmt_line().

◆ lines

int View::lines

number of lines for window size

Definition at line 48 of file view.h.

Referenced by enter_file_spec(), init_view_boxwin(), init_view_files(), init_view_full_screen(), mview(), popup_view(), and resize_page().

◆ ln

◆ ln_bg_clr_idx

int View::ln_bg_clr_idx

line_number_background_color

Definition at line 42 of file view.h.

◆ ln_bg_clr_x

char View::ln_bg_clr_x[COLOR_LEN]

line_number_background_color in hex

Definition at line 47 of file view.h.

◆ ln_clr_idx

int View::ln_clr_idx

line_number_color

Definition at line 41 of file view.h.

◆ ln_clr_x

char View::ln_clr_x[COLOR_LEN]

line_number_color in hex, e.g. "#RRGGBB"

Definition at line 46 of file view.h.

◆ ln_max_pos

off_t View::ln_max_pos

position of last page number increment

Definition at line 161 of file view.h.

Referenced by increment_ln(), initialize_line_table(), sync_ln(), and view_file().

◆ ln_s

char View::ln_s[10]

line number formatted string

Definition at line 157 of file view.h.

◆ ln_tbl

off_t* View::ln_tbl

◆ ln_tbl_cnt

off_t View::ln_tbl_cnt

number of entries used in line_tbl

Definition at line 160 of file view.h.

Referenced by increment_ln(), and sync_ln().

◆ ln_tbl_size

off_t View::ln_tbl_size

number of entries allocated in line_tbl

Definition at line 159 of file view.h.

Referenced by increment_ln(), and initialize_line_table().

◆ ln_win

WINDOW* View::ln_win

◆ ln_win_cols

int View::ln_win_cols

number of columns in line number window

Definition at line 154 of file view.h.

Referenced by init_view_boxwin(), and init_view_full_screen().

◆ ln_win_lines

int View::ln_win_lines

number of lines in line number window

Definition at line 153 of file view.h.

Referenced by init_view_boxwin(), and init_view_full_screen().

◆ lnbuf

char* View::lnbuf

pointer to first byte of virtual buffer

Definition at line 148 of file view.h.

◆ lnbuf_curr_ptr

char* View::lnbuf_curr_ptr

pointer to first byte of virtual buffer

Definition at line 149 of file view.h.

◆ lnbuf_end_ptr

char* View::lnbuf_end_ptr

pointer to first byte after end of data in virtual buffer

Definition at line 150 of file view.h.

◆ mark_tbl

off_t View::mark_tbl[NMARKS]

not implemented

Definition at line 135 of file view.h.

Referenced by go_to_mark(), view_cmd_processor(), and view_init_input().

◆ maxcol

int View::maxcol

length of longest line on pad

Definition at line 104 of file view.h.

Referenced by build_prompt(), fmt_line(), next_page(), view_cmd_processor(), and view_file().

◆ next_cmd_char

int View::next_cmd_char

index of next character in cmd string to process when building prompt

Definition at line 75 of file view.h.

Referenced by view_cmd_processor().

◆ next_file_spec_ptr

char* View::next_file_spec_ptr

pointer to next file spec

Definition at line 126 of file view.h.

Referenced by view_cmd_processor(), and view_file().

◆ optind

int View::optind

getopt pointer to non-option arguments in argv

Definition at line 60 of file view.h.

◆ out_fd

int View::out_fd

output file descriptor

Definition at line 138 of file view.h.

Referenced by write_view_buffer().

◆ out_spec

char View::out_spec[MAXLEN]

output file spec

Definition at line 120 of file view.h.

Referenced by view_cmd_processor(), and write_view_buffer().

◆ pad

◆ page_bot_ln

off_t View::page_bot_ln

line number of last line displayed

Definition at line 163 of file view.h.

Referenced by scroll_down_n_lines(), scroll_up_n_lines(), search(), view_display_page(), and view_file().

◆ page_bot_pos

off_t View::page_bot_pos

◆ page_top_ln

off_t View::page_top_ln

◆ page_top_pos

off_t View::page_top_pos

◆ pmincol

int View::pmincol

first pad column displayed in view window

Definition at line 106 of file view.h.

Referenced by build_prompt(), init_view_boxwin(), init_view_full_screen(), pad_refresh(), and view_cmd_processor().

◆ pminrow

int View::pminrow

first pad row displayed in view window

Definition at line 105 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), and pad_refresh().

◆ prev_file_pos

off_t View::prev_file_pos

previous file position

Definition at line 130 of file view.h.

Referenced by view_cmd_processor(), and view_init_input().

◆ prompt_str

char View::prompt_str[MAXLEN]

prompt string for chyron

Definition at line 56 of file view.h.

Referenced by build_prompt(), and view_cmd_processor().

◆ provider_cmd

char View::provider_cmd[MAXLEN]

command provides input

Definition at line 52 of file view.h.

Referenced by init_view_files(), and view_init_input().

◆ receiver_cmd

char View::receiver_cmd[MAXLEN]

command receives output

Definition at line 53 of file view.h.

Referenced by init_view_files().

◆ scroll_lines

◆ smaxcol

int View::smaxcol

screen position of last column of pad displayed in view window

Definition at line 113 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), pad_refresh(), resize_page(), and view_cmd_processor().

◆ smaxrow

int View::smaxrow

screen position of last row of pad displayed in view windiow

Definition at line 111 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), pad_refresh(), and resize_page().

◆ smincol

int View::smincol

screen position of first column of pad displayed in view window

Definition at line 109 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), pad_refresh(), and view_cmd_processor().

◆ sminrow

int View::sminrow

screen position of first row of pad displayed in view window

Definition at line 107 of file view.h.

Referenced by init_view_boxwin(), init_view_full_screen(), and pad_refresh().

◆ srch_beg_pos

off_t View::srch_beg_pos

file position when search started

Definition at line 134 of file view.h.

Referenced by search(), and view_cmd_processor().

◆ srch_curr_pos

off_t View::srch_curr_pos

current search position

Definition at line 133 of file view.h.

Referenced by search(), and view_cmd_processor().

◆ stdin_fd

int View::stdin_fd

standard input file descriptor

Definition at line 140 of file view.h.

◆ stdin_fp

FILE* View::stdin_fp

pointer to standard input stream data structure

Definition at line 141 of file view.h.

◆ stdout_fd

int View::stdout_fd

standard output file descriptor

Definition at line 142 of file view.h.

◆ stdout_fp

FILE* View::stdout_fp

pointer to standard output stream data structure

Definition at line 143 of file view.h.

◆ stripped_line_out

char View::stripped_line_out[PAD_COLS]

printable characters only

Definition at line 94 of file view.h.

Referenced by fmt_line(), and search().

◆ tab_stop

int View::tab_stop

number of spaces between tab stops

Definition at line 74 of file view.h.

Referenced by fmt_line(), init_view_boxwin(), init_view_files(), init_view_full_screen(), and view_cmd_processor().

◆ title

char View::title[MAXLEN]

title string for window

Definition at line 57 of file view.h.

Referenced by init_view_boxwin(), init_view_files(), and resize_page().

◆ tmp_file_name_ptr

char* View::tmp_file_name_ptr

pointer to temporary file spec

Definition at line 127 of file view.h.

Referenced by view_cmd_processor().

◆ tmp_prompt_str

char View::tmp_prompt_str[MAXLEN]

temporary prompt string used when building prompt

Definition at line 69 of file view.h.

Referenced by search().

◆ win

WINDOW* View::win

The documentation for this struct was generated from the following file: