added sample #13: dhtml and compositor.
git-svn-id: svn://10.0.0.236/trunk@23764 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
8d008d263b
commit
83c8853043
@ -148,6 +148,7 @@ install:: $(PROGRAM)
|
||||
$(MAKE_INSTALL) samples\test10.html $(DIST)\bin\res\samples
|
||||
$(MAKE_INSTALL) samples\test11.html $(DIST)\bin\res\samples
|
||||
$(MAKE_INSTALL) samples\test12.html $(DIST)\bin\res\samples
|
||||
$(MAKE_INSTALL) samples\test13.html $(DIST)\bin\res\samples
|
||||
$(MAKE_INSTALL) samples\test_pr.html $(DIST)\bin\res\samples
|
||||
$(MAKE_INSTALL) samples\test_gfx.html $(DIST)\bin\res\samples
|
||||
$(MAKE_INSTALL) samples\toolbarTest1.xul $(DIST)\bin\res\samples
|
||||
|
||||
@ -545,6 +545,7 @@ nsBrowserWindow::DispatchMenuItem(PRInt32 aID)
|
||||
case VIEWER_DEMO10:
|
||||
case VIEWER_DEMO11:
|
||||
case VIEWER_DEMO12:
|
||||
case VIEWER_DEMO13:
|
||||
{
|
||||
PRIntn ix = aID - VIEWER_DEMO0;
|
||||
nsAutoString url(SAMPLES_BASE_URL);
|
||||
|
||||
@ -55,6 +55,7 @@ GtkItemFactoryEntry menu_items[] =
|
||||
{ "/File/Samples/demo #10", nsnull, (GIFC)gtk_ifactory_cb, VIEWER_DEMO10, nsnull },
|
||||
{ "/File/Samples/demo #11", nsnull, (GIFC)gtk_ifactory_cb, VIEWER_DEMO11, nsnull },
|
||||
{ "/File/Samples/demo #12", nsnull, (GIFC)gtk_ifactory_cb, VIEWER_DEMO12, nsnull },
|
||||
{ "/File/Samples/demo #13", nsnull, (GIFC)gtk_ifactory_cb, VIEWER_DEMO13, nsnull },
|
||||
{ "/File/_Test Sites", nsnull, (GIFC)gtk_ifactory_cb, VIEWER_TOP100, nsnull },
|
||||
{ "/File/XPToolkit Tests", nsnull, nsnull, 0, "<Branch>" },
|
||||
{ "/File/XPToolkit Tests/Toolbar Test 1", nsnull, (GIFC)gtk_ifactory_cb, VIEWER_XPTOOLKITTOOLBAR1, nsnull },
|
||||
|
||||
@ -74,6 +74,9 @@ resource 'MENU' (2000+3, "demo")
|
||||
"demo #8", noicon, nokey, nomark, plain;
|
||||
"demo #9", noicon, nokey, nomark, plain;
|
||||
"demo #10", noicon, nokey, nomark, plain;
|
||||
"demo #11", noicon, nokey, nomark, plain;
|
||||
"demo #12", noicon, nokey, nomark, plain;
|
||||
"demo #13", noicon, nokey, nomark, plain;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -41,6 +41,9 @@
|
||||
#define VIEWER_DEMO10 40021
|
||||
#define VIEWER_DEMO11 40022
|
||||
#define VIEWER_DEMO12 40023
|
||||
#define VIEWER_DEMO13 40024
|
||||
#define VIEWER_DEMO14 40025
|
||||
#define VIEWER_DEMO15 40026
|
||||
|
||||
#define VIEWER_VISUAL_DEBUGGING 40028
|
||||
#define VIEWER_REFLOW_TEST 40029
|
||||
|
||||
124
mozilla/webshell/tests/viewer/samples/test13.html
Normal file
124
mozilla/webshell/tests/viewer/samples/test13.html
Normal file
@ -0,0 +1,124 @@
|
||||
<HTML>
|
||||
<BODY Background="file://c:/mozilla/webshell/tests/viewer/samples/rock_gra.gif">
|
||||
<DIV style="color:red; position:absolute; top:-40px; left:0px;">
|
||||
<!-- <DIV style="opacity:40%; color:red; position:absolute; top:-40px; left:0px;"> -->
|
||||
<font point-size=200 face="verdana">
|
||||
<b>Red</b>
|
||||
</font></div>
|
||||
<DIV style="color:darkgreen; position:absolute; top:50px; left:50px;">
|
||||
<!-- <DIV style="opacity:40%; color:darkgreen; position:absolute; top:50px; left:50px;"> -->
|
||||
<font point-size=200>
|
||||
<b>Green</b>
|
||||
</font></div>
|
||||
<DIV style="color:blue; position:absolute; top:100px; left:100px;">
|
||||
<!-- <DIV style="opacity:40%; color:blue; position:absolute; top:100px; left:100px;"> -->
|
||||
<font point-size=200 face="comic sans ms">
|
||||
<b>Blue</b>
|
||||
</font></div>
|
||||
<DIV style="background-color:pink; position:absolute; top:100px; left:100px;">
|
||||
<font point-size=100 face="symbol">
|
||||
<b>Opaque</b>
|
||||
</font></div>
|
||||
<script>
|
||||
var d0x = -40, d0y = 0;
|
||||
var d1x = 50, d1y = 50;
|
||||
var d2x = 100, d2y = 100;
|
||||
|
||||
var d0xinc = 20, d0yinc = -20;
|
||||
var d1xinc = -30, d1yinc = 20;
|
||||
var d2xinc = 40, d2yinc = -30;
|
||||
|
||||
var opac0 = 40.0;
|
||||
var opac1 = 40.0;
|
||||
var opac2 = 40.0;
|
||||
|
||||
var opac0inc = 10.0;
|
||||
var opac1inc = -10.0;
|
||||
var opac2inc = 20.0;
|
||||
|
||||
function movedivs()
|
||||
{
|
||||
d=document.getElementsByTagName("div");
|
||||
|
||||
d0x += d0xinc;
|
||||
d1x += d1xinc;
|
||||
d2x += d2xinc;
|
||||
|
||||
d0y += d0yinc;
|
||||
d1y += d1yinc;
|
||||
d2y += d2yinc;
|
||||
|
||||
if ((d0x < -50) || (d0x > (window.innerWidth - 300)))
|
||||
d0xinc = -d0xinc;
|
||||
|
||||
if ((d1x < -50) || (d1x > (window.innerWidth - 300)))
|
||||
d1xinc = -d1xinc;
|
||||
|
||||
if ((d2x < -50) || (d2x > (window.innerWidth - 300)))
|
||||
d2xinc = -d2xinc;
|
||||
|
||||
if ((d0y < -50) || (d0y > (window.innerHeight - 200)))
|
||||
d0yinc = -d0yinc;
|
||||
|
||||
if ((d1y < -50) || (d1y > (window.innerHeight - 200)))
|
||||
d1yinc = -d1yinc;
|
||||
|
||||
if ((d2y < -50) || (d2y > (window.innerHeight - 200)))
|
||||
d2yinc = -d2yinc;
|
||||
|
||||
opac0 += opac0inc;
|
||||
opac1 += opac1inc;
|
||||
opac2 += opac2inc;
|
||||
|
||||
if (opac0 > 100.0)
|
||||
{
|
||||
opac0 = 100.0;
|
||||
opac0inc = -opac0inc;
|
||||
}
|
||||
else if (opac0 < 0.0)
|
||||
{
|
||||
opac0 = 0.0;
|
||||
opac0inc = -opac0inc;
|
||||
}
|
||||
|
||||
if (opac1 > 100.0)
|
||||
{
|
||||
opac1 = 100.0;
|
||||
opac1inc = -opac1inc;
|
||||
}
|
||||
else if (opac1 < 0.0)
|
||||
{
|
||||
opac1 = 0.0;
|
||||
opac1inc = -opac1inc;
|
||||
}
|
||||
|
||||
if (opac2 > 100.0)
|
||||
{
|
||||
opac2 = 100.0;
|
||||
opac2inc = -opac2inc;
|
||||
}
|
||||
else if (opac2 < 0.0)
|
||||
{
|
||||
opac2 = 0.0;
|
||||
opac2inc = -opac2inc;
|
||||
}
|
||||
|
||||
d[0].style.left = d0x + "px";
|
||||
d[0].style.top = d0y + "px";
|
||||
/* d[0].style.opacity = opac0 + "%";*/
|
||||
|
||||
d[1].style.left = d1x + "px";
|
||||
d[1].style.top = d1y + "px";
|
||||
/* d[1].style.opacity = opac1 + "%";*/
|
||||
|
||||
d[2].style.left = d2x + "px";
|
||||
d[2].style.top = d2y + "px";
|
||||
/* d[2].style.opacity = opac2 + "%";*/
|
||||
|
||||
setTimeout(movedivs, 10);
|
||||
}
|
||||
|
||||
setTimeout(movedivs, 10);
|
||||
</script>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@ -42,6 +42,7 @@ VIEWER MENU DISCARDABLE
|
||||
MENUITEM "demo #10", VIEWER_DEMO10
|
||||
MENUITEM "demo #11", VIEWER_DEMO11
|
||||
MENUITEM "demo #12", VIEWER_DEMO12
|
||||
MENUITEM "demo #13", VIEWER_DEMO13
|
||||
}
|
||||
MENUITEM "&Test Sites", VIEWER_TOP100
|
||||
POPUP "XPToolkit Tests"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user