Project | WXT | Basics | Download | Documentation | Samples

PI: gadget

The purpose of a gadget PI is to allow gadgets of different kind, for instance Google-gadgets or home made material.

<?_wxt gadget location="" expanded="" width="" height=""?>

A gadget in this context is basically either a iframe-element or a documentfragment with a header that allows opening and closing.

See Javascript for a description of nessesary Javascript.

The parameters are:

location (optional) The URI that will act as src for the iframe that displays the content of the gadget.
fragmentid (optional) The id of a defined fragment that constitutes the content of the gadget.
Either location or fragmentid must be set. If both are set location is used.
expanded (optional) If you want the gadget to be initially expanded, expanded is set to yes. no is default.
width (mandatory) The width of the expaned window.
height (mandatory) The heigth of the expaned window.
title (optional) Deprecated, use text
text (optional) The text appearing in the header.
id (optional) ID attribute given to the content-part (and as name if iframe).
movable (optional) Default is no. When yes the user will be able to drag the gadget.
position (optional) The CSS position value you want to apply. If not set and movable is set, position is set to absolute. Alternative is fixed.
left (optional) The CSS positionioning value you want to apply.
top (optional) The CSS positionioning value you want to apply.

Styleclass(es) describing this PI is: wxtgadget. See distributed std styles.

Examples:

<div>
<?_wxt gadget 
   location="http://www.it.hiof.no/~borres/gadgets/geometri2/b-eks11.html"
   width="400px" height="300px" ?>
</div>