libhpdftbl 1.5.0
Table construction library for Haru PDF library
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
hpdftbl Struct Reference

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_tcells
 

Detailed Description

Core table handle.

This is the main structure that contains all information for the table. The basic structure is an array of cells.

See also
hpdftbl_cell_t
Examples
example01.c, tut_ex00.c, tut_ex01.c, tut_ex02.c, tut_ex02_1.c, tut_ex03.c, tut_ex04.c, tut_ex05.c, tut_ex06.c, tut_ex07.c, tut_ex08.c, tut_ex09.c, tut_ex10.c, tut_ex11.c, tut_ex12.c, tut_ex14.c, tut_ex15.c, tut_ex15_1.c, tut_ex20.c, tut_ex30.c, tut_ex40.c, and tut_ex41.c.

Field Documentation

◆ anchor_is_top_left

_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().

◆ bottom_vmargin_factor

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().

◆ 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().

◆ canvas_dyncb

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().

◆ cells

◆ col_width_percent

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().

◆ cols

◆ 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().

◆ content_dyncb

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().

◆ content_style

◆ 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().

◆ content_style_dyncb

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().

◆ header_style

◆ height

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().

◆ inner_hgrid

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().

◆ inner_tgrid

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().

◆ inner_vgrid

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().

◆ 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().

◆ label_dyncb

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().

◆ label_style

◆ minrowheight

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().

◆ outer_grid

◆ pdf_doc

HPDF_Doc pdf_doc

PDF document references

Referenced by hpdftbl_stroke().

◆ pdf_page

HPDF_Page pdf_page

PDF page reference

Referenced by hpdftbl_set_line_dash(), and hpdftbl_stroke().

◆ 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().

◆ post_dyncb

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().

◆ posx

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().

◆ posy

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().

◆ rows

◆ tag

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().

◆ title_style

◆ title_txt

◆ use_cell_labels

_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().

◆ use_header_row

_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().

◆ use_label_grid_style

_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().

◆ use_zebra

_Bool use_zebra

Use alternating background color on every second line TRUE or FALSE. Defaults to FALSE.

See also
hpdftbl_set_zebra()

Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_loads(), hpdftbl_set_zebra(), and hpdftbl_stroke().

◆ width

HPDF_REAL width

◆ zebra_color1

HPDF_RGBColor zebra_color1

◆ zebra_color2

HPDF_RGBColor zebra_color2

◆ zebra_phase

int zebra_phase

Determine if we start with color1 (phase=0) or start with color2 (phase=1)

See also
hpdftbl_set_zebra()

Referenced by hpdftbl_dumps(), hpdftbl_get_theme(), hpdftbl_set_zebra(), and hpdftbl_stroke().


The documentation for this struct was generated from the following file: