Top |
struct libscols_line * | scols_copy_line () |
int | scols_line_add_child () |
int | scols_line_alloc_cells () |
void | scols_line_free_cells () |
struct libscols_cell * | scols_line_get_cell () |
const char * | scols_line_get_color () |
struct libscols_cell * | scols_line_get_column_cell () |
size_t | scols_line_get_ncells () |
struct libscols_line * | scols_line_get_parent () |
void * | scols_line_get_userdata () |
int | scols_line_has_children () |
int | scols_line_next_child () |
int | scols_line_refer_data () |
int | scols_line_remove_child () |
int | scols_line_set_color () |
int | scols_line_set_data () |
int | scols_line_set_userdata () |
struct libscols_line * | scols_new_line () |
void | scols_ref_line () |
void | scols_unref_line () |
int scols_line_add_child (struct libscols_line *ln
,struct libscols_line *child
);
Sets child
as a child of ln
.
int scols_line_alloc_cells (struct libscols_line *ln
,size_t n
);
Allocates space for n
cells. This function is optional,
and libsmartcols automatically allocates necessary cells
according to number of columns in the table when you add
the line to the table. See scols_table_add_line()
.
void
scols_line_free_cells (struct libscols_line *ln
);
Frees the allocated cells referenced to by ln
.
struct libscols_cell * scols_line_get_cell (struct libscols_line *ln
,size_t n
);
struct libscols_cell * scols_line_get_column_cell (struct libscols_line *ln
,struct libscols_column *cl
);
Like scols_line_get_cell()
by cell is referenced by column.
int scols_line_next_child (struct libscols_line *ln
,struct libscols_iter *itr
,struct libscols_line **chld
);
Finds the next child and returns a pointer to it via chld
.
int scols_line_refer_data (struct libscols_line *ln
,size_t n
,char *data
);
int scols_line_remove_child (struct libscols_line *ln
,struct libscols_line *child
);
Removes child
as a child of ln
.
int scols_line_set_data (struct libscols_line *ln
,size_t n
,const char *data
);
int scols_line_set_userdata (struct libscols_line *ln
,void *data
);
Binds data
to ln
.
struct libscols_line *
scols_new_line (void
);
Note that the line is allocated without cells, the cells will be allocated
later when you add the line to the table. If you want to use the line
without table then you have to explicitly allocate the cells by
scols_line_alloc_cells()
.