Appendix C. Programmer's Reference
This appendix is an easy-to-use reference that contains information about
XUL elements, XBL elements, and event attributes. Details about how each
element and event works within a Mozilla application are covered in the rest
of the book; to learn how to use XUL or XBL, read Chapter 3
and Chapter 7.
Once you know how to use XUL and XBL, this reference allows you to look
up all available tags and elements quickly. Each entry listed below includes
a brief description of the element or event, its purpose, what attributes the
element or event has, and what other related elements or events you can look
at to get more information.
C.1. XUL Element Set
Table of Contents
action
Child element in a XUL template structure that draws content for
matched data
arrowscrollbox
Container box for scrolling contents
autorepeatbutton Provides arrows for a scrolling area
binding
Child element in a XUL template that optionally matches in the
data
bindings
Substructure in a XUL template that collects the optional binding
rules
box
Generic container and layout element
broadcaster
Notifies elements when a change occurs in the UI
broadcasterset
Container for broadcaster elements
editor
Content area for editable web content
grid
Widget for laying out content in a structured tabular fashion
grippy Visible widget used on a grippy bar to expand or collapse a UI
region
groupbox
Box with frame surrounding it
hbox
Box container whose children are laid out horizontally
iframe Web content area
image
Display of a supported type image
key
Definition for a keyboard shortcut
keybinding Container for a keyset or group of keysets
keyset
Container for one or more key elements
label
Simple text display element and label for a control element
listbox
Used for display of a flat list of items
listcell
Single cell of a listbox
listcol
Listbox column definition
listcols
Container for listbox columns (listcol)
listhead
Container for column header in list boxes (listheader)
radiogroup
Framed box for containing radio elements
resizer
Window-resizing element
row
Container for grid cells laid out consecutively
rows
Definition for grid rows
rule
Defines rules for rendering data as XUL
script
Declaration of script used in XUL file
scrollbar
Widget for scrolling in a container
scrollbarbutton
Button used to move position of scrollbar thumb
scrollbox
Box for scrolling content
separator
Bar between elements
slider
A scrollbar without buttons
spacer
Blank space separating element
splitter Element for dragging and resizing associated elements
stack
Shows children one on top of one another, all at the same time
statusbar
Box container for status elements
statusbarpanel Single unit of a statusbar
Pop-up window for context-sensitive help
tree
Hierarchical holder of information represented as rows
treecell A single cell in a tree
treechildren
The main body of a tree; a container for treeitems
treecol
A single column of a tree
treecols Container for tree columns
treeitem
A treerow container
treerow
A single row of a tree
triple Substructure of a template that matches RDF statements in the data
vbox
Box container with vertically laid out children
window
Root element of a top-level XUL window document
wizard
Window used to step though a task
wizardpage
A single panel (step) of a wizard
XUL isn't yet identified as a specification, and the language is still changing.
The elements and attributes given here represent a stable subset of the XUL
widget set. XML allows you to define new elements and attributes arbitrarily
(which is partly what makes a powerful extension like XBL possible) in
your markup. Although it's discouraged in practice, Mozilla application
developers even those working on the Mozilla source itself often use
this flexibility to manage data in one-off attributes. For example, you may
find XUL buttons in the source with attributes like "loading," which is not
context
Points to the context menu that this
element should use
datasources
Used in templates; points to the RDF
Attribute Description
data that gets processed
debug
Used for debugging XUL; adds
borders to make the element and its
layout easily visible
dir
Specifies the direction of the
children: normal or reverse
empty
(Boolean) Used for template;
specifies that the container has no
children
equalsize
Specifies whether the children should
be of the same size: always or never
flex
Provides an integer or percent value
that specifies the flexibility of an
element relative to its siblings within
a container
flexgroup
Provides an integer that can group
elements and give them the same
degree of flexibility
Attribute Description
height
minwidth
Specifies an element's minimum
width
observes
Points to a broadcasting element
whose state this element observes
ordinal
(Integer) Specifies the element's order
within the parent
orient
Shows the element's orientation:
vertical or horizontal
pack
Shows how children should be
distributed within this container:
center, end, or start
persist
Shows which of the element's
attributes should be persisted/stored
for reuse
position
Shows the element's position within a
list (e.g., menuitems in a menu)
ref
Specifies the RDF data root to begin
processing (used in templates)
Attribute Description
style