# Area

(UI 0.9.9)

## Introducción

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

## Sinopsis de la Clase

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

## Constantes predefinidas

`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

## Tabla de contenidos

- UI\Area::onDraw — Draw Callback
- UI\Area::onKey — Key Callback
- UI\Area::onMouse — Mouse Callback
- UI\Area::redraw — Redraw Area
- UI\Area::scrollTo — Area Scroll
- UI\Area::setSize — Set Size