NAME

Chart::Clicker::Container

DESCRIPTION

A Base 'container' for all components that want to hold other components.

SYNOPSIS

my $c = new Chart::Clicker::Container({
  width => 500, height => 350
  background_color => new Chart::Clicker::Drawing::Color(),
  border => new Chart::Clicker::Drawing::Border(),
  insets => new Chart::Clicker::Drawing::Insets(),
});

METHODS

Constructor

new
my $c = new Chart::Clicker::Container({
  width => 500, height => 350
  background_color => new Chart::Clicker::Drawing::Color(),
  border => new Chart::Clicker::Drawing::Border(),
  insets => new Chart::Clicker::Drawing::Insets(),
});

Creates a new Container. Width and height must be specified. Border, background_color and insets are all optional and will default to undef

Class Methods

add

Add a component to this container.

$cont1->add($foo);
$cont2->add($cont1, $CC_TOP);

The first argument must be some other entity that is renderable by Chart::Clicker. The second argument is an optional position. The positioning of elements is very rudimentary. Only a single component is allowed at any position ($CC_TOP and it's ilk) and...

background_color

Set/Get this Container's background color.

border

Set/Get this Container's border

height

Set/Get this Container's height

insets

Set/Get this Container's insets.

inside_width

Get the width available in this container after taking away space for insets and borders.

$c->inside_height()

Get the height available in this container after taking away space for insets and borders.

width

Set/Get this Container's height

AUTHOR

Cory 'G' Watson <gphat@cpan.org>

SEE ALSO

perl(1)