Bug 367520 Remove xpfe/browser/samples. r=mento,sr=neil

This commit is contained in:
bugzilla%standard8.demon.co.uk 2007-02-08 19:43:18 +00:00
parent feb75c238c
commit ad9090afc5
13 changed files with 0 additions and 1435 deletions

View File

@ -1 +0,0 @@
Makefile

View File

@ -1,66 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either of the GNU General Public License Version 2 or later (the "GPL"),
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = sampleimages
EXPORT_RESOURCE_SAMPLES = \
$(srcdir)/colorpicker.xul \
$(srcdir)/dexparamdialog.xul \
$(srcdir)/dexparamdialog.html \
$(srcdir)/dexopenchrome.xul \
$(srcdir)/hidetoolicon.xul \
$(srcdir)/hidetoolicon.css \
$(srcdir)/tab.xul \
$(srcdir)/widgets.xul \
$(srcdir)/xpmenu.xul \
$(NULL)
include $(topsrcdir)/config/rules.mk
libs::
$(INSTALL) $(EXPORT_RESOURCE_SAMPLES) $(DIST)/bin/res/samples
install::
$(SYSINSTALL) $(IFLAGS1) $(EXPORT_RESOURCE_SAMPLES) $(DESTDIR)$(mozappdir)/res/samples

View File

@ -1,9 +0,0 @@
window[sitemode="hideSiteOne"] box#SiteOneBox
{
visibility:collapse;
}
window[sitemode="hideSiteTwo"] box#SiteTwoBox
{
visibility:collapse;
}

View File

@ -1,47 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="collapsing.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
orient="horizontal"
onload="onWindowLoad()">
<script>
function onWindowLoad() {
verifyControls();
}
function verifyControls() {
var siteOne = window.frames["SiteOne"];
var siteTwo = window.frames["SiteTwo"];
if(siteOne==null)
window.alert("Our SiteOne Frame isn't in the DOM!");
if(siteTwo == null)
window.alert("Our SiteTwo Frame isn't in the DOM!");
}
function cmdHideSiteOne(){
verifyControls();
window.document.getElementById("ShowSite").setAttribute("sitemode", "hideSiteOne");
verifyControls();
}
function cmdHideSiteTwo() {
verifyControls();
window.document.getElementById("ShowSite").setAttribute("sitemode", "hideSiteTwo");
verifyControls();
}
</script>
<broadcaster id="ShowSite" sitemode="hideSiteTwo" />
<observes element="ShowSite" attribute="sitemode" />
<vbox id="SiteOneBox" flex="1">
<html:iframe flex="1" name="SiteOne" src="http://www.mozilla.org/xpfe/xptoolkit"/>
<html:input type="BUTTON" value="Show Boxes Documentation" onclick="cmdHideSiteOne()"/>
</vbox>
<vbox id="SiteTwoBox" flex="1">
<html:iframe flex="1" name="SiteTwo" src="http://www.mozilla.org/xpfe/xptoolkit/boxes.html"/>
<html:input type="BUTTON" value="Show XPFE Documentation" onclick="cmdHideSiteTwo()"/>
</vbox>
</window>

View File

