source: molecuilder/src/Menu/TextMenu.hpp@ c2c893

Last change on this file since c2c893 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: 691 bytes
Line 
1/*
2 * TextMenu.h
3 *
4 * Created on: Dec 10, 2009
5 * Author: crueger
6 */
7
8#ifndef TEXTMENU_H_
9#define TEXTMENU_H_
10
11#include <list>
12#include <ostream>
13#include <string>
14
15#include "Menu/Menu.hpp"
16
17class MenuItem;
18
19class TextMenu : public Menu
20{
21public:
22 TextMenu(ostream&,string,char,int);
23 TextMenu(ostream&,string);
24 virtual ~TextMenu();
25
26 virtual void addItem(MenuItem*);
27 virtual void removeItem(MenuItem*);
28 virtual void display();
29
30 virtual void doQuit();
31 virtual bool hasQuit();
32
33protected:
34 virtual void showEntry(MenuItem*);
35
36private:
37 list<MenuItem*> items;
38 ostream& outputter;
39 string title;
40 char spacer;
41 int length;
42
43 bool quit;
44};
45
46#endif /* TEXTMENU_H_ */
Note: See TracBrowser for help on using the repository browser.