The HtmlContainerCell class is an implementation of a cell that may contain more cells in it. It is heavily used in the HTML layout algorithm.
HtmlContainerCell.new(HtmlContainerCell parent)
Constructor. parent is pointer to parent container or NULL.
Integer get_align_hor()
Returns container’s horizontal alignment.
Integer get_align_ver()
Returns container’s vertical alignment.
Colour get_background_colour()
Returns the background colour of the container or NullColour if no background
colour is set.
Integer get_indent(Integer ind)
Returns the indentation. ind is one of the HTML_INDENT_* constants.
Note: You must call get_indent_units with same ind parameter in order to correctly interpret the returned integer value. It is NOT always in pixels!
Integer get_indent_units(Integer ind)
Returns the units of indentation for ind where ind is one of the HTML_INDENT_* constants.
insert_cell(HtmlCell cell)
Inserts new cell into the container.
set_align(HtmlTag tag)
Sets the container’s alignment (both horizontal and vertical) according to
the values stored in tag. (Tags ALIGN parameter is extracted.) In fact
it is only a front-end to set_align_hor
and set_align_ver.
set_align_hor(Integer al)
Sets the container’s horizontal alignment. During Layout each line is aligned according to al value.
| HTML_ALIGN_LEFT | lines are left-aligned (default) |
| HTML_ALIGN_JUSTIFY | lines are justified |
| HTML_ALIGN_CENTER | lines are centered |
| HTML_ALIGN_RIGHT | lines are right-aligned |
set_align_ver(Integer al)
Sets the container’s vertical alignment. This is per-line alignment!
| HTML_ALIGN_BOTTOM | cells are over the line (default) |
| HTML_ALIGN_CENTER | cells are centered on line |
| HTML_ALIGN_TOP | cells are under the line |
alignv.bmp
set_background_colour(Colour clr)
Sets the background colour for this container.
set_border(Colour clr1, Colour clr2)
Sets the border (frame) colours. A border is a rectangle around the container.
set_indent(Integer i, Integer what,
Integer units = HTML_UNITS_PIXELS)
Sets the indentation (free space between borders of container and subcells).
| HTML_INDENT_TOP | top border |
| HTML_INDENT_BOTTOM | bottom |
| HTML_INDENT_LEFT | left |
| HTML_INDENT_RIGHT | right |
| HTML_INDENT_HORIZONTAL | left and right |
| HTML_INDENT_VERTICAL | top and bottom |
| HTML_INDENT_ALL | all 4 borders |
indent.bmp
| HTML_UNITS_PIXELS | i is number of pixels |
|---|---|
| HTML_UNITS_PERCENT | i is interpreted as percents of widthof parent container |
set_min_height(Integer h, Integer align = HTML_ALIGN_TOP)
Sets minimal height of the container.
When container’s Layout is called, m_Height is set depending on layout of subcells to the height of area covered by layed-out subcells. Calling this method guarantees you that the height of container is never smaller than h – even if the subcells cover much smaller area.
set_width_float(Integer w, Integer units)
set_width_float(HtmlTag tag, Float pixel_scale = 1.0)
Sets floating width adjustment.
The normal behaviour of container is that its width is the same as the width of parent container (and thus you can have only one sub-container per line). You can change this by setting FWA.
pixel_scale is number of real pixels that equals to 1 HTML pixel.
SetWidthFloat(-50, HTML_UNITS_PIXELS) sets the width
of container to parent’s width minus 50 pixels. This is useful when
creating tables – you can call SetWidthFloat(50) and SetWidthFloat(-50))| HTML_UNITS_PIXELS | w is number of pixels |
|---|---|
| HTML_UNITS_PERCENT | w is interpreted as percents of widthof parent container |
WIDTH parameter.[This page automatically generated from the Textile source at Thu Aug 28 20:29:11 +0100 2008]