SYNOPSIS
#include <agar/core.h> #include <agar/gui.h>
DESCRIPTION
Some functions related to Agar widgets accept specially parsed string
arguments which are used to specify relative sizes of visual elements
which cannot be automatically determined by Agar.
For example, the AG_Table(3) widget provides an AG_TableAddCol(3) function which accepts an optional size_spec argument for defining the initial width of a column.
The following formats are allowed:
For example, the AG_Table(3) widget provides an AG_TableAddCol(3) function which accepts an optional size_spec argument for defining the initial width of a column.
The following formats are allowed:
Npx | Number of pixels. For example, "100px" will size to 100 pixels. |
<Some text> | Size to the minimum amount of space required to completely display the given text, as rendered using the default font. |
N% | Percentage of space (widget-specific). For example, "50%" in AG_TableAddCol(3) will size a new column to half of the available space. |
- | Expand to fill any available space remaining (widget-specific). |
SEE ALSO ↑
HISTORY ↑
The
AG_SizeSpec interface first appeared in
Agar 1.0.