#include <MenuCallBack.h>
Public Methods | |
| virtual const char* | action (const String &answer)=0 |
NAME: MenuCallBack - base class for callback functors
DESCRIPTION:
If the programmer of a menu (class "MenuSystem") wants to issue callbacks, a functor is used. A functor class derived from class "MenuCallBack" containing the virtual function "action" has then to be implemented.
|
|
This function may return a string. If no return is necessary one can simply return the "NULL" pointer. In other cases the returned string may contain (error) messages that are to be displayed by the menu system. It is advantageous to let the class derived from "MenuCallBack" have a reference to the class that operates the menu since then it will be easy for the "action" function to access various data to be filled by the menu. |