Loading...
Searching...
No Matches
juce::ScrollBar::LookAndFeelMethods Struct Referenceabstract

## Detailed Description

This abstract base class is implemented by LookAndFeel classes to provide scrollbar-drawing functionality.

The documentation for this struct was generated from the following file:

- juce_gui_basics/layout/juce_ScrollBar.h

Inheritance diagram for juce::ScrollBar::LookAndFeelMethods:

## Public Member Functions

virtual | ~LookAndFeelMethods ()=default
virtual bool | areScrollbarButtonsVisible ()=0
virtual void | drawScrollbarButton (Graphics &g, ScrollBar &scrollbar, int width, int height, int buttonDirection, bool isScrollbarVertical, bool isMouseOverButton, bool isButtonDown)=0
| Draws one of the buttons on a scrollbar.
virtual void | drawScrollbar (Graphics &g, ScrollBar &scrollbar, int x, int y, int width, int height, bool isScrollbarVertical, int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown)=0
| Draws the thumb area of a scrollbar.
virtual ImageEffectFilter * | getScrollbarEffect ()=0
| Returns the component effect to use for a scrollbar.
virtual int | getMinimumScrollbarThumbSize (ScrollBar &)=0
| Returns the minimum length in pixels to use for a scrollbar thumb.
virtual int | getDefaultScrollbarWidth ()=0
| Returns the default thickness to use for a scrollbar.
virtual int | getScrollbarButtonSize (ScrollBar &)=0
| Returns the length in pixels to use for a scrollbar button.

## Constructors and Destructors

## ~LookAndFeelMethods()

virtual juce::ScrollBar::LookAndFeelMethods::~LookAndFeelMethods | ( |  | ) |

virtual default

## Member Functions

## areScrollbarButtonsVisible()

virtual bool juce::ScrollBar::LookAndFeelMethods::areScrollbarButtonsVisible | ( |  | ) |

pure virtual

Implemented in juce::LookAndFeel_V2, and juce::LookAndFeel_V3.

## drawScrollbarButton()

virtual void juce::ScrollBar::LookAndFeelMethods::drawScrollbarButton | ( | Graphics & | g,
|  | ScrollBar & | scrollbar,
|  | int | width,
|  | int | height,
|  | int | buttonDirection,
|  | bool | isScrollbarVertical,
|  | bool | isMouseOverButton,
|  | bool | isButtonDown )

pure virtual

Draws one of the buttons on a scrollbar.

Parameters

  g | the context to draw into
  scrollbar | the bar itself
  width | the width of the button
  height | the height of the button
  buttonDirection | the direction of the button, where 0 = up, 1 = right, 2 = down, 3 = left
  isScrollbarVertical | true if it's a vertical bar, false if horizontal
  isMouseOverButton | whether the mouse is currently over the button (also true if it's held down)
  isButtonDown | whether the mouse button's held down

Implemented in juce::LookAndFeel_V1, and juce::LookAndFeel_V2.

References juce::ScrollBar::ScrollBar().

## drawScrollbar()

virtual void juce::ScrollBar::LookAndFeelMethods::drawScrollbar | ( | Graphics & | g,
|  | ScrollBar & | scrollbar,
|  | int | x,
|  | int | y,
|  | int | width,
|  | int | height,
|  | bool | isScrollbarVertical,
|  | int | thumbStartPosition,
|  | int | thumbSize,
|  | bool | isMouseOver,
|  | bool | isMouseDown )

pure virtual

Draws the thumb area of a scrollbar.

Parameters

  g | the context to draw into
  scrollbar | the bar itself
  x | the x position of the left edge of the thumb area to draw in
  y | the y position of the top edge of the thumb area to draw in
  width | the width of the thumb area to draw in
  height | the height of the thumb area to draw in
  isScrollbarVertical | true if it's a vertical bar, false if horizontal
  thumbStartPosition | for vertical bars, the y coordinate of the top of the thumb, or its x position for horizontal bars
  thumbSize | for vertical bars, the height of the thumb, or its width for horizontal bars. This may be 0 if the thumb shouldn't be drawn.
  isMouseOver | whether the mouse is over the thumb area, also true if the mouse is currently dragging the thumb
  isMouseDown | whether the mouse is currently dragging the scrollbar

Implemented in juce::LookAndFeel_V1, juce::LookAndFeel_V2, juce::LookAndFeel_V3, and juce::LookAndFeel_V4.

References juce::Component::isMouseOver(), juce::ScrollBar::ScrollBar(), x, and y.

## getScrollbarEffect()

virtual ImageEffectFilter * juce::ScrollBar::LookAndFeelMethods::getScrollbarEffect | ( |  | ) |

pure virtual

Returns the component effect to use for a scrollbar.

Implemented in juce::LookAndFeel_V1, and juce::LookAndFeel_V2.

## getMinimumScrollbarThumbSize()

virtual int juce::ScrollBar::LookAndFeelMethods::getMinimumScrollbarThumbSize | ( | ScrollBar & |  | ) |

pure virtual

Returns the minimum length in pixels to use for a scrollbar thumb.

Implemented in juce::LookAndFeel_V2.

References juce::ScrollBar::ScrollBar().

## getDefaultScrollbarWidth()

virtual int juce::ScrollBar::LookAndFeelMethods::getDefaultScrollbarWidth | ( |  | ) |

pure virtual

Returns the default thickness to use for a scrollbar.

Implemented in juce::LookAndFeel_V2, and juce::LookAndFeel_V4.

## getScrollbarButtonSize()

virtual int juce::ScrollBar::LookAndFeelMethods::getScrollbarButtonSize | ( | ScrollBar & |  | ) |

pure virtual

Returns the length in pixels to use for a scrollbar button.

Implemented in juce::LookAndFeel_V2.

References juce::ScrollBar::ScrollBar().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited