Layout::Manager::Component - Component Role
Layout::Manager resizes and repositions components. This role provides the blueprint for your objects to be moveable by Layout::Manager. Simply add this role to your class and implement the required methods.
package My::Widget; use Moose; with 'Layout::Manager::Component'; has 'width' ... has 'height' ... has 'origin' ... sub prepare { # ... prepare! } sub draw { # ... draw! }
This role does not provide an implementation of these methods. This might be surprising because it could. I originally intended to implement the attributes here and use the role in Geomtry::Primitive or Graphics::Primitive but it would've created a circular dependency, so I opted to leave this bit of yak shaving up to you. This may change in the future as the APIs of these modules solidifies.
Name of this component. Used to find specific components after they've been added to this layout manager.
Set/get the height of the component.
Set/get the maximum height for this component. Defaults to 0.
Set/get the maximum width for this component. Defaults to 0.
Set/get the minimum height for this component. Defaults to 0.
Set/get the minimum width for this component. Defaults to 0.
Set/get the origin point of this component. This is expected to be a Geometry::Primitive::Point object.
Set/get the preferred height for this component. Defaults to 0.
Set/get the width of the component.
Cory Watson, <gphat@cpan.org>
<gphat@cpan.org>
Infinity Interactive, http://www.iinteractive.com
Copyright 2008 by Infinity Interactive, Inc.
http://www.iinteractive.com
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Layout::Manager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Layout::Manager
CPAN shell
perl -MCPAN -e shell install Layout::Manager
For more information on module installation, please visit the detailed CPAN module installation guide.