new_ml_table_layout

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
LICENSE
VERSION
SEE ALSO

NAME

new_ml_table_layout, ml_table_layout_pack, ml_table_layout_set_colspan, ml_table_layout_set_rowspan, ml_table_layout_set_align, ml_table_layout_set_valign - monolith table layout widget

SYNOPSIS

#include <ml_table_layout.h>

ml_table_layout new_ml_table_layout (pool, int rows, int cols);
void ml_table_layout_pack (ml_table_layout, ml_widget, int row, int col);
void ml_table_layout_set_colspan (ml_table_layout, int row, int col, int colspan);
void ml_table_layout_set_rowspan (ml_table_layout, int row, int col, int rowspan);
void ml_table_layout_set_align (ml_table_layout, int row, int col, const char *align);
void ml_table_layout_set_valign (ml_table_layout, int row, int col, const char *valign);

DESCRIPTION

The monolith table layout widget is a very powerful layout tool. It is modelled on, and indeed implemented using, HTML <table>s. Table layouts are grids of widgets with a fixed number of rows and columns. Each widget normally occupies a single cell of the table, but widgets may occupy a rectangle of several adjacent cells. All cells in the table are referenced using the row and column number, with row and column numbers starting from zero.
new_ml_table_layout creates a new table layout widget with rows cells across and cols cells down. The cells are numbered 0 .. rows-1 across and code{0 .. cols-1} down.
ml_table_layout_pack packs a widget at position (row,col) within the table. To remove a widget and leave a cell empty, pack a NULL widget.
ml_table_layout_set_colspan and ml_table_layout_set_rowspan set the column span and row span for a particular table cell respectively. The col/row-span allow a cell to occupy one or more adjacent cells in the table (any widgets packed in those adjacent cells are silently ignored). The default column and row span for every cell is 1.
ml_table_layout_set_align sets the horizontal alignment for the content of a cell. The possibilities are "left", "center" or "right", with the default being left-aligned.
ml_table_layout_set_valign sets the vertical alignment for the content of a cell. The possibilities are "top", "middle" or "bottom", with the default being middle.

AUTHOR

Richard Jones <rich@annexia.org>

LICENSE

GNU LGPL (see http://www.gnu.org/)

VERSION

monolith-1.0.0

SEE ALSO

new_ml_widget(3).