Chart::Clicker::Drawing::Container
A Base 'container' for all components that want to hold other components.
my $c = new Chart::Clicker::Drawing::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
Set/Get this Container's background color.
Set/Get this Container's border
Get the components in this container. The return value is an arrayref of hashrefs. Each hashref has a 'component' and 'position' key.
Draw this container and all of it's children.
Set/Get this Container's height
Set/Get this Container's insets.
Prepare this container for rendering. All of it's child components will be prepared as well.
Add a component to this container.
$cont1->add($foo); $cont2->add($cont1, $CC_TOP); $cont2->add($cont1, $CC_TOP, 1);
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. If you do not specify a position then $CC_CENTER is used. The third argument is a flag that controls whether this component will actually affect the layout of items after it. This is used to make renderers render 'over' each other. A normal use of this would be to stack the Grid and Renderer.
Cory 'G' Watson <gphat@cpan.org>
perl(1)
You can redistribute and/or modify this code under the same terms as Perl itself.
To install Chart::Clicker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::Clicker
CPAN shell
perl -MCPAN -e shell install Chart::Clicker
For more information on module installation, please visit the detailed CPAN module installation guide.