[A] Extended table border settings

This commit is contained in:
seleznevae
2018-01-07 12:22:26 +03:00
parent b9110741e7
commit 33da7186ff
3 changed files with 154 additions and 26 deletions

View File

@@ -101,6 +101,51 @@ FORT_EXTERN char* ft_to_string(const FTABLE *FORT_RESTRICT table);
//FORT_EXTERN ssize_t ft_n_row_to_string(const FTABLE *FORT_RESTRICT table, size_t row, char *FORT_RESTRICT dst, size_t dst_len);
/*****************************************************************************
* TABLE BORDER
*****************************************************************************/
/*
* TL TT TT TT TV TT TT TT TV TB TB TB TR <----- TopSeparator
* LL IV IV RR
* LH IH IH IH II IH IH IH II IH IH IH RH <----- InsideSeparator
* LL IV IV RR
* BL BB BB BB BV BB BB BB BV BB BB BB BR <----- BottomSeparator
*/
enum HorSeparatorPos
{
TopSeparator,
InsideSeparator,
BottomSeparator
};
enum BorderItemPos
{
TL_bip = 0,
TT_bip = 1,
TV_bip = 2,
TR_bip = 3,
LL_bip = 4,
IV_bip = 5,
RR_bip = 6,
LH_bip = 7,
IH_bip = 8,
II_bip = 9,
RH_bip = 10,
BL_bip = 11,
BB_bip = 12,
BV_bip = 13,
BR_bip = 14,
BorderItemPosSize
};
struct fort_table_options
{
int cell_padding_top;
@@ -108,10 +153,9 @@ struct fort_table_options
int cell_padding_left;
int cell_padding_right;
int cell_empty_string_height;
char hor_separator;
char ver_separator;
char header_hor_separator;
char header_ver_separator;
char border_chars[BorderItemPosSize];
char header_border_chars[BorderItemPosSize];
};
typedef struct fort_table_options fort_table_options_t;