#!/usr/bin/perl
# 
#  Menu.pm - Compute the footer for the Oroborus.org website.
# 
#  Copyright (C) 2002 Stefan Pfetzing and Martin Helas
# 
#  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, 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.  
# 

# define the Package name
package Oroborus::Menu;

#use Apache::Reload;
use strict;
our ($q);

# constructor needs one argument, a reference to a CGI object
sub new($) {
	my $proto = shift();
	$q = shift();
	my $class = ref($proto) || $proto;
	my $self  = {};
	bless ($self, $class);
	my @menu_entries = ("Main", "Mailing Lists", "Bugs", "Download", "Screenshots", "Themes", "Links", "Imprint", "Disclaimer");
	my $context ;
	foreach my $entry (@menu_entries) {
		$context = $context ?
				$context . ("&nbsp;" x 4) . $q->a({-href=>$q->url()."?node=".$entry,-class=>"Menu"}, $entry)
			:
				$q->a({-href=>$q->url()."?node=".$entry,-class=>"Menu"}, $entry);
	}
	$self->{_STRING} =$q->Tr(
		$q->td({-class=>"NodeMenu",
			-colspan=>"3"},
			$context));
	return $self;
}

# destructor
sub DESTROY() {
};

sub toString() {
	my $self = shift();
	return $self->{_STRING};
}

# return a true value
1;
__END__