@ -1,145 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!--
***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is mozilla.org code.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<window title="Color Picker"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
style="width:200px"
>
<script>
function doSomethingUseful(cp)
{
var color = cp.color;
document.getElementById("input").value = color;
document.getElementById("mydiv").style.backgroundColor = color;
}
</script>
<colorpicker id="cp" onclick="doSomethingUseful(this);" style="background-color: #CCCCCC;"/>
<html:p/>
<html:input id="input"/>
<html:p/>
<html:div id="mydiv" style="width:100px; height:100px; background-color:white"/>
<html:hr/>
<script>
function setColorWell(menu)
{
// Debug tree walking.
dump("\n");
dump("parent: ");
dump(menu.id);
dump("\n");
dump("child 1: ");
dump(menu.firstChild.id);
dump("\n");
dump("child 2: ");
dump(menu.firstChild.nextSibling.id);
dump("\n");
dump("child 3: ");
dump(menu.firstChild.nextSibling.nextSibling.id);
dump("\n");
dump("child 3's child 1: ");
dump(menu.firstChild.nextSibling.nextSibling.firstChild.id);
dump("\n");
dump("\n");
dump("\n");
// Find the colorWell and colorPicker in the hierarchy.
var colorWell = menu.firstChild.nextSibling;
var colorPicker = menu.firstChild.nextSibling.nextSibling.firstChild;
// Extract color from colorPicker and assign to colorWell.
var color = colorPicker.getAttribute('color');
colorWell.style.backgroundColor = color;
}
</script>
<!-- ColorPicker #1 -->
<hbox id="box1">
<menu id="menu1">
<button id="button1" label="text1" class="popup"/>
<html:div id="colorWell1" style="width:30px; background-color:white"/>
<menupopup id="popup1">
<colorpicker id="cp1" palettename="standard" onclick="setColorWell(this.parentNode.parentNode);"/>
</menupopup>
</menu>
</hbox>
<!-- ColorPicker #2 -->
<html:hr/>
<hbox id="box2">
<menu id="menu2">
<button id="button2" label="text2" class="popup"/>
<html:div id="colorWell2" style="width:30px; background-color:white"/>
<menupopup id="popup2">
<colorpicker id="cp2" palettename="gray" onclick="setColorWell(this.parentNode.parentNode);"/>
</menupopup>
</menu>
</hbox>
<!-- ColorPicker #3 -->
<html:hr/>
<hbox id="box3">
<menu id="menu3">
<button id="button3" label="text3" class="popup"/>
<html:div id="colorWell3" style="width:30px; background-color:white"/>
<menupopup id="popup3">
<colorpicker id="cp3" palettename="web" onclick="setColorWell(this.parentNode.parentNode);"/>
</menupopup>
</menu>
</hbox>
</window>

View File

@ -1,153 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!DOCTYPE window>
<!-- DO NOT LOCALIZE: this file is source documentation; not part of the build -->
<!-- Sample interface for bringing up and passing parameters to a dialog -->
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="horizontal"
title = "Chrome Features Test">
<script>
<![CDATA[
var featureList = new Array("all",
"close", "titlebar", "resizable", "scrollbars",
"menubar", "toolbar", "status", "location",
"chrome", "dialog", "modal", "dependent",
"centerscreen",
"alwaysLowered", "alwaysRaised");
function OpenWindow(extension) {
var features = CalculateFeatures();
dump("******* begin open window\n");
window.open("dexparamdialog."+extension, "_blank", features);
dump("******* end open window\n");
}
function OpenDialog(extension) {
var features = CalculateFeatures();
dump("******* begin opendialog\n");
window.openDialog("dexparamdialog."+extension, "_blank", features,
{remind:true});
dump("******* end opendialog\n");
}
function CalculateFeatures() {
var ctr;
var features;
var element;
features = "";
// read checkboxes
for (ctr = 0; ctr < featureList.length; ctr++) {
element = document.getElementById(featureList[ctr]);
if (element.checked) {
if (features.length > 0)
features = features + ",";
features = features + featureList[ctr];
} else {
element = document.getElementById(featureList[ctr]+"-ex");
if (element && element.checked) { // titlebar, close, dialog
if (features.length > 0)
features = features + ",";
features = features + featureList[ctr] + "=no";
}
}
}
dump("******* " + features + "\n");
return features;
}
]]>
</script>
<vbox>
<grid>
<columns><column/><column/></columns>
<rows>
<row>
<checkbox id="all" label="all"/>
<checkbox id="all-ex" label="explicit"/>
</row>
<row>
<checkbox id="close" label="close"/>
<checkbox id="close-ex" label="explicit"/>
</row>
<row>
<checkbox id="titlebar" label="titlebar"/>
<checkbox id="titlebar-ex" label="explicit"/>
</row>
<row>
<checkbox id="resizable" label="resizable"/>
<spacer/>
</row>
<row>
<checkbox id="scrollbars" label="scrollbars"/>
<spacer/>
</row>
<row>
<checkbox id="alwaysRaised" label="raised"/>
<spacer/>
</row>
<row>
<checkbox id="alwaysLowered" label="lowered"/>
<spacer/>
</row>
<row>
<checkbox id="menubar" label="menubar"/>
<spacer/>
</row>
<row>
<checkbox id="toolbar" label="toolbar"/>
<spacer/>
</row>
<row>
<checkbox id="status" label="status"/>
<spacer/>
</row>
<row>
<checkbox id="location" label="location"/>
<spacer/>
</row>
<row>
<checkbox id="chrome" label="chrome"/>
<spacer/>
</row>
<row>
<checkbox id="dialog" label="dialog"/>
<checkbox id="dialog-ex" label="explicit"/>
</row>
<row>
<checkbox id="modal" label="modal"/>
<spacer/>
</row>
<row>
<checkbox id="dependent" label="dependent"/>
<spacer/>
</row>
<row>
<checkbox id="centerscreen" label="centered"/>
<spacer/>
</row>
</rows>
</grid>
</vbox>
<spacer style="width: 8px"/>
<vbox>
<hbox>
<spacer flex="1"/>
<text value="Open"/>
<spacer flex="1"/>
</hbox>
<grid>
<columns><column/><column/></columns>
<rows>
<row>
<button label="HTML Window" onclick="OpenWindow('html')"/>
<button label="XUL Window" onclick="OpenWindow('xul')"/>
</row>
<row>
<button label="HTML Dialog" onclick="OpenDialog('html')"/>
<button label="XUL Dialog" onclick="OpenDialog('xul')"/>
</row>
</rows>
</grid>
</vbox>
</window>

