UI

Inhaltsverzeichnis

Represents a position (x,y)

Einführung

Points are used throughout UI to represent co-ordinates on a screen, control, or area.

Klassenbeschreibung

UI\Point
final class UI\Point {
/* Eigenschaften */
public $x ;
public $y ;
/* Constructor */
public __construct ( float $x , float $y )
/* Methoden */
public static UI\Point at ( float $point )
public static UI\Point at ( UI\Size $size )
public float getX ( void )
public float getY ( void )
public setX ( float $point )
public setY ( float $point )
}

Eigenschaften

x

Holds the X co-ordinate, can be read/written directly

y

Holds the Y co-ordinate, can be read/written directly

Represents dimenstions (width, height)

Einführung

Sizes are used throughout UI to represent the size of a screen, control, or area.

Klassenbeschreibung

UI\Size
final class UI\Size {
/* Eigenschaften */
public $width ;
public $height ;
/* Constructor */
public __construct ( float $width , float $height )
/* Methoden */
public float getHeight ( void )
public float getWidth ( void )
public static UI\Size of ( float $size )
public static UI\Size of ( UI\Point $point )
public setHeight ( float $size )
public setWidth ( float $size )
}

Eigenschaften

width

Holds the width, can be read/written directly

height

Holds the height, can be read/written directly

Window

Einführung

Represents a UI Window

Klassenbeschreibung

