tcMenu
Loading...
Searching...
No Matches
tcgfx::NullItemDisplayPropertiesFactory Class Reference

#include <GfxMenuConfig.h>

Inheritance diagram for tcgfx::NullItemDisplayPropertiesFactory:
tcgfx::ItemDisplayPropertiesFactory

Public Member Functions

ItemDisplayPropertiesconfigFor (MenuItem *pItem, ItemDisplayProperties::ComponentType) override
ItemDisplayPropertiesconfigForCurrentSub (ItemDisplayProperties::ComponentType) override
DrawableIconiconForMenuItem (uint16_t) override
color_t getSelectedColor (ItemDisplayProperties::ColorType colorType, bool=false) override
GridPositionWithIdgridPositionForItem (MenuItem *pItem) override
void addGridPosition (MenuItem *pItem, const GridPosition &position) override

Detailed Description

Used by the BaseGraphicalRenderer class to work out how to draw an item, which grid position it is in etc. This version does not implement icons, nor does it implement overriding of display properties, it is intended for LCDs.

This is used by non graphical displays to allow grid configurations while not providing the complex support for display properties at different levels. This makes the class much simpler and should use far less memory on devices.

Member Function Documentation

◆ configFor()

ItemDisplayProperties * tcgfx::NullItemDisplayPropertiesFactory::configFor ( MenuItem * pItem,
ItemDisplayProperties::ComponentType compType )
inlineoverridevirtual

Returns the configuration for the parameters below, it should never return nullptr.

Parameters
pItemthe item or null for default
compTypethe component type to get the rendering for
Returns
the properties for a given component.

Implements tcgfx::ItemDisplayPropertiesFactory.

◆ configForCurrentSub()

ItemDisplayProperties * tcgfx::NullItemDisplayPropertiesFactory::configForCurrentSub ( ItemDisplayProperties::ComponentType compType)
inlineoverridevirtual

Returns the configuration for the parameters below, it should never return nullptr, but the difference to configFor is that this version will not check at the item level so is safe when there are overrides at both the item and the sub level.

Parameters
compTypethe type of component to get the rendering for
Returns
the properties for the given component.

Implements tcgfx::ItemDisplayPropertiesFactory.

◆ iconForMenuItem()

DrawableIcon * tcgfx::NullItemDisplayPropertiesFactory::iconForMenuItem ( uint16_t id)
inlineoverridevirtual

Returns the icon associated with the menu item ID, there are two special IDs for the edit and active icons

Parameters
idthe menu item ID or the special ID for edit or active icon
Returns
the icon or nullptr if not available

Implements tcgfx::ItemDisplayPropertiesFactory.

◆ getSelectedColor()

color_t tcgfx::NullItemDisplayPropertiesFactory::getSelectedColor ( ItemDisplayProperties::ColorType colorType,
bool isUnderCursor = false )
inlineoverridevirtual

Get the selected color for a given palette entry

Parameters
colorType
Returns

Implements tcgfx::ItemDisplayPropertiesFactory.

◆ gridPositionForItem()

GridPositionWithId * tcgfx::NullItemDisplayPropertiesFactory::gridPositionForItem ( MenuItem * pItem)
inlineoverridevirtual

Get the grid item for a given position if it is available

Parameters
pItemthe item to get the grid position for
Returns
the grid position if available

Implements tcgfx::ItemDisplayPropertiesFactory.

◆ addGridPosition()

void tcgfx::NullItemDisplayPropertiesFactory::addGridPosition ( MenuItem * item,
const GridPosition & position )
inlineoverridevirtual

add a new grid position for a given menu item

Parameters
itemthe menu item the position is for
positionthe position to record

Implements tcgfx::ItemDisplayPropertiesFactory.


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