Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

menuitem.h 1012B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef __MENUITEM_H
  2. #define __MENUITEM_H
  3. #include <string>
  4. #include "../glfontengine.h"
  5. #include "../punkt2d.h"
  6. namespace segl {
  7. class MenuItem {
  8. protected:
  9. std::string caption;
  10. std::string value;
  11. GLFontEngine fontengine;
  12. std::string fontname;
  13. int fontsizeadd;
  14. bool grey;
  15. bool usevalue;
  16. bool selectable;
  17. bool novaluecenter;
  18. public:
  19. MenuItem(std::string);
  20. virtual ~MenuItem();
  21. std::string getValue();
  22. std::string getCaption();
  23. void setCaption(std::string str);
  24. virtual void left() { };
  25. virtual void right() { };
  26. virtual void select() { };
  27. virtual void charInput(char c) { };
  28. virtual int getMaxValueLen();
  29. bool hasValue();
  30. void setFontSizeAdd(int fsa);
  31. int getFontSizeAdd();
  32. bool isSelectable();
  33. void greyItem(bool _grey);
  34. void noValueCenter(bool _vc);
  35. virtual void render(Punkt2D pos, bool center, int basefontsize, int maxwidth, int valuewidth, bool highlight, int caplen, int capvallen, int maxlen);
  36. };
  37. } // namespace segl
  38. #endif