|
BRL-CAD
|
Routines for generally (i.e., non-mathematically) handling numbers, strings, and other data for tabular printing. More...
Files | |
| file | tbl.h |
Macros | |
| #define | BU_TBL_INIT_ZERO {0} |
Functions | |
| struct bu_tbl * | bu_tbl_create () |
| void | bu_tbl_destroy (struct bu_tbl *) |
| int | bu_tbl_clear (struct bu_tbl *) |
| struct bu_tbl * | bu_tbl_style (struct bu_tbl *, enum bu_tbl_style) |
| struct bu_tbl * | bu_tbl_is_at (struct bu_tbl *, size_t *row, size_t *col) |
| struct bu_tbl * | bu_tbl_go_to (struct bu_tbl *, size_t row, size_t col) |
| struct bu_tbl * | bu_tbl_printf (struct bu_tbl *, const char *fmt,...) |
| void | bu_tbl_vls (struct bu_vls *str, const struct bu_tbl *t) |
Routines for generally (i.e., non-mathematically) handling numbers, strings, and other data for tabular printing.
| #define BU_TBL_INIT_ZERO {0} |
| enum bu_tbl_style |
Table styles:
NONE 1 ---— — +----—+—+ ╭────────┬───╮ ╔════════╦═══╗ 2 3 LIST 1 | BASIC | 1 | │ SINGLE │ 1 │ ║ DOUBLE ║ 1 ║ 4 5 ---— — +----—+—+ ├────────┼───┤ ╠════════╬═══╣ 2 3 | 2 | 3 | │ 2 │ 3 │ ║ 2 ║ 3 ║ 4 5 | 4 | 5 | │ 4 │ 5 │ ║ 4 ║ 5 ║ +----—+—+ ╰────────┴───╯ ╚════════╩═══╝
| struct bu_tbl * bu_tbl_create | ( | ) |
always returns a pointer to a newly allocated table
| void bu_tbl_destroy | ( | struct bu_tbl * | ) |
releases all dynamic memory associated with the specified table
| int bu_tbl_clear | ( | struct bu_tbl * | ) |
erases all cells in a table, but doesn't erase the table itself
| struct bu_tbl * bu_tbl_style | ( | struct bu_tbl * | , |
| enum | bu_tbl_style | ||
| ) |
sets table styling or formatting on cells printed next.
| struct bu_tbl * bu_tbl_is_at | ( | struct bu_tbl * | , |
| size_t * | row, | ||
| size_t * | col | ||
| ) |
get cell position for the current table insertion point.
| struct bu_tbl * bu_tbl_go_to | ( | struct bu_tbl * | , |
| size_t | row, | ||
| size_t | col | ||
| ) |
set cell position of the current table insertion point.
| struct bu_tbl * bu_tbl_printf | ( | struct bu_tbl * | , |
| const char * | fmt, | ||
| ... | |||
| ) |
print values into the table at the current insertion point.
each column of the 'fmt' printf-style format specfier must be delimited by a '|' character.
any existing values will be overwritten.
| void bu_tbl_vls | ( | struct bu_vls * | str, |
| const struct bu_tbl * | t | ||
| ) |
print a table into a vls