Mozilla/mozilla/xpfe/browser/samples/dexsimplemaster.xul
alecf%netscape.com 9083887386 update new image names in all XUL, JS, and CSS
git-svn-id: svn://10.0.0.236/trunk@50556 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 04:26:01 +00:00

48 lines
1.6 KiB
XML

<?xml version="1.0"?>
<!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/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>