View File

@ -1,215 +0,0 @@
<html><body>
<script language="javascript">
var debug = true;
// Initialize controls from parameters sent through the URL
function SetFromURL() {
// dump a bunch of diagnostics
if (debug) {
dump("In SetFromURL...\n");
dump("param string is '" + location.search + "', length " +
location.search.length + "\n");
var debugSetting = GetNamedParam(location.search.substring(1,location.search.length), "remind");
if (debugSetting) {
dump("'remind' parameter = '" + debugSetting + "'\n");
} else
dump("'remind' setting not found\n");
if (document.getElementById("remind"))
dump("found 'remind' element in document\n");
else
dump("'remind' element missing from document\n");
dump("Finishing SetFromURL...\n");
}
// set checkbox from "remind=xxx" name=value pair
var params = location.search.substring(1, location.search.length);
var setting = GetNamedParam(params, "remind");
if (setting)
setting = setting.toLowerCase() == "true";
else
setting = false;
var checkbox = document.getElementById("remind");
if (checkbox)
checkbox.checked = setting;
// set prompt text from "prompt=xxx" name=value pair
var setting = GetNamedParam(params, "prompt");
control = document.getElementById("prompt");
if (control && setting) {
control = control.firstChild;
if (control && control.nodeType == 3) // TEXT_NODE
control.data = setting;
}
}
// Initialize controls from parameters sent through openDialog
function SetFromParams() {
// dump a bunch of diagnostics
if (debug) {
var debugSetting;
var debugControl;
dump("In SetFromParams...\n");
if (window.arguments) {
dump("arguments exist\n");
if (window.arguments[0]) {
dump(" arguments[0] exists\n");
if (window.arguments[0].remind) {
dump(" arguments[0].remind exists\n");
debugSetting = window.arguments[0].remind;
dump(" it's " + debugSetting +
", type " + typeof debugSetting + "\n");
} else
dump("arguments[0].remind does not exist\n");
if (window.arguments[0].prompt) {
dump(" arguments[0].prompt exists\n");
debugSetting = window.arguments[0].prompt;
dump(" it's " + debugSetting +
", type " + typeof debugSetting + "\n");
} else
dump("arguments[0].prompt does not exist (or it's just false)\n");
} else
dump("arguments[0] does not exist\n");
} else
dump("no arguments\n");
debugControl = document.getElementById("remind");
if (debugControl)
dump("found 'remind' element in document "+
typeof debugControl+"\n");
else
dump("'remind' element missing from document\n");
debugControl = document.getElementById("prompt");
if (debugControl) {
dump("found 'prompt' element in document "+
typeof debugControl+"\n");
debugControl = debugControl.firstChild;
if (debugControl) {
dump("found prompt's first child. type " + debugControl.nodeName + "\n");
} else
dump("couldn't find prompt's first child\n");
} else
dump("'prompt' element missing from document\n");
dump("Finishing SetFromParams...\n");
}
// look in arguments[0] for an object with interesting properties and values
// set checkbox from its value, if present
if (window.arguments && window.arguments[0]) {
var setting;
var control;
// set checkbox from the value of argument[0]'s "value" property
setting = window.arguments[0].remind;
if (setting) { // (exists and true)
control = document.getElementById("remind");
if (control)
control.checked = setting;
}
// set prompt from the value of argument[0]'s "prompt" property
setting = window.arguments[0].prompt;
if (setting) {
if (typeof setting == "string") {
control = document.getElementById("prompt");
if (control) {
control = control.firstChild;
if (control && control.nodeType == 3) // TEXT_NODE
control.data = setting;
}
}
}
}
}
// OK button handler
// return the setting of the "remind" checkbox in two equivalent ways
// and then close the window (disabled for now, since that crashes)
function DoOK() {
var checkbox = document.getElementById("remind");
if (checkbox) {
// attach a property to ourselves, which can be queried from outside
window.returnArguments = checkbox.checked;
// additionally, if we were given an openDialog parameter, set its value
if (window.arguments && window.arguments[0])
window.arguments[0].remind = checkbox.checked;
}
// var toolkitCore = GetToolkitCore();
// if (toolkitCore)
// toolkitCore.CloseWindow(window);
window.close();
}
function GetToolkitCore() {
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore)
toolkitCore.Init("ToolkitCore");
}
return toolkitCore;
}
// params is a list of name=value parameters separated by semicolons
// or ampersands. To pass parameters containing either character,
// string together parameters escape()d separately, separated by ;.
// this function returns the value of the named pair, or null
// if it found nothing.
function GetNamedParam(params, name) {
if (debug)
dump("GetNamedParam looking for '" + name + "' in '" + params + "'\n");
var re = new RegExp(name+" *=([^&;]+)");
var match = re(params);
if (match) {
if (debug)
dump(" matched regexp. found '" + match[1] + "'\n");
return unescape(match[1]);
}
return null;
}
function DumpWindow() {
dump("**********************************************\n");
for (prop in window)
dump(prop + "\n");
dump("----------------------------------------------\n");
}
</script>
<table>
<tr>
<td id="prompt">Give me your money</td>
</tr>
<tr>
<td>
<!-- note the html namespace on the id attribute, which
seems at this time to be required by getAttribute() -->
<input type="checkbox" id="remind"/>Remind me
</td>
</tr>
<tr>
<td>
<button onclick="DoOK()">OK</button>
</td>
</tr>
<tr>
<td>
<button onclick="SetFromURL()">Startup from URL</button>
</td>
</tr>
<tr>
<td>
<button onclick="SetFromParams()">Startup from Params</button>
</td>
</tr>
<tr>
<td>
<button onclick="DumpWindow()">Dump Window</button>
</td>
</tr>
<tr>
<td>
<button onclick="alert('Hello world!')">Show Alert</button>
</td>
</tr>
</table>
</body></html>

