App-Chart

 view release on metacpan or  search on metacpan

lib/App/Chart/Gtk2/Ex/TreeRowPosition.pm  view on Meta::CPAN

=item C<< $iter = $rowpos->prev_iter >>

Move C<$rowpos> to the next or previous row from its current position and
return an integer index or L<C<Gtk2::TreeIter>|Gtk2::TreeIter> for the new
position.  If there's no more rows in the respective direction (including if
the model is empty) then the return is C<undef> instead.

=item C<< $rowpos->goto ($path) >>

=item C<< $rowpos->goto ($path, $type) >>

Move C<$rowpos> to the given C<$path> row.  The C<$type> parameter
defaults to "at", or you can give "before" or "after" instead.

    $rowpos->goto (4, 'before');

C<goto> is the same as setting the respective property values (but changed
in one operation).

=item C<< $rowpos->goto_start >>

=item C<< $rowpos->goto_end >>

Move C<$rowpos> to the start or end of its model, so that C<next> returns
the first row or C<prev> the last row (respectively).  These functions are
the same as setting the C<type> property to "start" or "end", respectively.

=back

=head1 PROPERTIES

=over 4

=item C<model> (C<Glib::Object> implementing C<Gtk2::TreeModel>)

The model to operate on.

=item C<type> (C<App::Chart::Gtk2::Ex::TreeRowPosition::Type> enum, default C<start>)

Enum values "at", "before", "after", "start", "end".

The default type is C<"start">, but you can Initialize to a particular row
explicitly,

    my $rowpos = App::Chart::Gtk2::Ex::TreeRowPosition->new (model => $my_model,
                                               type  => 'at',
                                               index => 3);

=item C<path> (C<Gtk2::TreePath>, default an empty path)

Current path in the model.

=item C<key-column> (integer, default -1)

Column number of row key data.  The default -1 means no key column.

=back

C<notify> signals are emitted for C<path> and/or C<type> when model row
changes alter those values, in the usual way.  A notify handler must not
insert, delete or reorder model rows because doing so may invalidate the
path and/or iter objects passed to further handlers on the model.

=head1 SIGNALS

=over 4

=item C<key-extract>, called (treerowpos, model, path, iter)

Callback to extract a key from a row.  When set it's called

=item C<key-equal>, called (treerowpos, string, string)

Row key equality function.  The default handler compares with C<eq>.

=back

=head1 OTHER NOTES

When a TreeRowPosition is "at" a given row and that row is deleted there's a
choice between becoming "after" the previous row, or "before" the next row.
This can make a difference in a reorder if the two rows move to different
places.  The current code always uses "after the previous", or if the first
row is deleted then "start".

=head1 SEE ALSO

L<Gtk2::TreeModel>, L<Gtk2::TreeRowReference>

=cut



( run in 0.740 second using v1.01-cache-2.11-cpan-39bf76dae61 )