<?php

include_once "BluePHP/BlueSystem/GUI/BSApplication.inc";
include_once "BluePHP/BlueSystem/GUI/BSDialogSubmit.inc";
/**
 * Simply create the Application and pass the Dialog
 * as the root window.
 */
$app = new BSApplication(new BSDialogSubmit("hello", array("title" => "Hello world message", "msg" => "Hello world !")));
/**
 * Show everything
 */
$app->render();
<?php

include_once "BluePHP/GUI/Button.inc";
include_once "BluePHP/GUI/Concat.inc";
include_once "BluePHP/BlueSystem/GUI/BSApplication.inc";
include_once "BluePHP/BlueSystem/GUI/BSDialogInfo.inc";
$button = new Button("bt_hello", array("label" => "Click me"));
$dialog = new BSDialogInfo("hello", array("title" => "Hello world message", "msg" => "Hello world !"), null);
// avoid the dialog to be shown when the application render
$dialog->setAutoOpen(false);
// avoid the dialog to be destroyed when the user click the close button
$dialog->setDestroyAtClose(false);
$app = new BSApplication();
// concat simply put elements one after the other
$frame = new Concat(array($button, $dialog));
// the root window is always needed
$app->setRootWindow($frame);
// connect the button click to the dialog show property
// only when everything is rendered
$app->pushReadyJS($button->eventClick($dialog->eventOpen()));
$app->render();
<?php

include_once "BluePHP/GUI/Button.inc";
include_once "BluePHP/GUI/Concat.inc";
include_once "BluePHP/BlueSystem/GUI/BSApplication.inc";
$button = new Button("bt_hello", array("label" => "Click me"));
$app = new BSApplication();
// concat simply put elements one after the other
$frame = new Concat(array($button));
// the root window is always needed
$app->setRootWindow($frame);
// connect the button click to the render method
// of the HelloWorldDialog.inc class located at BluePHP/doc/tutorial/HelloWorldDialog
$app->pushReadyJS($button->eventClick($app->eventRender("doc.tutorial.HelloWorldDialog")));
$app->render();
Пример #4
0
<?php

error_reporting(E_ALL);
include_once "BluePHP/Utils/Input.inc";
include_once "BluePHP/GUI/Concat.inc";
include_once "BluePHP/GUI/Dialog.inc";
include_once "BluePHP/BlueSystem/GUI/BSApplication.inc";
$elts = array();
foreach (glob("../tutorial/*.php") as $filename) {
    $id = basename($filename, ".php");
    $d = new Dialog($id, $id . ".php", null);
    $d->setHeader(createLink(array("url" => $filename, "value" => $id . ".php", "nofollow" => true)));
    $d->setContent(highlight_file($filename, true));
    array_push($elts, $d);
}
$app = new BSApplication(new Concat($elts));
$app->addRenderStyle("/BluePHP/doc/styles/main.css");
$app->render();