View File

@ -1,227 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE window>
<!-- DO NOT LOCALIZE: this file is source documentation; not part of the build -->
<!-- dialog containing a control requiring initial setup, expecting
initial settings to be passed in as parameters -->
<xul:window
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload = "SetFromParams()"
title = "Things to do"
height = "200" width = "300">
<script>
<![CDATA[
var debug = true;
// Initialize controls from parameters sent through the URL
function SetFromURL() {
// dump a bunch of diagnostics
if (debug) {
dump("In SetFromURL...\n");
dump("param string is '" + location.search + "', length " +
location.search.length + "\n");
var debugSetting = GetNamedParam(location.search.substring(1,location.search.length), "remind");
if (debugSetting) {
dump("'remind' parameter = '" + debugSetting + "'\n");
} else
dump("'remind' setting not found\n");
if (document.getElementById("remind"))
dump("found 'remind' element in document\n");
else
dump("'remind' element missing from document\n");
dump("Finishing SetFromURL...\n");
}
// set checkbox from "remind=xxx" name=value pair
var params = location.search.substring(1, location.search.length);
var setting = GetNamedParam(params, "remind");
if (setting)
setting = setting.toLowerCase() == "true";
else
setting = false;
var checkbox = document.getElementById("remind");
if (checkbox)
checkbox.checked = setting;
// set prompt text from "prompt=xxx" name=value pair
var setting = GetNamedParam(params, "prompt");
control = document.getElementById("prompt");
if (control && setting) {
control = control.firstChild;
if (control && control.nodeType == 3) // TEXT_NODE
control.data = setting;
}
}
// Initialize controls from parameters sent through openDialog
function SetFromParams() {
// dump a bunch of diagnostics
if (debug) {
var debugSetting;
var debugControl;
dump("In SetFromParams...\n");
if (window.arguments) {
dump("arguments exist\n");
if (window.arguments[0]) {
dump(" arguments[0] exists\n");
if (window.arguments[0].remind) {
dump(" arguments[0].remind exists\n");
debugSetting = window.arguments[0].remind;
dump(" it's " + debugSetting +
", type " + typeof debugSetting + "\n");
} else
dump("arguments[0].remind does not exist\n");
if (window.arguments[0].prompt) {
dump(" arguments[0].prompt exists\n");
debugSetting = window.arguments[0].prompt;
dump(" it's " + debugSetting +
", type " + typeof debugSetting + "\n");
} else
dump("arguments[0].prompt does not exist (or it's just false)\n");
} else
dump("arguments[0] does not exist\n");
} else
dump("no arguments\n");
debugControl = document.getElementById("remind");
if (debugControl)
dump("found 'remind' element in document "+
typeof debugControl+"\n");
else
dump("'remind' element missing from document\n");
debugControl = document.getElementById("prompt");
if (debugControl) {
dump("found 'prompt' element in document "+
typeof debugControl+"\n");
debugControl = debugControl.firstChild;
if (debugControl) {
dump("found prompt's first child. type " + debugControl.nodeName + "\n");
} else
dump("couldn't find prompt's first child\n");
} else
dump("'prompt' element missing from document\n");
dump("Finishing SetFromParams...\n");
}
// look in arguments[0] for an object with interesting properties and values
// set checkbox from its value, if present
if (window.arguments && window.arguments[0]) {
var setting;
var control;
// set checkbox from the value of argument[0]'s "value" property
setting = window.arguments[0].remind;
if (setting) { // (exists and true)
control = document.getElementById("remind");
if (control)
control.checked = setting;
}
// set prompt from the value of argument[0]'s "prompt" property
setting = window.arguments[0].prompt;
if (setting) {
if (typeof setting == "string") {
control = document.getElementById("prompt");
if (control) {
control = control.firstChild;
if (control && control.nodeType == 3) // TEXT_NODE
control.data = setting;
}
}
}
}
}
// OK button handler
// return the setting of the "remind" checkbox in two equivalent ways
// and then close the window (disabled for now, since that crashes)
function DoOK() {
var checkbox = document.getElementById("remind");
if (checkbox) {
// attach a property to ourselves, which can be queried from outside
window.returnArguments = checkbox.checked;
// additionally, if we were given an openDialog parameter, set its value
if (window.arguments && window.arguments[0])
window.arguments[0].remind = checkbox.checked;
}
// var toolkitCore = GetToolkitCore();
// if (toolkitCore)
// toolkitCore.CloseWindow(window);
window.close();
}
function GetToolkitCore() {
var toolkitCore = XPAppCoresManager.Find("ToolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore)
toolkitCore.Init("ToolkitCore");
}
return toolkitCore;
}
// params is a list of name=value parameters separated by semicolons
// or ampersands. To pass parameters containing either character,
// string together parameters escape()d separately, separated by ;.
// this function returns the value of the named pair, or null
// if it found nothing.
function GetNamedParam(params, name) {
if (debug)
dump("GetNamedParam looking for '" + name + "' in '" + params + "'\n");
var re = new RegExp(name+" *=([^&;]+)");
var match = re(params);
if (match) {
if (debug)
dump(" matched regexp. found '" + match[1] + "'\n");
return decodeURIComponent(match[1]);
}
return null;
}
function DumpWindow() {
dump("**********************************************\n");
for (prop in window)
dump(prop + "\n");
dump("----------------------------------------------\n");
}
]]>
</script>
<html:table>
<html:tr>
<html:td id="prompt">Give me your money</html:td>
</html:tr>
<html:tr>
<html:td>
<!-- note the html namespace on the id attribute, which
seems at this time to be required by getAttribute() -->
<html:input type="checkbox" id="remind"/>Remind me
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:button onclick="DoOK()">OK</html:button>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:button onclick="SetFromURL()">Startup from URL</html:button>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:button onclick="SetFromParams()">Startup from Params</html:button>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:button onclick="sizeToContent()">Size To Content</html:button>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:button onclick="DumpWindow()">Dump Window</html:button>
</html:td>
</html:tr>
</html:table>
</xul:window>

