Allen Day > CGI-Widget > CGI::Widget::HList



Annotate this POD

View/Report Bugs
Module Version: 0.53   Source  


CGI::Widget::HList - Create and manipulate Hierarchial List widgets


  use CGI::Widget::HList;
  use CGI::Widget::HList::Node;

  #create a node
  my $root_node = CGI::Widget::HList::Node->new;

  #create an hlist to manage the node
  my $hlist = CGI::Widget::HList->new(-root=>$root_node);

  #create a daughter node via the hlist object
  my $daughter  = $hlist->node;
  #render the hlist
  print $hlist; #not very exciting


CGI::Widget::HList provides look-and-feel for displaying a CGI::Widget::HList::Node tree graph. For more information, see CGI::Widget::HList::Node.

This module is where image configurations, node rendering, and connector rendering methods are stored in the form of callbacks.

Check ex/ for example scripts


CGI::Widget::HList has only one constructor: new().

For convenient access to the CGI::Widget::HList::Node constructor, you can call the node() method.

new() accepts the following parameters, with optional leading dash. All parameters are optional.

 Parameter                   Purpose
 root                        Root node of the tree to be rendered

 Images to be used in the HTML rendering of the tree:

 The rendering methods themselves.  All are callbacks:

The rendering methods default to sensible code that uses the (also default) images. This can all be over-ridden. See Methods.


Interpreted in a scalar context, the object is overloaded to return the html for the HList. Easy!

html(), or ashtml() can also be called to produce the series html.

node() returns a CGI::Widget::HList::Node object.

root_node() returns the HList's root node.

render_*() methods allow setting/retrieving the coderefs actually used by CGI::Widget::HList::Node objects in the rendering process.

img_*() methods allow setting/retrieving image paths or text that will be used by the rendering coderefs.


 Drop me a line if you use this, I'd like to know where it ends up.

 Allen Day <>
 Copyright (c) 2001.


perl. CGI::Widget. CGI::Widget::HList::Node Tk::HList.

syntax highlighting: