juce_JUCESplashScreen.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 5 End-User License
  8. Agreement and JUCE 5 Privacy Policy (both updated and effective as of the
  9. 27th April 2017).
  10. End User License Agreement: www.juce.com/juce-5-licence
  11. Privacy Policy: www.juce.com/juce-5-privacy-policy
  12. Or: You may also use this code under the terms of the GPL v3 (see
  13. www.gnu.org/licenses).
  14. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  15. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  16. DISCLAIMED.
  17. ==============================================================================
  18. */
  19. /*
  20. ==============================================================================
  21. In accordance with the terms of the JUCE 5 End-Use License Agreement, the
  22. JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
  23. ineffective unless you have a JUCE Indie or Pro license, or are using JUCE
  24. under the GPL v3 license.
  25. End User License Agreement: www.juce.com/juce-5-licence
  26. ==============================================================================
  27. */
  28. // BEGIN SECTION A
  29. namespace juce
  30. {
  31. /**
  32. The standard JUCE splash screen component.
  33. @tags{GUI}
  34. */
  35. class JUCE_API JUCESplashScreen : public Component,
  36. private Timer,
  37. private DeletedAtShutdown
  38. {
  39. public:
  40. JUCESplashScreen (Component& parentToAddTo);
  41. ~JUCESplashScreen() override;
  42. static std::unique_ptr<Drawable> getSplashScreenLogo();
  43. private:
  44. void paint (Graphics&) override;
  45. void timerCallback() override;
  46. void parentSizeChanged() override;
  47. void parentHierarchyChanged() override;
  48. bool hitTest (int, int) override;
  49. void mouseUp (const MouseEvent&) override;
  50. std::unique_ptr<Drawable> content;
  51. CriticalSection appUsageReporting;
  52. ComponentAnimator fader;
  53. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JUCESplashScreen)
  54. };
  55. // END SECTION A
  56. } // namespace juce