NAME

HTML::Menu::TreeView

SYNOPSIS

	use HTML::Menu::TreeView qw(Tree);

	my @tree =( {
	
	text => 'Folder',
	
	subtree => [

		{

                text => 'TreeView.tigris.org',

                href => 'http://TreeView.tigris.org',

		}

            ],

	},);

	Tree(\tree);

folderSentMail is only in 16 px avaible.

OO Syntax

use HTML::Menu::TreeView qw(Tree);

use strict;

my @tree =(

	{

		image => 'tar.png',

		onclick => "alert('onclick');",

		text => 'Node',

	},

	{

		href => "http://www.google.de",

		text => 'Node',

	},

	{

		text => 'Folder',

		folderclass => 'folderMan', # only for Crystal styles

		subtree => [

			{

				text => 'TreeView.tigris.org',

				href => 'http://TreeView.tigris.org',

			},

		],

	},

);

my $TreeView = new HTML::Menu::TreeView();

$TreeView->setStyle("bw");

print $TreeView->css("/srv/www/httpdocs");

print TreeView->jscript();

print $TreeView->Tree(\@tree);

Possible values for folderclass :

folderMan, folderVideo,folderCrystal, folderLocked , folderText, folderFavorite, folderPrint,folderHtml,folderSentMail,folderImage,folderSound,folderImportant,folderTar,folderYellow ,folderGray folderGreen

FO Syntax

use HTML::Menu::TreeView qw(Tree css jscript setStyle setDocumentRoot);

setDocumentRoot("/srv/www/httpdocs");

print css();

print jscript();

print Tree(\@tree,"Crystal");

DESCRIPTION

HTML::Menu::TreeView is a Modul to build an Html tree of an AoH.

Changes

0.6.4

- fix Crystal folderRed 16 px

- fix bw style

- i use perl 5.008006 but i think it is not strongly necessary. So i removed use 5.008006 for use with older Perl versions.

- preload plusNode fixed.

0.6.3

-new Styles Cyrstal 64, 128 ( In the future no more styles will be added to this Modul, if there a different ones they will be avaible as a standalone package).

-preload.js files for preloading images.

0.6.2

-size lastNode 16 & 32 px

0.6.1

- new Styles Cyrstal 22, 48

- new function preload();

- Overwrought Dokumentation.

- Some fixes in installdocs and width ocpNode

- remove some unnecessary files.

0.6

- setClasic, setModern clasic ( alternate node decoration ).

- setSize ( new Style Cyrstal 32 ) 16 or 32 are possible.

- make installdocs (install html documentation vor HTML::Menu::TreeView like http://treeview.lindnerei.de. Open /TreeView.html on your host into your browser after installation.)

- include some styles into Cyrstal.

- preload images for ie etc.

- delete unessesary files.

- new path for images

- make uninstalldocs

- Overwrought css

new()

my $TreeView = new HTML::Menu::TreeView(optional \@tree);

print $TreeView->Tree();

setStyle()

setStyle("style");

bw = Black & White Style

simple = redmond like style

Crystal = Crystal style

setSize()

setSize(16);

currently 16 an 32 are possible values.

only for Crystal styles

setClasic()

use a classic node decoration

(not for bw avaible).

setModern()

use a classic node decoration

(not for bw avaible).

is the dafault decoration.

clasic()

bool clasic() ( node decoration)

getStyle()

mainly for testing.

setDocumentRoot()

set the local path to the style folder.

should be the DocumentRoot of the webserver.

example: setDocumentRoot('/srv/www/htdocs');

default: /srv/www/htdocs

getDocumentRoot()

mainly for testing.

css()

return the necessary css part without <style></style> tag.

you can set the DocumentRoot if you pass a parameter

css('/srv/www/htdocs');

You can also include it with

<link href="/style/Crystal/16/html-menu-treeview/Crystal.css" rel="stylesheet" type="text/css">

for example.

jscript()

return the necessary javascript without <script> tag.

You can also include it with

<script language="JavaScript1.5" type="text/javascript" src="/style/treeview.js"></script>

preload()

Tree()

Tree(\@tree,optional $style);

Returns the Html part of the TreeView without javasript and css.

AUTHOR

Dirk Lindner <lindnerei@o2online.de>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Hr. Dirk Lindner

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.