The manakai project

Web::DOM::MouseEvent

The DOM MouseEvent object

DESCRIPTION

The Web::DOM::MouseEvent class implements the DOM MouseEvent interface.

METHODS

In addition to the methods of the Web::DOM::Event and Web::DOM::UIEvent classes, following methods are available:

$boolean = $ev->alt_key
$boolean = $ev->alt_graph_key
$boolean = $ev->ctrl_key
$boolean = $ev->meta_key
$boolean = $ev->shift_key
$boolean = $ev->get_modifier_state ($key_name)

Return whether the modifier key is pressed or not. [DOM3EVENTS] [MANAKAI]

$status = $ev->button

Return the mouse button which has changed the status. [DOM3EVENTS]

$status = $ev->buttons

Return the current status of the mouse buttons. [DOM3EVENTS]

$int = $ev->client_x
$int = $ev->client_y
$int = $ev->x
$int = $ev->y

Return the coordinate of the position in the viewport. [CSSOMVIEW]

$int = $ev->offset_x
$int = $ev->offset_y

Return the coordinate of the position in the padding box of the target. [CSSOMVIEW]

$int = $ev->page_x
$int = $ev->page_y

Return the coordinate of the position in the initial containing block. [CSSOMVIEW]

$string = $ev->region

Return the hit region. [HTML]

$object = $ev->related_target

Return the additional object specified for the event. [DOM3EVENTS]

$int = $ev->screen_x
$int = $ev->screen_y

Return the coordinate of the position in the screen. [CSSOMVIEW]

In addition, deprecated init_mouse_event method is supported. [DOM3EVENTS]

The new method of the Web::DOM::MouseEvent class accepts the screen_x, screen_y, client_x, client_y, ctrl_key, shift_key, alt_key, meta_key, button, buttons, related_target, and region name/value pairs in its second arguments, in addition to the name/value pairs for Web::DOM::Event and Web::DOM::UIEvent objects. [UIEVENTS] [HTML]

SUBCLASSES

There is a subclass of the class, representing the subinterface of the Event interface: Web::DOM::WheelEvent.

SPECIFICATIONS

DOM3EVENTS

DOM Level 3 Events <http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-uievents>.

UIEVENTS

UI Events <https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm#constructor-uievent>.

CSSOMVIEW

CSSOM View <http://dev.w3.org/csswg/cssom-view/#extensions-to-the-mouseevent-interface>.

HTML

HTML Standard <http://www.whatwg.org/specs/web-apps/current-work/#dom-mouseevent-region>.

MANAKAI

manakai DOM Extensions <http://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai++DOM%20Extensions>.

SEE ALSO

Web::DOM::Event, Web::DOM::UIEvent.

AUTHOR

Wakaba <wakaba@suikawiki.org>.

LICENSE

Copyright 2013 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.