ff_meters
Add meter components to visualise AudioBuffers
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Groups Pages
Public Member Functions | List of all members
foleys::LevelMeter::LookAndFeelMethods Class Referenceabstract

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

+ Inheritance diagram for foleys::LevelMeter::LookAndFeelMethods:

Public Member Functions

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

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

virtual foleys::LevelMeter::LookAndFeelMethods::~LookAndFeelMethods ( )
virtual

Member Function Documentation

virtual void foleys::LevelMeter::LookAndFeelMethods::setupDefaultMeterColours ( )
pure virtual

Define your default colours in this callback.

Implemented in foleys::LevelMeterLookAndFeel.

virtual void foleys::LevelMeter::LookAndFeelMethods::updateMeterGradients ( )
pure virtual

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

Implemented in foleys::LevelMeterLookAndFeel.

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

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

Implemented in foleys::LevelMeterLookAndFeel.

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

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

Implemented in foleys::LevelMeterLookAndFeel.

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

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

Implemented in foleys::LevelMeterLookAndFeel.

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

Override this callback to define the placement of the tickmarks.

To disable this feature return an empty rectangle.

Implemented in foleys::LevelMeterLookAndFeel.

virtual juce::Rectangle<float> foleys::LevelMeter::LookAndFeelMethods::getMeterClipIndicatorBounds ( const juce::Rectangle< float >  bounds,
const 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.

Implemented in foleys::LevelMeterLookAndFeel.

virtual juce::Rectangle<float> foleys::LevelMeter::LookAndFeelMethods::drawBackground ( juce::Graphics &  ,
const MeterFlags  meterType,
const 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

Implemented in foleys::LevelMeterLookAndFeel.

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

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

Implemented in foleys::LevelMeterLookAndFeel.

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

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

Implemented in foleys::LevelMeterLookAndFeel.

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

This draws a group of informations representing one channel.

Implemented in foleys::LevelMeterLookAndFeel.

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

This draws the static backgrounds representing one channel.

Implemented in foleys::LevelMeterLookAndFeel.

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

This callback draws the actual level bar.

The background has an extra callback

Implemented in foleys::LevelMeterLookAndFeel.

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

This callback draws an reduction from top.

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

Implemented in foleys::LevelMeterLookAndFeel.

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

This draws the background for the actual level bar.

Implemented in foleys::LevelMeterLookAndFeel.

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

This draws the tickmarks for the level scale.

It is painted on the static background

Implemented in foleys::LevelMeterLookAndFeel.

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

This callback draws the clip indicator.

The background has an extra callback

Implemented in foleys::LevelMeterLookAndFeel.

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

This draws the background for the clip indicator LED.

Implemented in foleys::LevelMeterLookAndFeel.

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

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

To disable this feature return an empty rectangle.

Implemented in foleys::LevelMeterLookAndFeel.

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

This callback draws the number of maximum level.

The background has an extra callback

Implemented in foleys::LevelMeterLookAndFeel.

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

This draws the background for the maximum level display.

Implemented in foleys::LevelMeterLookAndFeel.

virtual int foleys::LevelMeter::LookAndFeelMethods::hitTestClipIndicator ( const juce::Point< int >  position,
const MeterFlags  meterType,
const 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)

Implemented in foleys::LevelMeterLookAndFeel.

virtual int foleys::LevelMeter::LookAndFeelMethods::hitTestMaxNumber ( const juce::Point< int >  position,
const MeterFlags  meterType,
const 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)

Implemented in foleys::LevelMeterLookAndFeel.


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