Pointer gesture recognizer. More...
#include <PointerRecognizer.h>


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 |
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.
Definition at line 9 of file PointerRecognizer.h.
| bool WebCore::PointerRecognizer::altKey | ( | ) | const [inline] |
Get alt key's state.
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.
Definition at line 23 of file PointerRecognizer.h.
References m_cancelled.
| bool WebCore::PointerRecognizer::ctrlKey | ( | ) | const [inline] |
Get control key's state.
Definition at line 17 of file PointerRecognizer.h.
References m_ctrlKey.
| bool WebCore::PointerRecognizer::metaKey | ( | ) | const [inline] |
Get meta key's state.
Definition at line 19 of file PointerRecognizer.h.
References m_metaKey.
| const IntPoint & WebCore::PointerRecognizer::pos | ( | ) | const [inline] |
Get the pointer position.
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.
Definition at line 14 of file PointerRecognizer.h.
References m_screenPos.
| bool WebCore::PointerRecognizer::shiftKey | ( | ) | const [inline] |
Get shift key's state.
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.
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.
| 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.
bool WebCore::PointerRecognizer::m_altKey [private] |
Definition at line 38 of file PointerRecognizer.h.
bool WebCore::PointerRecognizer::m_cancelled [private] |
Definition at line 35 of file PointerRecognizer.h.
bool WebCore::PointerRecognizer::m_ctrlKey [private] |
Definition at line 37 of file PointerRecognizer.h.
bool WebCore::PointerRecognizer::m_metaKey [private] |
Definition at line 39 of file PointerRecognizer.h.
IntPoint WebCore::PointerRecognizer::m_pos [private] |
Definition at line 32 of file PointerRecognizer.h.
IntPoint WebCore::PointerRecognizer::m_screenPos [private] |
Definition at line 33 of file PointerRecognizer.h.
bool WebCore::PointerRecognizer::m_shiftKey [private] |
Definition at line 36 of file PointerRecognizer.h.
double WebCore::PointerRecognizer::m_timestamp [private] |
Definition at line 34 of file PointerRecognizer.h.
1.6.2-20100208