Graphics::Touch Class Referenceabstract

#include <Touch.h>

Inheritance diagram for Graphics::Touch:
[legend]
Collaboration diagram for Graphics::Touch:
[legend]

Classes

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...
 

Protected Attributes

Devicedevice
 
Orientation orientation {}
 
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.

◆ 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.

◆ 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.

Member Data Documentation

◆ 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: