1
0
Fork 0
libfort/src/table.h

50 lines
1.2 KiB
C
Raw Normal View History

2018-01-17 19:22:57 +01:00
#ifndef TABLE_H
#define TABLE_H
2018-05-06 15:36:53 +02:00
#include "fort_utils.h"
2018-02-04 14:21:04 +01:00
2018-05-06 16:04:34 +02:00
struct ft_table {
2018-01-17 19:22:57 +01:00
vector_t *rows;
2018-11-03 21:50:30 +01:00
fort_table_properties_t *properties;
2018-01-17 19:22:57 +01:00
string_buffer_t *conv_buffer;
size_t cur_row;
size_t cur_col;
2018-02-04 14:21:04 +01:00
vector_t *separators;
2018-01-17 19:22:57 +01:00
};
2018-09-01 14:25:07 +02:00
FT_INTERNAL
separator_t *create_separator(int enabled);
2018-02-04 14:21:04 +01:00
2018-09-01 14:25:07 +02:00
FT_INTERNAL
void destroy_separator(separator_t *sep);
2018-01-17 19:22:57 +01:00
FT_INTERNAL
separator_t *copy_separator(separator_t *sep);
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-05 21:34:45 +02:00
fort_status_t get_table_sizes(const ft_table_t *table, size_t *rows, size_t *cols);
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-05 21:34:45 +02:00
fort_row_t *get_row(ft_table_t *table, size_t row);
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-05 21:34:45 +02:00
const fort_row_t *get_row_c(const ft_table_t *table, size_t row);
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-05 21:34:45 +02:00
fort_row_t *get_row_and_create_if_not_exists(ft_table_t *table, size_t row);
2018-01-17 19:22:57 +01:00
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-06 16:04:34 +02:00
string_buffer_t *get_cur_str_buffer_and_create_if_not_exists(ft_table_t *table);
2018-01-17 19:22:57 +01:00
2018-11-10 07:58:21 +01:00
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-05 21:34:45 +02:00
fort_status_t table_rows_and_cols_geometry(const ft_table_t *table,
2018-05-06 16:04:34 +02:00
size_t **col_width_arr_p, size_t *col_width_arr_sz,
2018-11-10 07:58:21 +01:00
size_t **row_height_arr_p, size_t *row_height_arr_sz,
enum request_geom_type geom);
2018-09-01 14:25:07 +02:00
FT_INTERNAL
2018-05-05 21:34:45 +02:00
fort_status_t table_geometry(const ft_table_t *table, size_t *height, size_t *width);
2018-01-17 19:22:57 +01:00
2018-03-09 10:44:16 +01:00
#endif /* TABLE_H */