98 void setPercentageDisplay (
bool shouldDisplayPercentage);
105 void setTextToDisplay (
const String& text);
132 Style getResolvedStyle()
const;
144 backgroundColourId = 0x1001900,
145 foregroundColourId = 0x1001a00,
168 double progress,
const String& textToShow) = 0;
170 virtual bool isProgressBarOpaque (
ProgressBar&) = 0;
187 void lookAndFeelChanged()
override;
189 void visibilityChanged()
override;
191 void colourChanged()
override;
196 double currentValue {
jlimit (0.0, 1.0, progress) };
197 bool displayPercentage {
true };
198 String displayedMessage, currentMessage;
199 uint32 lastCallbackTime { 0 };
201 void timerCallback()
override;
The base class for all JUCE user-interface objects.
A graphics context, used for drawing a component or image.
A progress bar component.
~ProgressBar() override=default
Destructor.
ColourIds
A set of colour IDs to use to change the colour of various aspects of the bar.
Style
The types of ProgressBar styles available.
std::optional< Style > getStyle() const
Returns the progress bar's current style, as set in the constructor or in setStyle().
Makes repeated callbacks to a virtual method at a specified time interval.
Type jlimit(Type lowerLimit, Type upperLimit, Type valueToConstrain) noexcept
Constrains a value to keep it within a given range.
This abstract base class is implemented by LookAndFeel classes.
virtual void drawProgressBar(Graphics &, ProgressBar &, int width, int height, double progress, const String &textToShow)=0
Draws a progress bar.
virtual Style getDefaultProgressBarStyle(const ProgressBar &)=0
Returns the default style a progress bar should use if one hasn't been set.