View File

@ -1,11 +0,0 @@
window[buttonmode="hideOne"] input#ButtonOne,
window[buttonmode="hideAll"] input#ButtonOne
{
display:none;
}
window[buttonmode="hideTwo"] input#ButtonTwo,
window[buttonmode="hideAll"] input#ButtonTwo
{
display:none;
}

View File

@ -1,43 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="hidetoolicon.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
orient="vertical">
<script>
function cmdHideButtonOne(){
window.document.getElementById("ShowButton").setAttribute("buttonmode", "hideOne");
}
function cmdHideButtonTwo() {
window.document.getElementById("ShowButton").setAttribute("buttonmode", "hideTwo");
}
function cmdHideAll() {
window.document.getElementById("ShowButton").setAttribute("buttonmode", "hideAll");
}
function cmdShowAll() {
window.document.getElementById("ShowButton").setAttribute("buttonmode", "showAll");
}
</script>
<broadcaster id="ShowButton" buttonmode="showAll" />
<observes element="ShowButton" attribute="buttonmode" />
<toolbox>
<toolbar>
<html:input type="BUTTON" value="Button 1" id="ButtonOne"/>
<html:input type="BUTTON" value="Button 2" id="ButtonTwo"/>
<spacer flex="1"/>
</toolbar>
</toolbox>
<hbox flex="1">
<html:input flex="1" type="BUTTON" value="Hide Only Button 1" onclick="cmdHideButtonOne()"/>
<html:input flex="1" type="BUTTON" value="Hide Only Button 2" onclick="cmdHideButtonTwo()"/>
<html:input flex="1" type="BUTTON" value="Hide Both" onclick="cmdHideAll()"/>
<html:input flex="1" type="BUTTON" value="Show Both" onclick="cmdShowAll()"/>
</hbox>
</window>

