NAME
Wx::Perl::TreeView - virtual tree control interface
DESCRIPTION
Wx::Perl::TreeView
provides a "virtual" tree control, similar to a virtual Wx::ListCtrl
. All the data access methods are contained inside Wx::Perl::TreeView::Model
. Wx::Perl::TreeView
forwards all unknown method calls to the contained Wx::TreeCtrl
.
new
my $treeview = Wx::Perl::TreeView->new( $tree_control, $model );
Constructs a new Wx::Perl::TreeView
instance using the previously constructed tree control and model.
reload
$treeview->reload;
Deletes all tree items and readds root node(s) from the model.
refresh
my $refreshed = $treeview->refresh;
my $refreshed = $treeview->refresh( [ $treeitemid1, $treeitemid2, ... ] );
Walks the tree and refreshes data from the expanded tree branches. Returns true
on success.
If one of the expanded nodes has a different child count in the model and in the tree, calls reload
and returns false
.
If a list of Wx::TreeItemId
is passed as argument, te child count of these nodes is not checked against the model, and after refreshing these nodes are expanded.
get_cookie
my $cookie = $treeview->get_cookie( $treeitemid );
Returns the cookie associated with the given Wx::TreeItemId
.
treectrl
my $treectrl = $treeview->treectrl;
model
my $model = $treeview->model;
AUTHOR
Mattia Barbon <mbarbon@cpan.org>
LICENSE
Copyright (c) 2007 Mattia Barbon <mbarbon@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself