Do the magic to use the new buttons (with shorter names!) instead of the old

ones.  Get the <IMG> width & height right.  New design for the navigation
bars, including the document title as well as the navigation links/buttons.
This commit is contained in:
Fred Drake 1998-08-13 22:03:46 +00:00
parent 31bb8cef2c
commit 062bc6e598
1 changed files with 32 additions and 20 deletions

View File

@ -85,25 +85,38 @@ sub custom_driver_hook{
} }
$iconsizes{'up'} = 'width="75" height="25"'; sub set_icon_size{
$iconsizes{'next'} = 'width="75" height="25"'; my($name, $w, $h) = @_;
$iconsizes{'previous'} = 'width="75" height="25"'; $iconsizes{$name} = "width=$w height=$h";
$iconsizes{'contents'} = 'width="75" height="25"'; }
$iconsizes{'index'} = 'width="75" height="25"';
foreach $name (split(/ /, 'up next previous contents index modules')) {
set_icon_size($name, 32, 32);
}
# The '_motif' is really annoying, and makes the HTML larger with no value
# added, so strip it off:
foreach $name (keys %icons) {
my $icon = $icons{$name};
$icon =~ s/_motif//;
$icons{$name} = $icon;
}
$CUSTOM_BUTTONS = ''; $CUSTOM_BUTTONS = '';
sub make_nav_panel{ sub make_nav_panel{
($NEXT_TITLE ? $NEXT : '') ('<table width="100%" cellpadding=0 cellspacing=0><tr><td width="20%">'
. ($UP_TITLE ? $UP : '') . ($NEXT_TITLE ? "$NEXT " : '')
. ($PREVIOUS_TITLE ? $PREVIOUS : '') . ($UP_TITLE ? "$UP " : '')
. $CONTENTS . ($PREVIOUS_TITLE ? "$PREVIOUS " : '')
. $CUSTOM_BUTTONS . "</td>\n<td align=center width=\"60%\"><b>$t_title</b>"
. $INDEX . "</td>\n<td align=right width=\"20%\">"
. "\n<br>\n" . $CONTENTS
. ($NEXT_TITLE ? "<b>Next:</b> $NEXT_TITLE\n" : '') . ' ' . $CUSTOM_BUTTONS
. ($UP_TITLE ? "<b>Up:</b> $UP_TITLE\n" : '') . ' ' . $INDEX
. ($PREVIOUS_TITLE ? "<b>Previous:</b> $PREVIOUS_TITLE\n" : ''); . "</td></tr></table>\n<hr>\n"
. ($NEXT_TITLE ? "<b>Next:</b> $NEXT_TITLE\n" : '')
. ($UP_TITLE ? "<b>Up:</b> $UP_TITLE\n" : '')
. ($PREVIOUS_TITLE ? "<b>Previous:</b> $PREVIOUS_TITLE\n" : ''));
} }
sub top_navigation_panel { sub top_navigation_panel {
@ -157,10 +170,11 @@ sub img_tag {
my $alt; my $alt;
my $align = " align=bottom "; my $align = " align=bottom ";
# having this list hardcoded here is really bogus....
$alt = join('|', 'up', 'next_group', 'previous_group' $alt = join('|', 'up', 'next_group', 'previous_group'
, 'next', 'previous', 'change_begin_right', 'change_begin' , 'next', 'previous', 'change_begin_right', 'change_begin'
, 'change_end_right', 'change_end', 'change_delete_right' , 'change_end_right', 'change_end', 'change_delete_right'
, 'change_delete', 'contents', 'index'); , 'change_delete', 'contents', 'index', 'modules');
if ($icon =~ /(gif|png)$/) { if ($icon =~ /(gif|png)$/) {
$used_icons{$icon} = 1; $used_icons{$icon} = 1;
@ -359,10 +373,8 @@ sub add_bbl_and_idx_dummy_commands {
. "([\\\\]begin\\s*$O\\d+$C\\s*theindex)"; . "([\\\\]begin\\s*$O\\d+$C\\s*theindex)";
s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o; s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o;
# Add a button to the navigation areas: # Add a button to the navigation areas:
$CUSTOM_BUTTONS .= ("<a\n href=\"modindex.html\"><img" $CUSTOM_BUTTONS .= ("<a\n href=\"modindex.html\">"
. " src=\"$ICONSERVER$dd" . img_tag('modules.'.$IMAGE_TYPE) . "</a>");
. "modules_motif.gif\" width=74 height=25 border=0"
. " alt=\"[Modules]\"></a>");
} }
else { else {
$global{'max_id'} = $id; # not sure why.... $global{'max_id'} = $id; # not sure why....