ProgressMonitor::Stringify::Fields::AbstractDynamicField - A reusable/abstract


ProgressMonitor documentation  | view source Contained in the ProgressMonitor distribution.

Index


NAME

Top

ProgressMonitor::Stringify::Fields::AbstractDynamicField - A reusable/abstract dynamic field implementation for stringify progress.

DESCRIPTION

Top

Inherits from ProgressMonitor::Stringify::Fields::AbstractField. See that for more information; this class signals participation in the dynamic width negotiation protocol as utilized by ProgressMonitor::Stringify::AbstractMonitor and subclasses.

Inherit from this class if you wish to dynamically adjust your field width to grab as much as possible.

METHODS

Top

grabExtraWidth( $extraWidth )

Called with extra width available. Consume all or part of this by updating the inherited width attribute and return the width not used.

This method may be called multiple times in order to fairly distribute extra width across several dynamic fields

isDynamic

Returns true as long as the current width is less than maxWidth.

widthChange

Notification that the width has changed, thus giving the field a chance to recompute some of its attributes as needed.

PROTECTED METHODS

Top

_new( $hashRef, $package )

The constructor, needs to be called by subclasses.

Configuration data:

minWidth (default => 0)

The minimum width this field should use.

maxWidth

The maximum width this field should use.

_set_width( $newWidth )

Calls SUPER and then widthChange.

AUTHOR

Top

Kenneth Olwing, <knth at cpan.org>

BUGS

Top

I wouldn't be surprised! If you can come up with a minimal test that shows the problem I might be able to take a look. Even better, send me a patch.

Please report any bugs or feature requests to bug-progressmonitor at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ProgressMonitor. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find general documentation for this module with the perldoc command:

    perldoc ProgressMonitor

ACKNOWLEDGEMENTS

Top

Thanks to my family. I'm deeply grateful for you!

COPYRIGHT & LICENSE

Top


ProgressMonitor documentation  | view source Contained in the ProgressMonitor distribution.