JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::TouchSurface Class Referenceabstract

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

#include <juce_TouchSurface.h>

Collaboration diagram for juce::TouchSurface:

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...
 
void addListener (Listener *)
 Adds a listener to be called when the surface is touched. More...
 
void callListenersTouchChanged (const TouchSurface::Touch &t)
 Testing feature: this allows you to inject touches onto a touch surface. 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 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.

{Blocks}

Constructor & Destructor Documentation

◆ TouchSurface()

juce::TouchSurface::TouchSurface ( Block )

◆ ~TouchSurface()

virtual juce::TouchSurface::~TouchSurface ( )
virtual

Destructor.

Member Function Documentation

◆ addListener()

void juce::TouchSurface::addListener ( Listener )

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

Referenced by callListenersTouchChanged().

◆ callListenersTouchChanged()

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

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

References addListener(), listeners, removeListener(), and juce::TouchSurface::Listener::touchChanged().

◆ cancelAllActiveTouches()

virtual void juce::TouchSurface::cancelAllActiveTouches ( )
pure virtualnoexcept

Forces a touch-off message for all active touches.

◆ getNumberOfKeywaves()

virtual int juce::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.

◆ removeListener()

void juce::TouchSurface::removeListener ( Listener )

Removes a previously-registered listener.

Referenced by callListenersTouchChanged().

Member Data Documentation

◆ block

Block& juce::TouchSurface::block

The block that owns this touch surface.

◆ listeners

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

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