View File

@ -1,151 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE window>
<window style="height: 100%; width: 100%;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox flex="1">
<tabbox orient="vertical" flex="100%" >
<tabs orient="horizontal">
<tab selected="true" label="centered"/>
<tab label="percent"/>
<tab label="html"/>
<tab><html:img src="resource:/res/toolbar/stop.gif"/></tab>
<tab label="native"/>
<tab label="iframe"/>
<tab label="dialog"/>
<spacer flex="1"/>
</tabs>
<tabpanels flex="100%" style="border: 2px outset gray">
<!-- tab 1 -->
<hbox>
<spacer flex="100%"/>
<vbox>
<spacer flex="100%"/>
<button class="push" label="centered"/>
<!--html:button>This is a test</html:button-->
<spacer flex="100%"/>
</vbox>
<spacer flex="100%"/>
</hbox>
<!-- tab2 -->
<hbox>
<button class="push" label="10%" flex="10%"/>
<button class="push" label="20%" flex="20%"/>
<button class="push" label="30%" flex="30%"/>
<button class="push" label="40%" flex="40%"/>
</hbox>
<!-- tab3 -->
<html:div>
This is just some basic html.
<html:input type="text" value="text" flex="100%"/>
</html:div>
<!-- tab4 -->
<toolbox>
<toolbar>
<button id="back-button" align="bottom" label="Back"/>
<button src="resource:/res/toolbar/forward.gif" align="bottom" label="Forward"/>
<button src="resource:/res/toolbar/reload.gif" align="bottom" label="Reload"/>
<button src="resource:/res/toolbar/stop.gif" align="bottom" label="Stop"/>
<button src="resource:/res/toolbar/home.gif" align="bottom" label="Home"/>
<button src="resource:/res/toolbar/print.gif" align="bottom" label="Print"/>
<spacer flex="100%"/>
<button src="resource:/res/throbber/anims00.gif"/>
</toolbar>
<toolbar>
<button src="resource:/res/toolbar/location.gif" label="Mozilla" />
<button src="resource:/res/toolbar/location.gif" label="ABC News"/>
</toolbar>
</toolbox>
<!-- tab 5 -->
<vbox>
<html:input type="text" value="text" flex="100%"/>
</vbox>
<html:iframe src="http://www.yahoo.com" />
<!-- tab 6 -->
<vbox>
<html:div>
Category:
</html:div>
<hbox flex="100%">
<html:div style="width: 100px; background-color: rgb(255,255,255)">
table
</html:div>
<vbox flex="100%">
<hbox style="margin: 10px; margin-top: 0; margin-bottom: 0; background-color: #8080c0; color: white">
<html:div><html:B>Navigator</html:B></html:div>
<spacer flex="100%"/>
<html:div>Specify you preferences for browsing the web</html:div>
</hbox>
<vbox style="margin: 10px; padding: 10px; border: 2px groove white">
<html:div><html:input type="radio"/>Blank Page </html:div>
<html:div><html:input type="radio"/>Home Page </html:div>
<html:div><html:input type="radio"/>Last Visited</html:div>
</vbox>
<vbox style="margin: 10px; padding: 10px; border: 2px groove white">
<html:div>Clicking the home button will take you to this page.</html:div>
<hbox>
<html:div>Location: </html:div>
<html:input type="text" flex="100%"/>
</hbox>
<hbox>
<spacer flex="100%"/>
<html:input disabled="true" type="button" value="Use current page"/>
<spacer style="width:10px"/>
<html:input type="button" value="Browse"/>
</hbox>
</vbox>
<vbox style="margin: 10px; padding: 10px; border: 2px groove white">
<html:div>History is a list a pages you have previously visited.</html:div>
<hbox>
<html:div>Pages in history expire in: <html:input type="text" value="9"/> days. </html:div>
<spacer flex="100%"/>
<html:input type="button" value="Clear History"/>
</hbox>
<hbox>
<html:div>Clear the list of sites on the location bar.</html:div>
<spacer flex="100%"/>
<html:input type="button" value="Clear Location Bar"/>
</hbox>
</vbox>
<spacer flex="100%"/>
</vbox>
</hbox>
<hbox style="margin: 5px;">
<spacer flex="100%"/>
<html:input type="button" value="Ok"/>
<spacer style="width:10px"/>
<html:input type="button" value="Cancel"/>
<spacer style="width:10px"/>
<html:input type="button" value="Help"/>
</hbox>
</vbox>
</tabpanels>
</tabbox>
</vbox>
</window>

