ItemCommand

Functions

inline MenuItem *ITEM_COMMAND(const char *text, void (*callback)())
class ItemCommand : public BaseItemZeroWidget
#include <ItemCommand.h>

A menu item that executes a callback function when selected.

This class extends the BaseItemZeroWidget class and provides a menu item that executes a callback function when selected. The callback function is provided as a function pointer during construction.

As a BaseItemZeroWidget, this item responds to selection events in the menu system. When the user confirms the selection, handleCommit is triggered, which executes the provided callback.

Public Functions

inline ItemCommand(const char *text, void (*callback)())

Protected Functions

inline virtual void handleCommit(LcdMenu *menu) override

Private Members

void (*callback)()