mouse-lock.html
changeset 137 2a0c78eeaa2d
parent 136 e6b893606800
child 145 6c149e83cd5d
equal deleted inserted replaced
136:e6b893606800 137:2a0c78eeaa2d
   116       popular example is that of first person movement controls in three
   116       popular example is that of first person movement controls in three
   117       dimensional graphics applications such as games.  Movement of the mouse is
   117       dimensional graphics applications such as games.  Movement of the mouse is
   118       interpreted for rotation of the view-port, there is no limit to how far
   118       interpreted for rotation of the view-port, there is no limit to how far
   119       movement can go, and no mouse cursor is displayed.</p>
   119       movement can go, and no mouse cursor is displayed.</p>
   120 
   120 
   121       <p>Mouse Lock is related to Mouse Capture [MDCCAP].  Capture provides
   121       <p>Mouse Lock is related to Mouse Capture [[MDN-SETCAPTURE]].  Capture provides
   122       continued event delivery to a target element while a mouse is being
   122       continued event delivery to a target element while a mouse is being
   123       dragged, but ceases when the mouse button is released.  Mouse Lock differs
   123       dragged, but ceases when the mouse button is released.  Mouse Lock differs
   124       by being persistent, not limited by screen boundaries, sending events
   124       by being persistent, not limited by screen boundaries, sending events
   125       regardless of mouse button state, hiding the cursor, and not releasing
   125       regardless of mouse button state, hiding the cursor, and not releasing
   126       until an API call or specific release gesture by the user.</p>
   126       until an API call or specific release gesture by the user.</p>
   200           <a><code>mouselocklost</code></a> callback for the previous target.</p>
   200           <a><code>mouselocklost</code></a> callback for the previous target.</p>
   201 
   201 
   202           <p>Once in the locked state the <a>user agent</a> must fire all relevant
   202           <p>Once in the locked state the <a>user agent</a> must fire all relevant
   203           user generated <code>MouseEvent</code> events (for example:
   203           user generated <code>MouseEvent</code> events (for example:
   204           <code>mousemove</code>, <code>mousedown</code>, <code>mouseup</code>,
   204           <code>mousemove</code>, <code>mousedown</code>, <code>mouseup</code>,
   205           <code>click</code>, <code>wheel</code>)[<a
   205           <code>click</code>, <code>wheel</code>)[[!DOM-LEVEL-3-CORE]]
   206           href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-MouseEvent">DOMMOUSE</a>]
       
   207           to the <code>target</code> of mouse lock, and not fire mouse events to
   206           to the <code>target</code> of mouse lock, and not fire mouse events to
   208           other elements.  Events that require the concept of a mouse cursor must
   207           other elements.  Events that require the concept of a mouse cursor must
   209           not be dispatched (for example: <code>mouseover</code>,
   208           not be dispatched (for example: <code>mouseover</code>,
   210           <code>mouseout</code>).</p>
   209           <code>mouseout</code>).</p>
   211 
   210 
   352 
   351 
   353       <section>
   352       <section>
   354         <h2>Jog movement over spinner controls</h2>
   353         <h2>Jog movement over spinner controls</h2>
   355 
   354 
   356         <p>When modifying numerically magnitudes in applications sometimes the
   355         <p>When modifying numerically magnitudes in applications sometimes the
   357         user will prefer to "drag" a numeric control (e.g.  a spinner [<a
   356         user will prefer to "drag" a numeric control by its button handles to
   358         href="http://books.zkoss.org/wiki/Small%20Talks/2008/June/Using%20Spinner%20Component">ZKSPINNER</a>])
   357         increment or decrement the numeric value.  E.g. a spinner with a
   359         by its button handles to increment or decrement the numeric value.  An
   358         number entry text box and arrows pointing up and down that can be
       
   359         clicked or dragged on to change the value. An
   360         application could use the Mouse Lock API to allow modifying the numeric
   360         application could use the Mouse Lock API to allow modifying the numeric
   361         values beyond what the logical screen bounds allow.  The same could apply
   361         values beyond what the logical screen bounds allow.  The same could apply
   362         for a control that fast forwards or rewinds a video or audio stream like a
   362         for a control that fast forwards or rewinds a video or audio stream like a
   363         "jog".</p>
   363         "jog".</p>
   364       </section>
   364       </section>
   554       <h2>Frequently Asked Questions</h2>
   554       <h2>Frequently Asked Questions</h2>
   555 
   555 
   556       <section>
   556       <section>
   557         <h2>Why not merge with Mouse Capture: setCapture()?</h2>
   557         <h2>Why not merge with Mouse Capture: setCapture()?</h2>
   558 
   558 
   559         <p>Mouse Capture [<a
   559         <p>Mouse Capture [[MDN-SETCAPTURE]]
   560         href="https://developer.mozilla.org/en/DOM/element.setCapture">MDCCAP</a>]
       
   561         handles low security risk mouse event target lock for the duration of a
   560         handles low security risk mouse event target lock for the duration of a
   562         mouse drag gesture.  Mouse Lock removes the concept of the cursor and
   561         mouse drag gesture.  Mouse Lock removes the concept of the cursor and
   563         directs all events to a given target.  They are related, but
   562         directs all events to a given target.  They are related, but
   564         different.</p>
   563         different.</p>
   565 
   564