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.

99 lines
4.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. namespace juce
  14. {
  15. //==============================================================================
  16. /**
  17. The original JUCE look-and-feel, as used back from 2002 to about 2007ish.
  18. @see LookAndFeel, LookAndFeel_V2, LookAndFeel_V3
  19. @tags{GUI}
  20. */
  21. class JUCE_API LookAndFeel_V1 : public LookAndFeel_V2
  22. {
  23. public:
  24. LookAndFeel_V1();
  25. ~LookAndFeel_V1() override;
  26. //==============================================================================
  27. void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
  28. bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
  29. void drawToggleButton (Graphics&, ToggleButton&,
  30. bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
  31. void drawTickBox (Graphics&, Component&, float x, float y, float w, float h,
  32. bool ticked, bool isEnabled,
  33. bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
  34. void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
  35. double progress, const String& textToShow) override;
  36. //==============================================================================
  37. void drawScrollbarButton (Graphics&, ScrollBar&, int width, int height,
  38. int buttonDirection, bool isScrollbarVertical,
  39. bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
  40. void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height,
  41. bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
  42. bool isMouseOver, bool isMouseDown) override;
  43. ImageEffectFilter* getScrollbarEffect() override;
  44. //==============================================================================
  45. void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;
  46. //==============================================================================
  47. void drawPopupMenuBackground (Graphics&, int width, int height) override;
  48. void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override;
  49. //==============================================================================
  50. void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
  51. int buttonX, int buttonY, int buttonW, int buttonH, ComboBox&) override;
  52. Font getComboBoxFont (ComboBox&) override;
  53. //==============================================================================
  54. void drawLinearSlider (Graphics&, int x, int y, int width, int height,
  55. float sliderPos, float minSliderPos, float maxSliderPos,
  56. const Slider::SliderStyle, Slider&) override;
  57. int getSliderThumbRadius (Slider&) override;
  58. Button* createSliderButton (Slider&, bool isIncrement) override;
  59. ImageEffectFilter* getSliderEffect (Slider&) override;
  60. //==============================================================================
  61. void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;
  62. Button* createDocumentWindowButton (int buttonType) override;
  63. void positionDocumentWindowButtons (DocumentWindow&,
  64. int titleBarX, int titleBarY, int titleBarW, int titleBarH,
  65. Button* minimiseButton, Button* maximiseButton, Button* closeButton,
  66. bool positionTitleBarButtonsOnLeft) override;
  67. private:
  68. DropShadowEffect scrollbarShadow;
  69. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V1)
  70. };
  71. } // namespace juce