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.

juce_LookAndFeel_V1.h 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. #pragma once
  20. //==============================================================================
  21. /**
  22. The original JUCE look-and-feel, as used back from 2002 to about 2007ish.
  23. @see LookAndFeel, LookAndFeel_V2, LookAndFeel_V3
  24. */
  25. class JUCE_API LookAndFeel_V1 : public LookAndFeel_V2
  26. {
  27. public:
  28. LookAndFeel_V1();
  29. ~LookAndFeel_V1();
  30. //==============================================================================
  31. void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
  32. bool isMouseOverButton, bool isButtonDown) override;
  33. void drawToggleButton (Graphics&, ToggleButton&, bool isMouseOverButton, bool isButtonDown) override;
  34. void drawTickBox (Graphics&, Component&, float x, float y, float w, float h,
  35. bool ticked, bool isEnabled, bool isMouseOverButton, bool isButtonDown) override;
  36. void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
  37. double progress, const String& textToShow) override;
  38. //==============================================================================
  39. void drawScrollbarButton (Graphics&, ScrollBar&, int width, int height,
  40. int buttonDirection, bool isScrollbarVertical,
  41. bool isMouseOverButton, bool isButtonDown) override;
  42. void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height,
  43. bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
  44. bool isMouseOver, bool isMouseDown) override;
  45. ImageEffectFilter* getScrollbarEffect() override;
  46. //==============================================================================
  47. void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;
  48. //==============================================================================
  49. void drawPopupMenuBackground (Graphics&, int width, int height) override;
  50. void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override;
  51. //==============================================================================
  52. void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
  53. int buttonX, int buttonY, int buttonW, int buttonH, ComboBox&) override;
  54. Font getComboBoxFont (ComboBox&) override;
  55. //==============================================================================
  56. void drawLinearSlider (Graphics&, int x, int y, int width, int height,
  57. float sliderPos, float minSliderPos, float maxSliderPos,
  58. const Slider::SliderStyle, Slider&) override;
  59. int getSliderThumbRadius (Slider&) override;
  60. Button* createSliderButton (Slider&, bool isIncrement) override;
  61. ImageEffectFilter* getSliderEffect (Slider&) override;
  62. //==============================================================================
  63. void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;
  64. Button* createDocumentWindowButton (int buttonType) override;
  65. void positionDocumentWindowButtons (DocumentWindow&,
  66. int titleBarX, int titleBarY, int titleBarW, int titleBarH,
  67. Button* minimiseButton, Button* maximiseButton, Button* closeButton,
  68. bool positionTitleBarButtonsOnLeft) override;
  69. private:
  70. DropShadowEffect scrollbarShadow;
  71. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V1)
  72. };