/* * MenuItem.hpp * * Created on: Dec 10, 2009 * Author: crueger */ #ifndef MENUITEM_HPP_ #define MENUITEM_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include class TxMenu; /** * Base class for all kinds of MenuItems * * This class takes care of checking the triggers and performing appropriate actions. */ class MenuItem { public: MenuItem(char,const std::string &,TxMenu* const); virtual ~MenuItem(); virtual void doTrigger()=0; virtual bool checkTrigger(char); virtual const std::string formatEntry(); virtual const std::string getDescription(); char getTrigger(); void add_to_menu(TxMenu* const); bool wasAdded(); virtual bool isActive() const; private: char trigger; const std::string description; bool added; }; #endif /* MENUITEM_HPP_ */