tcMenu
Public Member Functions | List of all members
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

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: