]> matita.cs.unibo.it Git - helm.git/commitdiff
Menu in JavaScript substituted to multi-area links. Cool.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 9 Oct 2001 16:34:38 +0000 (16:34 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 9 Oct 2001 16:34:38 +0000 (16:34 +0000)
helm/graphs/tools/mk_html.pl

index 1d558fa3c586c99266fda9d1ec95ea084dc76ae1..e8c0aed17de8da2d9265ac03fdae7993c078968d 100755 (executable)
@@ -6,7 +6,69 @@ print <<EOT;
 <html>
  <head>
   <title>Graph</title>
-
+<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
+<!--
+
+if(window.event + "" == "undefined") event = null;
+function HM_f_PopUp(){return false};
+function HM_f_PopDown(){return false};
+popUp = HM_f_PopUp;
+popDown = HM_f_PopDown;
+
+//-->
+</SCRIPT>
+
+<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
+<!--
+
+HM_PG_MenuWidth = 300;
+HM_PG_FontFamily = "Arial,sans-serif";
+HM_PG_FontSize = 10;
+HM_PG_FontBold = 0;
+HM_PG_FontItalic = 0;
+HM_PG_FontColor = "blue";
+HM_PG_FontColorOver = "green";
+HM_PG_BGColor = "#DDDDDD";
+HM_PG_BGColorOver = "#FFCCCC";
+HM_PG_ItemPadding = 3;
+
+HM_PG_BorderWidth = 2;
+HM_PG_BorderColor = "black";
+HM_PG_BorderStyle = "solid";
+HM_PG_SeparatorSize = 2;
+HM_PG_SeparatorColor = "#d0ff00";
+
+HM_PG_ImageSrc = "HM_More_black_right.gif";
+HM_PG_ImageSrcLeft = "HM_More_black_left.gif";
+HM_PG_ImageSrcOver = "HM_More_white_right.gif";
+HM_PG_ImageSrcLeftOver = "HM_More_white_left.gif";
+
+HM_PG_ImageSize = 5;
+HM_PG_ImageHorizSpace = 0;
+HM_PG_ImageVertSpace = 2;
+
+HM_PG_KeepHilite = true; 
+HM_PG_ClickStart = 0;
+HM_PG_ClickKill = false;
+HM_PG_ChildOverlap = 20;
+HM_PG_ChildOffset = 10;
+HM_PG_ChildPerCentOver = null;
+HM_PG_TopSecondsVisible = .5;
+HM_PG_StatusDisplayBuild =0;
+HM_PG_StatusDisplayLink = 0;
+HM_PG_UponDisplay = null;
+HM_PG_UponHide = null;
+HM_PG_RightToLeft = 0;
+
+HM_PG_CreateTopOnly = 0;
+HM_PG_ShowLinkCursor = 1;
+HM_PG_NSFontOver = true;
+
+//HM_a_TreesToBuild = [2];
+
+
+//-->
+</SCRIPT>
 
 <script>
 function setParam(url,name,value)
@@ -113,7 +175,10 @@ function mkMetaURL(uri)
   <map name="graphe">
 EOT
 
+my $count = 0;
+
 while (<STDIN>) {
+ $count++;
  my (undef,$point1,$point2,$uri) = split;
  my ($point1x,$point1y) = split /,/,$point1;
  my ($point2x,$point2y) = split /,/,$point2;
@@ -122,29 +187,22 @@ while (<STDIN>) {
  $point1x = substr($point1x,1);
  $point2x = substr($point2x,1);
 
-# Linea corretta se c'e' il menu
-# print <<EOT;
-#   <area shape="rect" href="$url" coords="$point1x,$point2y,$point2x,$point1y">
-#EOT
-
-# In assenza di menu
- my $point_1_5_x = $point1x +   ($point2x - $point1x)/5;
- my $point_2_5_x = $point1x + 2*($point2x - $point1x)/5;
- my $point_3_5_x = $point1x + 3*($point2x - $point1x)/5;
- my $point_4_5_x = $point1x + 4*($point2x - $point1x)/5;
- print <<EOT;
-  <script>
-   document.write('<area shape="rect" href="' + mkDepURL('$uri') + '" coords="$point1x,$point2y,$point_1_5_x,$point1y">');
-  </script>
-EOT
  print <<EOT;
-  <script>
-   document.write('<area shape="rect" href="' + mkCICURL('$uri') + '" coords="$point_2_5_x,$point2y,$point_3_5_x,$point1y" target="cic">');
-  </script>
+   <area shape="rect" href="$url" coords="$point1x,$point2y,$point2x,$point1y"
+   onMouseOver="HM_f_PopUp('elMenu$count',event)"
+   onMouseOut="HM_f_PopDown('elMenu$count')">
 EOT
+
  print <<EOT;
   <script>
-   document.write('<area shape="rect" href="' + mkMetaURL('$uri') + '" coords="$point_4_5_x,$point2y,$point2x,$point1y">');
+HM_Array$count = [
+[,,,
+,,,,,,,,,,,,,,,,
+1,true],
+["Objects this one depends on.",mkDepURL('$uri'),1,0,1],
+["Render this object.",mkCICURL('$uri'),1,0,0],
+["Objects depending on this one.",mkMetaURL('$uri'),1,0,1],
+];
   </script>
 EOT
 }
@@ -152,6 +210,9 @@ EOT
 print <<EOT;
    </map>
   </img>
+  <SCRIPT LANGUAGE="JavaScript1.2"
+          SRC="http://www.cs.unibo.it/~sacerdot/jsmenu/HM_Loader_prova.js"
+          TYPE='text/javascript'></SCRIPT>
  </body>
 </html>
 EOT