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.

105 lines
4.6KB

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