Classes | Public Member Functions | Public Attributes | Protected Attributes | List of all members
TouchSurface Class Referenceabstract

Represents the touch surface of a BLOCKS device. More...

Classes

struct  Listener
 Receives callbacks when a touch moves or changes pressure. More...
 
struct  Touch
 Structure used to describe touch properties. More...
 

Public Member Functions

 TouchSurface (Block &)
 
virtual ~TouchSurface ()
 Destructor. More...
 
virtual void cancelAllActiveTouches () noexcept=0
 Forces a touch-off message for all active touches. More...
 
virtual int getNumberOfKeywaves () const =0
 For the on-screen seaboard view, this will return the number of keys. More...
 
void callListenersTouchChanged (const TouchSurface::Touch &t)
 Testing feature: this allows you to inject touches onto a touch surface. More...
 
void addListener (Listener *)
 Adds a listener to be called when the surface is touched. More...
 
void removeListener (Listener *)
 Removes a previously-registered listener. More...
 

Public Attributes

Blockblock
 The block that owns this touch surface. More...
 

Protected Attributes

juce::ListenerList< Listenerlisteners
 

Detailed Description

Represents the touch surface of a BLOCKS device.

Constructor & Destructor Documentation

◆ TouchSurface()

TouchSurface::TouchSurface ( Block )

◆ ~TouchSurface()

virtual TouchSurface::~TouchSurface ( )
virtual

Destructor.

Member Function Documentation

◆ cancelAllActiveTouches()

virtual void TouchSurface::cancelAllActiveTouches ( )
pure virtualnoexcept

Forces a touch-off message for all active touches.

◆ getNumberOfKeywaves()

virtual int TouchSurface::getNumberOfKeywaves ( ) const
pure virtual

For the on-screen seaboard view, this will return the number of keys.

For other types of touch-surface, it will return 0.

◆ callListenersTouchChanged()

void TouchSurface::callListenersTouchChanged ( const TouchSurface::Touch t)

Testing feature: this allows you to inject touches onto a touch surface.

References listeners, and TouchSurface::Listener::touchChanged().

◆ addListener()

void TouchSurface::addListener ( Listener )

Adds a listener to be called when the surface is touched.

◆ removeListener()

void TouchSurface::removeListener ( Listener )

Removes a previously-registered listener.

Member Data Documentation

◆ block

Block& TouchSurface::block

The block that owns this touch surface.

◆ listeners

juce::ListenerList<Listener> TouchSurface::listeners
protected

The documentation for this class was generated from the following file: