1 package HTMLWorkspaceCreator
;
3 # ************************************************************
4 # Description : An html workspace creator
5 # Author : Justin Michel
6 # Create Date : 8/25/2003
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
15 use HTMLProjectCreator
;
19 @ISA = qw(WorkspaceCreator);
21 # ************************************************************
23 # ************************************************************
25 sub workspace_file_extension
{
27 return '_workspace.html';
33 my $crlf = $self->crlf();
36 print $fh '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', $crlf,
39 ## Next, goes the workspace comment
40 $self->print_workspace_comment($fh,
41 '<!-- MPC Command: -->', $crlf,
42 '<!-- ', $self->create_command_line_string($0, @ARGV),' -->', $crlf);
44 ## Then, comes the title and the CSS settings.
45 print $fh '<head>', $crlf,
46 '<title>', $self->get_workspace_name(), '</title>', $crlf,
47 ' <style type="text/css">', $crlf,
48 ' a {font: 12pt bold verdana, lucida; color: white; padding: 3px;}', $crlf,
49 ' td {font: 12pt bold verdana, lucida; color: white; padding: 3px; background-color: cadetblue;}', $crlf,
50 ' thead tr td {font: 18pt "trebuchet ms", helvetica; color: white; padding: 3px; background-color: teal;}', $crlf,
58 my($self, $fh, $creator) = @_;
59 my $crlf = $self->crlf();
61 ## Start the table for all of the projects
62 print $fh "<table style=\"table-layout:fixed\" width=\"400\" ",
63 "summary=\"MPC Projects\">$crlf",
64 "<col style=\"background-color: darkcyan;\">$crlf",
66 "<tr><td>Projects In Build Order</td></tr>$crlf",
70 ## Sort the projects in build order instead of alphabetical order
71 my $project_info = $self->get_project_info();
72 foreach my $project ($self->sort_dependencies($self->get_projects(), 0)) {
73 print $fh "<tr><td><a href='$project'>",
74 $$project_info{$project}->[ProjectCreator
::PROJECT_NAME
],
75 "</a></td></tr>$crlf";
79 print $fh "</tbody></table>";
85 print $fh "</body></html>" . $self->crlf();