wxRuby Documentation Home

Wx::HtmlContainerCell

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.

Derived from

HtmlCell

See Also

Cells Overview

Methods

HtmlContainerCell.new

HtmlContainerCell.new(%(arg-type)HtmlContainerCell% parent)

Constructor. parent is pointer to parent container or NULL.

HtmlContainerCell#get_align_hor

Integer get_align_hor()

Returns container’s horizontal alignment.

HtmlContainerCell#get_align_ver

Integer get_align_ver()

Returns container’s vertical alignment.

HtmlContainerCell#get_background_colour

Colour get_background_colour()

Returns the background colour of the container or NullColour if no background
colour is set.

HtmlContainerCell#get_indent

Integer get_indent(%(arg-type)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!

HtmlContainerCell#get_indent_units

Integer get_indent_units(%(arg-type)Integer% ind)

Returns the units of indentation for ind where ind is one
of the *HTML_INDENT_** constants.

HtmlContainerCell#insert_cell

insert_cell(%(arg-type)HtmlCell% cell)

Inserts new cell into the container.

HtmlContainerCell#set_align

set_align(%(arg-type)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
setalignver.

HtmlContainerCell#set_align_hor

set_align_hor(%(arg-type)Integer% al)

Sets the container’s horizontal alignment. During Layout
each line is aligned according to al value.

Parameters

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

HtmlContainerCell#set_align_ver

set_align_ver(%(arg-type)Integer% al)

Sets the container’s vertical alignment. This is per-line alignment!

Parameters

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

HtmlContainerCell#set_background_colour

set_background_colour(%(arg-type)Colour% clr)

Sets the background colour for this container.

HtmlContainerCell#set_border

set_border(%(arg-type)Colour% clr1, Colour clr2)

Sets the border (frame) colours. A border is a rectangle around the container.

Parameters

HtmlContainerCell#set_indent

set_indent(%(arg-type)Integer% i, Integer what, Integer units = HTML_UNITS_PIXELS)

Sets the indentation (free space between borders of container and subcells).

Parameters

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

HtmlContainerCell#set_min_height

set_min_height(%(arg-type)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.

Parameters

HtmlContainerCell#set_width_float

set_width_float(%(arg-type)Integer% w, Integer units) set_width_float(%(arg-type)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.

Parameters

HTML_UNITS_PIXELS w is number of pixels
HTML_UNITS_PERCENT w is interpreted as percents of widthof parent container

[This page automatically generated from the Textile source at 2023-06-03 08:07:33 +0000]