Window
(UI 0.9.9)
はじめに
Represents a UI Window
クラス概要
class UI\Window
extends
UI\Control
{
/* プロパティ */
protected
$controls;
/* Constructor */
/* メソッド */
/* 継承したメソッド */
public UI\Control::destroy()
public UI\Control::disable()
public UI\Control::enable()
public UI\Control::hide()
public UI\Control::show()
}プロパティ
- controls
-
Contains controls, should not be manipulated directly
目次
- UI\Window::add — Add a Control
- UI\Window::__construct — Construct a new Window
- UI\Window::error — Show Error Box
- UI\Window::getSize — Get Window Size
- UI\Window::getTitle — Get Title
- UI\Window::hasBorders — Border Detection
- UI\Window::hasMargin — Margin Detection
- UI\Window::isFullScreen — Full Screen Detection
- UI\Window::msg — Show Message Box
- UI\Window::onClosing — Closing Callback
- UI\Window::open — Open Dialog
- UI\Window::save — Save Dialog
- UI\Window::setBorders — Border Use
- UI\Window::setFullScreen — Full Screen Use
- UI\Window::setMargin — Margin Use
- UI\Window::setSize — Set Size
- UI\Window::setTitle — Window Title
+add a note
User Contributed Notes 1 note
everton3x at gmail dot com ¶
7 years ago
This is a example to wizard layout in UI library:
<?php
/*
* Wizard sample layout builded with PHP UI
*/
use UI\Window;
use UI\Size;
use UI\Controls\Button;
use UI\Controls\Grid;
use UI\Controls\Box;
use UI\Controls\Form;
use UI\Controls\Entry;
use UI\Controls\Label;
/*
* The window
*/
$window = new Window('Wizard Sample Layout', new Size(640, 480), TRUE);
$window->setMargin(true);
/*
* Wizard content (sample)
*/
$content = new Form();
$content->setPadded(true);
$content->append('User:', new Entry());
$content->append('Password:', new Entry(Entry::Password));
/*
* Layout to title, content and buttons
*/
$grid = new Grid();
$grid->setPadded(false);
/*
* Title
*/
$grid->append(new Label('Wizard Sample'), 0, 0, 6, 1, true, Grid::Fill, false, Grid::Fill);
/*
* Append content
*/
$grid->append($content, 0, 1, 6, 1, false, Grid::Fill, true, Grid::Fill);
/*
* Left buttons
*/
$left_box = new Box(Box::Horizontal);
$left_box->append(new Button('&About'));
$left_box->append(new Button('&Help'));
/*
* Right buttons
*/
$right_box = new Box(Box::Horizontal);
$right_box->append(new Button('&Back'));
$right_box->append(new Button('&Forward'));
$right_box->append(new Button('&Close'));
/**
* Append buttons
*/
$grid->append($left_box, 0, 2, 1, 1, true, Grid::Start, false, Grid::Fill);
$grid->append($right_box, 5, 2, 1, 1, true, Grid::End, false, Grid::Fill);
/*
* Append layout and show.
*/
$window->add($grid);
$window->show();
UI\run();
?>