WebCore::ManipulateEvent Class Reference

Event class for a touch manipulate event. More...

#include <ManipulateEvent.h>

List of all members.

Public Member Functions

 ManipulateEvent ()
 Construct an empty event.
void initManipulateEvent (const AtomicString &type, bool canBubble, bool cancelable, PassRefPtr< AbstractView > view, int detail, int screenX, int screenY, int clientX, int clientY, int pageX, int pageY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int panX, int panY, int panSpeedX, int panSpeedY, float scale, float scaleSpeed, float rotation, float rotationSpeed)
 Initialize the event with data.
int screenX () const
 Get the X-coordinate in screen coordinate space.
int screenY () const
 Get the Y-coordinate in screen coordinate space.
int clientX () const
 Get the X-coordinate in client coordinate space.
int clientY () const
 Get the Y-coordinate in client coordinate space.
int pageX () const
 Get the X-coordinate in page coordinate space.
int pageY () const
 Get the Y-coordinate in page coordinate space.
int panX () const
 Get the pan amount in X axis, as the offset in pixels from the beginning of the manipulation in screen coordinates.
int panY () const
 Get the pan amount in Y axis, as the offset in pixels from the beginning of the manipulation in screen coordinates.
int panSpeedX () const
 Get the pan speed in X axis (px/s).
int panSpeedY () const
 Get the pan speed in Y axis (px/s).
float scale () const
 Get the scale amount as a scale factor starting from 1.0.
float scaleSpeed () const
 Get the scale speed (Averaged amount of scale factor change per second).
float rotation () const
 Get the rotation amount in radians. The value does not wrap.
float rotationSpeed () const
 Get the rotation speed in radians per second.
virtual bool isManipulateEvent () const
 Check whether this object is a manipulate event.

Private Attributes

int m_screenX
int m_screenY
int m_clientX
int m_clientY
int m_pageX
int m_pageY
int m_panX
int m_panY
int m_panSpeedX
int m_panSpeedY
float m_scale
float m_scaleSpeed
float m_rotation
float m_rotationSpeed

Detailed Description

Event class for a touch manipulate event.

A manipulate event is sent when the user does a manipulation gesture with a touch screen. The manipulate event contains data like rotation amount, scale amount and pan amount, and the speed of change for them.

Definition at line 28 of file ManipulateEvent.h.


Constructor & Destructor Documentation

WebCore::ManipulateEvent::ManipulateEvent (  ) 

Construct an empty event.

Definition at line 29 of file ManipulateEvent.cpp.


Member Function Documentation

WebCore::ManipulateEvent::clientX (  )  const [inline]

Get the X-coordinate in client coordinate space.

Definition at line 46 of file ManipulateEvent.h.

References m_clientX.

WebCore::ManipulateEvent::clientY (  )  const [inline]

Get the Y-coordinate in client coordinate space.

Definition at line 47 of file ManipulateEvent.h.

References m_clientY.

void WebCore::ManipulateEvent::initManipulateEvent ( const AtomicString &  type,
bool  canBubble,
bool  cancelable,
PassRefPtr< AbstractView >  view,
int  detail,
int  screenX,
int  screenY,
int  clientX,
int  clientY,
int  pageX,
int  pageY,
bool  ctrlKey,
bool  altKey,
bool  shiftKey,
bool  metaKey,
int  panX,
int  panY,
int  panSpeedX,
int  panSpeedY,
float  scale,
float  scaleSpeed,
float  rotation,
float  rotationSpeed 
)

Initialize the event with data.

Parameters:
type Name of the event.
canBubble Flag that tells whether the event can bubble up to parent elements.
cancelable Flag that tells whether the event can be cancelled.
view The view in use.
detail Amount of detail.
screenX X-coordinate of the event in screen coordinates.
screenY Y-coordinate of the event in screen coordinates.
clientX X-coordinate of the event in client coordinates.
clientY Y-coordinate of the event in client coordinates.
pageX X-coordinate of the event in page coordinates.
pageY Y-coordinate of the event in page coordinates.
ctrlKey Flag that tells whether the control key is pressed.
altKey Flag that tells whether the alt key is pressed.
shiftKey Flag that tells whether the shift key is pressed.
metaKey Flag that tells whether the meta key is pressed.
panX Amount of pan done in X axis.
panY Amount of pan done in Y axis.
panSpeedX Speed of pan done in X axis (px/s).
panSpeedY Speed of pan done in Y axis (px/s).
scale The amount of scaling done as a scale factor starting from 1.0.
scaleSpeed Averaged amount of scale factor change per second.
rotation The amount of rotation done in radians.
rotationSpeed The speed of rotation in radians per second.

