source: molecuilder/src/Menu/DisplayMenuItem.hpp@ ae8b90

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

Added possibility to add default Items to textMenus

  • Property mode set to 100644
File size: 861 bytes
Line 
1/*
2 * DisplayMenuItem.hpp
3 *
4 * Created on: Dec 14, 2009
5 * Author: crueger
6 */
7
8#ifndef DISPLAYMENUITEM_HPP_
9#define DISPLAYMENUITEM_HPP_
10
11#include "Menu/MenuItem.hpp"
12#include "defs.hpp"
13
14class StringView;
15
16/**
17 * Display any kind of StringView within a Menu
18 *
19 * Any trigger are ignored for this type of Item
20 */
21class DisplayMenuItem : public MenuItem
22{
23public:
24 DisplayMenuItem(Menu* _menu, StringView *_view);
25 DisplayMenuItem(Menu* _menu, StringView *_view, string _title,
26 char _spacer=STD_MENU_TITLE_SPACER, int _length=STD_MENU_LENGTH);
27 virtual ~DisplayMenuItem();
28
29 virtual void doTrigger();
30 virtual bool checkTrigger(char);
31
32 virtual const string formatEntry();
33
34 virtual const string getDescription();
35
36private:
37 StringView *view;
38 string title;
39 int length;
40 char spacer;
41};
42
43#endif /* DISPLAYMENUITEM_HPP_ */
Note: See TracBrowser for help on using the repository browser.