|
LMMS
|
#include <juce_ProgressBar.h>
Classes | |
| struct | LookAndFeelMethods |
Public Types | |
| enum | ColourIds { backgroundColourId = 0x1001900 , foregroundColourId = 0x1001a00 } |
| Public Types inherited from juce::Component | |
| enum class | FocusContainerType { none , focusContainer , keyboardFocusContainer } |
| enum | FocusChangeType { focusChangedByMouseClick , focusChangedByTabKey , focusChangedDirectly } |
Protected Member Functions | |
| void | paint (Graphics &) override |
| void | lookAndFeelChanged () override |
| void | visibilityChanged () override |
| void | colourChanged () override |
| Protected Member Functions inherited from juce::Component | |
| virtual ComponentPeer * | createNewPeer (int styleFlags, void *nativeWindowToAttachTo) |
| Protected Member Functions inherited from juce::SettableTooltipClient | |
| SettableTooltipClient ()=default | |
Private Member Functions | |
| std::unique_ptr< AccessibilityHandler > | createAccessibilityHandler () override |
| void | timerCallback () override |
| Private Member Functions inherited from juce::Timer | |
| virtual | ~Timer () |
| void | startTimer (int intervalInMilliseconds) noexcept |
| void | startTimerHz (int timerFrequencyHz) noexcept |
| void | stopTimer () noexcept |
| bool | isTimerRunning () const noexcept |
| int | getTimerInterval () const noexcept |
| Timer () noexcept | |
| Timer (const Timer &) noexcept | |
Private Attributes | |
| double & | progress |
| double | currentValue |
| bool | displayPercentage |
| String | displayedMessage |
| String | currentMessage |
| uint32 | lastCallbackTime |
Additional Inherited Members | |
| Static Public Member Functions inherited from juce::Component | |
| static float JUCE_CALLTYPE | getApproximateScaleFactorForComponent (const Component *targetComponent) |
| static Component *JUCE_CALLTYPE | getCurrentlyFocusedComponent () noexcept |
| static void JUCE_CALLTYPE | unfocusAllComponents () |
| static void JUCE_CALLTYPE | beginDragAutoRepeat (int millisecondsBetweenCallbacks) |
| static bool JUCE_CALLTYPE | isMouseButtonDownAnywhere () noexcept |
| static int JUCE_CALLTYPE | getNumCurrentlyModalComponents () noexcept |
| static Component *JUCE_CALLTYPE | getCurrentlyModalComponent (int index=0) noexcept |
| Static Protected Member Functions inherited from juce::Component | |
| static std::unique_ptr< AccessibilityHandler > | createIgnoredAccessibilityHandler (Component &) |
| Static Private Member Functions inherited from juce::Timer | |
| static void JUCE_CALLTYPE | callAfterDelay (int milliseconds, std::function< void()> functionToCall) |
| static void JUCE_CALLTYPE | callPendingTimersSynchronously () |
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.
If using LookAndFeel_V4 a circular spinning progress bar will be drawn if the width and height of the ProgressBar are equal, otherwise the standard, linear ProgressBar will be drawn.
For an easy way of running a background task with a dialog box showing its progress, see the ThreadWithProgressWindow class.
@tags{GUI}
| enum juce::ProgressBar::ColourIds |
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 and JUCE LookAndFeel classes will draw a spinning animation for values outside this range. Obviously you'd better be careful not to delete this variable while the ProgressBar still exists! |
|
override |
Destructor.
|
overrideprotectedvirtual |
This method is called when a colour is changed by the setColour() method.
Reimplemented from juce::Component.
|
overrideprivatevirtual |
Override this method to return a custom AccessibilityHandler for this component.
The default implementation creates and returns a AccessibilityHandler object with an unspecified role, meaning that it will be visible to accessibility clients but without a specific role, action callbacks or interfaces. To control how accessibility clients see and interact with your component subclass AccessibilityHandler, implement the desired behaviours, and return an instance of it from this method in your component subclass.
The accessibility handler you return here is guaranteed to be destroyed before its Component, so it's safe to store and use a reference back to the Component inside the AccessibilityHandler if necessary.
Reimplemented from juce::Component.
|
overrideprotectedvirtual |
Called to let the component react to a change in the look-and-feel setting.
When the look-and-feel is changed for a component, this will be called in all its child components, recursively.
It can also be triggered manually by the sendLookAndFeelChange() method, in case an application uses a LookAndFeel class that might have changed internally.
Reimplemented from juce::Component.
Components can override this method to draw their content.
The paint() method gets called when a region of a component needs redrawing, either because the component's repaint() method has been called, or because something has happened on the screen that means a section of a window needs to be redrawn.
Any child components will draw themselves over whatever this method draws. If you need to paint over the top of your child components, you can also implement the paintOverChildren() method to do this.
If you want to cause a component to redraw itself, this is done asynchronously - calling the repaint() method marks a region of the component as "dirty", and the paint() method will automatically be called sometime later, by the message thread, to paint any bits that need refreshing. In JUCE (and almost all modern UI frameworks), you never redraw something synchronously.
You should never need to call this method directly - to take a snapshot of the component you could use createComponentSnapshot() or paintEntireComponent().
| g | the graphics context that must be used to do the drawing operations. |
Reimplemented from juce::Component.
| void juce::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.
|
overrideprivatevirtual |
The user-defined callback routine that actually gets called periodically.
It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.
Implements juce::Timer.
|
overrideprotectedvirtual |
Called when this component's visibility changes.
Reimplemented from juce::Component.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |