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.

81 lines
2.5KB

  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 PROJUCER_EULADIALOGUE_H_INCLUDED
  18. #define PROJUCER_EULADIALOGUE_H_INCLUDED
  19. class EULADialogue : public AlertWindow
  20. {
  21. public:
  22. EULADialogue()
  23. : AlertWindow ("End User Licence Agreement",
  24. "Please accept the End User Licence Agreement to run the Projucer.",
  25. AlertWindow::NoIcon,
  26. nullptr)
  27. {
  28. setColour (AlertWindow::backgroundColourId, ProjucerDialogLookAndFeel::getBackgroundColour());
  29. setColour (AlertWindow::textColourId, ProjucerDialogLookAndFeel::getBrightButtonColour());
  30. setLookAndFeel (&lookAndFeel);
  31. addButton ("Accept", EULADialogue::accepted);
  32. addButton ("Decline", EULADialogue::declined);
  33. addCustomComponent (&component);
  34. }
  35. enum EULADialogueResult
  36. {
  37. accepted,
  38. declined
  39. };
  40. private:
  41. struct EULADialogueComponent : public Component
  42. {
  43. EULADialogueComponent()
  44. {
  45. setSize (700, 550);
  46. editor.setSize (getWidth(), getHeight() - 50);
  47. editor.setReadOnly (true);
  48. editor.setCaretVisible (false);
  49. editor.setMultiLine (true, true);
  50. editor.setScrollbarsShown (true);
  51. editor.setFont (Font (Font::getDefaultMonospacedFontName(), 13.0f, Font::plain));
  52. editor.setText (String (BinaryData::projucer_EULA_txt));
  53. addAndMakeVisible (editor);
  54. }
  55. TextEditor editor;
  56. };
  57. EULADialogueComponent component;
  58. ProjucerDialogLookAndFeel lookAndFeel;
  59. };
  60. #endif // PROJUCER_EULADIALOGUE_H_INCLUDED