use strict; sub plugin { my $global=shift; print "Generation namespace documentation\n"; print_namespaces($global); print "Done with namespaces\n"; } sub print_namespaces { my $space=shift; print_namespace($space); } sub print_namespace { $_=shift; print "Generating $$_{fullname} index\n"; open(FILE,">html/$$_{fullname}_index.html"); print FILE "\n"; print FILE "ClanLib Reference: $$_{fullname}\n"; print FILE '
ClanSoft logo
ClanSoft logo
Entire Class Index Main Class Index Cross Index Global Index
'; print FILE "

Namespace $$_{fullname}

\n"; my $items = $_->{items}; my @array = sort byname @$items; my $child; my $type; my $col; $col = 0; print FILE "


\n"; print FILE "

Index:

\n"; foreach $type ( $Enum::CLASS, $Enum::TYPEDEF ) { print FILE "

Members of type $Enum::TYPE_NAMES[$type]

\n"; print FILE "\n"; foreach $child (@array) { if ($child->{ntype} == $type) { print FILE "" if $col == 0; $col++; print FILE ""; if ($col == 5) { $col = 0; print FILE ""; } print FILE "\n"; } } if ($col != 0) { print FILE ""; } print FILE "
"; print FILE $child->href(); print FILE "
\n"; } print FILE "
\n"; print FILE "

Member Descriptions:

\n"; print FILE "
\n"; foreach $type ( $Enum::TYPEDEF, $Enum::FUNCTION ) { print FILE "

Members of type $Enum::TYPE_NAMES[$type]

\n"; foreach $child (@array) { if ($child->{ntype} == $type) { print FILE "
"; print FILE $child->href($child->{fullname}); if ($child->{short}) { print FILE " - $child->{short}"; } if ($child->{longcomment}) { print FILE "
$child->{long}"; } print FILE "\n"; } } } print FILE "
\n"; print FILE "\n"; print FILE "\n"; close(FILE); }