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

NAME

Wx::Perl::TreeView::Model - virtual tree control model class

DESCRIPTION

An abstract base class for all models.

METHODS

get_root

  my( $cookie, $string, $image, $data ) = $model->get_root;

$cookie is an opaque identifier specific to the model implementation that can be used to access model nodes. $string, $image and $data are the item's label, image and client data (the latter two are optional).

get_child_count

  my $count = $model->get_child_count( $cookie );

Return the numer of childrens of a given node.

get_child

  my( $cookie, $string, $image, $data ) = $model->get_child( $cookie, $index );

Return the n-th child of the given node. See get_root for the return values.

has_children

  my $has_children = $model->has_children( $cookie );

Return true if the given item has childrens. The default implementation uses get_child_count return value.