juce_LookAndFeel_V1.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCE_LOOKANDFEEL_V1_H_INCLUDED
  18. #define JUCE_LOOKANDFEEL_V1_H_INCLUDED
  19. //==============================================================================
  20. /**
  21. The original JUCE look-and-feel, as used back from 2002 to about 2007ish.
  22. @see LookAndFeel, LookAndFeel_V2, LookAndFeel_V3
  23. */
  24. class JUCE_API LookAndFeel_V1 : public LookAndFeel_V2
  25. {
  26. public:
  27. LookAndFeel_V1();
  28. ~LookAndFeel_V1();
  29. //==============================================================================
  30. void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
  31. bool isMouseOverButton, bool isButtonDown) override;
  32. void drawToggleButton (Graphics&, ToggleButton&, bool isMouseOverButton, bool isButtonDown) override;
  33. void drawTickBox (Graphics&, Component&, float x, float y, float w, float h,
  34. bool ticked, bool isEnabled, bool isMouseOverButton, bool isButtonDown) override;
  35. void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
  36. double progress, const String& textToShow) override;
  37. //==============================================================================
  38. void drawScrollbarButton (Graphics&, ScrollBar&, int width, int height,
  39. int buttonDirection, bool isScrollbarVertical,
  40. bool isMouseOverButton, bool isButtonDown) override;
  41. void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height,
  42. bool isScrollbarVertical, int thumbStartPosition, int thumbSize,
  43. bool isMouseOver, bool isMouseDown) override;
  44. ImageEffectFilter* getScrollbarEffect() override;
  45. //==============================================================================
  46. void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;
  47. //==============================================================================
  48. void drawPopupMenuBackground (Graphics&, int width, int height) override;
  49. void drawMenuBarBackground (Graphics&, int width, int height, bool isMouseOverBar, MenuBarComponent&) override;
  50. //==============================================================================
  51. void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
  52. int buttonX, int buttonY, int buttonW, int buttonH, ComboBox&) override;
  53. Font getComboBoxFont (ComboBox&) override;
  54. //==============================================================================
  55. void drawLinearSlider (Graphics&, int x, int y, int width, int height,
  56. float sliderPos, float minSliderPos, float maxSliderPos,
  57. const Slider::SliderStyle, Slider&) override;
  58. int getSliderThumbRadius (Slider&) override;
  59. Button* createSliderButton (Slider&, bool isIncrement) override;
  60. ImageEffectFilter* getSliderEffect (Slider&) override;
  61. //==============================================================================
  62. void drawCornerResizer (Graphics&, int w, int h, bool isMouseOver, bool isMouseDragging) override;
  63. Button* createDocumentWindowButton (int buttonType) override;
  64. void positionDocumentWindowButtons (DocumentWindow&,
  65. int titleBarX, int titleBarY, int titleBarW, int titleBarH,
  66. Button* minimiseButton, Button* maximiseButton, Button* closeButton,
  67. bool positionTitleBarButtonsOnLeft) override;
  68. private:
  69. DropShadowEffect scrollbarShadow;
  70. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeel_V1)
  71. };
  72. #endif // JUCE_LOOKANDFEEL_V1_H_INCLUDED