#include <GfxMenuConfig.h>
Public Member Functions | |
virtual ItemDisplayProperties * | configFor (MenuItem *pItem, ItemDisplayProperties::ComponentType compType)=0 |
virtual ItemDisplayProperties * | configForCurrentSub (ItemDisplayProperties::ComponentType compType)=0 |
virtual DrawableIcon * | iconForMenuItem (uint16_t id)=0 |
virtual GridPositionWithId * | gridPositionForItem (MenuItem *pItem)=0 |
virtual color_t | getSelectedColor (ItemDisplayProperties::ColorType colorType, bool isUnderCursor=false)=0 |
virtual void | addGridPosition (MenuItem *item, const GridPosition &position)=0 |
This factory is responsible for generating all the display configuration settings for the main display, it provides all the grid setting overrides, icons, fonts, padding and colors. This class also provides sensible defaults for when no overrides are present. For GridSettings, it returns null if there is no override, for colors, fonts and padding it checks first by ID, then gets the default if no override exists. be easy to extend by the end user, in order to add additional drawing rules easily. This class will slowly replace the current GfxConfig objects which are quite inflexible.
|
pure virtual |
Returns the configuration for the parameters below, it should never return nullptr.
pItem | the item or null for default |
compType | the component type to get the rendering for |
Implemented in tcgfx::NullItemDisplayPropertiesFactory, and tcgfx::ConfigurableItemDisplayPropertiesFactory.
|
pure virtual |
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.
compType | the type of component to get the rendering for |
Implemented in tcgfx::NullItemDisplayPropertiesFactory, and tcgfx::ConfigurableItemDisplayPropertiesFactory.
|
pure virtual |
Returns the icon associated with the menu item ID, there are two special IDs for the edit and active icons
id | the menu item ID or the special ID for edit or active icon |
Implemented in tcgfx::NullItemDisplayPropertiesFactory, and tcgfx::ConfigurableItemDisplayPropertiesFactory.
|
pure virtual |
Get the grid item for a given position if it is available
pItem | the item to get the grid position for |
Implemented in tcgfx::ConfigurableItemDisplayPropertiesFactory, and tcgfx::NullItemDisplayPropertiesFactory.
|
pure virtual |
Get the selected color for a given palette entry
colorType |
Implemented in tcgfx::NullItemDisplayPropertiesFactory, and tcgfx::ConfigurableItemDisplayPropertiesFactory.
|
pure virtual |
add a new grid position for a given menu item
item | the menu item the position is for |
position | the position to record |
Implemented in tcgfx::ConfigurableItemDisplayPropertiesFactory, and tcgfx::NullItemDisplayPropertiesFactory.