tcMenu
Loading...
Searching...
No Matches
MenuItemTypePredicate Class Reference

#include <MenuIterator.h>

Inheritance diagram for MenuItemTypePredicate:
MenuItemPredicate

Public Member Functions

 MenuItemTypePredicate (MenuType filterType, uint8_t mode=0)
bool matches (MenuItem *item) override

Detailed Description

A specialisation of the MenuItemPredicate that matches on a given MenuType. For example sub menus or boolean menu items. The following modes can be used

  • TM_REGULAR anything matching the filter type
  • TM_INVERTED anything not matching the filter type
  • TM_REGULAR_NOLOCAL regular + local only not set
  • TM_INVERTED_NOLOCAL inverted + local only not set

Constructor & Destructor Documentation

◆ MenuItemTypePredicate()

MenuItemTypePredicate::MenuItemTypePredicate ( MenuType filterType,
uint8_t mode = 0 )
inline

Construct the predicate indicating the type of item to filter on

Parameters
filterTypethe type to filter for

Member Function Documentation

◆ matches()

bool MenuItemTypePredicate::matches ( MenuItem * item)
overridevirtual

This predicate checks if the item matches the type in the constructor.

Parameters
itemthe item to be checked
Returns
true if menu type is of filterType provided in the constructor

Implements MenuItemPredicate.


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