The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Gapp::TableMap - Create ASCII Table Layouts

SYNOPSIS

    Gapp::TableMap->new( string => "
        +-------%------+>>>>>>>>>>>>>>>+
        |     Name     |               |
        +--------------~ Image         |
        | Keywords     |               |
        +-------+------+[--------------+
        ^       ' More | Something     |
        ^       |      +-----+--------]+
        _ Notes |      |     |     Foo |
        +-------+------+-----+---------+
        ^ Bar          | Baz           |
        +--------------+---------------+
    ");

OBJECT HIERARCHY

Gapp::TableMap

DESCRIPTION

A Gapp::TableMap is used to layout widgets in a table. Generally you will only need to know how to create a Table map and won't need to worry about the details (unless your want to change how widgets are added to table - see Gapp::Layout).

Creating a TableMap

You may also call the Gapp::TableMap constructor with a single argument, which will be used as the string attribute.

    Gapp::TableMap->new( ... );

The map attribute of Gapp::Table will coerce a string into a Gapp::TableMap for you.

    Gapp::Table->new (
        map => '
            ...
        ',
    )

Special Characters

This is the complete list of recognized characters and their meaning:

- | + =

The widget fills the cell, but the cell doesn't resize with the table. That's the default, because these characters belong to the set of ASCII graphic characters used to draw the layout.

>

The cell expands horizontal. Recognized only in the top border of a cell.

^

The cell expands vertical. Recognized only in the left border of a cell.

[

Widget is attached on the left and doesn't expand anymore with the cell. Recognized only in the top border of a cell.

]

Widget is attached on the right and doesn't expand anymore with the cell. Recognized only in the top border of a cell.

%

Widget is attached in the middle (horizontal) and doesn't expand anymore with the cell. Recognized only in the top border of a cell.

'

Widget is attached on the top and doesn't expand anymore with the cell. Recognized only in the left border of a cell.

_

Widget is attached on the bottom and doesn't expand anymore with the cell. Recognized only in the left border of a cell.

~

Widget is attached in the middle (vertical) and doesn't expand anymore with the cell. Recognized only in the left border of a cell.

Whitespace

You may have arbitrary whitespace around your table, inlcuding TAB characters. Don't use TAB characters but true SPACE characters inside the table.

PROVIDED ATTRIBUTES

string
isa: Str

PROVIDED METHODS

cells

Returns an ArrayRef containing Gapp::TableCell objects.

row_count

The number of table rows in the map.

col_count

The number of tbale columns in the map.

ACKNOWLEDGMENTS

Thanks to Jörn Reder and his Gtk2::Ex::FormFactory::Table package, this one is able to exist.

AUTHORS

Jörn Reder <joern at zyn dot de>

Jeffrey Ray Hallock <jeffrey.hallock at gmail dot com>

COPYRIGHT & LICENSE

    Copyright 2004-2006 by Jörn Reder.

    Copyright (c) 2011-2012 Jeffrey Ray Hallock.

    This library is free software; you can redistribute it and/or modify
    it under the terms of the GNU Library General Public License as
    published by the Free Software Foundation; either version 2.1 of the
    License, or (at your option) any later version.
    
    This library is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
    
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307
    USA.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 437:

Non-ASCII character seen before =encoding in 'Jörn'. Assuming CP1252