Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Public Attributes
Dali::TouchPoint Struct Reference

A TouchPoint represents a point on the screen that is currently being touched or where touch has stopped. More...

#include <touch-point.h>

Collaboration diagram for Dali::TouchPoint:
Collaboration graph
[legend]

Public Types

enum  State {
  Started, Finished, Down = Started, Up = Finished,
  Motion, Leave, Stationary, Interrupted,
  Last
}
 Touch state .0. More...
 

Public Member Functions

 TouchPoint (int id, State state, float screenX, float screenY)
 Constructor. More...
 
 TouchPoint (int id, State state, float screenX, float screenY, float localX, float localY)
 Constructor. More...
 
 ~TouchPoint ()
 Destructor .0. More...
 

Public Attributes

int deviceId
 Each touch point has a unique device ID which specifies the touch device for that point. More...
 
State state
 State of the point. More...
 
Actor hitActor
 The actor that was underneath the touch point. More...
 
Vector2 local
 The co-ordinates relative to the top-left of the hit-actor. More...
 
Vector2 screen
 The co-ordinates relative to the top-left of the screen. More...
 

Detailed Description

A TouchPoint represents a point on the screen that is currently being touched or where touch has stopped.

.0

Definition at line 37 of file touch-point.h.

Member Enumeration Documentation

Touch state .0.

Enumerator
Started 

Touch or hover started.

Finished 

Touch or hover finished.

Down 

Screen touched.

Up 

Touch stopped.

Motion 

Finger dragged or hovered.

Leave 

Leave the boundary of an actor.

Stationary 

No change from last event.

Useful when a multi-point event occurs where all points are sent but indicates that this particular point has not changed since the last time

Interrupted 

A system event has occurred which has interrupted the touch or hover event sequence.

Last 

Number of states.

Definition at line 45 of file touch-point.h.

Constructor & Destructor Documentation

Dali::TouchPoint::TouchPoint ( int  id,
State  state,
float  screenX,
float  screenY 
)

Constructor.

.0

Parameters
[in]idThe touch device ID.
[in]stateThe state.
[in]screenXThe X co-ordinate relative to the screen's origin.
[in]screenYThe Y co-ordinate relative to the screen's origin.

Definition at line 24 of file touch-point.cpp.

Dali::TouchPoint::TouchPoint ( int  id,
State  state,
float  screenX,
float  screenY,
float  localX,
float  localY 
)

Constructor.

.0

Parameters
[in]idThe touch device ID.
[in]stateThe state.
[in]screenXThe X co-ordinate relative to the screen's origin.
[in]screenYThe Y co-ordinate relative to the screen's origin.
[in]localXThe X co-ordinate relative to the top-left (0.0, 0.0, 0.5) of the actor.
[in]localYThe Y co-ordinate relative to the top-left (0.0, 0.0, 0.5) of the actor.

Definition at line 32 of file touch-point.cpp.

Dali::TouchPoint::~TouchPoint ( )

Destructor .0.

Definition at line 40 of file touch-point.cpp.

Member Data Documentation

int Dali::TouchPoint::deviceId
Actor Dali::TouchPoint::hitActor
Vector2 Dali::TouchPoint::local

The co-ordinates relative to the top-left of the hit-actor.

Note
The top-left of an actor is (0.0, 0.0, 0.5).
If you require the local coordinates of another actor (e.g the parent of the hit actor), then you should use Actor::ScreenToLocal().

Definition at line 118 of file touch-point.h.

Referenced by Dali::Internal::anonymous_namespace{hover-event-processor.cpp}::EmitHoverSignals(), Dali::Internal::anonymous_namespace{touch-event-processor.cpp}::EmitTouchSignals(), Dali::Toolkit::Internal::Slider::OnTouchEvent(), Dali::Internal::HoverEventProcessor::ProcessHoverEvent(), Dali::Internal::TouchEventProcessor::ProcessTouchEvent(), UtcDaliHoverNormalProcessing(), and UtcDaliTouchNormalProcessing().

Vector2 Dali::TouchPoint::screen
State Dali::TouchPoint::state

State of the point.

See Also
State

Definition at line 104 of file touch-point.h.

Referenced by Dali::Internal::anonymous_namespace{hover-event-processor.cpp}::EmitHoverSignals(), Dali::Internal::anonymous_namespace{touch-event-processor.cpp}::EmitTouchSignals(), Dali::Toolkit::Internal::Popup::OnBackingTouched(), Dali::Toolkit::Text::Decorator::Impl::OnGrabHandleTouched(), Dali::Toolkit::Text::Decorator::Impl::OnHandleOneTouched(), Dali::Toolkit::Text::Decorator::Impl::OnHandleTwoTouched(), Dali::Toolkit::Internal::KeyboardFocusManager::OnTouched(), Dali::Toolkit::Internal::ItemView::OnTouchEvent(), Dali::Toolkit::Internal::Button::OnTouchEvent(), Dali::Toolkit::Internal::ScrollView::OnTouchEvent(), anonymous_namespace{utc-Dali-TapGestureDetector.cpp}::TouchEventFunctor::operator()(), anonymous_namespace{utc-Dali-LongPressGestureDetector.cpp}::TouchEventFunctor::operator()(), Dali::Internal::HoverEventProcessor::ProcessHoverEvent(), Dali::Internal::TouchEventProcessor::ProcessTouchEvent(), Dali::Internal::Adaptor::TapGestureDetector::SendEvent(), Dali::Internal::Adaptor::LongPressGestureDetector::SendEvent(), Dali::Internal::Adaptor::PinchGestureDetector::SendEvent(), UtcDaliHoverNormalProcessing(), UtcDaliTouchEventCombinerMultiTouchInterrupted(), UtcDaliTouchEventCombinerMultiTouchNormal(), UtcDaliTouchEventCombinerReset(), UtcDaliTouchEventCombinerSingleTouchInterrupted(), UtcDaliTouchEventCombinerSingleTouchMotionFollowedByDown(), UtcDaliTouchEventCombinerSingleTouchMotionWithDifferentId(), UtcDaliTouchEventCombinerSingleTouchMotionWithoutDown(), UtcDaliTouchEventCombinerSingleTouchNormal(), UtcDaliTouchEventCombinerSingleTouchTwoDowns(), UtcDaliTouchEventCombinerSingleTouchTwoUps(), UtcDaliTouchEventCombinerSingleTouchUpWithDifferentId(), and UtcDaliTouchNormalProcessing().


The documentation for this struct was generated from the following files:
Dali Docs Home
Read more about Dali