2008-03-08 23:03:26 +01:00
|
|
|
#ifndef __MENUITEM_H
|
|
|
|
#define __MENUITEM_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "../glfontengine.h"
|
|
|
|
#include "../punkt2d.h"
|
|
|
|
|
|
|
|
class MenuItem {
|
|
|
|
protected:
|
|
|
|
std::string caption;
|
|
|
|
std::string value;
|
|
|
|
|
|
|
|
GLFontEngine fontengine;
|
|
|
|
std::string fontname;
|
|
|
|
int fontsizeadd;
|
2008-03-23 18:00:55 +01:00
|
|
|
bool grey;
|
2008-03-08 23:03:26 +01:00
|
|
|
|
|
|
|
bool usevalue;
|
2008-03-23 18:00:55 +01:00
|
|
|
bool selectable;
|
|
|
|
bool novaluecenter;
|
2008-03-08 23:03:26 +01:00
|
|
|
public:
|
|
|
|
MenuItem(std::string);
|
|
|
|
virtual ~MenuItem();
|
|
|
|
|
2008-03-23 18:00:55 +01:00
|
|
|
std::string getValue();
|
|
|
|
std::string getCaption();
|
|
|
|
void setCaption(std::string str);
|
|
|
|
|
2008-03-08 23:03:26 +01:00
|
|
|
virtual void left() { };
|
|
|
|
virtual void right() { };
|
|
|
|
virtual void select() { };
|
2008-03-23 18:00:55 +01:00
|
|
|
virtual void charInput(char c) { };
|
|
|
|
|
2008-03-31 13:00:13 +02:00
|
|
|
virtual int getMaxValueLen();
|
|
|
|
|
|
|
|
bool hasValue();
|
2008-03-23 18:00:55 +01:00
|
|
|
void setFontSizeAdd(int fsa);
|
2008-03-08 23:03:26 +01:00
|
|
|
int getFontSizeAdd();
|
2008-03-23 18:00:55 +01:00
|
|
|
bool isSelectable();
|
|
|
|
void greyItem(bool _grey);
|
|
|
|
void noValueCenter(bool _vc);
|
2008-03-08 23:03:26 +01:00
|
|
|
|
2008-03-31 13:00:13 +02:00
|
|
|
virtual void render(Punkt2D pos, bool center, int basefontsize, int maxwidth, int valuewidth, bool highlight, int caplen, int capvallen, int maxlen);
|
2008-03-08 23:03:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|