juce_LookAndFeel_V3.h 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_V3_H_INCLUDED
  18. #define JUCE_LOOKANDFEEL_V3_H_INCLUDED
  19. //==============================================================================
  20. /**
  21. The latest JUCE look-and-feel style, as introduced in 2013.
  22. @see LookAndFeel, LookAndFeel_V1, LookAndFeel_V2
  23. */
  24. class JUCE_API LookAndFeel_V3 : public LookAndFeel_V2
  25. {
  26. public:
  27. LookAndFeel_V3();
  28. ~LookAndFeel_V3();
  29. //==============================================================================
  30. void drawButtonBackground (Graphics&, Button&, const Colour& backgroundColour,
  31. bool isMouseOverButton, bool isButtonDown) override;
  32. void drawTableHeaderBackground (Graphics&, TableHeaderComponent&) override;
  33. void drawTreeviewPlusMinusBox (Graphics&, const Rectangle<float>& area,
  34. Colour backgroundColour, bool isOpen, bool isMouseOver) override;
  35. bool areLinesDrawnForTreeView (TreeView&) override;
  36. int getTreeViewIndentSize (TreeView&) override;
  37. Button* createDocumentWindowButton (int buttonType) override;
  38. void drawComboBox (Graphics&, int width, int height, bool isButtonDown,
  39. int buttonX, int buttonY, int buttonW, int buttonH, ComboBox& box) override;
  40. void drawKeymapChangeButton (Graphics&, int width, int height, Button& button, const String& keyDescription) override;
  41. void drawPopupMenuBackground (Graphics&, int width, int height) override;
  42. void drawMenuBarBackground (Graphics&, int width, int height, bool, MenuBarComponent&) override;
  43. int getTabButtonOverlap (int tabDepth) override;
  44. int getTabButtonSpaceAroundImage() override;
  45. void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override;
  46. void drawTabAreaBehindFrontButton (TabbedButtonBar& bar, Graphics& g, int w, int h) override;
  47. void drawTextEditorOutline (Graphics&, int width, int height, TextEditor&) override;
  48. void drawStretchableLayoutResizerBar (Graphics&, int w, int h, bool isVerticalBar, bool isMouseOver, bool isMouseDragging) override;
  49. bool areScrollbarButtonsVisible() override;
  50. void drawScrollbar (Graphics&, ScrollBar&, int x, int y, int width, int height, bool isScrollbarVertical,
  51. int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown) override;
  52. void drawLinearSlider (Graphics&, int x, int y, int width, int height,
  53. float sliderPos, float minSliderPos, float maxSliderPos,
  54. const Slider::SliderStyle, Slider&) override;
  55. void drawLinearSliderBackground (Graphics&, int x, int y, int width, int height,
  56. float sliderPos, float minSliderPos, float maxSliderPos,
  57. const Slider::SliderStyle, Slider&) override;
  58. void drawConcertinaPanelHeader (Graphics&, const Rectangle<int>& area, bool isMouseOver, bool isMouseDown,
  59. ConcertinaPanel&, Component&) override;
  60. Path getTickShape (float height) override;
  61. Path getCrossShape (float height) override;
  62. static void createTabTextLayout (const TabBarButton& button, float length, float depth, Colour colour, TextLayout&);
  63. private:
  64. Image backgroundTexture;
  65. Colour backgroundTextureBaseColour;
  66. };
  67. #endif // JUCE_LOOKANDFEEL_V3_H_INCLUDED