gecko-dev/xpfe/browser/samples/widgets.xul

214 строки
6.8 KiB
Plaintext
Исходник Обычный вид История

2000-03-29 07:22:07 +04:00
<?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 ***** -->
2000-03-29 07:22:07 +04:00
2000-04-20 01:42:30 +04:00
<?xml-stylesheet href="chrome://navigator/skin/navigator.css" type="text/css"?>
2000-03-29 07:22:07 +04:00
<window id="openLocation"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
style="width: 250px;"
orient="vertical">
2000-03-29 07:22:07 +04:00
<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">
2000-03-29 07:22:07 +04:00
<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">
2000-03-29 07:22:07 +04:00
<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">
2000-03-29 07:22:07 +04:00
<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">
2000-03-29 07:22:07 +04:00
<text class="label" value="Foo Label 5:" for="nerp4"/>
<menubutton label="regular menubutton">
2000-03-29 07:22:07 +04:00
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
2000-03-29 07:22:07 +04:00
</menupopup>
</menubutton>
<menubutton label="disabled menubutton" disabled="true">
2000-03-29 07:22:07 +04:00
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
2000-03-29 07:22:07 +04:00
</menupopup>
</menubutton>
</hbox>
2000-03-29 07:22:07 +04:00
<hbox align="center">
2000-03-29 07:22:07 +04:00
<text class="label" value="Foo Label 5:" for="nerp4"/>
<menulist label="regular menulist">
2000-03-29 07:22:07 +04:00
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
2000-03-29 07:22:07 +04:00
</menupopup>
</menulist>
<menulist label="disabled menulist" disabled="true">
2000-03-29 07:22:07 +04:00
<menupopup>
<menuitem label="foo 1"/>
<menuitem label="foo 2"/>
<menuitem label="foo 3"/>
2000-03-29 07:22:07 +04:00
</menupopup>
</menulist>
</hbox>
2000-03-29 07:22:07 +04:00
<hbox>
2000-03-29 07:22:07 +04:00
<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>
2000-03-29 07:22:07 +04:00
<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"/>
2000-03-29 07:22:07 +04:00
</radiogroup>
</vbox>
</hbox>
2000-03-29 07:22:07 +04:00
<separator/>
<hbox align="center">
2000-03-29 07:22:07 +04:00
<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>
2000-03-29 07:22:07 +04:00
<separator/>
<hbox>
<vbox>
2000-03-29 07:22:07 +04:00
<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>
2000-03-29 07:22:07 +04:00
<hbox>
<vbox>
2000-03-29 07:22:07 +04:00
<text class="label" value="Foo Label 6:"/>
<spacer flex="1"/>
</vbox>
<textbox rows="3" multiline="true" disabled="true" value="Disabled multiline textbox"/>
</hbox>
2000-03-29 07:22:07 +04:00
<separator/>
<progressmeter mode="undetermined" flex="1"/>
2000-03-29 07:22:07 +04:00
<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>
2000-03-29 07:22:07 +04:00
<separator/>
<scrollbar orient="horizontal"/>
2000-03-29 07:22:07 +04:00
</window>