WebCore::PointerRecognizer Class Reference

Pointer gesture recognizer. More...

#include <PointerRecognizer.h>

Inheritance diagram for WebCore::PointerRecognizer:
Inheritance graph
[legend]
Collaboration diagram for WebCore::PointerRecognizer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const IntPoint & pos () const
 Get the pointer position.
const IntPoint & screenPos () const
 Get the pointer position in screen coordinates.
bool shiftKey () const
 Get shift key's state.
bool ctrlKey () const
 Get control key's state.
bool altKey () const
 Get alt key's state.
bool metaKey () const
 Get meta key's state.
const double timestamp () const
 Get the timestamp of the last event.
const bool cancelled () const
 Get the cancelled status of the recognizer.
virtual void reset ()
 Reset gesture state.
virtual void touchEvent (const PlatformTouchEvent &)
 Handle a platform touch event.

Private Attributes

IntPoint m_pos
IntPoint m_screenPos
double m_timestamp
bool m_cancelled
bool m_shiftKey
bool m_ctrlKey
bool m_altKey
bool m_metaKey

Detailed Description

Pointer gesture recognizer.

PointerRecognizer is a gesture recognizer that calculates pointer gesture data from given touch events. It is used for generating mouse events from touch events. PointerRecognizer is one of the gesture recognizers handled by GestureContext.

See also:
GestureContext

Definition at line 9 of file PointerRecognizer.h.


Member Function Documentation

bool WebCore::PointerRecognizer::altKey (  )  const [inline]

Get alt key's state.

Returns:
true is the alt key is pressed.

Definition at line 18 of file PointerRecognizer.h.

References m_altKey.

const bool WebCore::PointerRecognizer::cancelled (  )  const [inline]

Get the cancelled status of the recognizer.

If more than one fingers touch the screen, the recognizer is cancelled and won't give valid mouse pointer data.

Returns:
true if the recognizer is cancelled.

Definition at line 23 of file PointerRecognizer.h.

References m_cancelled.

bool WebCore::PointerRecognizer::ctrlKey (  )  const [inline]

Get control key's state.

Returns:
true is the control key is pressed.

Definition at line 17 of file PointerRecognizer.h.

References m_ctrlKey.

bool WebCore::PointerRecognizer::metaKey (  )  const [inline]

Get meta key's state.

Returns:
true is the meta key is pressed.

Definition at line 19 of file PointerRecognizer.h.

References m_metaKey.

const IntPoint & WebCore::PointerRecognizer::pos (  )  const [inline]

Get the pointer position.

Returns:
position of the pointer in client coordinates.
See also:
screenPos

Definition at line 13 of file PointerRecognizer.h.

References m_pos.

void WebCore::PointerRecognizer::reset (  )  [virtual]

Reset gesture state.

Reimplemented from WebCore::GestureRecognizer.

Definition at line 84 of file PointerRecognizer.cpp.

References m_cancelled.

const IntPoint & WebCore::PointerRecognizer::screenPos (  )  const [inline]

Get the pointer position in screen coordinates.

Returns:
position of the pointer in screen coordinates.
See also:
pos

Definition at line 14 of file PointerRecognizer.h.

References m_screenPos.

bool WebCore::PointerRecognizer::shiftKey (  )  const [inline]

Get shift key's state.

Returns:
true is the shift key is pressed.

Definition at line 16 of file PointerRecognizer.h.

References m_shiftKey.

const double WebCore::PointerRecognizer::timestamp (  )  const [inline]

Get the timestamp of the last event.

Returns:
the time of the last processed event, in seconds since some undefined time.

Definition at line 21 of file PointerRecognizer.h.

References m_timestamp.

void WebCore::PointerRecognizer::touchEvent ( const PlatformTouchEvent &  ev  )  [virtual]

Handle a platform touch event.

Interpret a touch event and set gesture parameters accordingly.

Parameters:
ev Platform touch event.

Implements WebCore::GestureRecognizer.

Definition at line 95 of file PointerRecognizer.cpp.

References m_altKey, m_cancelled, m_ctrlKey, m_metaKey, m_pos, m_screenPos, m_shiftKey, and m_timestamp.


Member Data Documentation

Definition at line 38 of file PointerRecognizer.h.

Definition at line 35 of file PointerRecognizer.h.

Definition at line 37 of file PointerRecognizer.h.

Definition at line 39 of file PointerRecognizer.h.

Definition at line 32 of file PointerRecognizer.h.

Definition at line 33 of file PointerRecognizer.h.

Definition at line 36 of file PointerRecognizer.h.

Definition at line 34 of file PointerRecognizer.h.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208