Tom Molesworth > Tickit-Widget-Table-0.003 > Tickit::Widget::Table::Column

Download:
Tickit-Widget-Table-0.003.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 0.003   Source  

NAME ^

Tickit::Widget::Table::Column - a column in a Ticket::Widget::Table

VERSION ^

version 0.003

DESCRIPTION ^

See Tickit::Widget::Table.

A column includes a single header cell, and zero or more data cells.

METHODS ^

new

Instantiate a new column.

Takes the following named parameters:

Returns the new instance.

format_by_name

Returns the appropriate format coderef for the given string.

Currently the format can be one of:

format

Returns the format type for this column.

apply_format

Formats the given value according to the requirements of this column's formatting settings.

remove_row

Remove the given row from this column.

add_header_cell

Attach the given header cell to this column.

lines

Number of lines in this widget - since we draw indirectly via cells, this is left as 1.

cols

Returns the number of (screen) columns we'd like to have.

width_type

What sort of width this is. Probably something like left|right|auto

width

The width for this column. Should probably return a number.

displayed_width

This returns the actual displayed width, i.e. the real number of (screen) columns used. I think.

align

Returns the current alignment setting.

label

Returns the current label for this column.

set_displayed_width

Change the displayed width.

table

Accessor for the containing Tickit::Widget::Table.

add_cell

Adds a new Tickit::Widget::Cell to the end of this column.

add_row

Does nothing at all yet has a confusingly purposeful name.

autofit

Makes a wild guess as to how wide we should be then sets the displayed width accordingly.

render

Does nothing, for cases where we're attached to something as a real widget.

idx

Our index in the containing Tickit::Widget::Table. Zero-based.

update_style

Updates the pen for all contained cells.

Returns $self.

cells

Returns a list of all contained Tickit::Widget::Cell instances.

AUTHOR ^

Tom Molesworth <cpan@entitymodel.com>

LICENSE ^

Copyright Tom Molesworth 2011. Licensed under the same terms as Perl itself.

syntax highlighting: