Audio plugin host https://kx.studio/carla
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.

theme.hpp 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * PatchBay Canvas Themes
  3. * Copyright (C) 2010-2019 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #ifndef CARLA_PATCHBAY_THEME_HPP_INCLUDED
  18. #define CARLA_PATCHBAY_THEME_HPP_INCLUDED
  19. //---------------------------------------------------------------------------------------------------------------------
  20. // Imports (Global)
  21. //---------------------------------------------------------------------------------------------------------------------
  22. // Imports (Custom)
  23. #include "CarlaJuceUtils.hpp"
  24. //---------------------------------------------------------------------------------------------------------------------
  25. class Theme
  26. {
  27. public:
  28. enum PortType {
  29. THEME_PORT_SQUARE,
  30. THEME_PORT_POLYGON
  31. };
  32. enum List {
  33. THEME_MODERN_DARK,
  34. THEME_MODERN_DARK_TINY,
  35. THEME_MODERN_LIGHT,
  36. THEME_CLASSIC_DARK,
  37. THEME_OOSTUDIO,
  38. THEME_MAX
  39. };
  40. enum BackgroundType {
  41. THEME_BG_SOLID,
  42. THEME_BG_GRADIENT
  43. };
  44. Theme(Theme::List idx);
  45. ~Theme();
  46. private:
  47. struct PrivateData;
  48. PrivateData* const self;
  49. CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Theme)
  50. };
  51. //---------------------------------------------------------------------------------------------------------------------
  52. static inline
  53. Theme::List getDefaultTheme()
  54. {
  55. return Theme::THEME_MODERN_DARK;
  56. }
  57. static inline
  58. const char* getDefaultThemeName()
  59. {
  60. return "Modern Dark";
  61. }
  62. static inline
  63. const char* getThemeName(const Theme::List idx)
  64. {
  65. switch (idx)
  66. {
  67. case Theme::THEME_MODERN_DARK:
  68. return "Modern Dark";
  69. case Theme::THEME_MODERN_DARK_TINY:
  70. return "Modern Dark (Tiny)";
  71. case Theme::THEME_MODERN_LIGHT:
  72. return "Modern Light";
  73. case Theme::THEME_CLASSIC_DARK:
  74. return "Classic Dark";
  75. case Theme::THEME_OOSTUDIO:
  76. return "OpenOctave Studio";
  77. default:
  78. return "";
  79. }
  80. }
  81. //---------------------------------------------------------------------------------------------------------------------
  82. #endif // CARLA_PATCHBAY_THEME_HPP_INCLUDED