|
Alain Reguera Delgado |
46de3c |
#!/usr/bin/perl
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# repository.init -- This file initializes Texi2HTML program to
|
|
Alain Reguera Delgado |
46de3c |
# produce the repository documentation manual using the CentOS Web
|
|
Alain Reguera Delgado |
46de3c |
# Environment XHTML and CSS standard definition.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# Copyright (C) 2009, 2010, 2011 The CentOS Project
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# This program is free software; you can redistribute it and/or modify
|
|
Alain Reguera Delgado |
46de3c |
# it under the terms of the GNU General Public License as published by
|
|
Alain Reguera Delgado |
46de3c |
# the Free Software Foundation; either version 2 of the License, or
|
|
Alain Reguera Delgado |
46de3c |
# (at your option) any later version.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# This program is distributed in the hope that it will be useful, but
|
|
Alain Reguera Delgado |
46de3c |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Alain Reguera Delgado |
46de3c |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Alain Reguera Delgado |
46de3c |
# General Public License for more details.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# You should have received a copy of the GNU General Public License
|
|
Alain Reguera Delgado |
46de3c |
# along with this program; if not, write to the Free Software
|
|
Alain Reguera Delgado |
46de3c |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
Alain Reguera Delgado |
46de3c |
# USA.
|
|
Alain Reguera Delgado |
46de3c |
# ----------------------------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
# $Id$
|
|
Alain Reguera Delgado |
46de3c |
# ----------------------------------------------------------------------
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# -iso
|
|
Alain Reguera Delgado |
46de3c |
# if set, ISO8859 characters are used for special symbols (like
|
|
Alain Reguera Delgado |
46de3c |
# copyright, etc)
|
|
Alain Reguera Delgado |
46de3c |
$USE_ISO = 1;
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# -I
|
|
Alain Reguera Delgado |
46de3c |
# add a directory to the list of directories where @include files are
|
|
Alain Reguera Delgado |
46de3c |
# searched for (besides the directory of the file). additional '-I'
|
|
Alain Reguera Delgado |
46de3c |
# args are appended to this list. (APA: Don't implicitely search .,
|
|
Alain Reguera Delgado |
46de3c |
# to conform with the docs!) my @INCLUDE_DIRS = (".");
|
|
Alain Reguera Delgado |
46de3c |
#@INCLUDE_DIRS = ("/home/al/Projects/CentOS/artwork");
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Extension used on output files.
|
|
Alain Reguera Delgado |
46de3c |
$EXTENSION = "xhtml";
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Horizontal rules.
|
|
Alain Reguera Delgado |
46de3c |
$DEFAULT_RULE = ' ';
|
|
Alain Reguera Delgado |
46de3c |
$SMALL_RULE = $DEFAULT_RULE;
|
|
Alain Reguera Delgado |
46de3c |
$MIDDLE_RULE = $DEFAULT_RULE;
|
|
Alain Reguera Delgado |
46de3c |
$BIG_RULE = $DEFAULT_RULE;
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# -split section|chapter|node|none
|
|
Alain Reguera Delgado |
46de3c |
# if $SPLIT is set to 'section' (resp. 'chapter') one html file per
|
|
Alain Reguera Delgado |
46de3c |
# section (resp. chapter) is generated. If $SPLIT is set to 'node' one
|
|
Alain Reguera Delgado |
46de3c |
# html file per node or sectionning element is generated. In all these
|
|
Alain Reguera Delgado |
46de3c |
# cases separate pages for Top, Table of content (Toc), Overview and
|
|
Alain Reguera Delgado |
46de3c |
# About are generated. Otherwise a monolithic html file that contains
|
|
Alain Reguera Delgado |
46de3c |
# the whole document is created.
|
|
Alain Reguera Delgado |
46de3c |
$SPLIT = 'section';
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# -sec-nav|-nosec-nav
|
|
Alain Reguera Delgado |
46de3c |
# if this is set then navigation panels are printed at the beginning
|
|
Alain Reguera Delgado |
46de3c |
# of each section. If the document is split at nodes then navigation
|
|
Alain Reguera Delgado |
46de3c |
# panels are printed at the end if there were more than $WORDS_IN_PAGE
|
|
Alain Reguera Delgado |
46de3c |
# words on page.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# If the document is split at sections this is ignored.
|
|
Alain Reguera Delgado |
46de3c |
#
|
|
Alain Reguera Delgado |
46de3c |
# This is most useful if you do not want to have section navigation
|
|
Alain Reguera Delgado |
46de3c |
# with -split chapter. There will be chapter navigation panel at the
|
|
Alain Reguera Delgado |
46de3c |
# beginning and at the end of chapters anyway.
|
|
Alain Reguera Delgado |
46de3c |
$SECTION_NAVIGATION = 1;
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Layout control
|
|
Alain Reguera Delgado |
46de3c |
$print_page_head = \&T2H_XHTML_print_page_head;
|
|
Alain Reguera Delgado |
46de3c |
$print_page_foot = \&T2H_XHTML_print_page_foot;
|
|
Alain Reguera Delgado |
46de3c |
$print_frame = \&T2H_XHTML_print_frame;
|
|
Alain Reguera Delgado |
46de3c |
$button_icon_img = \&T2H_XHTML_button_icon_img;
|
|
Alain Reguera Delgado |
46de3c |
$print_navigation = \&T2H_XHTML_print_navigation;
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
#FIXME update once it is more stabilized in texi2html.init
|
|
Alain Reguera Delgado |
46de3c |
sub T2H_XHTML_print_page_head
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $fh = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $longtitle = "$Texi2HTML::THISDOC{'title_unformatted'}";
|
|
Alain Reguera Delgado |
46de3c |
$longtitle .= ": $Texi2HTML::UNFORMATTED{'This'}" if exists $Texi2HTML::UNFORMATTED{'This'};
|
|
Alain Reguera Delgado |
46de3c |
print $fh <
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
Alain Reguera Delgado |
46de3c |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
Alain Reguera Delgado |
46de3c |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$LANG" lang="$LANG">
|
|
Alain Reguera Delgado |
46de3c |
<head>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
<title>$longtitle</title>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
Alain Reguera Delgado |
46de3c |
<meta name="description" content="$longtitle" />
|
|
Alain Reguera Delgado |
46de3c |
<meta name="keywords" content="$longtitle" />
|
|
Alain Reguera Delgado |
46de3c |
<meta name="resource-type" content="document" />
|
|
Alain Reguera Delgado |
46de3c |
<meta name="distribution" content="global" />
|
|
Alain Reguera Delgado |
46de3c |
<meta name="generator" content="$Texi2HTML::THISDOC{program}" />
|
|
Alain Reguera Delgado |
46de3c |
<meta name="copyright" content="2009-2012 The CentOS Project" />
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
<link href="Css/stylesheet.css" rel="stylesheet" type="text/css" media="screen projection" />
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
</head>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
<body>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
EOT
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
sub T2H_XHTML_print_page_foot
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $fh = shift;
|
|
Alain Reguera Delgado |
46de3c |
my @date=localtime(time);
|
|
Alain Reguera Delgado |
46de3c |
my $year=$date[5] += 1900;
|
|
Alain Reguera Delgado |
46de3c |
my $program_string = program_string();
|
|
Alain Reguera Delgado |
46de3c |
print $fh <
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
$program_string
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
</body>
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
</html>
|
|
Alain Reguera Delgado |
46de3c |
EOT
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# / in
|
|
Alain Reguera Delgado |
46de3c |
sub T2H_XHTML_button_icon_img
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $button = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $icon = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $name = shift;
|
|
Alain Reguera Delgado |
46de3c |
return '' if (!defined($icon));
|
|
Alain Reguera Delgado |
46de3c |
if (defined($name) && $name)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
$name = ": $name";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
else
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
$name = '';
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
$button = "" if (!defined ($button));
|
|
Alain Reguera Delgado |
46de3c |
return qq{};
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
$simple_map{'*'} = ' ';
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# formatting functions
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
$def_line = \&t2h_xhtml_def_line;
|
|
Alain Reguera Delgado |
46de3c |
$index_summary = \&t2h_xhtml_index_summary;
|
|
Alain Reguera Delgado |
46de3c |
$image = \&t2h_xhtml_image;
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# need / in
|
|
Alain Reguera Delgado |
46de3c |
sub t2h_xhtml_image($$$)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $file = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $base = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $preformatted = shift;
|
|
Alain Reguera Delgado |
46de3c |
return "[ $base ]" if ($preformatted);
|
|
Alain Reguera Delgado |
46de3c |
return "";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# process definition commands line @deffn for example
|
|
Alain Reguera Delgado |
46de3c |
# <u> replaced by
|
|
Alain Reguera Delgado |
46de3c |
sub t2h_xhtml_def_line($$$$$)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $category = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $name = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $type = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $arguments = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $index_label = shift;
|
|
Alain Reguera Delgado |
46de3c |
$index_label = '' if (!defined($index_label));
|
|
Alain Reguera Delgado |
46de3c |
$name = '' if (!defined($name) or ($name =~ /^\s*$/));
|
|
Alain Reguera Delgado |
46de3c |
$type = '' if (!defined($type) or $type =~ /^\s*$/);
|
|
Alain Reguera Delgado |
46de3c |
if (!defined($arguments) or $arguments =~ /^\s*$/)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
$arguments = '';
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
else
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
$arguments = '' . $arguments . '';
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
my $type_name = '';
|
|
Alain Reguera Delgado |
46de3c |
$type_name = " $type" if ($type ne '');
|
|
Alain Reguera Delgado |
46de3c |
$type_name .= ' ' . $name . '' if ($name ne '');
|
|
Alain Reguera Delgado |
46de3c |
$type_name .= $arguments . "\n";
|
|
Alain Reguera Delgado |
46de3c |
if (! $DEF_TABLE)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
return ''. '' . $category . ':' . $type_name . $index_label . "\n";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
else
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
return "\n" . $type_name .
|
|
Alain Reguera Delgado |
46de3c |
"\n" . $category . $index_label . "\n" . "\n";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# There is a br which needs /
|
|
Alain Reguera Delgado |
46de3c |
sub t2h_xhtml_index_summary($$)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $alpha = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $nonalpha = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $join = '';
|
|
Alain Reguera Delgado |
46de3c |
my $nonalpha_text = '';
|
|
Alain Reguera Delgado |
46de3c |
my $alpha_text = '';
|
|
Alain Reguera Delgado |
46de3c |
$join = " \n \n" if (@$nonalpha and @$alpha);
|
|
Alain Reguera Delgado |
46de3c |
if (@$nonalpha)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
$nonalpha_text = join("\n \n", @$nonalpha) . "\n";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
if (@$alpha)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
$alpha_text = join("\n \n", @$alpha) . "\n \n";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
#I18n
|
|
Alain Reguera Delgado |
46de3c |
return "" . &$I('Jump to') . ": | " . |
---|
|
|
Alain Reguera Delgado |
46de3c |
$nonalpha_text . $join . $alpha_text . '';
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Layout of navigation panel
|
|
Alain Reguera Delgado |
46de3c |
sub T2H_XHTML_print_navigation
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $fh = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $buttons = shift;
|
|
Alain Reguera Delgado |
46de3c |
my $vertical = shift;
|
|
Alain Reguera Delgado |
46de3c |
print $fh '' . "\n";
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
print $fh "" unless $vertical;
|
|
Alain Reguera Delgado |
46de3c |
for my $button (@$buttons)
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
print $fh qq{\n} if $vertical;
|
|
Alain Reguera Delgado |
46de3c |
print $fh qq{};
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
if (ref($button) eq 'CODE')
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
&$button($fh, $vertical);
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
elsif (ref($button) eq 'SCALAR')
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
print $fh "$$button" if defined($$button);
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
elsif (ref($button) eq 'ARRAY')
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
my $text = $button->[1];
|
|
Alain Reguera Delgado |
46de3c |
my $button_href = $button->[0];
|
|
Alain Reguera Delgado |
46de3c |
if (defined($button_href) and !ref($button_href)
|
|
Alain Reguera Delgado |
46de3c |
and defined($text) and (ref($text) eq 'SCALAR') and defined($$text))
|
|
Alain Reguera Delgado |
46de3c |
{ # use given text
|
|
Alain Reguera Delgado |
46de3c |
if ($Texi2HTML::HREF{$button_href})
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
print $fh "" .
|
|
Alain Reguera Delgado |
46de3c |
&$anchor('',
|
|
Alain Reguera Delgado |
46de3c |
$Texi2HTML::HREF{$button_href},
|
|
Alain Reguera Delgado |
46de3c |
$$text
|
|
Alain Reguera Delgado |
46de3c |
)
|
|
Alain Reguera Delgado |
46de3c |
;
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
else
|
|
Alain Reguera Delgado |
46de3c |
{
|
|
Alain Reguera Delgado |
46de3c |
print $fh $$text;
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
elsif ($button eq ' ')
|
|
Alain Reguera Delgado |
46de3c |
{ # handle space button
|
|
Alain Reguera Delgado |
46de3c |
print $fh
|
|
Alain Reguera Delgado |
46de3c |
$ICONS && $ACTIVE_ICONS{' '} ?
|
|
Alain Reguera Delgado |
46de3c |
&$button_icon_img($button, $ACTIVE_ICONS{' '}) :
|
|
Alain Reguera Delgado |
46de3c |
$NAVIGATION_TEXT{' '};
|
|
Alain Reguera Delgado |
46de3c |
#next;
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
elsif ($Texi2HTML::HREF{$button})
|
|
Alain Reguera Delgado |
46de3c |
{ # button is active
|
|
Alain Reguera Delgado |
46de3c |
my $btitle = $BUTTONS_GOTO{$button} ?
|
|
Alain Reguera Delgado |
46de3c |
'title="' . ucfirst($BUTTONS_GOTO{$button}) . '"' : '';
|
|
Alain Reguera Delgado |
46de3c |
if ($ICONS && $ACTIVE_ICONS{$button})
|
|
Alain Reguera Delgado |
46de3c |
{ # use icon
|
|
Alain Reguera Delgado |
46de3c |
print $fh '' .
|
|
Alain Reguera Delgado |
46de3c |
&$anchor('',
|
|
Alain Reguera Delgado |
46de3c |
$Texi2HTML::HREF{$button},
|
|
Alain Reguera Delgado |
46de3c |
&$button_icon_img($button,
|
|
Alain Reguera Delgado |
46de3c |
$ACTIVE_ICONS{$button},
|
|
Alain Reguera Delgado |
46de3c |
#$Texi2HTML::NAME{$button}),
|
|
Alain Reguera Delgado |
46de3c |
$Texi2HTML::NO_TEXI{$button}),
|
|
Alain Reguera Delgado |
46de3c |
$btitle
|
|
Alain Reguera Delgado |
46de3c |
);
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
else
|
|
Alain Reguera Delgado |
46de3c |
{ # use text
|
|
Alain Reguera Delgado |
46de3c |
print $fh
|
|
Alain Reguera Delgado |
46de3c |
'[' .
|
|
Alain Reguera Delgado |
46de3c |
&$anchor('',
|
|
Alain Reguera Delgado |
46de3c |
$Texi2HTML::HREF{$button},
|
|
Alain Reguera Delgado |
46de3c |
$NAVIGATION_TEXT{$button},
|
|
Alain Reguera Delgado |
46de3c |
$btitle
|
|
Alain Reguera Delgado |
46de3c |
) .
|
|
Alain Reguera Delgado |
46de3c |
']';
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
else
|
|
Alain Reguera Delgado |
46de3c |
{ # button is passive
|
|
Alain Reguera Delgado |
46de3c |
print $fh
|
|
Alain Reguera Delgado |
46de3c |
$ICONS && $PASSIVE_ICONS{$button} ?
|
|
Alain Reguera Delgado |
46de3c |
&$button_icon_img($button,
|
|
Alain Reguera Delgado |
46de3c |
$PASSIVE_ICONS{$button},
|
|
Alain Reguera Delgado |
46de3c |
#$Texi2HTML::NAME{$button}) :
|
|
Alain Reguera Delgado |
46de3c |
$Texi2HTML::NO_TEXI{$button}) :
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
"[" . $NAVIGATION_TEXT{$button} . "]";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
print $fh "\n";
|
|
Alain Reguera Delgado |
46de3c |
print $fh "\n" if $vertical;
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
print $fh "" unless $vertical;
|
|
Alain Reguera Delgado |
46de3c |
print $fh "\n";
|
|
Alain Reguera Delgado |
46de3c |
}
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Use icons for navigation.
|
|
Alain Reguera Delgado |
46de3c |
$ICONS = 0;
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# insert here name of icon images for buttons
|
|
Alain Reguera Delgado |
46de3c |
# Icons are used, if $ICONS and resp. value are set
|
|
Alain Reguera Delgado |
46de3c |
%ACTIVE_ICONS =
|
|
Alain Reguera Delgado |
46de3c |
(
|
|
Alain Reguera Delgado |
46de3c |
'Top', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-top.png',
|
|
Alain Reguera Delgado |
46de3c |
'Contents', 'file:///usr/share/icons/Bluecurve/24x24/stock/help-contents.png',
|
|
Alain Reguera Delgado |
46de3c |
'Overview', '',
|
|
Alain Reguera Delgado |
46de3c |
'Index', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-find.png',
|
|
Alain Reguera Delgado |
46de3c |
'This', '',
|
|
Alain Reguera Delgado |
46de3c |
'Back', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-back.png',
|
|
Alain Reguera Delgado |
46de3c |
'FastBack', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-first.png',
|
|
Alain Reguera Delgado |
46de3c |
'Prev', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-back.png',
|
|
Alain Reguera Delgado |
46de3c |
'Up', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-up.png',
|
|
Alain Reguera Delgado |
46de3c |
'Next', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'NodeUp', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-up.png',
|
|
Alain Reguera Delgado |
46de3c |
'NodeNext', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'NodePrev', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-back.png',
|
|
Alain Reguera Delgado |
46de3c |
'Following', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'Forward', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'FastForward', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-last.png',
|
|
Alain Reguera Delgado |
46de3c |
'About' , 'file:///usr/share/icons/Bluecurve/24x24/stock/gtk-about.png',
|
|
Alain Reguera Delgado |
46de3c |
'First', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-first.png',
|
|
Alain Reguera Delgado |
46de3c |
'Last', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-last.png',
|
|
Alain Reguera Delgado |
46de3c |
' ', ''
|
|
Alain Reguera Delgado |
46de3c |
);
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
# Insert here name of icon images for these, if button is inactive
|
|
Alain Reguera Delgado |
46de3c |
%PASSIVE_ICONS =
|
|
Alain Reguera Delgado |
46de3c |
(
|
|
Alain Reguera Delgado |
46de3c |
'Top', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-top.png',
|
|
Alain Reguera Delgado |
46de3c |
'Contents', 'file:///usr/share/icons/Bluecurve/24x24/stock/help-contents.png',
|
|
Alain Reguera Delgado |
46de3c |
'Overview', '',
|
|
Alain Reguera Delgado |
46de3c |
'Index', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-find.png',
|
|
Alain Reguera Delgado |
46de3c |
'This', '',
|
|
Alain Reguera Delgado |
46de3c |
'Back', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-back.png',
|
|
Alain Reguera Delgado |
46de3c |
'FastBack', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-first.png',
|
|
Alain Reguera Delgado |
46de3c |
'Prev', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-back.png',
|
|
Alain Reguera Delgado |
46de3c |
'Up', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-up.png',
|
|
Alain Reguera Delgado |
46de3c |
'Next', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'NodeUp', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-up.png',
|
|
Alain Reguera Delgado |
46de3c |
'NodeNext', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'NodePrev', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-back.png',
|
|
Alain Reguera Delgado |
46de3c |
'Following', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'Forward', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-go-forward.png',
|
|
Alain Reguera Delgado |
46de3c |
'FastForward', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-last.png',
|
|
Alain Reguera Delgado |
46de3c |
'About' , 'file:///usr/share/icons/Bluecurve/24x24/stock/gtk-about.png',
|
|
Alain Reguera Delgado |
46de3c |
'First', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-first.png',
|
|
Alain Reguera Delgado |
46de3c |
'Last', 'file:///usr/share/icons/Bluecurve/24x24/stock/stock-goto-last.png',
|
|
Alain Reguera Delgado |
46de3c |
' ', ''
|
|
Alain Reguera Delgado |
46de3c |
);
|
|
Alain Reguera Delgado |
46de3c |
|
|
Alain Reguera Delgado |
46de3c |
return 1;
|