Programmation Xul
Xul est le language de description xmlisé de Mozilla.
Xul.
Éléments.
http://developer.mozilla.org/En/XUL_Reference
action
arrowscrollbox 
assign 
bbox 
binding 
bindings 
box 
broadcaster 
broadcasterset 
button 
browser 
checkbox 
caption 
colorpicker 
column 
columns 
commandset 
command 
conditions 
content 
datepicker 
deck 
description 
dialog 
dialogheader 
dropmarker 
editor 
grid 
grippy 
groupbox 
hbox 
iframe 
image 
key 
keyset 
label 
listbox 
listcell 
listcol 
listcols 
listhead 
listheader 
listitem 
member 
menu 
menubar 
menuitem 
menulist 
menupopup 
menuseparator 
notification 
notificationbox 
observes 
overlay 
page 
panel 
param 
popup 
popupset 
preference 
preferences 
prefpane 
prefwindow 
progressmeter 
query 
queryset 
radio 
radiogroup 
resizer 
richlistbox 
richlistitem 
row 
rows 
rule 
scale 
script 
scrollbar 
scrollbox 
scrollcorner 
separator 
spacer 
spinbuttons 
splitter 
stack 
statusbar 
statusbarpanel 
stringbundle 
stringbundleset 
tab 
tabbrowser (Firefox-only starting with Firefox 3/Gecko 1.9) 
tabbox 
tabpanel 
tabpanels 
tabs 
template 
textnode 
textbox 
textbox (Firefox autocomplete) 
textbox (Mozilla autocomplete) 
timepicker 
titlebar 
toolbar 
toolbarbutton 
toolbargrippy 
toolbaritem 
toolbarpalette 
toolbarseparator 
toolbarset 
toolbarspacer 
toolbarspring 
toolbox 
tooltip 
tree 
treecell 
treechildren 
treecol 
treecols 
treeitem 
treerow 
treeseparator 
triple 
vbox 
where 
window 
wizard 
wizardpage
Attributs.
http://developer.mozilla.org/en/XUL/Attribute
acceltext | 
accessible | 
accesskey | 
activetitlebarcolor | 
afterselected | 
align | 
allowevents | 
allownegativeassertions | 
alternatingbackground | 
alwaysopenpopup | 
attribute | 
autocheck | 
autoCheck | 
autocompleteenabled | 
autocompletepopup | 
autocompletesearch | 
autocompletesearchparam | 
autoFill | 
autoFillAfterMatch | 
autoscroll | 
beforeselected | 
buttonaccesskeyaccept | 
buttonaccesskeycancel | 
buttonaccesskeydisclosure | 
buttonaccesskeyextra1 | 
buttonaccesskeyextra2 | 
buttonaccesskeyhelp | 
buttonalign | 
buttondir | 
buttondisabledaccept | 
buttonlabelaccept | 
buttonlabelcancel | 
buttonlabeldisclosure | 
buttonlabelextra1 | 
buttonlabelextra2 | 
buttonlabelhelp | 
buttonorient | 
buttonpack | 
buttons | 
checked | 
checkState | 
class | 
closebutton | 
coalesceduplicatearcs | 
collapse | 
collapsed | 
color | 
cols | 
command | 
commandupdater | 
completedefaultindex | 
container | 
containment | 
contentcontextmenu | 
contenttooltip | 
context | 
contextmenu | 
control | 
crop | 
curpos | 
current | 
currentset | 
customindex | 
customizable | 
cycler | 
datasources | 
decimalplaces | 
default | 
defaultButton | 
defaultset | 
description | 
dir | 
disableAutocomplete | 
disableautocomplete | 
disableautoselect | 
disableclose | 
disabled | 
disablehistory | 
disableKeyNavigation | 
disablekeynavigation | 
disablesecurity | 
dlgtype | 
dragging | 
editable | 
editortype | 
element | 
empty | 
emptytext | 
enableColumnDrag | 
enablehistory | 
equalsize | 
eventnode | 
events | 
expr | 
firstdayofweek | 
firstpage | 
first-tab | 
fixed | 
flags | 
flex | 
focused | 
forceComplete | 
forcecomplete | 
grippyhidden | 
grippytooltiptext | 
group | 
handleCtrlPageUpDown | 
handleCtrlTab | 
height | 
helpURI | 
hidden | 
hidechrome | 
hidecolumnpicker | 
hideheader | 
hideseconds | 
hidespinbuttons | 
homepage | 
href | 
icon | 
id | 
ignoreBlurWhileSearching | 
ignorebluewhilesearching | 
ignorecase | 
ignoreincolumnpicker | 
ignorekeys | 
image | 
inactivetitlebarcolor | 
increment | 
index | 
inputtooltiptext | 
insertafter | 
insertbefore | 
instantApply | 
inverted | 
iscontainer | 
isempty | 
key | 
keycode | 
keytext | 
label | 
lastpage | 
lastSelected | 
last-tab | 
left | 
linkedpanel | 
max | 
maxheight | 
maxlength | 
maxpos | 
maxrows | 
maxwidth | 
member | 
menu | 
menuactive | 
min | 
minheight | 
minResultsForPopup | 
minresultsforpopup | 
minwidth | 
mode | 
modifiers | 
mousethrough | 
multiline | 
multiple | 
name | 
negate | 
newlines | 
next | 
noautofocus | 
noautohide | 
nomatch | 
object | 
observes | 
onbeforeaccept | 
onbookmarkgroup | 
onchange | 
onclosetab | 
oncommand | 
oncommandupdate | 
ondialogaccept | 
ondialogcancel | 
ondialogclosure | 
ondialogextra1 | 
ondialogextra2 | 
ondialoghelp | 
onerror | 
onerrorcommand | 
onextra1 | 
onextra2 | 
oninput | 
onload | 
onnewtab | 
onpageadvanced | 
onpagehide | 
onpagerewound | 
onpageshow | 
onpaneload | 
onpopuphidden | 
onpopuphiding | 
onpopupshowing | 
onpopupshown | 
onsearchcomplete | 
onselect | 
ontextcommand | 
ontextentered | 
ontextrevert | 
ontextreverted | 
onwizardback | 
onwizardcancel | 
onwizardfinish | 
onwizardnext | 
open | 
ordinal | 
orient | 
pack | 
pageid | 
pageincrement | 
pagestep | 
parent | 
parsetype | 
persist | 
persistence | 
phase | 
pickertooltiptext | 
popup | 
position | 
predicate | 
preference | 
preference-editable | 
primary | 
priority | 
properties | 
querytype | 
readonly | 
ref | 
rel | 
removeelement | 
resizeafter | 
resizebefore | 
rows | 
screenX | 
screenY | 
searchSessions | 
searchlabel | 
selected | 
selectedIndex | 
seltype | 
setfocus | 
showcaret | 
showCommentColumn | 
showcommentcolumn | 
showpopup | 
size | 
sizemode | 
sizetopopup | 
smoothscroll | 
sort | 
sortActive | 
sortDirection | 
sortResource | 
sortResource2 | 
spellcheck | 
src | 
state | 
statedatasource | 
statusbar | 
statustext | 
style | 
subject | 
substate | 
suppressonselect | 
tabindex | 
tabScrolling | 
tabscrolling | 
targets | 
template | 
timeout | 
title | 
toolbarname | 
tooltip | 
tooltiptext | 
tooltiptextnew | 
top | 
type | 
uri | 
userAction | 
validate | 
value | 
var | 
wait-cursor | 
width | 
windowtype | 
wrap | 
wraparound
Propriétés.
http://developer.mozilla.org/en/XUL/Property
accessible | accessibleType | accessKey | align | allNotifications | allowEvents | alwaysOpenPopup | amIndicator | appLocale | autoCheck | autoFill | autoFillAfterMatch | boxObject | browsers | builder | builderView | buttons | canAdvance | canGoBack | canGoForward | canRewind | checked | checkState | child | children | className | clickSelectsAll | collapsed | color | columns | command | commandManager | completeDefaultIndex | container | contentDocument | contentPrincipal | contentTitle | contentView | contentViewerEdit | contentViewerFile | contentWindow | contextMenu | control | controller | controllers | crop | current | currentIndex | currentItem | currentNotification | currentPage | currentPane | currentSet | currentURI | customToolbarCount | database | datasources | date | dateLeadingZero | dateValue | decimalPlaces | decimalSymbol | defaultButton | defaultValue | description | dir | disableAutocomplete | disableAutoComplete | disableautoselect | disabled | disableKeyNavigation | dlgType | docShell | documentCharsetInfo | editable | editingColumn | editingRow | editingSession | editor | editortype | emptyText | enableColumnDrag | eventNode | firstOrdinalColumn | firstPermanentChild | flex | focused | focusedItem | forceComplete | group | handleCtrlPageUpDown | handleCtrlTab | height | hidden | hideSeconds | homePage | hour | hourLeadingZero | id | ignoreBlurWhileSearching | image | increment | inputField | inverted | is24HourClock | isPM | isSearching | isWaiting | itemCount | label | labelElement | lastPermanentChild | lastSelected | left | linkedPanel | listBoxObject | locked | markupDocumentViewer | max | maxHeight | maxLength | maxRows | maxWidth | menu | menuBoxObject | menupopup | min | minHeight | minResultsForPopup | minWidth | minute | minuteLeadingZero | mode | month | monthLeadingZero | name | next | noMatch | notificationsHidden | object | observes | onFirstPage | onLastPage | open | ordinal | orient | pack | pageCount | pageid | pageIncrement | pageIndex | pageStep | parentContainer | palette | persist | persistence | pmIndicator | popup | popupBoxObject | popupOpen | position | predicate | preferenceElements | preferencePanes | preferences | priority | radioGroup | readonly | readOnly | ref | resource | resultsPopup | scrollBoxObject | scrollIncrement | searchCount | searchLabel | searchParam | searchSessions | second | secondLeadingZero | securityUI | selected | selectedBrowser | selectedCount | selectedIndex | selectedItem | selectedItems | selectedPanel | selectedTab | selectionEnd | selectionStart | selstyle | selType | sessionCount | sessionHistory | showCommentColumn | showPopup | size | smoothScroll | spinButtons | src | state | statusbar | statusText | stringBundle | strings | style | subject | suppressOnSelect | tabContainer | tabIndex | tabs | tabScrolling | tabpanels | tag | textLength | textValue | timeout | title | toolbarName | toolbarset | tooltip | tooltipText | top | treeBoxObject | type | uri | userAction | value | valueNumber | view | webBrowsereFind | webNavigation | webProgress | width | wizardPages | wrapAround | year | yearLeadingZero
DOM.
http://developer.mozilla.org/en/XUL/Property
DOM:element.attributes | 
class="new DOM:element.baseURI | 
DOM:element.childElementCount | 
DOM:element.childNodes | 
DOM:element.children | 
DOM:element.clientHeight | 
DOM:element.clientLeft | 
DOM:element.clientTop | 
DOM:element.clientWidth | 
DOM:element.cloneNode | 
DOM:element.firstChild | 
DOM:element.firstElementChild | 
DOM:element.lastChild | 
DOM:element.lastElementChild | 
DOM:element.localName | 
DOM:element.namespaceURI | 
DOM:element.nextElementSibling | 
DOM:element.nextSibling | 
DOM:element.nodeName | 
DOM:element.nodeType | 
DOM:element.nodeValue | 
DOM:element.ownerDocument | 
DOM:element.parentNode | 
DOM:element.prefix | 
DOM:element.previousElementSibling | 
DOM:element.previousSibling | 
DOM:element.scrollHeight | 
DOM:element.scrollLeft | 
DOM:element.scrollTop | 
DOM:element.scrollWidth | 
DOM:element.tagName | 
DOM:element.textContent
Méthodes.
http://developer.mozilla.org/en/XUL/Method
acceptDialog | addItemToSelection | addPane | addProgressListener | addSession | addTab | advance | advanceSelectedTab | appendCustomToolbar | appendGroup | appendItem | appendNotification | blur | cancel | cancelDialog | centerWindowOnScreen | checkAdjacentElement | clearResults | clearSelection | click | close | collapseToolbar | contains | decrease | decreasePage | doCommand | ensureElementIsVisible | ensureIndexIsVisible | ensureSelectedElementIsVisible | expandToolbar | extra1 | extra2 | focus | getBrowserAtIndex | getBrowserForDocument | getBrowserForTab | getBrowserIndexForDocument | getButton | getDefaultSession | getEditor | getElementsByAttribute | getElementsByAttributeNS | getFormattedString | getHTMLEditor | getIndexOfFirstVisibleRow | getIndexOfItem | getItemAtIndex | getNextItem | getNotificationBox | getNotificationWithValue | getNumberOfVisibleRows | getPageById | getPreviousItem | getResultAt | getResultCount | getResultValueAt | getRowCount | getSearchAt | getSelectedItem | getSession | getSessionByName | getSessionResultAt | getSessionStatusAt | getSessionValueAt | getString | goBack | goBackGroup | goDown | goForward | goForwardGroup | goHome | goTo | gotoIndex | goUp | hidePopup | increase | increasePage | insertItem | insertItemAt | invertSelection | loadGroup | loadOneTab | loadTabs | loadURI | loadURIWithFlags | makeEditable | moveByOffset | moveTo | moveToAlertPosition | onSearchComplete | onTextEntered | onTextReverted | openPopup | openPopupAtScreen | openSubDialog | openWindow | preferenceForElement | reload | reloadAllTabs | reloadTab | reloadWithFlags | removeAllItems | removeAllNotifications | removeAllTabsBut | removeCurrentNotification | removeCurrentTab | removeItemAt | removeItemFromSelection | removeNotification | removeProgressListener | removeSession | removeTab | removeTransientNotifications | replaceGroup | reset | rewind | scrollByIndex | scrollByPixels | scrollToIndex | select | selectAll | selectItem | selectItemRange | setSelectionRange | showPane | showPopup | sizeTo | startEditing | stop | stopEditing | swapDocShells | syncSessions | timedSelect | toggleItemSelection
Attributs définis pour les éléments Xul.
http://developer.mozilla.org/en/XUL_element_attributes
Classes de styles.
http://developer.mozilla.org/en/XUL/Style
Gestionnaires d'événements.
http://developer.mozilla.org/en/XUL/Events
APPLICATION.
interface.
Une fenêtre Xul se déclare par l'utilisation d'un skin dans le "chrome" :
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
 id="cWin"
 title="interface test"
 orient="horizontal"
 xmlns:html="http://www.w3.org/1999/xhtml"
 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
 onload="initialize()"
</window>
Les scripts et les styles se placent dans window comme ceci :
<!-- [0] regionHEAD -->
<!-- script -->
 <script src="./Script/scr.js" /><!-- type="application/javascript;version=1.7" -->
 <script src="./Script/prototype_xul_1_6_0_2.js" />
<!-- style -->
 <style/>
L'interface se découpe en box :
 <vbox>
 <toolbox flex="1">
 <menubar id="sample-menubar">
 <!-- MENU -->
 <menu id="file-menu" label="File">
 <menupopup id="file-popup">
 <!-- subMenu
 <menu id="new-menu" label="New">
 <menupopup id="new-popup">
 <menuitem label="Window"/>
 <menuitem label="Message"/>
 </menupopup>
 </menu>