The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

92 lines
2.9KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCER_GLOBALPREFERENCES_H_INCLUDED
  18. #define JUCER_GLOBALPREFERENCES_H_INCLUDED
  19. //==============================================================================
  20. #include "../Project/jucer_DependencyPathPropertyComponent.h"
  21. class GlobalPreferencesTab
  22. {
  23. public:
  24. virtual ~GlobalPreferencesTab() {}
  25. virtual Component* getContent() = 0;
  26. virtual String getName() const noexcept = 0;
  27. };
  28. //==============================================================================
  29. /** This component implements the "Paths" tab in the global preferences window,
  30. which defines the default paths for dependencies like third-party SDKs
  31. for this machine.
  32. */
  33. class PathSettingsTab : public GlobalPreferencesTab,
  34. public Component,
  35. private TextPropertyComponent::Listener
  36. {
  37. public:
  38. PathSettingsTab (DependencyPathOS);
  39. ~PathSettingsTab();
  40. Component* getContent() override;
  41. String getName() const noexcept override;
  42. void resized() override;
  43. private:
  44. void textPropertyComponentChanged (TextPropertyComponent*) override;
  45. Identifier getKeyForPropertyComponent (TextPropertyComponent*) const;
  46. OwnedArray<TextPropertyComponent> pathComponents;
  47. TextPropertyComponent* vst2PathComponent;
  48. TextPropertyComponent* vst3PathComponent;
  49. TextPropertyComponent* rtasPathComponent;
  50. TextPropertyComponent* aaxPathComponent;
  51. TextPropertyComponent* androidSdkPathComponent;
  52. TextPropertyComponent* androidNdkPathComponent;
  53. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PathSettingsTab)
  54. };
  55. //==============================================================================
  56. class GlobalPreferencesComponent : public TabbedComponent
  57. {
  58. public:
  59. GlobalPreferencesComponent();
  60. private:
  61. OwnedArray<GlobalPreferencesTab> preferenceTabs;
  62. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlobalPreferencesComponent)
  63. };
  64. #endif // JUCER_GLOBALPREFERENCES_H_INCLUDED