tcMenu
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
MenuRenderer Class Referenceabstract

#include <BaseRenderers.h>

Inheritance diagram for MenuRenderer:
BaseMenuRenderer NoRenderer tcgfx::BaseGraphicalRenderer tcgfx::GraphicsDeviceRenderer

Public Member Functions

 MenuRenderer (RendererType rendererType, int bufferSize)
 
virtual void initialise ()=0
 
virtual bool tryTakeSelectIfNeeded (int currentReading, RenderPressMode press)=0
 
virtual BaseDialoggetDialog ()=0
 
virtual ~MenuRenderer ()
 
char * getBuffer ()
 
uint8_t getBufferSize ()
 
RendererType getRendererType ()
 

Static Public Member Functions

static MenuRenderergetInstance ()
 

Protected Attributes

char * buffer
 
uint8_t bufferSize
 
RendererType rendererType
 

Static Protected Attributes

static MenuRenderertheInstance = nullptr
 

Detailed Description

Each display must have a renderer, even if it is the NoRenderer, the NoRenderer is for situations where the control is performed exclusively by a remote device.

Constructor & Destructor Documentation

◆ ~MenuRenderer()

virtual MenuRenderer::~MenuRenderer ( )
inlinevirtual

virtual destructor is required by the language

Member Function Documentation

◆ initialise()

virtual void MenuRenderer::initialise ( )
pure virtual

This is called when the menu manager is created, to let the display perform one off tasks to prepare the display for use

Implemented in tcgfx::BaseGraphicalRenderer, BaseMenuRenderer, and NoRenderer.

◆ tryTakeSelectIfNeeded()

virtual bool MenuRenderer::tryTakeSelectIfNeeded ( int  currentReading,
RenderPressMode  press 
)
pure virtual

Allows the select key to be overriden for situations such as dialogs and other special cases.

Parameters
heldtrue when the select was held down.
Returns
true to indicate we consumed the event, otherwise false.

Implemented in NoRenderer, and BaseMenuRenderer.

◆ getDialog()

virtual BaseDialog* MenuRenderer::getDialog ( )
pure virtual

Gets the dialog instance that is associated with this renderer or NULL if this renderer cannot display dialogs (only NoRenderer case).

Implemented in tcgfx::BaseGraphicalRenderer, and NoRenderer.

◆ getBuffer()

char* MenuRenderer::getBuffer ( )
inline

Gets the buffer that is used internally for render buffering.

◆ getBufferSize()

uint8_t MenuRenderer::getBufferSize ( )
inline

Gets the buffer size of the buffer

◆ getRendererType()

RendererType MenuRenderer::getRendererType ( )
inline

Returns if this is a no display type renderer or a base renderer type.


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