libsegl/glmenu/menuitem.h

47 lines
973 B
C
Raw Normal View History

#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;
bool usevalue;
2008-03-23 18:00:55 +01:00
bool selectable;
bool novaluecenter;
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);
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);
int getFontSizeAdd();
2008-03-23 18:00:55 +01:00
bool isSelectable();
void greyItem(bool _grey);
void noValueCenter(bool _vc);
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);
};
#endif