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.6KB

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