Difference between revisions of "XBL"

From CDOT Wiki
Jump to: navigation, search
(XBL (eXtensible Bindings Language))
Line 1: Line 1:
== XBL (eXtensible Bindings Language) ==
+
=What is WBL?=
A XML language that used for declaring the behavior of XUL widgets.
 
XBL describing a set of bindings that can be attached to bound elements. The binding implements new methods and properties to the bound element.
 
We can use XUL to define the layout of userinterface, then we can use BXL to change the pieces of the function.
 
  
For Example: Create a window box by UXL, then we attach OK/Cancel buttons in the box.  
+
XBL stands for eXtensible Bindings Language, which is an XML language that is used for declaring the behavious of XUL widgets.
  
<PRE>
+
=What Does XBL Do?=
XUL (example.xul):
 
  
 +
Basically, XBL is a langauge that describes a set of bindings that can be attached and bound to elements on the screen. When bound, the binding implements new methods and properties to the associated element. In essence, the widgets on the screen are layed out using XUL and then given functionality using XBL.
 +
 +
=Resources/Examples=
 +
==Overview==
 +
 +
==API Reference==
 +
 +
==Test Cases==
 +
 +
In this example, we can use XUL to define the layout of user interface and then use XBL to change the widgets functionality. <br/><br/>
 +
 +
Here is the XUL Code that lays out the widgets:
 +
<pre>
 
<?xml version="1.0"?>
 
<?xml version="1.0"?>
 
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 
<?xml-stylesheet href="chrome://example/skin/example.css" type="text/css"?>
 
<?xml-stylesheet href="chrome://example/skin/example.css" type="text/css"?>
  
<window
+
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 
   <box class="okcancelbuttons"/>
 
   <box class="okcancelbuttons"/>
 
</window>
 
</window>
 +
</pre>
  
XBL (example.xml):
+
This lays out an interface with the buttons for OK and Cancel. To give these buttons functionality, XBL is used:
 
+
<pre>
 
<?xml version="1.0"?>
 
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
+
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
        xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 
   <binding id="okcancel">
 
   <binding id="okcancel">
 
     <content>
 
     <content>
Line 30: Line 38:
 
   </binding>
 
   </binding>
 
</bindings>
 
</bindings>
</PRE>
+
</pre>
 +
 
 +
==Technical Notes==
 +
 
 +
=Getting in contact=
 +
==Telephone==
 +
 
 +
==Newsgroup==

Revision as of 14:59, 5 October 2006

What is WBL?

XBL stands for eXtensible Bindings Language, which is an XML language that is used for declaring the behavious of XUL widgets.

What Does XBL Do?

Basically, XBL is a langauge that describes a set of bindings that can be attached and bound to elements on the screen. When bound, the binding implements new methods and properties to the associated element. In essence, the widgets on the screen are layed out using XUL and then given functionality using XBL.

Resources/Examples

Overview

API Reference

Test Cases

In this example, we can use XUL to define the layout of user interface and then use XBL to change the widgets functionality.

Here is the XUL Code that lays out the widgets:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://example/skin/example.css" type="text/css"?>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <box class="okcancelbuttons"/>
</window>

This lays out an interface with the buttons for OK and Cancel. To give these buttons functionality, XBL is used:

<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <binding id="okcancel">
    <content>
      <xul:button label="OK"/>
      <xul:button label="Cancel"/>
    </content>
  </binding>
</bindings>

Technical Notes

Getting in contact

Telephone

Newsgroup