View File

@ -1,213 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Ben Goodger <ben@netscape.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://navigator/skin/navigator.css" type="text/css"?>
<window id="openLocation"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
style="width: 250px;"
orient="vertical">
<script>
<![CDATA[
function testProperty( aID )
{
var element = document.getElementById( aID );
if (!element)
return false;
var pValPair = prompt("Enter property,value:","").split(",");
var property = pValPair[0];
var value = pValPair[1];
element[property] = value;
}
]]>
</script>
<hbox align="center">
<text class="label" value="Foo Label 1:" for="nerp1"/>
<textbox flex="1" id="nerp1" disabled="true" value="disabled"/>
<button label="Test Property APIs" oncommand="testProperty('nerp1');"/>
</hbox>
<hbox align="center">
<text class="label" value="Foo Label 2:" for="nerp2"/>
<textbox flex="1" id="nerp2" readonly="true" value="readonly"/>
<button label="Test Property APIs" oncommand="testProperty('nerp2');"/>
</hbox>
<hbox align="center">
<text class="label" value="Foo Label 2:" for="nerp2r"/>
<textbox flex="1" id="nerp2r" readonly="true" disabled="true" value="readonly disabled"/>
<button label="Test Property APIs" oncommand="testProperty('nerp2r');"/>
</hbox>
<hbox align="center">
<text class="label" value="Foo Label 3:" for="nerp3"/>
<textbox flex="1" id="nerp3" value="regular"/>
<button label="Test Property APIs" oncommand="testProperty('nerp3');"/>
</hbox>
<hbox align="center">
<text class="label" value="Foo Label 5:" for="nerp4"/>
<menubutton label="regular menubutton">
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
</menupopup>
</menubutton>
<menubutton label="disabled menubutton" disabled="true">
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
</menupopup>
</menubutton>
</hbox>
<hbox align="center">
<text class="label" value="Foo Label 5:" for="nerp4"/>
<menulist label="regular menulist">
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
</menupopup>
</menulist>
<menulist label="disabled menulist" disabled="true">
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
</menupopup>
</menulist>
</hbox>
<hbox>
<text class="label" value="Foo Label 4:"/>
<vbox flex="1">
<textbox flex="1"/>
<vbox align="center">
<hbox flex="1">
<checkbox label="Checkbox 1" id="checkbox1"/>
<spacer flex="1"/>
<button label="Test Property APIs" oncommand="testProperty('checkbox1');"/>
</hbox>
<checkbox label="Checkbox 2" disabled="true" checked="true"/>
<checkbox label="Checkbox 3"/>
</vbox>
<separator class="groove"/>
<radiogroup id="group" orient="vertical">
<hbox>
<radio group="group" label="Radio 1" id="radio1"/>
<spacer flex="1"/>
<button label="Test Property APIs" oncommand="testProperty('radio1');"/>
</hbox>
<radio group="group" label="Radio 2"/>
<radio group="group" label="Radio 3" disabled="true" checked="true"/>
</radiogroup>
</vbox>
</hbox>
<separator/>
<hbox align="center">
<text class="label" value="Foo Label 7:"/>
<button label="Standard XUL Button"/>
<button class="dialog" label="Dialog XUL Button"/>
<button class="dialog" disabled="true" default="true" label="Disabled Button"/>
</hbox>
<separator/>
<hbox>
<vbox>
<text class="label" value="Foo Label 6:"/>
<spacer flex="1"/>
</vbox>
<textbox id="textarea" rows="3" multiline="true" value="Regular multiline textbox"/>
<vbox>
<button label="Test Property APIs" oncommand="testProperty('textarea');"/>
<spacer flex="1"/>
</vbox>
</hbox>
<hbox>
<vbox>
<text class="label" value="Foo Label 6:"/>
<spacer flex="1"/>
</vbox>
<textbox rows="3" multiline="true" disabled="true" value="Disabled multiline textbox"/>
</hbox>
<separator/>
<progressmeter mode="undetermined" flex="1"/>
<script>
<![CDATA[
function advanceProgress()
{
var progressMeter = document.getElementById("normal");
if(progressMeter.getAttribute('value') <= 100) {
var newvalue = parseInt(progressMeter.getAttribute('value')) + 10;
progressMeter.setAttribute('value', newvalue);
setTimeout("advanceProgress()", 100);
}
else {
progressMeter.setAttribute('value', 0);
setTimeout("advanceProgress()", 100);
}
}
]]>
</script>
<hbox align="center">
<progressmeter id="normal" mode="normal" flex="1"/>
<button label="Advance Progress" oncommand="advanceProgress();"/>
</hbox>
<separator/>
<scrollbar orient="horizontal"/>
</window>

