XUL Programmer's Reference Manual
|
<toolbar>
|
<toolbar> is XUL's toolbar widget.
Like the Navigator's Navigation toolbar and Personal toolbar, XUL toolbars
are collections of related tools that can often be customized, collapsed,
hidden, or altered in some other way. Toolbar's attributes are responsible
for such things as event handling, styling (e.g., chromeclass), and state
persistence. |
tooltip |
Description
The tooltip
attribute identifies a unique popup element in which the tooltip text for
the toolbar is stored.
Syntax
<toolbar tooltip="popup element's id value"
/>
Example
<toolbox id="Main" />
<toolbar id="Personal" tooltip="customize_popup"
Notes
In the above example, the tooltip attribute is identifying
a popup with the id "customize_popup", in which the tooltip text to be
displayed might be defined as follows:
<popup id="customize_popup">
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="200" height="20" style="border: thin solid black">
<titledbutton id = "replaceMe"
align="left"
class="borderless paneltitle"
value="Here is the tooltip text" />
</window>
</popup>
|
When the mouse hovers over the example toolbar, the text "Here is the
tooltip text" is displayed in a small bordered window above the toolbar,
and disappears when the mouse moves away from the toolbar.
|
dragdroparea |
Description
The dragdroparea
attribute identifies a child element within the toolbar which listens for
the drag and drop events.
Syntax
<toolbar dragdroparea="child element's id
value" />
Example
<toolbox id="Main" />
<toolbar id="Personal" dragdroparea="innerMostBox"
Notes
In the above example, the dragdroparea
attribute is specifying a box identified as "innerMostBox" within the toolbar
container that is to listen for the drag and drop events. When this attribute
is used, other child elements of the toolbar are not sensitive to these
events. The child element identified by this example might look as follows:
<toolbar dragdroparea="innerMostBox">
<box id="outerBox" align="horizontal">
<spring flex="1" />
<box id="innerMostBox">
<titledbutton id="new" value="New"
/>
<titledbutton id="open" value="Open"
/>
<titledbutton id="close" value="Close
/>
</box>
</toolbar> |
In this subtree, the spring element and
the outerbox are not aware of drag and drop events as they are fired.
See ondraggesture, ondragdrop,
ondragover,
and ondragexit for more information
on drag and drop functionality in XUL.
|