Video display and composing engine for JUCE
Loading...
Searching...
No Matches
LevelMeter::LookAndFeelMethods Class Referenceabstract

These methods define a interface for the LookAndFeel class of juce. More...

#include <LevelMeter.h>

+ Inheritance diagram for LevelMeter::LookAndFeelMethods:

Public Member Functions

virtual ~LookAndFeelMethods ()
 
virtual void setupDefaultMeterColours ()=0
 Define your default colours in this callback.
 
virtual void updateMeterGradients ()=0
 Call this to create the cached ColourGradients after changing colours of the meter gradients.
 
virtual juce::Rectangle< float > getMeterInnerBounds (juce::Rectangle< float > bounds, MeterFlags meterType) const =0
 Override this to change the inner rectangle in case you want to paint a border e.g.
 
virtual juce::Rectangle< float > getMeterBounds (juce::Rectangle< float > bounds, MeterFlags meterType, int numChannels, int channel) const =0
 Override this callback to define the placement of a meter channel.
 
virtual juce::Rectangle< float > getMeterBarBounds (juce::Rectangle< float > bounds, MeterFlags meterType) const =0
 Override this callback to define the placement of the actual meter bar.
 
virtual juce::Rectangle< float > getMeterTickmarksBounds (juce::Rectangle< float > bounds, MeterFlags meterType) const =0
 Override this callback to define the placement of the tickmarks.
 
virtual juce::Rectangle< float > getMeterClipIndicatorBounds (juce::Rectangle< float > bounds, MeterFlags meterType) const =0
 Override this callback to define the placement of the clip indicator light.
 
virtual juce::Rectangle< float > drawBackground (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds)=0
 Override this to draw background and if wanted a frame.
 
virtual void drawMeterBars (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds, const LevelMeterSource *source, int fixedNumChannels=-1, int selectedChannel=-1)=0
 This is called to draw the actual numbers and bars on top of the static background.
 
virtual void drawMeterBarsBackground (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds, int numChannels, int fixedNumChannels=-1)=0
 This draws the static background of the whole level meter group with all channels.
 
virtual void drawMeterChannel (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds, const LevelMeterSource *source, int selectedChannel)=0
 This draws a group of informations representing one channel.
 
virtual void drawMeterChannelBackground (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds)=0
 This draws the static backgrounds representing one channel.
 
virtual void drawMeterBar (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds, float rms, const float peak)=0
 This callback draws the actual level bar.
 
virtual void drawMeterReduction (juce::Graphics &g, foleys::LevelMeter::MeterFlags meterType, juce::Rectangle< float > bounds, float reduction)=0
 This callback draws an reduction from top.
 
virtual void drawMeterBarBackground (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds)=0
 This draws the background for the actual level bar.
 
virtual void drawTickMarks (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds)=0
 This draws the tickmarks for the level scale.
 
virtual void drawClipIndicator (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds, bool hasClipped)=0
 This callback draws the clip indicator.
 
virtual void drawClipIndicatorBackground (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds)=0
 This draws the background for the clip indicator LED.
 
virtual juce::Rectangle< float > getMeterMaxNumberBounds (juce::Rectangle< float > bounds, MeterFlags meterType) const =0
 Override this callback to define the placement of the max level.
 
virtual void drawMaxNumber (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds, float maxGain)=0
 This callback draws the number of maximum level.
 
virtual void drawMaxNumberBackground (juce::Graphics &, MeterFlags meterType, juce::Rectangle< float > bounds)=0
 This draws the background for the maximum level display.
 
