| 
    libhpdftbl 1.5.0
    
   Table construction library for Haru PDF library 
   | 
 
Core table handle. More...
#include <hpdftbl.h>
Data Fields | |
| HPDF_Doc | pdf_doc | 
| HPDF_Page | pdf_page | 
| size_t | cols | 
| size_t | rows | 
| HPDF_REAL | posx | 
| HPDF_REAL | posy | 
| HPDF_REAL | height | 
| HPDF_REAL | minrowheight | 
| _Bool | anchor_is_top_left | 
| HPDF_REAL | bottom_vmargin_factor | 
| HPDF_REAL | width | 
| void * | tag | 
| char * | title_txt | 
| hpdf_text_style_t | title_style | 
| hpdf_text_style_t | header_style | 
| _Bool | use_header_row | 
| hpdf_text_style_t | label_style | 
| _Bool | use_cell_labels | 
| _Bool | use_label_grid_style | 
| hpdf_text_style_t | content_style | 
| hpdftbl_content_callback_t | label_cb | 
| char * | label_dyncb | 
| hpdftbl_content_callback_t | content_cb | 
| char * | content_dyncb | 
| hpdftbl_content_style_callback_t | content_style_cb | 
| char * | content_style_dyncb | 
| hpdftbl_canvas_callback_t | canvas_cb | 
| char * | canvas_dyncb | 
| hpdftbl_callback_t | post_cb | 
| char * | post_dyncb | 
| hpdftbl_grid_style_t | outer_grid | 
| hpdftbl_grid_style_t | inner_vgrid | 
| hpdftbl_grid_style_t | inner_hgrid | 
| hpdftbl_grid_style_t | inner_tgrid | 
| _Bool | use_zebra | 
| int | zebra_phase | 
| HPDF_RGBColor | zebra_color1 | 
| HPDF_RGBColor | zebra_color2 | 
| float * | col_width_percent | 
| hpdftbl_cell_t * | cells | 
Core table handle.
This is the main structure that contains all information for the table. The basic structure is an array of cells.
| _Bool anchor_is_top_left | 
Is the table anchor to be upper top left or bottom left
Referenced by hpdftbl_create_title(), hpdftbl_dumps(), hpdftbl_get_anchor_top_left(), hpdftbl_loads(), hpdftbl_set_anchor_top_left(), and hpdftbl_stroke().
| HPDF_REAL bottom_vmargin_factor | 
The content text bottom margin as a factor of the fontsize
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), and hpdftbl_set_bottom_vmargin_factor().
| hpdftbl_canvas_callback_t canvas_cb | 
Table canvas callback. Will be called for each cell unless the cell has its own canvas callback 
 
