1 Debian patch touch this file
| 1 | // menuaction.h |
| 2 | // |
| 3 | // (c) Robert Schuster, 2007 |
| 4 | // |
| 5 | // Licensed under GNU GPL version 2 or, at your option, any later version. |
| 6 | |
| 7 | #ifndef MENUACTION_H |
| 8 | #define MENUACTION_H |
| 9 | |
| •10 | #include "guichan.hpp" |
| 11 | |
| 12 | /* TODO: Realize all customized behavior with specific MenuEntry subclasses |
| 13 | * and remove the need for a MenuAction delegate object. |
| 14 | */ |
| 15 | class MenuAction |
| 16 | { |
| 17 | public: |
| 18 | virtual gcn::Widget *getWidget(std::string); |
| 19 | |
| 20 | virtual void invoke() = 0; |
| 21 | |
| 22 | virtual void next() { }; |
| 23 | |
| 24 | virtual void previous() { }; |
| 25 | |
| 26 | virtual void update() { }; |
| 27 | |
| 28 | /** Returns true if some operation was cancelled or false if not. |
| 29 | */ |
| 30 | virtual bool cancel() { return false; } |
| 31 | |
| 32 | virtual void reset() { } |
| 33 | }; |
| 34 | |
| 35 | #endif |