tcMenu
Public Member Functions | List of all members
ResetCallbackFunctionCustomDraw Class Reference

#include <BaseRenderers.h>

Inheritance diagram for ResetCallbackFunctionCustomDraw:
CustomDrawing

Public Member Functions

 ResetCallbackFunctionCustomDraw (ResetCallbackFn fn)
 
void started (BaseMenuRenderer *) override
 
void reset () override
 
void renderLoop (unsigned int, RenderPressMode) override
 

Detailed Description

This class provides the reset callback in a functional way without the need for custom drawing class. It simply calls the provided reset function on reset.

Member Function Documentation

◆ started()

void ResetCallbackFunctionCustomDraw::started ( BaseMenuRenderer currentRenderer)
inlineoverridevirtual

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

Parameters
currentRendererthe renderer object that sent this event.

Implements CustomDrawing.

◆ reset()

void ResetCallbackFunctionCustomDraw::reset ( )
inlineoverridevirtual

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

Implements CustomDrawing.

◆ renderLoop()

void ResetCallbackFunctionCustomDraw::renderLoop ( unsigned int  currentValue,
RenderPressMode  userClick 
)
inlineoverridevirtual

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.

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

Implements CustomDrawing.


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