大网数据广告活动
PHP 语言与运行手册

Area

· 52CE 我爱测

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

Area

(UI 0.9.9)

Introduction

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

Class synopsis

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

Predefined Constants

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

Table of Contents

来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
PHP Documentation Group
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。