HTML-TreeStructured

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension HTML::TreeStructured.

1.00  Wed Jun  9 15:56:19 2004
	- HTML::TreeStructured for tree structured HTML using style sheets

1.01  Fri Jun 25 17:18:23 2004
	- Added interpreted property "weight" to control presentation order at sibling level
	- 'tooltip' is another interpreted property for popup 
	  (See HTML::Tooltip::Javascript for details)
	- Fixed bugs related to quoting of strings

README  view on Meta::CPAN

                        },
        };

        Interpreted Node Properties:

        color           = Color of the node name
        mouseover       = Mouse Over text for the node (Info image is displayed next to node)
        active          = 0 would cause strike thru on node
        highlight       = color code used for marker highlight of node
        url             = URL to hyperlink the node
        tooltip         = popup when mouse is over the link (together with url) (See HTML::Tooltip::Javascript)
        closed          = 1 if node be closed on default display (default, all nodes are open)
        comment         = Text to display next to node in bold
        weight          = A numeric value on node which will be used for sorting node position in at sibling level
                          (Default, nodes are sorted in ascending order per dictionary order)


        ### Now get HTML equivalent for the tree
        ### The associated JavaScript for nodes close/open and ExpandAll/CollapseAll is generated alongside

        $tree_html = HTML::TreeStructured->new(

lib/HTML/TreeStructured.pm  view on Meta::CPAN

			},
	};

	Interpreted Node Properties:

	color		= Color of the node name
	mouseover	= Mouse Over text for the node (Info image is displayed next to node)
	active		= 0 would cause strike thru on node
	highlight	= color code used for marker highlight of node
	url		= URL to hyperlink the node
	tooltip		= popup when mouse is over the link (together with url) (See HTML::Tooltip::Javascript)
	closed		= 1 if node be closed on default display (default, all nodes are open)
	comment		= Text to display next to node in bold
	weight		= A numeric value on node which will be used for sorting node position in at sibling level
			  (Default, nodes are sorted in ascending order per dictionary order)


	### Now get HTML equivalent for the tree
	### The associated JavaScript for nodes close/open and ExpandAll/CollapseAll is generated alongside

	$tree_html = HTML::TreeStructured->new(

lib/HTML/TreeStructured.pm  view on Meta::CPAN

    #print "<pre>", Dumper($node), "</pre>";

    my $id = next_id();
    push @{$arg{loop}}, { label       => $node->{label},		### Label to appear in tree
                          value       => $node->{value},		### Hidden Value (whats the use?, but good to have)
                          id          => $id,				### Unique Id (no immediate use, but good to have)
                          open        => display_closed_node($depth, $level, $node->{closed}) ? 0 : 1,	
			  						### During Display, whether to close/open
			  url	      => $node->{url},			### Url to link 
			  mouseover   => $node->{mouseover},		### mouseover message
			  tooltip     => $node->{tooltip},		### Tooltip popup box (See HTML::Tooltip::Javascript)
			  active      => ((defined($node->{active}) and $node->{active} == 0) ? 0 : 1),	
			  						### Is this node active? If not, strike thru during display
			  color       => $node->{color} || 'black',	### Color of the label
			  highlight   => $node->{highlight},		### Color to use for marker highlight
			  comment     => $node->{comment},		### Comment in bold within parentheses next to label
                        };
    
    if ($node->{children} and @{$node->{children}}) {
        $arg{loop}[-1]{has_children} = 1;
        for my $child (@{$node->{children}}) {



( run in 0.591 second using v1.01-cache-2.11-cpan-364913b4093 )