View File

@ -1,154 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<window id="main-window" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical">
<toolbox>
<menubar chromeclass="menubar">
<menu label="File" accesskey="f">
<html:div><html:u>F</html:u>ile</html:div>
<menupopup>
<menu label="New" accesskey="n" key="newKey">
<button class="menu-left"/>
<html:div><html:u>N</html:u>ew </html:div>
<spacer flex="100%"/>
<html:div>Ctrl+N</html:div>
<button class="menu-right"/>
<menupopup>
<menuitem label="Lambda" accesskey="a" oncommand="dump('Lambda lambda lambda!\n')"/>
<menuitem label="Phi" accesskey="p"/>
</menupopup>
</menu>
<menuitem>
<button class="menu-left"/>
<html:div><html:u>O</html:u>pen...</html:div>
<spacer flex="100%"/>
<html:div>Ctrl+O</html:div>
<button class="menu-right"/>
</menuitem>
<menuitem>
<button class="menu-left"/>
<html:div><html:u>C</html:u>lose</html:div>
<spacer flex="100%"/>
<button class="menu-right"/>
</menuitem>
<menuseparator/>
<menuitem disabled="true">
<button class="menu-left"/>
<html:div><html:u>S</html:u>ave</html:div>
<spacer flex="100%"/>
<html:div>Ctrl+S</html:div>
<button class="menu-right"/>
</menuitem>
<menuitem>
<button class="menu-left"/>
<html:div>S<html:u>a</html:u>ve as...</html:div>
<spacer flex="100%"/>
<button class="menu-right"/>
</menuitem>
<menuitem>
<button class="menu-left"/>
<html:div><html:u>Q</html:u>uit</html:div>
<spacer flex="100%"/>
<html:div>Ctrl+Q</html:div>
<button class="menu-right"/>
</menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>E</html:u>dit</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>V</html:u>iew</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>S</html:u>earch</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>G</html:u>o</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>B</html:u>ookmarks</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>T</html:u>asks</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>D</html:u>ebug</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<menu>
<html:div><html:u>Q</html:u>A</html:div>
<menupopup>
<menuitem><html:div>Sample Item</html:div></menuitem>
</menupopup>
</menu>
<spacer flex="100%"/>
</menubar>
</toolbox>
<html:iframe style="height: 300px" src="http://www.mozillazine.org/"/>
</window>