LMMS
Loading...
Searching...
No Matches
juce_ProgressBar.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
50 private Timer
51{
52public:
53 //==============================================================================
64 explicit ProgressBar (double& progress);
65
67 ~ProgressBar() override;
68
69 //==============================================================================
75 void setPercentageDisplay (bool shouldDisplayPercentage);
76
82 void setTextToDisplay (const String& text);
83
84
85 //==============================================================================
94 {
95 backgroundColourId = 0x1001900,
96 foregroundColourId = 0x1001a00,
98 };
99
100 //==============================================================================
103 {
104 virtual ~LookAndFeelMethods() = default;
105
114 virtual void drawProgressBar (Graphics&, ProgressBar&, int width, int height,
115 double progress, const String& textToShow) = 0;
116
117 virtual bool isProgressBarOpaque (ProgressBar&) = 0;
118 };
119
120protected:
121 //==============================================================================
123 void paint (Graphics&) override;
125 void lookAndFeelChanged() override;
127 void visibilityChanged() override;
129 void colourChanged() override;
130
131private:
132 double& progress;
137
138 std::unique_ptr<AccessibilityHandler> createAccessibilityHandler() override;
139 void timerCallback() override;
140
142};
143
144} // namespace juce
Component() noexcept
Definition juce_Component.cpp:517
Definition juce_GraphicsContext.h:45
String currentMessage
Definition juce_ProgressBar.h:135
ColourIds
Definition juce_ProgressBar.h:94
@ backgroundColourId
Definition juce_ProgressBar.h:95
@ foregroundColourId
Definition juce_ProgressBar.h:96
double currentValue
Definition juce_ProgressBar.h:133
bool displayPercentage
Definition juce_ProgressBar.h:134
ProgressBar(double &progress)
Definition juce_ProgressBar.cpp:29
void lookAndFeelChanged() override
Definition juce_ProgressBar.cpp:54
void colourChanged() override
Definition juce_ProgressBar.cpp:59
double & progress
Definition juce_ProgressBar.h:132
uint32 lastCallbackTime
Definition juce_ProgressBar.h:136
void timerCallback() override
Definition juce_ProgressBar.cpp:91
void paint(Graphics &) override
Definition juce_ProgressBar.cpp:64
std::unique_ptr< AccessibilityHandler > createAccessibilityHandler() override
Definition juce_ProgressBar.cpp:121
void setPercentageDisplay(bool shouldDisplayPercentage)
Definition juce_ProgressBar.cpp:42
String displayedMessage
Definition juce_ProgressBar.h:135
void visibilityChanged() override
Definition juce_ProgressBar.cpp:83
void setTextToDisplay(const String &text)
Definition juce_ProgressBar.cpp:48
Definition juce_String.h:53
Timer() noexcept
Definition juce_Timer.cpp:316
static int int height
Definition pugl.h:1594
static int width
Definition pugl.h:1593
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
unsigned int uint32
Definition juce_MathsFunctions.h:45
Definition juce_ProgressBar.h:103
virtual void drawProgressBar(Graphics &, ProgressBar &, int width, int height, double progress, const String &textToShow)=0
virtual bool isProgressBarOpaque(ProgressBar &)=0
const char * text
Definition swell-functions.h:167