openshot-audio
0.1.7
|
#include <juce_ProgressBar.h>
Classes | |
struct | LookAndFeelMethods |
Public Types | |
enum | ColourIds { backgroundColourId = 0x1001900, foregroundColourId = 0x1001a00 } |
Public Member Functions | |
ProgressBar (double &progress) | |
~ProgressBar () | |
void | setPercentageDisplay (bool shouldDisplayPercentage) |
void | setTextToDisplay (const String &text) |
Protected Member Functions | |
void | paint (Graphics &) override |
void | lookAndFeelChanged () override |
void | visibilityChanged () override |
void | colourChanged () override |
A progress bar component.
To use this, just create one and make it visible. It'll run its own timer to keep an eye on a variable that you give it, and will automatically redraw itself when the variable changes.
For an easy way of running a background task with a dialog box showing its progress, see the ThreadWithProgressWindow class.
A set of colour IDs to use to change the colour of various aspects of the bar.
These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() methods.
Enumerator | |
---|---|
backgroundColourId |
The background colour, behind the bar. |
foregroundColourId |
The colour to use to draw the bar itself. LookAndFeel classes will probably use variations on this colour. |
|
explicit |
Creates a ProgressBar.
progress | pass in a reference to a double that you're going to update with your task's progress. The ProgressBar will monitor the value of this variable and will redraw itself when the value changes. The range is from 0 to 1.0. Obviously you'd better be careful not to delete this variable while the ProgressBar still exists! |
ProgressBar::~ProgressBar | ( | ) |
Destructor.
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
void ProgressBar::setPercentageDisplay | ( | bool | shouldDisplayPercentage | ) |
Turns the percentage display on or off.
By default this is on, and the progress bar will display a text string showing its current percentage.
Gives the progress bar a string to display inside it.
If you call this, it will turn off the percentage display.
|
overrideprotected |