TouchResponder

class

The TouchReponder handles incoming touch events.

The TouchResponder is an interface that classes and inherit from to receive touch input events. This class also defined global static method used by Mono’s hardware dependend touch system. These static methods receives the touch events and delegates them to all objects in the responder chain.

You can make any object a receiver of touch events if you inherit from this interface. You need to override 3 methods:

  • RespondTouchBegin
  • RespondTouchMove
  • RespondTouchEnd

These methods are called on any subclass when touch input events are received. Note that your subclass will receive all incoming events not handled by other responders.

If you want to make touch enabled graphical elements, you should use the interface ResponderView. This class is the parent class for all touch enabled views.

See
ResponderView
See
ITouchSystem

Public Functions

TouchResponder::TouchResponder()

Create a new responder object that receives touch input.

Upon creation, this object is automatically inserted into the responder chain, to receive touch input events.

void mono::TouchResponder::activate()

Add this responder to the responder chain

void mono::TouchResponder::deactivate()

Remove this responder from the responder chain

Public Static Functions

TouchResponder *TouchResponder::FirstResponder()

Get the top of the responder queue, the first to handle touch.

If there are no objects reponding to touch, this will return NULL