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

NAME

Layout::Manager::Component - Component Role

SYNOPSIS

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' ...

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.

METHODS

name

Name of this component. Used to find specific components after they've been added to this layout manager.

height

Set/get the height of the component.

maximum_height

Set/get the maximum height for this component. Defaults to 0.

maximum_width

Set/get the maximum width for this component. Defaults to 0.

minimum_height

Set/get the minimum height for this component. Defaults to 0.

minimum_width

Set/get the minimum width for this component. Defaults to 0.

origin

Set/get the origin point of this component. This is expected to be a Geometry::Primitive::Point object.

preferred_height

Set/get the preferred height for this component. Defaults to 0.

preferred_height

Set/get the minimum height for this component. Defaults to 0.

width

Set/get the width of the component.

AUTHOR

Cory Watson, <gphat@cpan.org>

Infinity Interactive, http://www.iinteractive.com

SEE ALSO

COPYRIGHT & LICENSE

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.