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

NAME

App::Chart::Gtk2::Ex::TreePath::Circular -- managed path position with wraparound

SYNOPSIS

 use App::Chart::Gtk2::Ex::TreePath::Circular;
 my $path = My::TreePath::Circular->new;

 $path->next ($model);
 $path->prev ($model);

CLASS HIERARCHY

App::Chart::Gtk2::Ex::TreePath::Circular is a Perl subclass of Gtk2::TreePath,

    Glib::Boxed
      Gtk2::TreePath
        App::Chart::Gtk2::Ex::TreePath::Circular

DESCRIPTION

App::Chart::Gtk2::Ex::TreePath::Circular is a version of Gtk2::TreePath designed to maintain a position in the model's row data and to wrap round from the end back to the beginning of the rows when necessary. It's used for instance by Gtk2::Ex::TickerView to maintain the current item position in that display.

FUNCTIONS

App::Chart::Gtk2::Ex::TreePath::Circular->new

Create and return a new path object.

App::Chart::Gtk2::Ex::TreePath::Circular->new_first

Create and return a new path object positioned at index 0, ie. the start of any model's data.

App::Chart::Gtk2::Ex::TreePath::Circular->new_from_indices ($index)

Create and return a new path object positioned at the given index. Index 0 is the first in any model.

App::Chart::Gtk2::Ex::TreePath::Circular->new_from_string ($str)

Create and return a new path object positioned at an index given by a string.

$circpath->next ($model)
$circpath->prev ($model)

Step $circpath to the next or previous row in the given $model. At the end of the rows next wraps around to the start again, and conversely at the start prev wraps around to the end.

$circpath->row_inserted ($model, $path, $iter)
$circpath->row_deleted ($model, $path)
$circpath->rows_reordered ($model, $path, $iter, $aref)

Adjust $circpath to maintain it's current position in the presence of the given changes to $model. These functions can be called from the respective model signal, the parameters are the same as to those signals.

SEE ALSO

Gtk2::TreePath