W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2002

RE: mousewheel support proposal (for SVG)

From: Thierry Kormann <tkormann@ilog.fr>
Date: Tue, 30 Apr 2002 11:21:56 +0200
To: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
Cc: <www-dom@w3.org>
Message-ID: <EGECJAFKOPPEMLJGHNDNOECGCEAA.tkormann@ilog.fr>

> That link is member confidential.  Could you restate or summarize the
> proposal?

Here is the email.
---
From: "Thierry Kormann" <tkormann@ilog.fr>
To: "W3c-Svg-Wg" <w3c-svg-wg@w3.org>
Date: Thu, 18 Apr 2002 10:35:13 +0200
Message-ID: <EGECJAFKOPPEMLJGHNDNGEFKCDAA.tkormann@ilog.fr>
Subject: SVG1.2: Add support for mouse wheel in the SVG DOM

Hi,

I have a request for SVG1.2 which is the support of mousewheel event
in the SVG DOM. I have participated to a discussion on that topic on
the DOM WG mailing list. The conclusion so far is that the DOM WG does
not want to handle that (to low-level event...).

In conclusion, here is a concrete proposal that might be added to
SVG1.2. Other WG might leverage our MouseWheelEvent later on.

Note: The event attribute in SVG can be: onmousewheel="..."

// SVG DOM API

interface MouseWheelEvent : MouseEvent {

          readonly attribute int wheelRotation

          void initMouseWheelEvent(in DOMString typeArg,
                                   in boolean canBubbleArg,
                                   in boolean cancelableArg,
                                   in views::AbstractView viewArg,
                                   in long detailArg,
                                   in long screenXArg,
                                   in long screenYArg,
                                   in long clientXArg,
                                   in long clientYArg,
                                   in boolean ctrlKeyArg,
                                   in boolean altKeyArg,
                                   in boolean shiftKeyArg,
                                   in boolean metaKeyArg,
                                   in unsigned short buttonArg,
                                   in EventTarget relatedTargetArg,
                                   in int wheelRotation);


}

- Attributes

  wheelRotation

        Indicates the number of "clicks" the mouse wheel was rotated.
        A positive value indicates that the mouse wheel was rotated
        away from the user and a negative value indicates that the
        mouse wheel has rotated towards the user.

- Methods

  initMouseWheelEvent

        The initMouseWheelEvent method is used to initialize the value
        of a MouseWheelEvent created through the DocumentEvent
        interface. This method may only be called before the
        MouseWheelEvent has been dispatched via the dispatchEvent
        method, though it may be called multiple times during that
        phase if necessary. If called multiple times, the final
        invocation takes precedence.


        Parameters
            typeArg of type DOMString
                    Specifies the event type.

            canBubbleArg of type boolean
                    Specifies whether or not the event can bubble.

            cancelableArg of type boolean
                    Specifies whether or not the event's default action
                    can be prevented.

            viewArg of type views::AbstractView
                    Specifies the Event's AbstractView.

            detailArg of type long
                    Specifies the Event's mouse click count.

            screenXArg of type long
                    Specifies the Event's screen x coordinate

            screenYArg of type long
                    Specifies the Event's screen y coordinate

            clientXArg of type long
                    Specifies the Event's client x coordinate

            clientYArg of type long
                    Specifies the Event's client y coordinate

            ctrlKeyArg of type boolean
                    Specifies whether or not control key was depressed
                    during the Event.

            altKeyArg of type boolean
                    Specifies whether or not alt key was depressed during
                    the Event.

            shiftKeyArg of type boolean
                    Specifies whether or not shift key was depressed during
                    the Event.

            metaKeyArg of type boolean
                    Specifies whether or not meta key was depressed during
                    the Event.

            buttonArg of type unsigned short
                    Specifies the Event's mouse button.

            relatedTargetArg of type EventTarget
                    Specifies the Event's related EventTarget.

            wheelRotation of type int
                    Indicates the number of "clicks" the mouse wheel was
                    rotated.

No Return Value
No Exceptions


The different types of Mouse events that can occur are:

mousewheel

           The mousewheel event occurs when the wheel is rotated over
           an element. This event is valid for most elements.

           * Bubbles: Yes
           * Cancelable: Yes
           * Context Info: screenX, screenY, clientX, clientY, altKey,
ctrlKey,
                           shiftKey, metaKey, relatedTarget indicates the
                           EventTarget the pointing device is exiting.


---

Thierry.
Received on Tuesday, 30 April 2002 05:23:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT