source: molecuilder/src/Menu/MenuItem.hpp@ 7cb300

Last change on this file since 7cb300 was 7cb300, checked in by Frederik Heber <heber@…>, 16 years ago

Changed formating of menus and added protection to keep MenuItems from being added twice. Signed-off-by: Tillmann Crueger <crueger@…>

  • Property mode set to 100644
File size: 607 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
17class MenuItem {
18private:
19 char trigger;
20 string *description;
21 bool added;
22
23public:
24 MenuItem(char,const char*,Menu*);
25 virtual ~MenuItem();
26
27 virtual void doTrigger()=0;
28 virtual void checkTrigger(char);
29
30 virtual const string formatEntry();
31
32 virtual const string getDescription();
33 char getTrigger();
34
35 void add_to_menu(Menu*);
36 bool wasAdded();
37
38protected:
39 void setDescription(string);
40};
41
42#endif /* MENUITEM_H_ */
Note: See TracBrowser for help on using the repository browser.