Kenneth Ölwing > ProgressMonitor-0.33 > ProgressMonitor::Stringify::Fields::AbstractDynamicField

Download:
ProgressMonitor-0.33.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

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

DESCRIPTION ^

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 ^

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 ^

_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 ^

Kenneth Olwing, <knth at cpan.org>

BUGS ^

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 ^

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

    perldoc ProgressMonitor

ACKNOWLEDGEMENTS ^

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

COPYRIGHT & LICENSE ^

Copyright 2006,2007 Kenneth Olwing, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: