skins.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef __SKINS_H
  2. #define __SKINS_H
  3. struct skins {
  4. maudit::glyph a;
  5. maudit::glyph b;
  6. maudit::glyph c;
  7. void set(const maudit::glyph& _a, const maudit::glyph& _b, const maudit::glyph& _c) {
  8. a = _a;
  9. b = _b;
  10. c = _c;
  11. }
  12. const maudit::glyph& operator[](size_t n) const {
  13. switch (n) {
  14. case 2:
  15. return c;
  16. break;
  17. case 1:
  18. return b;
  19. break;
  20. default:
  21. return a;
  22. break;
  23. }
  24. }
  25. };
  26. struct ui_symbol_t {
  27. maudit::glyph circle;
  28. maudit::glyph fill;
  29. maudit::glyph line;
  30. maudit::glyph box_v;
  31. maudit::glyph box_h;
  32. maudit::glyph box_rd;
  33. maudit::glyph box_ru;
  34. maudit::glyph box_ld;
  35. maudit::glyph box_lu;
  36. maudit::glyph arrow_l;
  37. maudit::glyph arrow_r;
  38. maudit::glyph arrow_u;
  39. maudit::glyph arrow_d;
  40. maudit::glyph wspace;
  41. };
  42. struct ui_symbols_t {
  43. skins circle;
  44. skins fill;
  45. skins line;
  46. skins box_v;
  47. skins box_h;
  48. skins box_rd;
  49. skins box_ru;
  50. skins box_ld;
  51. skins box_lu;
  52. skins arrow_l;
  53. skins arrow_r;
  54. skins arrow_u;
  55. skins arrow_d;
  56. skins wspace;
  57. ui_symbol_t operator[](size_t n) const {
  58. return ui_symbol_t{
  59. circle[n], fill[n], line[n], box_v[n], box_h[n], box_rd[n], box_ru[n],
  60. box_ld[n], box_lu[n], arrow_l[n], arrow_r[n], arrow_u[n], arrow_d[n], wspace[n]
  61. };
  62. }
  63. };
  64. #endif