UI\Window
class UI\Window extends UI\Control {
/* Eigenschaften */
protected $controls ;
/* Constructor */
public __construct ( string $title , Size $size [, boolean $menu = false ] )
/* Methoden */
public add ( UI\Control $control )
public error ( string $title , string $msg )
public UI\Size getSize ( void )
public string getTitle ( void )
public bool hasBorders ( void )
public bool hasMargin ( void )
public bool isFullScreen ( void )
public msg ( string $title , string $msg )
protected int onClosing ( void )
public string open ( void )
public string save ( void )
public setBorders ( boolean $borders )
public setFullScreen ( boolean $full )
public setMargin ( boolean $margin )
public setSize ( UI\Size $size )
public setTitle ( string $title )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Eigenschaften

controls

Contains controls, should not be manipulated directly

Control

Einführung

This is the closed base class for all UI Controls.

Klassenbeschreibung

UI\Control
final class UI\Control {
/* Methoden */
public destroy ( void )
public disable ( void )
public enable ( void )
public UI\Control getParent ( void )
public int getTopLevel ( void )
public hide ( void )
public bool isEnabled ( void )
public bool isVisible ( void )
public setParent ( UI\Control $parent )
public show ( void )
}

Menu

Einführung

Menus must be constructed before the first Window, and can be shown on any Window

Klassenbeschreibung

UI\Menu
class UI\Menu {
/* Constructor */
public __construct ( string $name )
/* Methoden */
public UI\MenuItem append ( string $name [, string $type = UI\MenuItem::class ] )
public UI\MenuItem appendAbout ([ string $type = UI\MenuItem::class ] )
public UI\MenuItem appendCheck ( string $name [, string $type = UI\MenuItem::class ] )
public UI\MenuItem appendPreferences ([ string $type = UI\MenuItem::class ] )
public UI\MenuItem appendQuit ([ string $type = UI\MenuItem::class ] )
public appendSeparator ( void )
}

Menu Item

Einführung

Menu Items should only be created by the Menu

Klassenbeschreibung

UI\MenuItem
class UI\MenuItem {
/* Methoden */
public disable ( void )
public enable ( void )
public bool isChecked ( void )
protected onClick ( void )
public setChecked ( boolean $checked )
}

Area

Einführung

An Area represents a canvas which can be used to draw, and respond to mouse and key events.

Klassenbeschreibung

UI\Area
class UI\Area extends UI\Control {
/* Constants */
const integer UI\Area::Ctrl ;
const integer UI\Area::Alt ;
const integer UI\Area::Shift ;
const integer UI\Area::Super ;
const integer UI\Area::Down ;
const integer UI\Area::Up ;
/* Methoden */
protected onDraw ( UI\Draw\Pen $pen , UI\Size $areaSize , UI\Point $clipPoint , UI\Size $clipSize )
protected onKey ( string $key , integer $ext , integer $flags )
protected onMouse ( UI\Point $areaPoint , UI\Size $areaSize , integer $flags )
public redraw ( void )
public scrollTo ( UI\Point $point , UI\Size $size )
public setSize ( UI\Size $size )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Vordefinierte Konstanten

UI\Area::Ctrl

Shall be set in the modifiers passed to key and mouse events when the CTRL key is active

UI\Area::Alt

Shall be set in the modifiers passed to key and mouse events when the ALT key is active

UI\Area::Shift

Shall be set in the modifiers passed to key and mouse events when the SHIFT key is active

UI\Area::Super

UI\Area::Down

Shall be set in the modifiers passed to key and mouse events

UI\Area::Up

Shall be set in the modifiers passed to key and mouse events

Execution Scheduler

Einführung

This facility schedules repetitive execution of a callback, useful for animations and other such activities.

Klassenbeschreibung

UI\Executor
abstract class UI\Executor {
/* Constructor */
public __construct ( void )
public __construct ( integer $microseconds )
public __construct ( integer $seconds , integer $microseconds )
/* Methoden */
public void kill ( void )
abstract protected void onExecute ( void )
public bool setInterval ( integer $microseconds )
public bool setInterval ( integer $seconds , integer $microseconds )
}

Tab Control

Einführung

A Tab can contain many pages of Controls, each with a title, each selectable by the user.

Klassenbeschreibung

UI\Controls\Tab
class UI\Controls\Tab extends UI\Control {
/* Eigenschaften */
protected $controls ;
/* Methoden */
public integer append ( string $name , UI\Control $control )
public boolean delete ( integer $index )
public bool hasMargin ( integer $page )
public insertAt ( string $name , integer $page , UI\Control $control )
public integer pages ( void )
public setMargin ( integer $page , boolean $margin )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Eigenschaften

controls

Contains controls, should not be manipulated directly

Check Control

Einführung

A Check is a labelled checkable box

Klassenbeschreibung

UI\Controls\Check
class UI\Controls\Check extends UI\Control {
/* Constructor */
public __construct ( string $text )
/* Methoden */
public string getText ( void )
public bool isChecked ( void )
protected onToggle ( void )
public setChecked ( boolean $checked )
public setText ( string $text )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Button Control

Einführung

Represents a labelled clickable button

Klassenbeschreibung

UI\Controls\Button
class UI\Controls\Button extends UI\Control {
/* Constructor */
public __construct ( string $text )
/* Methoden */
public string getText ( void )
protected onClick ( void )
public setText ( string $text )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

ColorButton Control

Einführung

A Color Button is a button which displays a color picker when clicked

Klassenbeschreibung

UI\Controls\ColorButton
class UI\Controls\ColorButton extends UI\Control {
/* Methoden */
public UI\Color getColor ( void )
protected onChange ( void )
public setColor ( UI\Draw\Color $color )
public setColor ( integer $color )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Label Control

Einführung

A Label is a single line of text, meant to identify, for the user, some element of the interface.

Klassenbeschreibung

UI\Controls\Label
class UI\Controls\Label extends UI\Control {
/* Constructor */
public __construct ( string $text )
/* Methoden */
public string getText ( void )
public setText ( string $text )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Entry Control

Einführung

An Entry is a text entry control, suitable for entering plain text, passwords, or search terms.

Klassenbeschreibung

UI\Controls\Entry
class UI\Controls\Entry extends UI\Control {
/* Constants */
const integer UI\Controls\Entry::Normal ;
const integer UI\Controls\Entry::Password ;
const integer UI\Controls\Entry::Search ;
/* Constructor */
public __construct ([ integer $type = UI\Controls\Entry::Normal ] )
/* Methoden */
public string getText ( void )
public bool isReadOnly ( void )
protected onChange ( void )
public setReadOnly ( boolean $readOnly )
public setText ( string $text )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Vordefinierte Konstanten

UI\Controls\Entry::Normal

A normal single line entry

UI\Controls\Entry::Password

A password entry

UI\Controls\Entry::Search

A search entry

MultilineEntry Control

Einführung

A Multiline Entry is a text entry control able to hold multiple lines of text, with or without wrapping.

Klassenbeschreibung

UI\Controls\MultilineEntry
class UI\Controls\MultilineEntry extends UI\Control {
/* Constants */
const integer UI\Controls\MultilineEntry::Wrap ;
const integer UI\Controls\MultilineEntry::NoWrap ;
/* Constructor */
public __construct ([ integer $type ] )
/* Methoden */
public append ( string $text )
public string getText ( void )
public bool isReadOnly ( void )
protected onChange ( void )
public setReadOnly ( boolean $readOnly )
public setText ( string $text )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Vordefinierte Konstanten

UI\Controls\MultilineEntry::Wrap

Allow lines to wrap

UI\Controls\MultilineEntry::NoWrap

Do not allow lines to wrap

Spin Control

Einführung

A Spin box is a text box with an up-down control which changes the integer value in the box, within a defined range

Klassenbeschreibung

UI\Controls\Spin
class UI\Controls\Spin extends UI\Control {
/* Constructor */
public __construct ( integer $min , integer $max )
/* Methoden */
public int getValue ( void )
protected onChange ( void )
public setValue ( integer $value )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Slider Control

Einführung

A Slider is a control which represents a range, and a current value in the range. The sliding element of the control (sometimes called the "thumb") reflects the value, and can be adjusted within the range.

Klassenbeschreibung

UI\Controls\Slider
class UI\Controls\Slider extends UI\Control {
/* Constructor */
public __construct ( integer $min , integer $max )
/* Methoden */
public integer getValue ( void )
protected onChange ( void )
public setValue ( integer $value )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Progress Control

Einführung

A Progress control is a familiar Progress bar: It represents progress as a percentage, with a possible range of 0 to 100 (inclusive).

Klassenbeschreibung

UI\Controls\Progress
class UI\Controls\Progress extends UI\Control {
/* Methoden */
public int getValue ( void )
public setValue ( integer $value )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Control Separator

Einführung

A Separator represents a control separator, it has no other function.

Klassenbeschreibung

UI\Controls\Separator
class UI\Controls\Separator extends UI\Control {
/* Constants */
const integer UI\Controls\Separator::Horizontal ;
const integer UI\Controls\Separator::Vertical ;
/* Constructor */
public __construct ([ integer $type = UI\Controls\Separator::Horizontal ] )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Vordefinierte Konstanten

UI\Controls\Separator::Horizontal

A Horizontal Separator

UI\Controls\Separator::Vertical

A Vertical Separator

Combo Control

Einführung

A Combo control represents a list of options, like the familiar select HTML element.

Klassenbeschreibung

UI\Controls\Combo
class UI\Controls\Combo extends UI\Control {
/* Methoden */
public append ( string $text )
public integer getSelected ( void )
protected onSelected ( void )
public setSelected ( integer $index )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

EdiableCombo Control

Einführung

An Editable Combo is a Combo which allows the user to enter custom options

Klassenbeschreibung

UI\Controls\EditableCombo
class UI\Controls\EditableCombo extends UI\Control {
/* Methoden */
public append ( string $text )
public string getText ( void )
protected onChange ( void )
public setText ( string $text )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Radio Control

Einführung

A Radio is similar to the radio input type familiar from HTML

Klassenbeschreibung

UI\Controls\Radio
class UI\Controls\Radio extends UI\Control {
/* Methoden */
public append ( string $text )
public integer getSelected ( void )
protected onSelected ( void )
public setSelected ( integer $index )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Picker Control

Einführung

A Picker represents a button which when clicked presents a native Date/Time/DateTime Picker interface to the user.

Klassenbeschreibung

UI\Controls\Picker
class UI\Controls\Picker extends UI\Control {
/* Constants */
const integer UI\Controls\Picker::Date ;
const integer UI\Controls\Picker::Time ;
const integer UI\Controls\Picker::DateTime ;
/* Constructor */
public __construct ([ integer $type = UI\Controls\Picker::Date ] )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Vordefinierte Konstanten

UI\Controls\Picker::Date

A Date Picker

UI\Controls\Picker::Time

A Time Picker

UI\Controls\Picker::DateTime

A Date and Time Picker

Control Form (Arrangement)

Einführung

A Form is a control which allows the arrangement of other controls into a familiar layout (the form).

Klassenbeschreibung

UI\Controls\Form
class UI\Controls\Form extends UI\Control {
/* Eigenschaften */
protected $controls ;
/* Methoden */
public integer append ( string $label , UI\Control $control [, boolean $stretchy = false ] )
public boolean delete ( integer $index )
public bool isPadded ( void )
public setPadded ( boolean $padded )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Eigenschaften

controls

Contains controls, should not be manipulated directly

Control Grid (Arrangement)

Einführung

A Grid is a control which is allows the arrangement of children into a grid

Klassenbeschreibung

UI\Controls\Grid
class UI\Controls\Grid extends UI\Control {
/* Constants */
const integer UI\Controls\Grid::Fill ;
const integer UI\Controls\Grid::Start ;
const integer UI\Controls\Grid::Center ;
const integer UI\Controls\Grid::End ;
const integer UI\Controls\Grid::Leading ;
const integer UI\Controls\Grid::Top ;
const integer UI\Controls\Grid::Trailing ;
const integer UI\Controls\Grid::Bottom ;
/* Eigenschaften */
protected $controls ;
/* Methoden */
public append ( UI\Control $control , integer $left , integer $top , integer $xspan , integer $yspan , boolean $hexpand , integer $halign , boolean $vexpand , integer $valign )
public bool isPadded ( void )
public setPadded ( boolean $padding )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Vordefinierte Konstanten

UI\Controls\Grid::Fill

UI\Controls\Grid::Start

UI\Controls\Grid::Center

UI\Controls\Grid::End

UI\Controls\Grid::Leading

UI\Controls\Grid::Top

UI\Controls\Grid::Trailing

UI\Controls\Grid::Bottom

Eigenschaften

controls

Contains controls, should not be manipulated directly

Control Group (Arrangement)

Einführung

A Group is a titled container for child controls

Klassenbeschreibung

UI\Controls\Group
class UI\Controls\Group extends UI\Control {
/* Eigenschaften */
protected $controls ;
/* Constructor */
public __construct ( string $title )
/* Methoden */
public append ( UI\Control $control )
public string getTitle ( void )
public bool hasMargin ( void )
public setMargin ( boolean $margin )
public setTitle ( string $title )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Eigenschaften

controls

Contains controls, should not be manipulated directly

Control Box (Arrangement)

Einführung

A Box allows the arrangement of other controls

Klassenbeschreibung

UI\Controls\Box
class UI\Controls\Box extends UI\Control {
/* Constants */
const integer UI\Controls\Box::Vertical ;
const integer UI\Controls\Box::Horizontal ;
/* Eigenschaften */
protected $controls ;
/* Constructor */
public __construct ([ integer $orientation = UI\Controls\Box::Horizontal ] )
/* Methoden */
public integer append ( Control $control [, boolean $stretchy = false ] )
public boolean delete ( integer $index )
public integer getOrientation ( void )
public bool isPadded ( void )
public setPadded ( boolean $padded )
/* Geerbte Methoden */
public UI\Control::destroy ( void )
public UI\Control::disable ( void )
public UI\Control::enable ( void )
public UI\Control UI\Control::getParent ( void )
public int UI\Control::getTopLevel ( void )
public UI\Control::hide ( void )
public bool UI\Control::isEnabled ( void )
public bool UI\Control::isVisible ( void )
public UI\Control::setParent ( UI\Control $parent )
public UI\Control::show ( void )
}

Eigenschaften

controls

Contains controls, should not be manipulated directly

Vordefinierte Konstanten

UI\Controls\Box::Vertical

UI\Controls\Box::Horizontal

Draw Pen

Einführung

The Pen is passed to the Area Draw event handler, it is used for clipping, filling, stroking, and writing to Draw Paths.

Klassenbeschreibung

UI\Draw\Pen
final class UI\Draw\Pen {
/* Methoden */
public clip ( UI\Draw\Path $path )
public fill ( UI\Draw\Path $path , UI\Draw\Brush $with )
public fill ( UI\Draw\Path $path , UI\Draw\Color $with )
public fill ( UI\Draw\Path $path , integer $with )
public restore ( void )
public save ( void )
public stroke ( UI\Draw\Path $path , UI\Draw\Brush $with , UI\Draw\Stroke $stroke )
public stroke ( UI\Draw\Path $path , UI\Draw\Color $with , UI\Draw\Stroke $stroke )
public stroke ( UI\Draw\Path $path , integer $with , UI\Draw\Stroke $stroke )
public transform ( UI\Draw\Matrix $matrix )
public write ( UI\Point $point , UI\Draw\Text\Layout $layout )
}

Draw Path

Einführung

A Draw Path guides a Draw Pen, telling the Pen where to draw on an Area.

Klassenbeschreibung

UI\Draw\Path
class UI\Draw\Path {
/* Constants */
const integer UI\Draw\Path::Winding ;
const integer UI\Draw\Path::Alternate ;
/* Constructor */
public __construct ([ integer $mode = UI\Draw\Path::Winding ] )
/* Methoden */
public addRectangle ( UI\Point $point , UI\Size $size )
public arcTo ( UI\Point $point , float $radius , float $angle , float $sweep , float $negative )
public bezierTo ( UI\Point $point , float $radius , float $angle , float $sweep , float $negative )
public closeFigure ( void )
public end ( void )
public lineTo ( UI\Point $point , float $radius , float $angle , float $sweep , float $negative )
public newFigure ( UI\Point $point )
public newFigureWithArc ( UI\Point $point , float $radius , float $angle , float $sweep , float $negative )
}

Vordefinierte Konstanten

UI\Draw\Path::Winding

This is the default draw path mode

UI\Draw\Path::Alternate

This is the alternate draw path mode

Draw Matrix

Einführung

Klassenbeschreibung

UI\Draw\Matrix
class UI\Draw\Matrix {
/* Methoden */
public invert ( void )
public bool isInvertible ( void )
public UI\Draw\Matrix multiply ( UI\Draw\Matrix $matrix )
public rotate ( UI\Point $point , float $amount )
public scale ( UI\Point $center , UI\Point $point )
public skew ( UI\Point $point , UI\Point $amount )
public translate ( UI\Point $point )
}

Color Representation

Einführung

Represents RGBA colours, individual channels are accessible via public properties.

Klassenbeschreibung

UI\Draw\Color
class UI\Draw\Color {
/* Constants */
const integer UI\Draw\Color::Red ;
const integer UI\Draw\Color::Green ;
const integer UI\Draw\Color::Blue ;
const integer UI\Draw\Color::Alpha ;
/* Eigenschaften */
public $r ;
public $g ;
public $b ;
public $a ;
/* Constructor */
public __construct ([ UI\Draw\Color $color ] )
public __construct ([ integer $color ] )
/* Methoden */
public float getChannel ( integer $channel )
public void setChannel ( integer $channel , float $value )
}

Eigenschaften

r

Provides access to the red channel

g

Provides access to the green channel

b

Provides access to the blue channel

a

Provides access to the alpha channel

Vordefinierte Konstanten

UI\Draw\Color::Red

Identifies the red channel

UI\Draw\Color::Green

Identifies the green channel

UI\Draw\Color::Blue

Identifies the blue channel

UI\Draw\Color::Alpha

Identifies the alpha channel

Draw Stroke

Einführung

Holds the configuration for the Pen to perform a stroke

Klassenbeschreibung

UI\Draw\Stroke
class UI\Draw\Stroke {
/* Constructor */
public __construct ([ integer $cap = UI\Draw\Line\Cap::Flat [, integer $join = UI\Draw\Line\Join::Miter [, float $thickness = 1 [, float $miterLimit = 10 ]]]] )
/* Methoden */
public integer getCap ( void )
public integer getJoin ( void )
public float getMiterLimit ( void )
public float getThickness ( void )
public setCap ( integer $cap )
public setJoin ( integer $join )
public setMiterLimit ( float $limit )
public setThickness ( float $thickness )
}

Brushes

Einführung

Represents a solid color brush

Klassenbeschreibung

UI\Draw\Brush
class UI\Draw\Brush {
/* Constructor */
public __construct ( UI\Draw\Color $color )
public __construct ( integer $color )
/* Methoden */
public UI\Draw\Color getColor ( void )
public void setColor ( UI\Draw\Color $color )
public void setColor ( integer $color )
}

Gradient Brushes

Einführung

Abstract for gradient brushes

Klassenbeschreibung

UI\Draw\Brush\Gradient
abstract class UI\Draw\Brush\Gradient extends UI\Draw\Brush {
/* Methoden */
public integer addStop ( float $position , UI\Draw\Color $color )
public integer addStop ( float $position , integer $color )
public integer delStop ( integer $index )
public boolean setStop ( integer $index , float $position , UI\Draw\Color $color )
public boolean setStop ( integer $index , float $position , integer $color )
/* Geerbte Methoden */
public UI\Draw\Color UI\Draw\Brush::getColor ( void )
public void UI\Draw\Brush::setColor ( UI\Draw\Color $color )
public void UI\Draw\Brush::setColor ( integer $color )
}

Linear Gradient

Einführung

Klassenbeschreibung

UI\Draw\Brush\LinearGradient
class UI\Draw\Brush\LinearGradient extends UI\Draw\Brush\Gradient {
/* Constructor */
public __construct ( UI\Point $start , UI\Point $end )
/* Geerbte Methoden */
public integer UI\Draw\Brush\Gradient::addStop ( float $position , UI\Draw\Color $color )
public integer UI\Draw\Brush\Gradient::addStop ( float $position , integer $color )
public integer UI\Draw\Brush\Gradient::delStop ( integer $index )
public boolean UI\Draw\Brush\Gradient::setStop ( integer $index , float $position , UI\Draw\Color $color )
public boolean UI\Draw\Brush\Gradient::setStop ( integer $index , float $position , integer $color )
}

Radial Gradient

Einführung

Klassenbeschreibung

UI\Draw\Brush\RadialGradient
class UI\Draw\Brush\RadialGradient extends UI\Draw\Brush\Gradient {
/* Constructor */
public __construct ( UI\Point $start , UI\Point $outer , float $radius )
/* Geerbte Methoden */
public integer UI\Draw\Brush\Gradient::addStop ( float $position , UI\Draw\Color $color )
public integer UI\Draw\Brush\Gradient::addStop ( float $position , integer $color )
public integer UI\Draw\Brush\Gradient::delStop ( integer $index )
public boolean UI\Draw\Brush\Gradient::setStop ( integer $index , float $position , UI\Draw\Color $color )
public boolean UI\Draw\Brush\Gradient::setStop ( integer $index , float $position , integer $color )
}

Represents Text Layout

Einführung

A Text Layout represents the layout of text which will be drawn by the Pen

Klassenbeschreibung

UI\Draw\Text\Layout
class UI\Draw\Text\Layout {
/* Constructor */
public __construct ( string $text , UI\Draw\Text\Font $font , float $width )
/* Methoden */
public setColor ( UI\Draw\Color $color [, integer $start = 0 [, integer $end ]] )
public setColor ( integer $color [, integer $start = 0 [, integer $end ]] )
public setWidth ( float $width )
}

Represents a Font

Einführung

Loads a described font

Klassenbeschreibung

UI\Draw\Text\Font
class UI\Draw\Text\Font {
/* Constructor */
public __construct ( UI\Draw\Text\Font\Descriptor $descriptor )
/* Methoden */
public float getAscent ( void )
public float getDescent ( void )
public float getLeading ( void )
public float getUnderlinePosition ( void )
public float getUnderlineThickness ( void )
}

Font Descriptor

Einführung

Describes a font

Klassenbeschreibung

UI\Draw\Text\Font\Descriptor
class UI\Draw\Text\Font\Descriptor {
/* Constructor */
public __construct ( string $family , float $size [, integer $weight = UI\Draw\Text\Font\Weight::Normal [, integer $italic = UI\Draw\Text\Font\Italic::Normal [, integer $stretch = UI\Draw\Text\Font\Stretch::Normal ]]] )
/* Methoden */
public string getFamily ( void )
public int getItalic ( void )
public float getSize ( void )
public int getStretch ( void )
public int getWeight ( void )
}

Font Weight Settings

Einführung

Klassenbeschreibung

UI\Draw\Text\Font\Weight
final class UI\Draw\Text\Font\Weight {
/* Constants */
const integer UI\Draw\Text\Font\Weight::Thin ;
const integer UI\Draw\Text\Font\Weight::UltraLight ;
const integer UI\Draw\Text\Font\Weight::Light ;
const integer UI\Draw\Text\Font\Weight::Book ;
const integer UI\Draw\Text\Font\Weight::Normal ;
const integer UI\Draw\Text\Font\Weight::Medium ;
const integer UI\Draw\Text\Font\Weight::SemiBold ;
const integer UI\Draw\Text\Font\Weight::Bold ;
const integer UI\Draw\Text\Font\Weight::UltraBold ;
const integer UI\Draw\Text\Font\Weight::Heavy ;
const integer UI\Draw\Text\Font\Weight::UltraHeavy ;
}

Italic Font Settings

Einführung

Klassenbeschreibung

UI\Draw\Text\Font\Italic
final class UI\Draw\Text\Font\Italic {
/* Constants */
const integer UI\Draw\Text\Font\Italic::Normal = 0 ;
const integer UI\Draw\Text\Font\Italic::Oblique = 1 ;
const integer UI\Draw\Text\Font\Italic::Italic = 2 ;
}

Font Stretch Settings

Einführung

Klassenbeschreibung

UI\Draw\Text\Font\Stretch
final class UI\Draw\Text\Font\Stretch {
/* Constants */
const integer UI\Draw\Text\Font\Stretch::UltraCondensed = 0 ;
const integer UI\Draw\Text\Font\Stretch::ExtraCondensed = 1 ;
const integer UI\Draw\Text\Font\Stretch::Condensed = 2 ;
const integer UI\Draw\Text\Font\Stretch::SemiCondensed = 3 ;
const integer UI\Draw\Text\Font\Stretch::Normal = 4 ;
const integer UI\Draw\Text\Font\Stretch::SemiExpanded = 5 ;
const integer UI\Draw\Text\Font\Stretch::Expanded = 6 ;
const integer UI\Draw\Text\Font\Stretch::ExtraExpanded = 7 ;
const integer UI\Draw\Text\Font\Stretch::UltraExpanded = 8 ;
}

Line Cap Settings

Einführung

Klassenbeschreibung

UI\Draw\Line\Cap
final class UI\Draw\Line\Cap {
/* Constants */
const integer UI\Draw\Line\Cap::Flat ;
const integer UI\Draw\Line\Cap::Round ;
const integer UI\Draw\Line\Cap::Square ;
}

Line Join Settings

Einführung

Klassenbeschreibung

UI\Draw\Line\Join
final class UI\Draw\Line\Join {
/* Constants */
const integer UI\Draw\Line\Join::Miter ;
const integer UI\Draw\Line\Join::Round ;
const integer UI\Draw\Line\Join::Bevel ;
}

Key Identifiers

Einführung

Klassenbeschreibung

UI\Key
final class UI\Key {
/* Constants */
const integer UI\Key::Escape ;
const integer UI\Key::Insert ;
const integer UI\Key::Delete ;
const integer UI\Key::Home ;
const integer UI\Key::End ;
const integer UI\Key::PageUp ;
const integer UI\Key::PageDown ;
const integer UI\Key::Up ;
const integer UI\Key::Down ;
const integer UI\Key::Left ;
const integer UI\Key::Right ;
const integer UI\Key::F1 ;
const integer UI\Key::F2 ;
const integer UI\Key::F3 ;
const integer UI\Key::F4 ;
const integer UI\Key::F5 ;
const integer UI\Key::F6 ;
const integer UI\Key::F7 ;
const integer UI\Key::F8 ;
const integer UI\Key::F9 ;
const integer UI\Key::F10 ;
const integer UI\Key::F11 ;
const integer UI\Key::F12 ;
const integer UI\Key::N0 ;
const integer UI\Key::N1 ;
const integer UI\Key::N2 ;
const integer UI\Key::N3 ;
const integer UI\Key::N4 ;
const integer UI\Key::N5 ;
const integer UI\Key::N6 ;
const integer UI\Key::N7 ;
const integer UI\Key::N8 ;
const integer UI\Key::N9 ;
const integer UI\Key::NDot ;
const integer UI\Key::NEnter ;
const integer UI\Key::NAdd ;
const integer UI\Key::NSubtract ;
const integer UI\Key::NMultiply ;
const integer UI\Key::NDivide ;
}

InvalidArgumentException

Einführung

Klassenbeschreibung

UI\Exception\InvalidArgumentException
class UI\Exception\InvalidArgumentException extends InvalidArgumentException implements Throwable {
/* Geerbte Eigenschaften */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Geerbte Methoden */
final public string Exception::getMessage ( void )
final public Exception Exception::getPrevious ( void )
final public mixed Exception::getCode ( void )
final public string Exception::getFile ( void )
final public int Exception::getLine ( void )
final public array Exception::getTrace ( void )
final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )
final private void Exception::__clone ( void )
}

RuntimeException

Einführung

Klassenbeschreibung

UI\Exception\RuntimeException
class UI\Exception\RuntimeException extends RuntimeException implements Throwable {
/* Geerbte Eigenschaften */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Geerbte Methoden */
final public string Exception::getMessage ( void )
final public Exception Exception::getPrevious ( void )
final public mixed Exception::getCode ( void )
final public string Exception::getFile ( void )
final public int Exception::getLine ( void )
final public array Exception::getTrace ( void )
final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )
final private void Exception::__clone ( void )
}