=for comment POD_DERIVED_INDEX_GENERATED
The following documentation is automatically generated.  Please do not edit
this file, but rather the original, inline with Tickit::Widget::Breadcrumb
at lib/Tickit/Widget/Breadcrumb.pm
(on the system that originally ran this).
If you do edit this file, and don't want your changes to be removed, make
sure you change the first line.

=encoding utf8

=cut

=head1 NAME

Tickit::Widget::Breadcrumb - render a breadcrumb trail

=head1 VERSION

Version 0.002

=head1 SYNOPSIS

 use Tickit;
 use Tickit::Widget::Breadcrumb;
 my $bc = Tickit::Widget::Breadcrumb->new;
 $bc->adapter->push([
  qw(home perl site-lib)
 ]);
 Tickit->new(root_widget => $bc)->run;

=head1 DESCRIPTION

Provides a widget for showing "breadcrumbs".

Accepts focus.

Use left/right to navigate, enter to select.

Render looks something like:

 first < second | current | next > last

=head2 ITEM TRANSFORMATIONS

See L</new>.

=head1 METHODS

=head2 new

Instantiate. The following named parameters may be of use:

=over 4

=item * item_transformations - a coderef or arrayref of transformations to
apply to items received from the adapter.

=back

An example of transformations:

 my $bc = Tickit::Widget::Breadcrumb->new(
  item_transformations => sub {
   my $item = shift;
   strftime '%Y-%m-%d %H:%M:%S', localtime $item
  }
 );
 $bc->push([ time ]);

=head2 lines

Returns the number of lines this widget would like.

=head2 cols

Returns the number of columns this widget would like.

=head2 render_to_rb

Perform rendering.

=head2 render_separator

Renders the separator between two items.

Pass the index of the item on the left.

There are 3 cases:

=over 4

=item * inactive to inactive

=item * inactive to active

=item * active to inactive

=back

=head2 transform_item

Applies any transformations to the given item.

Currently these are immediate transformations, i.e. no support for L<Future>s.
This may change in a newer versions, but you should be safe as long as you return
a string or L<String::Tagged> rather than a L<Future> here.

See L<ITEM TRANSFORMATIONS> for details.

=head2 adapter

Returns the adapter responsible for dealing with the underlying data.

If called with no parameters, will return the current adapter (creating one if necessary).

If called with a parameter, will set the adapter to that value,
assigning a new default adapter if given undef. Will then return
$self to allow for method chaining.

=head1 SEE ALSO

=over 4

=item * L<Tickit::Widgets> - the standard Tickit widgetset.

=item * L<Tickit>

=back

=head1 INHERITED METHODS

=over 4

=item L<Tickit::Widget>

L<get_style_pen|Tickit::Widget/get_style_pen>, L<get_style_text|Tickit::Widget/get_style_text>, L<get_style_values|Tickit::Widget/get_style_values>, L<key_focus_next_after|Tickit::Widget/key_focus_next_after>, L<key_focus_next_before|Tickit::Widget/key_focus_next_before>, L<on_pen_changed|Tickit::Widget/on_pen_changed>, L<parent|Tickit::Widget/parent>, L<pen|Tickit::Widget/pen>, L<redraw|Tickit::Widget/redraw>, L<requested_cols|Tickit::Widget/requested_cols>, L<requested_lines|Tickit::Widget/requested_lines>, L<requested_size|Tickit::Widget/requested_size>, L<reshape|Tickit::Widget/reshape>, L<resized|Tickit::Widget/resized>, L<set_parent|Tickit::Widget/set_parent>, L<set_pen|Tickit::Widget/set_pen>, L<set_requested_size|Tickit::Widget/set_requested_size>, L<set_style|Tickit::Widget/set_style>, L<set_style_tag|Tickit::Widget/set_style_tag>, L<set_window|Tickit::Widget/set_window>, L<style_classes|Tickit::Widget/style_classes>, L<take_focus|Tickit::Widget/take_focus>, L<window|Tickit::Widget/window>, L<window_lost|Tickit::Widget/window_lost>

=back

=head1 AUTHOR

Tom Molesworth <cpan@perlsite.co.uk>

=head1 LICENSE

Copyright Tom Molesworth 2014. Licensed under the same terms as Perl itself.
