Public Member Functions | List of all members
CustomDrawing Class Referenceabstract

#include <BaseRenderers.h>

Inheritance diagram for CustomDrawing:

Public Member Functions

virtual void started (BaseMenuRenderer *currentRenderer)=0
virtual void reset ()=0
virtual void renderLoop (unsigned int currentValue, RenderPressMode userClick)=0

Detailed Description

By implementing this interface, you can take over the screen and handle reset events an OO fashion. Along with being able to take over the display using a drawing function that's called frequently, you can also implement this class and pass it to the renderer instead. It then handles all attempts to take over the display and also the reset callback.

Member Function Documentation

◆ started()

virtual void CustomDrawing::started ( BaseMenuRenderer currentRenderer)
pure virtual

Called when the display is taken over before any calls to renderLoop. You can set up anything you need here.

currentRendererthe renderer object that sent this event.

Implemented in tcextras::TouchScreenCalibrator.

◆ reset()

virtual void CustomDrawing::reset ( )
pure virtual

Called when the menu has become inactive, IE after the idle time out has triggered.

Implemented in tcextras::TouchScreenCalibrator.

◆ renderLoop()

virtual void CustomDrawing::renderLoop ( unsigned int  currentValue,
RenderPressMode  userClick 
pure virtual

After takeOverDisplay is called, you'll first get the started event, then this loop will be called repeatedly, you should check if anything needs painting, and redraw display sections if need be.

currentValuethe current value of the encoder, or simulated encoder.
userClickthe selection state, eg of the select button.

Implemented in tcextras::TouchScreenCalibrator.

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