source: molecuilder/src/Menu/MenuItem.hpp@ 32df34

Last change on this file since 32df34 was da09909, checked in by Tillmann Crueger <crueger@…>, 16 years ago

Improved documentation for menu framework.

  • Property mode set to 100644
File size: 745 bytes
Line 
1/*
2 * MenuItem.h
3 *
4 * Created on: Dec 10, 2009
5 * Author: crueger
6 */
7
8#ifndef MENUITEM_H_
9#define MENUITEM_H_
10
11#include <string>
12
13using namespace std;
14
15class Menu;
16
17/**
18 * Base class for all kinds of MenuItems
19 *
20 * This class takes care of checking the triggers and performing appropriate actions.
21 */
22class MenuItem {
23private:
24 char trigger;
25 string *description;
26 bool added;
27
28public:
29 MenuItem(char,const char*,Menu*);
30 virtual ~MenuItem();
31
32 virtual void doTrigger()=0;
33 virtual void checkTrigger(char);
34
35 virtual const string formatEntry();
36
37 virtual const string getDescription();
38 char getTrigger();
39
40 void add_to_menu(Menu*);
41 bool wasAdded();
42
43protected:
44 void setDescription(string);
45};
46
47#endif /* MENUITEM_H_ */
Note: See TracBrowser for help on using the repository browser.