libfort/src/row.h

68 lines
1.6 KiB
C
Raw Normal View History

2018-01-17 19:22:57 +01:00
#ifndef ROW_H
#define ROW_H
2018-05-06 15:36:53 +02:00
#include "fort_utils.h"
2018-01-17 19:22:57 +01:00
#include "fort.h"
2018-05-06 12:12:28 +02:00
#include <stdarg.h>
2018-11-03 21:50:30 +01:00
#include "properties.h"
2018-04-24 20:36:07 +02:00
#ifdef FT_HAVE_WCHAR
#include <wchar.h>
#endif
2018-05-06 12:12:28 +02:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_row_t *create_row(void);
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
void destroy_row(f_row_t *row);
2018-08-31 19:09:10 +02:00
2018-11-02 22:16:20 +01:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_row_t *copy_row(f_row_t *row);
2018-11-02 22:16:20 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_row_t *create_row_from_string(const char *str);
2018-01-17 19:22:57 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_row_t *create_row_from_fmt_string(const struct f_string_view *fmt, va_list *va_args);
2018-01-17 19:22:57 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
size_t columns_in_row(const f_row_t *row);
2018-01-17 19:22:57 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_cell_t *get_cell(f_row_t *row, size_t col);
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
const f_cell_t *get_cell_c(const f_row_t *row, size_t col);
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_cell_t *get_cell_and_create_if_not_exists(f_row_t *row, size_t col);
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_status swap_row(f_row_t *cur_row, f_row_t *ins_row, size_t pos);
2018-01-17 19:22:57 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
size_t group_cell_number(const f_row_t *row, size_t master_cell_col);
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
int get_row_cell_types(const f_row_t *row, enum f_cell_type *types, size_t types_sz);
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_status row_set_cell_span(f_row_t *row, size_t cell_column, size_t hor_span);
2018-01-17 19:22:57 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
int print_row_separator(f_conv_context_t *cntx,
2018-05-06 16:04:34 +02:00
const size_t *col_width_arr, size_t cols,
2019-08-27 14:04:54 +02:00
const f_row_t *upper_row, const f_row_t *lower_row,
enum f_hor_separator_pos separatorPos, const f_separator_t *sep);
2018-01-17 19:22:57 +01:00
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
int snprintf_row(const f_row_t *row, f_conv_context_t *cntx, size_t *col_width_arr, size_t col_width_arr_sz,
2019-08-14 21:01:57 +02:00
size_t row_height);
2018-04-24 20:36:07 +02:00
#ifdef FT_HAVE_WCHAR
2018-08-31 19:09:10 +02:00
FT_INTERNAL
2019-08-27 14:04:54 +02:00
f_row_t *create_row_from_wstring(const wchar_t *str);
2018-04-24 20:36:07 +02:00
#endif
2018-01-17 19:22:57 +01:00
2018-03-09 10:44:16 +01:00
#endif /* ROW_H */