Referenced by hpdftbl_set_canvas_cb(), and hpdftbl_stroke().
| char* canvas_dyncb | 
Table canvas dynamic callback name. The name is created vi strdup() and must be freed on destruction 
Referenced by hpdftbl_destroy(), hpdftbl_dumps(), and hpdftbl_set_canvas_dyncb().
| hpdftbl_cell_t* cells | 
Reference to all an array of cells in the table
Referenced by hpdftbl_clear_spanning(), hpdftbl_create_title(), hpdftbl_destroy(), hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_set_cell(), hpdftbl_set_cell_canvas_cb(), hpdftbl_set_cell_canvas_dyncb(), hpdftbl_set_cell_content_cb(), hpdftbl_set_cell_content_dyncb(), hpdftbl_set_cell_content_style(), hpdftbl_set_cell_content_style_cb(), hpdftbl_set_cell_content_style_dyncb(), hpdftbl_set_cell_label_cb(), hpdftbl_set_cell_label_dyncb(), hpdftbl_set_cellspan(), hpdftbl_set_content(), hpdftbl_set_labels(), and hpdftbl_stroke().
| float* col_width_percent | 
User specified column width array as fraction of the table width. Defaults to equ-width
Referenced by hpdftbl_create_title(), hpdftbl_destroy(), hpdftbl_dumps(), hpdftbl_loads(), and hpdftbl_set_colwidth_percent().
| size_t cols | 
Number of columns in table
Referenced by hpdftbl_clear_spanning(), hpdftbl_create_title(), hpdftbl_destroy(), hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_set_cellspan(), hpdftbl_set_colwidth_percent(), hpdftbl_set_content(), hpdftbl_set_labels(), hpdftbl_set_row_content_style(), and hpdftbl_stroke().
| hpdftbl_content_callback_t content_cb | 
Table content callback. Will be called for each cell unless the cell has its own content callback
Referenced by hpdftbl_set_content_cb().
| char* content_dyncb | 
Table content dynamic callback name. The name is created vi strdup() and must be freed on destruction 
Referenced by hpdftbl_destroy(), hpdftbl_dumps(), and hpdftbl_set_content_dyncb().
| hpdf_text_style_t content_style | 
Content style
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_background(), hpdftbl_set_content_style(), and hpdftbl_stroke().
| hpdftbl_content_style_callback_t content_style_cb | 
Style for content callback. Will be called for each cell unless the cell has its own content style callback
Referenced by hpdftbl_set_content_style_cb(), and hpdftbl_stroke().
| char* content_style_dyncb | 
Table content style dynamic callback name. The name is created vi strdup() and must be freed on destruction 
Referenced by hpdftbl_destroy(), hpdftbl_dumps(), and hpdftbl_set_content_style_dyncb().
| hpdf_text_style_t header_style | 
Header style 
 
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_header_halign(), and hpdftbl_set_header_style().
| HPDF_REAL height | 
Table height. If specified as 0 then the height will be automatically calculated
Referenced by hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_setpos(), hpdftbl_stroke(), and hpdftbl_stroke_pos().
| hpdftbl_grid_style_t inner_hgrid | 
Table inner horizontal border settings, if width>0 this takes precedence over the generic inner border
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_inner_hgrid_style(), and hpdftbl_stroke().
| hpdftbl_grid_style_t inner_tgrid | 
Table inner horizontal top border settings, if width>0 this takes precedence over the generic horizontal and inner horizontal border
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_inner_tgrid_style(), and hpdftbl_stroke().
| hpdftbl_grid_style_t inner_vgrid | 
Table inner vertical border settings, if width>0 this takes precedence over the generic inner border
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_inner_vgrid_style(), and hpdftbl_stroke().
| hpdftbl_content_callback_t label_cb | 
Table content callback. Will be called for each cell unless the cella has its own content callback
Referenced by hpdftbl_set_label_cb().
| char* label_dyncb | 
Table label dynamic callback name. The name is created vi strdup() and must be freed on destruction 
Referenced by hpdftbl_destroy(), hpdftbl_dumps(), and hpdftbl_set_label_dyncb().
| hpdf_text_style_t label_style | 
Label style settings
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_label_style(), and hpdftbl_stroke().
| HPDF_REAL minrowheight | 
Minimum table row height. If specified as 0 it has no effect
Referenced by hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_set_min_rowheight(), and hpdftbl_stroke().
| hpdftbl_grid_style_t outer_grid | 
Table outer border settings
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_outer_grid_style(), and hpdftbl_stroke().
| HPDF_Doc pdf_doc | 
PDF document references
Referenced by hpdftbl_stroke().
| HPDF_Page pdf_page | 
PDF page reference
Referenced by hpdftbl_set_line_dash(), and hpdftbl_stroke().
| hpdftbl_callback_t post_cb | 
Post table creation callback. This is an opportunity for a client to do any special table manipulation before the table is stroked to the page. A reference to the table will be passed on in the callback.
Referenced by hpdftbl_set_post_cb().
| char* post_dyncb | 
Table post dynamic callback name. The name is created vi strdup() and must be freed on destruction 
Referenced by hpdftbl_destroy(), hpdftbl_dumps(), and hpdftbl_set_post_dyncb().
| HPDF_REAL posx | 
X-position of table. Reference point defaults to lower left but can be changed by calling hpdftbl_set_anchor_top_left()
Referenced by hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_setpos(), hpdftbl_stroke(), and hpdftbl_stroke_pos().
| HPDF_REAL posy | 
Y-position of table. Reference point defaults to lower left but can be changed by calling hpdftbl_set_anchor_top_left()
Referenced by hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_setpos(), hpdftbl_stroke(), and hpdftbl_stroke_pos().
| size_t rows | 
Number of rows in table
Referenced by hpdftbl_clear_spanning(), hpdftbl_create_title(), hpdftbl_destroy(), hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_set_cellspan(), hpdftbl_set_col_content_style(), hpdftbl_set_content(), hpdftbl_set_labels(), and hpdftbl_stroke().
| void* tag | 
Optional tag used in callbacks. This can be used to identify the table or add any reference needed by a particular application 
 
Referenced by hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_set_tag(), and hpdftbl_stroke().
| hpdf_text_style_t title_style | 
Title style
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_title_halign(), hpdftbl_set_title_style(), and hpdftbl_stroke().
| char* title_txt | 
Title text 
 
Referenced by hpdftbl_create_title(), hpdftbl_destroy(), hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_set_title(), and hpdftbl_stroke().
| _Bool use_cell_labels | 
Flag to determine if cell labels should be used
Referenced by hpdftbl_apply_theme(), hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_stroke(), and hpdftbl_use_labels().
| _Bool use_header_row | 
Flag to determine if the first row in the table should be formatted as a header row
Referenced by hpdftbl_apply_theme(), hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_stroke(), and hpdftbl_use_header().
| _Bool use_label_grid_style | 
Flag to determine of the short vertical label border should be used. Default is to use half grid.
Referenced by hpdftbl_apply_theme(), hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_stroke(), hpdftbl_use_labelgrid(), and hpdftbl_use_labels().
| _Bool use_zebra | 
Use alternating background color on every second line TRUE or FALSE. Defaults to FALSE.
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_zebra(), and hpdftbl_stroke().
| HPDF_REAL width | 
Table width
Referenced by hpdftbl_dumps(), hpdftbl_loads(), hpdftbl_setpos(), hpdftbl_stroke(), and hpdftbl_stroke_pos().
| HPDF_RGBColor zebra_color1 | 
First zebra color.
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_zebra_color(), and hpdftbl_stroke().
| HPDF_RGBColor zebra_color2 | 
Second zebra color.
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_zebra_color(), and hpdftbl_stroke().
| int zebra_phase | 
Determine if we start with color1 (phase=0) or start with color2 (phase=1)
Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_set_zebra(), and hpdftbl_stroke().