Graphics::Touch Class Referenceabstract

#include <Touch.h>

Inheritance diagram for Graphics::Touch:
Collaboration diagram for Graphics::Touch:

Classes

struct  Calibration
 
struct  State
 

Public Types

using Callback = Delegate< void()>
 Callback function. More...
 

Public Member Functions

 Touch (Device *device=nullptr)
 
virtual bool setOrientation (Orientation orientation)
 Set display orientation. More...
 
virtual Size getNativeSize () const =0
 Get physical size of display. More...
 
virtual State getState () const =0
 Get current state. More...
 
virtual void setCallback (Callback callback)
 Register callback to be invoked when state changes. More...
 
Size getSize () const
 Get native dimensions for current orientation. More...
 
Orientation getOrientation ()
 Get current display orientation. More...
 
void setCalibration (const Calibration &cal)
 
Point translate (Point rawPos)
 Translate position into screen co-ordinates. More...
 

Protected Attributes

Devicedevice
 
Orientation orientation {}
 
Calibration calibration
 
Callback callback
 

Member Typedef Documentation

◆ Callback

Callback function.

Constructor & Destructor Documentation

◆ Touch()

Graphics::Touch::Touch ( Device device = nullptr)
inline

Member Function Documentation

◆ getNativeSize()

virtual Size Graphics::Touch::getNativeSize ( ) const
pure virtual

Get physical size of display.

Return values
SizeDimensions for NORMAL orientation

Implemented in Graphics::XPT2046, and Graphics::VirtualTouch.

◆ getOrientation()

Orientation Graphics::Touch::getOrientation ( )
inline

Get current display orientation.

◆ getSize()

Size Graphics::Touch::getSize ( ) const
inline

Get native dimensions for current orientation.

◆ getState()

virtual State Graphics::Touch::getState ( ) const
pure virtual

Get current state.

Implemented in Graphics::XPT2046, and Graphics::VirtualTouch.

◆ setCalibration()

void Graphics::Touch::setCalibration ( const Calibration cal)
inline

◆ setCallback()

virtual void Graphics::Touch::setCallback ( Callback  callback)
inlinevirtual

Register callback to be invoked when state changes.

◆ setOrientation()

virtual bool Graphics::Touch::setOrientation ( Orientation  orientation)
virtual

Set display orientation.

◆ translate()

Point Graphics::Touch::translate ( Point  rawPos)
inline

Translate position into screen co-ordinates.

Member Data Documentation

◆ calibration

Calibration Graphics::Touch::calibration
protected

◆ callback

Callback Graphics::Touch::callback
protected

◆ device

Device* Graphics::Touch::device
protected

◆ orientation

Orientation Graphics::Touch::orientation {}
protected

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