Mozilla/mozilla/xpfe/browser/samples/dexsimplemaster.xul
danm%netscape.com a7497d77b2 updating to new location of xul.css
git-svn-id: svn://10.0.0.236/trunk@40245 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-20 06:50:10 +00:00

49 lines
1.6 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window>
<!-- DO NOT LOCALIZE: this file is source documentation; not part of the build -->
<!-- Simple sample interface for bringing up a dialog -->
<xul:window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title = "Dialog creation sample">
<html:script>
function MakeDialog() {
var toolkitCore = GetToolkitCore();
if (toolkitCore)
toolkitCore.ShowWindow("resource:/res/samples/dexsimpledialog.xul",
window);
}
function ModalDialog() {
var toolkitCore = GetToolkitCore();
if (toolkitCore)
toolkitCore.ShowModalDialog("resource:/res/samples/dexsimpledialog.xul",
window);
}
function GetToolkitCore() {
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore)
toolkitCore.Init("ToolkitCore");
}
return toolkitCore;
}
</html:script>
<xul:toolbox>
<xul:toolbar>
<!-- insert the next line should the bug where buttons don't show up
without an image specified ever return -->
<!-- src="resource:/res/toolbar/TB_Stop.gif" align="bottom" -->
<xul:titledbutton
value="Make Dialog" onclick="MakeDialog()"
style="background-color:rgb(192,192,192);"/>
<xul:titledbutton
value="Modal Dialog" onclick="ModalDialog()"
style="background-color:rgb(192,192,192);"/>
</xul:toolbar>
</xul:toolbox>
</xul:window>