Difference between revisions of "XBL"

From CDOT Wiki
Jump to: navigation, search
 
(XBL (eXtensible Bindings Language))
Line 6: Line 6:
 
For Example: Create a window box by UXL, then we attach OK/Cancel buttons in the box.  
 
For Example: Create a window box by UXL, then we attach OK/Cancel buttons in the box.  
  
 
+
<PRE>
 
XUL (example.xul):
 
XUL (example.xul):
  
Line 30: Line 30:
 
   </binding>
 
   </binding>
 
</bindings>
 
</bindings>
 +
</PRE>

Revision as of 13:24, 4 October 2006

XBL (eXtensible Bindings Language)

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.

XUL (example.xul):

<?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>

XBL (example.xml):

<?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>