File: menuaction.h

package info (click to toggle)
qonk 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,076 kB
  • ctags: 2,026
  • sloc: cpp: 14,978; sh: 3,464; makefile: 200
file content (35 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// menuaction.h
//
// (c) Robert Schuster, 2007
//
// Licensed under GNU GPL version 2 or, at your option, any later version.

#ifndef MENUACTION_H
#define MENUACTION_H

#include "guichan/guichan.hpp"

/* TODO: Realize all customized behavior with specific MenuEntry subclasses
 * and remove the need for a MenuAction delegate object.
 */
class MenuAction
{
  public:
    virtual gcn::Widget *getWidget(std::string);

    virtual void invoke() = 0;

    virtual void next() { };

    virtual void previous() { };

    virtual void update() { };

    /** Returns true if some operation was cancelled or false if not.
     */ 
    virtual bool cancel() { return false; }
    
    virtual void reset() { }
};

#endif