widget::hlist::node(3)
NAME
CGI::Widget::HList::Node - Tree::DAG_Node extension for
representing Hierarchical List (HList) Nodes.
SYNOPSIS
use CGI::Widget::HList::Node;
my $node1 = CGI::Widget::HList::Node->new;
$node1->name("no.1");
$node1->link("http://some.link/");
my $node2 = CGI::Widget::HList::Node->new;
$node2->name("no.2");
$node2->link("/");
$node1->add_daughter($node1);
DESCRIPTION
CGI::Widget::HList::Node is a subclass of Tree::DAG_Node,
with a few overridden and extra methods that help it be
more specific to representation of DAGs in an HTML/CGI
context. See Tree::DAG_Node for more details.
Constuctors
CGI::Widget::Series has multiple constructors. See
Tree::DAG_Node.
Methods
open() - set the value returned by state() to 1. An
open() node is one which allows its daughters to be
exposed.
close() - set the value returned by state() to 0. A
close() node does not expose its daughter nodes.
state() - returns the open/close state of a node.
pregnant() - a node that has the potential to have daugh
ter nodes, but currently does not have them can be tagged
by calling pregnant with a non-zero,defined value. Call
ing with zero or undef terminates the pregnancy, as does
calling open() on the node.
link() - holds a subroutine used to render the text label
of the node. Returns name() or an object reference by
default. Override this with a callback.
dump_names() - overridden to produce a highly flexible
hierarchical list, optionally with CGI parameters and HTML
tags.
Many, many methods are provided by Tree::DAG_Node, and are
available within this class. I have only outlined here
overridden/ additional methods. For complete documenta
tion, also consult Tree::DAG_Node.
AUTHOR
Allen Day <allenday@ucla.edu>
Copyright (c) 2001.
SEE ALSO
- perl. CGI::Widget. CGI::Widget::HList. Tree::DAG_Node.