Paweł Murias
and 1 contributors

SYNOPSIS

  use Gtk2 -init;

  use Forest::Tree;
  use Forest::Tree::Viewer::Gtk2;

  my $tree = Forest::Tree->new(node=>'root',children=>[
    Forest::Tree->new(node=>'child1'),
    Forest::Tree->new(node=>'child2'),
  ]);

  my $viewer = Forest::Tree::Viewer::Gtk2->new(tree=>$tree);

  # wrap the tree view in a simple gtk2 application
  my $window = Gtk2::Window->new('toplevel');
  $window->add($viewer->view);
  $window->show_all;
  Gtk2->main;

NAME

Forest::Tree::Viewer::Gtk2 - a simple Gtk2 using tree viewer

ATTRIBUTES

tree

The tree we want to display

METHODS

view

Return the Gtk2::TreeView for our tree

tree_store

Return the Gtk2::TreeStore for our tree