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.

158 lines
7.0KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCE_OLDSCHOOLLOOKANDFEEL_JUCEHEADER__
  19. #define __JUCE_OLDSCHOOLLOOKANDFEEL_JUCEHEADER__
  20. //==============================================================================
  21. /**
  22. The original Juce look-and-feel.
  23. */
  24. class JUCE_API OldSchoolLookAndFeel : public LookAndFeel
  25. {
  26. public:
  27. //==============================================================================
  28. /** Creates the default JUCE look and feel. */
  29. OldSchoolLookAndFeel();
  30. /** Destructor. */
  31. virtual ~OldSchoolLookAndFeel();
  32. //==============================================================================
  33. /** Draws the lozenge-shaped background for a standard button. */
  34. virtual void drawButtonBackground (Graphics& g,
  35. Button& button,
  36. const Colour& backgroundColour,
  37. bool isMouseOverButton,
  38. bool isButtonDown);
  39. /** Draws the contents of a standard ToggleButton. */
  40. virtual void drawToggleButton (Graphics& g,
  41. ToggleButton& button,
  42. bool isMouseOverButton,
  43. bool isButtonDown);
  44. virtual void drawTickBox (Graphics& g,
  45. Component& component,
  46. float x, float y, float w, float h,
  47. bool ticked,
  48. bool isEnabled,
  49. bool isMouseOverButton,
  50. bool isButtonDown);
  51. //==============================================================================
  52. virtual void drawProgressBar (Graphics& g, ProgressBar& progressBar,
  53. int width, int height,
  54. double progress, const String& textToShow);
  55. //==============================================================================
  56. virtual void drawScrollbarButton (Graphics& g,
  57. ScrollBar& scrollbar,
  58. int width, int height,
  59. int buttonDirection,
  60. bool isScrollbarVertical,
  61. bool isMouseOverButton,
  62. bool isButtonDown);
  63. virtual void drawScrollbar (Graphics& g,
  64. ScrollBar& scrollbar,
  65. int x, int y,
  66. int width, int height,
  67. bool isScrollbarVertical,
  68. int thumbStartPosition,
  69. int thumbSize,
  70. bool isMouseOver,
  71. bool isMouseDown);
  72. virtual ImageEffectFilter* getScrollbarEffect();
  73. //==============================================================================
  74. virtual void drawTextEditorOutline (Graphics& g,
  75. int width, int height,
  76. TextEditor& textEditor);
  77. //==============================================================================
  78. /** Fills the background of a popup menu component. */
  79. virtual void drawPopupMenuBackground (Graphics& g, int width, int height);
  80. virtual void drawMenuBarBackground (Graphics& g, int width, int height,
  81. bool isMouseOverBar,
  82. MenuBarComponent& menuBar);
  83. //==============================================================================
  84. virtual void drawComboBox (Graphics& g, int width, int height,
  85. bool isButtonDown,
  86. int buttonX, int buttonY,
  87. int buttonW, int buttonH,
  88. ComboBox& box);
  89. virtual Font getComboBoxFont (ComboBox& box);
  90. //==============================================================================
  91. virtual void drawLinearSlider (Graphics& g,
  92. int x, int y,
  93. int width, int height,
  94. float sliderPos,
  95. float minSliderPos,
  96. float maxSliderPos,
  97. const Slider::SliderStyle style,
  98. Slider& slider);
  99. virtual int getSliderThumbRadius (Slider& slider);
  100. virtual Button* createSliderButton (bool isIncrement);
  101. virtual ImageEffectFilter* getSliderEffect();
  102. //==============================================================================
  103. virtual void drawCornerResizer (Graphics& g,
  104. int w, int h,
  105. bool isMouseOver,
  106. bool isMouseDragging);
  107. virtual Button* createDocumentWindowButton (int buttonType);
  108. virtual void positionDocumentWindowButtons (DocumentWindow& window,
  109. int titleBarX, int titleBarY,
  110. int titleBarW, int titleBarH,
  111. Button* minimiseButton,
  112. Button* maximiseButton,
  113. Button* closeButton,
  114. bool positionTitleBarButtonsOnLeft);
  115. private:
  116. //==============================================================================
  117. DropShadowEffect scrollbarShadow;
  118. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OldSchoolLookAndFeel)
  119. };
  120. #endif // __JUCE_OLDSCHOOLLOOKANDFEEL_JUCEHEADER__