Definition at line 73 of file ManipulateEvent.cpp.

References m_clientX, m_clientY, m_pageX, m_pageY, m_panSpeedX, m_panSpeedY, m_panX, m_panY, m_rotation, m_rotationSpeed, m_scale, m_scaleSpeed, m_screenX, and m_screenY.

bool WebCore::ManipulateEvent::isManipulateEvent (  )  const [virtual]

Check whether this object is a manipulate event.

Returns:
always true for objects of this class.

Definition at line 115 of file ManipulateEvent.cpp.

WebCore::ManipulateEvent::pageX (  )  const [inline]

Get the X-coordinate in page coordinate space.

Definition at line 48 of file ManipulateEvent.h.

References m_pageX.

WebCore::ManipulateEvent::pageY (  )  const [inline]

Get the Y-coordinate in page coordinate space.

Definition at line 49 of file ManipulateEvent.h.

References m_pageY.

WebCore::ManipulateEvent::panSpeedX (  )  const [inline]

Get the pan speed in X axis (px/s).

Definition at line 52 of file ManipulateEvent.h.

References m_panSpeedX.

WebCore::ManipulateEvent::panSpeedY (  )  const [inline]

Get the pan speed in Y axis (px/s).

Definition at line 53 of file ManipulateEvent.h.

References m_panSpeedY.

WebCore::ManipulateEvent::panX (  )  const [inline]

Get the pan amount in X axis, as the offset in pixels from the beginning of the manipulation in screen coordinates.

Definition at line 50 of file ManipulateEvent.h.

References m_panX.

WebCore::ManipulateEvent::panY (  )  const [inline]

Get the pan amount in Y axis, as the offset in pixels from the beginning of the manipulation in screen coordinates.

Definition at line 51 of file ManipulateEvent.h.

References m_panY.

WebCore::ManipulateEvent::rotation (  )  const [inline]

Get the rotation amount in radians. The value does not wrap.

Definition at line 56 of file ManipulateEvent.h.

References m_rotation.

WebCore::ManipulateEvent::rotationSpeed (  )  const [inline]

Get the rotation speed in radians per second.

Definition at line 57 of file ManipulateEvent.h.

References m_rotationSpeed.

WebCore::ManipulateEvent::scale (  )  const [inline]

Get the scale amount as a scale factor starting from 1.0.

Definition at line 54 of file ManipulateEvent.h.

References m_scale.

WebCore::ManipulateEvent::scaleSpeed (  )  const [inline]

Get the scale speed (Averaged amount of scale factor change per second).

Definition at line 55 of file ManipulateEvent.h.

References m_scaleSpeed.

WebCore::ManipulateEvent::screenX (  )  const [inline]

Get the X-coordinate in screen coordinate space.

Definition at line 44 of file ManipulateEvent.h.

References m_screenX.

WebCore::ManipulateEvent::screenY (  )  const [inline]

Get the Y-coordinate in screen coordinate space.

Definition at line 45 of file ManipulateEvent.h.

References m_screenY.


Member Data Documentation

Definition at line 67 of file ManipulateEvent.h.

Definition at line 68 of file ManipulateEvent.h.

Definition at line 69 of file ManipulateEvent.h.

Definition at line 70 of file ManipulateEvent.h.

Definition at line 73 of file ManipulateEvent.h.

Definition at line 74 of file ManipulateEvent.h.

Definition at line 71 of file ManipulateEvent.h.

Definition at line 72 of file ManipulateEvent.h.

Definition at line 77 of file ManipulateEvent.h.

Definition at line 78 of file ManipulateEvent.h.

Definition at line 75 of file ManipulateEvent.h.

Definition at line 76 of file ManipulateEvent.h.

Definition at line 65 of file ManipulateEvent.h.

Definition at line 66 of file ManipulateEvent.h.


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