virtual int hitTestClipIndicator (juce::Point< int > position, MeterFlags meterType, juce::Rectangle< float > bounds, const LevelMeterSource *source) const =0
 This is called by the frontend to check, if the clip indicator was clicked (e.g.
 
virtual int hitTestMaxNumber (juce::Point< int > position, MeterFlags meterType, juce::Rectangle< float > bounds, const LevelMeterSource *source) const =0
 This is called by the frontend to check, if the maximum level number was clicked (e.g.
 

Detailed Description

These methods define a interface for the LookAndFeel class of juce.

The LevelMeter needs a LookAndFeel, that implements these methods. There is a default implementation to be included in your custom LookAndFeel class,

See also
LookAndFeelMethods.h

Constructor & Destructor Documentation

◆ ~LookAndFeelMethods()

virtual ~LookAndFeelMethods ( )
virtual

Member Function Documentation

◆ setupDefaultMeterColours()

virtual void setupDefaultMeterColours ( )
pure virtual

Define your default colours in this callback.

Referenced by LevelMeterLookAndFeel::LevelMeterLookAndFeel().

◆ updateMeterGradients()

virtual void updateMeterGradients ( )
pure virtual

Call this to create the cached ColourGradients after changing colours of the meter gradients.

Referenced by LevelMeter::resized().

◆ getMeterInnerBounds()

virtual juce::Rectangle< float > getMeterInnerBounds ( juce::Rectangle< float >  bounds,
MeterFlags  meterType 
) const
pure virtual

Override this to change the inner rectangle in case you want to paint a border e.g.

Referenced by LevelMeter::mouseDown().

◆ getMeterBounds()

virtual juce::Rectangle< float > getMeterBounds ( juce::Rectangle< float >  bounds,
MeterFlags  meterType,
int  numChannels,
int  channel 
) const
pure virtual

Override this callback to define the placement of a meter channel.

◆ getMeterBarBounds()

virtual juce::Rectangle< float > getMeterBarBounds ( juce::Rectangle< float >  bounds,
MeterFlags  meterType 
) const
pure virtual

Override this callback to define the placement of the actual meter bar.

◆ getMeterTickmarksBounds()

virtual juce::Rectangle< float > getMeterTickmarksBounds ( juce::Rectangle< float >  bounds,
MeterFlags  meterType 
) const
pure virtual

Override this callback to define the placement of the tickmarks.

To disable this feature return an empty rectangle.

◆ getMeterClipIndicatorBounds()

virtual juce::Rectangle< float > getMeterClipIndicatorBounds ( juce::Rectangle< float >  bounds,
MeterFlags  meterType 
) const
pure virtual

Override this callback to define the placement of the clip indicator light.

To disable this feature return an empty rectangle.

◆ drawBackground()

virtual juce::Rectangle< float > drawBackground ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds 
)
pure virtual

Override this to draw background and if wanted a frame.

If the frame takes space away, it should return the reduced bounds

Referenced by LevelMeter::paint().

◆ drawMeterBars()

virtual void drawMeterBars ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
const LevelMeterSource source,
int  fixedNumChannels = -1,
int  selectedChannel = -1 
)
pure virtual

This is called to draw the actual numbers and bars on top of the static background.

Referenced by LevelMeter::paint().

◆ drawMeterBarsBackground()

virtual void drawMeterBarsBackground ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
int  numChannels,
int  fixedNumChannels = -1 
)
pure virtual

This draws the static background of the whole level meter group with all channels.

Referenced by LevelMeter::paint().

◆ drawMeterChannel()

virtual void drawMeterChannel ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
const LevelMeterSource source,
int  selectedChannel 
)
pure virtual

This draws a group of informations representing one channel.

◆ drawMeterChannelBackground()

virtual void drawMeterChannelBackground ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds 
)
pure virtual

This draws the static backgrounds representing one channel.

◆ drawMeterBar()

virtual void drawMeterBar ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
float  rms,
const float  peak 
)
pure virtual

This callback draws the actual level bar.

The background has an extra callback

◆ drawMeterReduction()

virtual void drawMeterReduction ( juce::Graphics &  g,
foleys::LevelMeter::MeterFlags  meterType,
juce::Rectangle< float >  bounds,
float  reduction 
)
pure virtual

This callback draws an reduction from top.

Only triggered, if a reduction < 1.0 is set in the LevelMeterSource

◆ drawMeterBarBackground()

virtual void drawMeterBarBackground ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds 
)
pure virtual

This draws the background for the actual level bar.

◆ drawTickMarks()

virtual void drawTickMarks ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds 
)
pure virtual

This draws the tickmarks for the level scale.

It is painted on the static background

◆ drawClipIndicator()

virtual void drawClipIndicator ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
bool  hasClipped 
)
pure virtual

This callback draws the clip indicator.

The background has an extra callback

◆ drawClipIndicatorBackground()

virtual void drawClipIndicatorBackground ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds 
)
pure virtual

This draws the background for the clip indicator LED.

◆ getMeterMaxNumberBounds()

virtual juce::Rectangle< float > getMeterMaxNumberBounds ( juce::Rectangle< float >  bounds,
MeterFlags  meterType 
) const
pure virtual

Override this callback to define the placement of the max level.

To disable this feature return an empty rectangle.

◆ drawMaxNumber()

virtual void drawMaxNumber ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
float  maxGain 
)
pure virtual

This callback draws the number of maximum level.

The background has an extra callback

◆ drawMaxNumberBackground()

virtual void drawMaxNumberBackground ( juce::Graphics &  ,
MeterFlags  meterType,
juce::Rectangle< float >  bounds 
)
pure virtual

This draws the background for the maximum level display.

◆ hitTestClipIndicator()

virtual int hitTestClipIndicator ( juce::Point< int >  position,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
const LevelMeterSource source 
) const
pure virtual

This is called by the frontend to check, if the clip indicator was clicked (e.g.

for reset)

Referenced by LevelMeter::mouseDown().

◆ hitTestMaxNumber()

virtual int hitTestMaxNumber ( juce::Point< int >  position,
MeterFlags  meterType,
juce::Rectangle< float >  bounds,
const LevelMeterSource source 
) const
pure virtual

This is called by the frontend to check, if the maximum level number was clicked (e.g.

for reset)

Referenced by LevelMeter::mouseDown().


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