PHP Classes

File: sample.xul.php

Recommend this page to a friend!
  Classes of Tom Schaefer   QTag   sample.xul.php   Download  
File: sample.xul.php
Role: Example script
Content type: text/plain
Description: XUL sample
Class: QTag
Generate tag based documents programmatically
Author: By
Last change:
Date: 16 years ago
Size: 1,334 bytes
 

Contents

Class file image Download
<?php
/*
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="sample-window"
        title="Beispiel"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <vbox>
        <checkbox label="CheckBox"/>
        <hbox>
            <spacer flex="1"/>
            <button label="OK"/>
            <button label="Abbrechen"/>
        </hbox>
    </vbox>
</window>

 */
header("Content-Type: text/xml");

echo
'<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
'
;

include_once
'autoload.inc.php';


$button1 = QTag::factory("button")
            ->
setAttribute("label","Cancel");

$button1 = QTag::factory("button")
            ->
setAttribute("label","OK");

$spacer = QTag::factory("spacer")
            ->
setAttribute("flex","1");

$hbox = QTag::factory("hbox")
            ->
add($spacer)
            ->
add($button1)
            ->
add($button2);

$checkbox = QTag::factory("checkbox")
            ->
setAttribute("label","checkbox");

$vbox = QTag::factory("vbox")
        ->
add($checkbox)
        ->
add($hbox);

$wdw = QTag::factory("window")
        ->
setAttribute("id","sample")
        ->
setAttribute("title","Beispiel")
        ->
setAttribute("xmlns","http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul")
        ->
add($vbox);

echo
$wdw->doRender();