LMMS
Loading...
Searching...
No Matches
juce_LookAndFeel_V4.cpp
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
30{
31 if (isPositiveAndBelow (index, numColours))
32 return palette[index];
33
35 return {};
36}
37
39{
40 if (isPositiveAndBelow (index, numColours))
41 palette[index] = newColour;
42 else
44}
45
46bool LookAndFeel_V4::ColourScheme::operator== (const ColourScheme& other) const noexcept
47{
48 for (auto i = 0; i < numColours; ++i)
49 if (palette[i] != other.palette[i])
50 return false;
51
52 return true;
53}
54
55bool LookAndFeel_V4::ColourScheme::operator!= (const ColourScheme& other) const noexcept
56{
57 return ! operator== (other);
58}
59
60//==============================================================================
65
70
72
73//==============================================================================
75{
76 currentColourScheme = newColourScheme;
78}
79
81{
82 return { 0xff323e44, 0xff263238, 0xff323e44,
83 0xff8e989b, 0xffffffff, 0xff42a2c8,
84 0xffffffff, 0xff181f22, 0xffffffff };
85}
86
88{
89 return { 0xff2f2f3a, 0xff191926, 0xffd0d0d0,
90 0xff66667c, 0xc8ffffff, 0xffd8d8d8,
91 0xffffffff, 0xff606073, 0xff000000 };
92}
93
95{
96 return { 0xff505050, 0xff424242, 0xff606060,
97 0xffa6a6a6, 0xffffffff, 0xff21ba90,
98 0xff000000, 0xffffffff, 0xffffffff };
99}
100
102{
103 return { 0xffefefef, 0xffffffff, 0xffffffff,
104 0xffdddddd, 0xff000000, 0xffa9a9a9,
105 0xffffffff, 0xff42a2c8, 0xff000000 };
106}
107
108//==============================================================================
110{
111public:
113 : Button (name), colour (c), normalShape (normal), toggledShape (toggled)
114 {
115 }
116
117 void paintButton (Graphics& g, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override
118 {
119 auto background = Colours::grey;
120
122 if (auto lf = dynamic_cast<LookAndFeel_V4*> (&rw->getLookAndFeel()))
123 background = lf->getCurrentColourScheme().getUIColour (LookAndFeel_V4::ColourScheme::widgetBackground);
124
125 g.fillAll (background);
126
127 g.setColour ((! isEnabled() || shouldDrawButtonAsDown) ? colour.withAlpha (0.6f)
128 : colour);
129
130 if (shouldDrawButtonAsHighlighted)
131 {
132 g.fillAll();
133 g.setColour (background);
134 }
135
137
138 auto reducedRect = Justification (Justification::centred)
140 .toFloat()
141 .reduced ((float) getHeight() * 0.3f);
142
143 g.fillPath (p, p.getTransformToScaleToFit (reducedRect, true));
144 }
145
146private:
149
151};
152
154{
155 Path shape;
156 auto crossThickness = 0.15f;
157
158 if (buttonType == DocumentWindow::closeButton)
159 {
160 shape.addLineSegment ({ 0.0f, 0.0f, 1.0f, 1.0f }, crossThickness);
161 shape.addLineSegment ({ 1.0f, 0.0f, 0.0f, 1.0f }, crossThickness);
162
163 return new LookAndFeel_V4_DocumentWindowButton ("close", Colour (0xff9A131D), shape, shape);
164 }
165
166 if (buttonType == DocumentWindow::minimiseButton)
167 {
168 shape.addLineSegment ({ 0.0f, 0.5f, 1.0f, 0.5f }, crossThickness);
169
170 return new LookAndFeel_V4_DocumentWindowButton ("minimise", Colour (0xffaa8811), shape, shape);
171 }
172
173 if (buttonType == DocumentWindow::maximiseButton)
174 {
175 shape.addLineSegment ({ 0.5f, 0.0f, 0.5f, 1.0f }, crossThickness);
176 shape.addLineSegment ({ 0.0f, 0.5f, 1.0f, 0.5f }, crossThickness);
177
178 Path fullscreenShape;
179 fullscreenShape.startNewSubPath (45.0f, 100.0f);
180 fullscreenShape.lineTo (0.0f, 100.0f);
181 fullscreenShape.lineTo (0.0f, 0.0f);
182 fullscreenShape.lineTo (100.0f, 0.0f);
183 fullscreenShape.lineTo (100.0f, 45.0f);
184 fullscreenShape.addRectangle (45.0f, 45.0f, 100.0f, 100.0f);
185 PathStrokeType (30.0f).createStrokedPath (fullscreenShape, fullscreenShape);
186
187 return new LookAndFeel_V4_DocumentWindowButton ("maximise", Colour (0xff0A830A), shape, fullscreenShape);
188 }
189
191 return nullptr;
192}
193
195 int titleBarX, int titleBarY,
196 int titleBarW, int titleBarH,
197 Button* minimiseButton,
198 Button* maximiseButton,
199 Button* closeButton,
200 bool positionTitleBarButtonsOnLeft)
201{
202 auto buttonW = static_cast<int> (titleBarH * 1.2);
203
204 auto x = positionTitleBarButtonsOnLeft ? titleBarX
205 : titleBarX + titleBarW - buttonW;
206
207 if (closeButton != nullptr)
208 {
209 closeButton->setBounds (x, titleBarY, buttonW, titleBarH);
210 x += positionTitleBarButtonsOnLeft ? buttonW : -buttonW;
211 }
212
213 if (positionTitleBarButtonsOnLeft)
214 std::swap (minimiseButton, maximiseButton);
215
216 if (maximiseButton != nullptr)
217 {
218 maximiseButton->setBounds (x, titleBarY, buttonW, titleBarH);
219 x += positionTitleBarButtonsOnLeft ? buttonW : -buttonW;
220 }
221
222 if (minimiseButton != nullptr)
223 minimiseButton->setBounds (x, titleBarY, buttonW, titleBarH);
224}
225
227 int w, int h, int titleSpaceX, int titleSpaceW,
228 const Image* icon, bool drawTitleTextOnLeft)
229{
230 if (w * h == 0)
231 return;
232
233 auto isActive = window.isActiveWindow();
234
235 g.setColour (getCurrentColourScheme().getUIColour (ColourScheme::widgetBackground));
236 g.fillAll();
237
238 Font font ((float) h * 0.65f, Font::plain);
239 g.setFont (font);
240
241 auto textW = font.getStringWidth (window.getName());
242 auto iconW = 0;
243 auto iconH = 0;
244
245 if (icon != nullptr)
246 {
247 iconH = static_cast<int> (font.getHeight());
248 iconW = icon->getWidth() * iconH / icon->getHeight() + 4;
249 }
250
251 textW = jmin (titleSpaceW, textW + iconW);
252 auto textX = drawTitleTextOnLeft ? titleSpaceX
253 : jmax (titleSpaceX, (w - textW) / 2);
254
255 if (textX + textW > titleSpaceX + titleSpaceW)
256 textX = titleSpaceX + titleSpaceW - textW;
257
258 if (icon != nullptr)
259 {
260 g.setOpacity (isActive ? 1.0f : 0.6f);
261 g.drawImageWithin (*icon, textX, (h - iconH) / 2, iconW, iconH,
263 textX += iconW;
264 textW -= iconW;
265 }
266
268 g.setColour (window.findColour (DocumentWindow::textColourId));
269 else
270 g.setColour (getCurrentColourScheme().getUIColour (ColourScheme::defaultText));
271
272 g.drawText (window.getName(), textX, 0, textW, h, Justification::centredLeft, true);
273}
274
275//==============================================================================
277{
278 return { jmin (16.0f, (float) buttonHeight * 0.6f) };
279}
280
282 Button& button,
283 const Colour& backgroundColour,
284 bool shouldDrawButtonAsHighlighted,
285 bool shouldDrawButtonAsDown)
286{
287 auto cornerSize = 6.0f;
288 auto bounds = button.getLocalBounds().toFloat().reduced (0.5f, 0.5f);
289
290 auto baseColour = backgroundColour.withMultipliedSaturation (button.hasKeyboardFocus (true) ? 1.3f : 0.9f)
291 .withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f);
292
293 if (shouldDrawButtonAsDown || shouldDrawButtonAsHighlighted)
294 baseColour = baseColour.contrasting (shouldDrawButtonAsDown ? 0.2f : 0.05f);
295
296 g.setColour (baseColour);
297
298 auto flatOnLeft = button.isConnectedOnLeft();
299 auto flatOnRight = button.isConnectedOnRight();
300 auto flatOnTop = button.isConnectedOnTop();
301 auto flatOnBottom = button.isConnectedOnBottom();
302
303 if (flatOnLeft || flatOnRight || flatOnTop || flatOnBottom)
304 {
305 Path path;
306 path.addRoundedRectangle (bounds.getX(), bounds.getY(),
307 bounds.getWidth(), bounds.getHeight(),
308 cornerSize, cornerSize,
309 ! (flatOnLeft || flatOnTop),
310 ! (flatOnRight || flatOnTop),
311 ! (flatOnLeft || flatOnBottom),
312 ! (flatOnRight || flatOnBottom));
313
314 g.fillPath (path);
315
316 g.setColour (button.findColour (ComboBox::outlineColourId));
317 g.strokePath (path, PathStrokeType (1.0f));
318 }
319 else
320 {
321 g.fillRoundedRectangle (bounds, cornerSize);
322
323 g.setColour (button.findColour (ComboBox::outlineColourId));
324 g.drawRoundedRectangle (bounds, cornerSize, 1.0f);
325 }
326}
327
329 bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown)
330{
331 auto fontSize = jmin (15.0f, (float) button.getHeight() * 0.75f);
332 auto tickWidth = fontSize * 1.1f;
333
334 drawTickBox (g, button, 4.0f, ((float) button.getHeight() - tickWidth) * 0.5f,
335 tickWidth, tickWidth,
336 button.getToggleState(),
337 button.isEnabled(),
338 shouldDrawButtonAsHighlighted,
339 shouldDrawButtonAsDown);
340
341 g.setColour (button.findColour (ToggleButton::textColourId));
342 g.setFont (fontSize);
343
344 if (! button.isEnabled())
345 g.setOpacity (0.5f);
346
347 g.drawFittedText (button.getButtonText(),
348 button.getLocalBounds().withTrimmedLeft (roundToInt (tickWidth) + 10)
349 .withTrimmedRight (2),
351}
352
354 float x, float y, float w, float h,
355 const bool ticked,
356 const bool isEnabled,
357 const bool shouldDrawButtonAsHighlighted,
358 const bool shouldDrawButtonAsDown)
359{
360 ignoreUnused (isEnabled, shouldDrawButtonAsHighlighted, shouldDrawButtonAsDown);
361
362 Rectangle<float> tickBounds (x, y, w, h);
363
364 g.setColour (component.findColour (ToggleButton::tickDisabledColourId));
365 g.drawRoundedRectangle (tickBounds, 4.0f, 1.0f);
366
367 if (ticked)
368 {
369 g.setColour (component.findColour (ToggleButton::tickColourId));
370 auto tick = getTickShape (0.75f);
371 g.fillPath (tick, tick.getTransformToScaleToFit (tickBounds.reduced (4, 5).toFloat(), false));
372 }
373}
374
376{
377 auto fontSize = jmin (15.0f, (float) button.getHeight() * 0.75f);
378 auto tickWidth = fontSize * 1.1f;
379
380 Font font (fontSize);
381
382 button.setSize (font.getStringWidth (button.getButtonText()) + roundToInt (tickWidth) + 14, button.getHeight());
383}
384
385//==============================================================================
387 const String& button1, const String& button2, const String& button3,
388 MessageBoxIconType iconType,
389 int numButtons, Component* associatedComponent)
390{
391 auto boundsOffset = 50;
392
393 auto* aw = LookAndFeel_V2::createAlertWindow (title, message, button1, button2, button3,
394 iconType, numButtons, associatedComponent);
395
396 auto bounds = aw->getBounds();
397 bounds = bounds.withSizeKeepingCentre (bounds.getWidth() + boundsOffset, bounds.getHeight() + boundsOffset);
398 aw->setBounds (bounds);
399
400 for (auto* child : aw->getChildren())
401 if (auto* button = dynamic_cast<TextButton*> (child))
402 button->setBounds (button->getBounds() + Point<int> (25, 40));
403
404 return aw;
405}
406
408 const Rectangle<int>& textArea, TextLayout& textLayout)
409{
410 auto cornerSize = 4.0f;
411
412 g.setColour (alert.findColour (AlertWindow::outlineColourId));
413 g.drawRoundedRectangle (alert.getLocalBounds().toFloat(), cornerSize, 2.0f);
414
415 auto bounds = alert.getLocalBounds().reduced (1);
416 g.reduceClipRegion (bounds);
417
418 g.setColour (alert.findColour (AlertWindow::backgroundColourId));
419 g.fillRoundedRectangle (bounds.toFloat(), cornerSize);
420
421 auto iconSpaceUsed = 0;
422
423 auto iconWidth = 80;
424 auto iconSize = jmin (iconWidth + 50, bounds.getHeight() + 20);
425
426 if (alert.containsAnyExtraComponents() || alert.getNumButtons() > 2)
427 iconSize = jmin (iconSize, textArea.getHeight() + 50);
428
429 Rectangle<int> iconRect (iconSize / -10, iconSize / -10,
430 iconSize, iconSize);
431
433 {
434 Path icon;
435 char character;
436 uint32 colour;
437
439 {
440 character = '!';
441
442 icon.addTriangle ((float) iconRect.getX() + (float) iconRect.getWidth() * 0.5f, (float) iconRect.getY(),
443 static_cast<float> (iconRect.getRight()), static_cast<float> (iconRect.getBottom()),
444 static_cast<float> (iconRect.getX()), static_cast<float> (iconRect.getBottom()));
445
446 icon = icon.createPathWithRoundedCorners (5.0f);
447 colour = 0x66ff2a00;
448 }
449 else
450 {
451 colour = Colour (0xff00b0b9).withAlpha (0.4f).getARGB();
452 character = alert.getAlertType() == MessageBoxIconType::InfoIcon ? 'i' : '?';
453
454 icon.addEllipse (iconRect.toFloat());
455 }
456
458 ga.addFittedText ({ (float) iconRect.getHeight() * 0.9f, Font::bold },
459 String::charToString ((juce_wchar) (uint8) character),
460 static_cast<float> (iconRect.getX()), static_cast<float> (iconRect.getY()),
461 static_cast<float> (iconRect.getWidth()), static_cast<float> (iconRect.getHeight()),
463 ga.createPath (icon);
464
465 icon.setUsingNonZeroWinding (false);
466 g.setColour (Colour (colour));
467 g.fillPath (icon);
468
469 iconSpaceUsed = iconWidth;
470 }
471
472 g.setColour (alert.findColour (AlertWindow::textColourId));
473
474 Rectangle<int> alertBounds (bounds.getX() + iconSpaceUsed, 30,
475 bounds.getWidth(), bounds.getHeight() - getAlertWindowButtonHeight() - 20);
476
477 textLayout.draw (g, alertBounds.toFloat());
478}
479
484
485//==============================================================================
487 int width, int height, double progress, const String& textToShow)
488{
489 if (width == height)
491 else
492 drawLinearProgressBar (g, progressBar, width, height, progress, textToShow);
493}
494
496 int width, int height,
497 double progress, const String& textToShow)
498{
499 auto background = progressBar.findColour (ProgressBar::backgroundColourId);
500 auto foreground = progressBar.findColour (ProgressBar::foregroundColourId);
501
502 auto barBounds = progressBar.getLocalBounds().toFloat();
503
504 g.setColour (background);
505 g.fillRoundedRectangle (barBounds, (float) progressBar.getHeight() * 0.5f);
506
507 if (progress >= 0.0f && progress <= 1.0f)
508 {
509 Path p;
510 p.addRoundedRectangle (barBounds, (float) progressBar.getHeight() * 0.5f);
511 g.reduceClipRegion (p);
512
513 barBounds.setWidth (barBounds.getWidth() * (float) progress);
514 g.setColour (foreground);
515 g.fillRoundedRectangle (barBounds, (float) progressBar.getHeight() * 0.5f);
516 }
517 else
518 {
519 // spinning bar..
520 g.setColour (background);
521
522 auto stripeWidth = height * 2;
523 auto position = static_cast<int> (Time::getMillisecondCounter() / 15) % stripeWidth;
524
525 Path p;
526
527 for (auto x = static_cast<float> (-position); x < (float) (width + stripeWidth); x += (float) stripeWidth)
528 p.addQuadrilateral (x, 0.0f,
529 x + (float) stripeWidth * 0.5f, 0.0f,
530 x, static_cast<float> (height),
531 x - (float) stripeWidth * 0.5f, static_cast<float> (height));
532
533 Image im (Image::ARGB, width, height, true);
534
535 {
536 Graphics g2 (im);
537 g2.setColour (foreground);
538 g2.fillRoundedRectangle (barBounds, (float) progressBar.getHeight() * 0.5f);
539 }
540
541 g.setTiledImageFill (im, 0, 0, 0.85f);
542 g.fillPath (p);
543 }
544
545 if (textToShow.isNotEmpty())
546 {
547 g.setColour (Colour::contrasting (background, foreground));
548 g.setFont ((float) height * 0.6f);
549
550 g.drawText (textToShow, 0, 0, width, height, Justification::centred, false);
551 }
552}
553
554void LookAndFeel_V4::drawCircularProgressBar (Graphics& g, ProgressBar& progressBar, const String& progressText)
555{
556 auto background = progressBar.findColour (ProgressBar::backgroundColourId);
557 auto foreground = progressBar.findColour (ProgressBar::foregroundColourId);
558
559 auto barBounds = progressBar.getLocalBounds().reduced (2, 2).toFloat();
560
561 auto rotationInDegrees = static_cast<float> ((Time::getMillisecondCounter() / 10) % 360);
562 auto normalisedRotation = rotationInDegrees / 360.0f;
563
564 auto rotationOffset = 22.5f;
565 auto maxRotation = 315.0f;
566
567 auto startInDegrees = rotationInDegrees;
568 auto endInDegrees = startInDegrees + rotationOffset;
569
570 if (normalisedRotation >= 0.25f && normalisedRotation < 0.5f)
571 {
572 auto rescaledRotation = (normalisedRotation * 4.0f) - 1.0f;
573 endInDegrees = startInDegrees + rotationOffset + (maxRotation * rescaledRotation);
574 }
575 else if (normalisedRotation >= 0.5f && normalisedRotation <= 1.0f)
576 {
577 endInDegrees = startInDegrees + rotationOffset + maxRotation;
578 auto rescaledRotation = 1.0f - ((normalisedRotation * 2.0f) - 1.0f);
579 startInDegrees = endInDegrees - rotationOffset - (maxRotation * rescaledRotation);
580 }
581
582 g.setColour (background);
583 Path arcPath2;
584 arcPath2.addCentredArc (barBounds.getCentreX(),
585 barBounds.getCentreY(),
586 barBounds.getWidth() * 0.5f,
587 barBounds.getHeight() * 0.5f, 0.0f,
588 0.0f,
590 true);
591 g.strokePath (arcPath2, PathStrokeType (4.0f));
592
593 g.setColour (foreground);
594 Path arcPath;
595 arcPath.addCentredArc (barBounds.getCentreX(),
596 barBounds.getCentreY(),
597 barBounds.getWidth() * 0.5f,
598 barBounds.getHeight() * 0.5f,
599 0.0f,
600 degreesToRadians (startInDegrees),
601 degreesToRadians (endInDegrees),
602 true);
603
604 arcPath.applyTransform (AffineTransform::rotation (normalisedRotation * MathConstants<float>::pi * 2.25f, barBounds.getCentreX(), barBounds.getCentreY()));
605 g.strokePath (arcPath, PathStrokeType (4.0f));
606
607 if (progressText.isNotEmpty())
608 {
609 g.setColour (progressBar.findColour (TextButton::textColourOffId));
610 g.setFont ({ 12.0f, Font::italic });
611 g.drawText (progressText, barBounds, Justification::centred, false);
612 }
613}
614
615//==============================================================================
617{
618 return 8;
619}
620
621void LookAndFeel_V4::drawScrollbar (Graphics& g, ScrollBar& scrollbar, int x, int y, int width, int height,
622 bool isScrollbarVertical, int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown)
623{
624 ignoreUnused (isMouseDown);
625
626 Rectangle<int> thumbBounds;
627
628 if (isScrollbarVertical)
629 thumbBounds = { x, thumbStartPosition, width, thumbSize };
630 else
631 thumbBounds = { thumbStartPosition, y, thumbSize, height };
632
634 g.setColour (isMouseOver ? c.brighter (0.25f) : c);
635 g.fillRoundedRectangle (thumbBounds.reduced (1).toFloat(), 4.0f);
636}
637
638//==============================================================================
640{
641 static const unsigned char pathData[] = { 110,109,32,210,202,64,126,183,148,64,108,39,244,247,64,245,76,124,64,108,178,131,27,65,246,76,252,64,108,175,242,4,65,246,76,252,
642 64,108,236,5,68,65,0,0,160,180,108,240,150,90,65,21,136,52,63,108,48,59,16,65,0,0,32,65,108,32,210,202,64,126,183,148,64, 99,101,0,0 };
643
644 Path path;
645 path.loadPathFromData (pathData, sizeof (pathData));
646 path.scaleToFit (0, 0, height * 2.0f, height, true);
647
648 return path;
649}
650
652{
653 static const unsigned char pathData[] = { 110,109,51,51,255,66,0,0,0,0,108,205,204,13,67,51,51,99,65,108,0,0,170,66,205,204,141,66,108,51,179,13,67,52,51,255,66,108,0,0,255,
654 66,205,204,13,67,108,205,204,141,66,0,0,170,66,108,52,51,99,65,51,179,13,67,108,0,0,0,0,51,51,255,66,108,205,204,98,66, 204,204,141,66,108,0,0,0,0,51,51,99,65,108,51,51,
655 99,65,0,0,0,0,108,205,204,141,66,205,204,98,66,108,51,51,255,66,0,0,0,0,99,101,0,0 };
656
657 Path path;
658 path.loadPathFromData (pathData, sizeof (pathData));
659 path.scaleToFit (0, 0, height * 2.0f, height, true);
660
661 return path;
662}
663
664//==============================================================================
666{
667 if (dynamic_cast<AlertWindow*> (textEditor.getParentComponent()) != nullptr)
668 {
669 g.setColour (textEditor.findColour (TextEditor::backgroundColourId));
670 g.fillRect (0, 0, width, height);
671
672 g.setColour (textEditor.findColour (TextEditor::outlineColourId));
673 g.drawHorizontalLine (height - 1, 0.0f, static_cast<float> (width));
674 }
675 else
676 {
678 }
679}
680
682{
683 if (dynamic_cast<AlertWindow*> (textEditor.getParentComponent()) == nullptr)
684 {
685 if (textEditor.isEnabled())
686 {
687 if (textEditor.hasKeyboardFocus (true) && ! textEditor.isReadOnly())
688 {
689 g.setColour (textEditor.findColour (TextEditor::focusedOutlineColourId));
690 g.drawRect (0, 0, width, height, 2);
691 }
692 else
693 {
694 g.setColour (textEditor.findColour (TextEditor::outlineColourId));
695 g.drawRect (0, 0, width, height);
696 }
697 }
698 }
699}
700
701//==============================================================================
703{
704 auto* goUpButton = new DrawableButton ("up", DrawableButton::ImageOnButtonBackground);
705
706 Path arrowPath;
707 arrowPath.addArrow ({ 50.0f, 100.0f, 50.0f, 0.0f }, 40.0f, 100.0f, 50.0f);
708
709 DrawablePath arrowImage;
710 arrowImage.setFill (goUpButton->findColour (TextButton::textColourOffId));
711 arrowImage.setPath (arrowPath);
712
713 goUpButton->setImages (&arrowImage);
714
715 return goUpButton;
716}
717
719 DirectoryContentsDisplayComponent* fileListComponent,
720 FilePreviewComponent* previewComp,
721 ComboBox* currentPathBox,
722 TextEditor* filenameBox,
723 Button* goUpButton)
724{
725 auto sectionHeight = 22;
726 auto buttonWidth = 50;
727
728 auto b = browserComp.getLocalBounds().reduced (20, 5);
729
730 auto topSlice = b.removeFromTop (sectionHeight);
731 auto bottomSlice = b.removeFromBottom (sectionHeight);
732
733 currentPathBox->setBounds (topSlice.removeFromLeft (topSlice.getWidth() - buttonWidth));
734
735 topSlice.removeFromLeft (6);
736 goUpButton->setBounds (topSlice);
737
738 bottomSlice.removeFromLeft (20);
739 filenameBox->setBounds (bottomSlice);
740
741 if (previewComp != nullptr)
742 previewComp->setBounds (b.removeFromRight (b.getWidth() / 3));
743
744 if (auto* listAsComp = dynamic_cast<Component*> (fileListComponent))
745 listAsComp->setBounds (b.reduced (0, 10));
746}
747
749 const File& file, const String& filename, Image* icon,
750 const String& fileSizeDescription,
751 const String& fileTimeDescription,
752 bool isDirectory, bool isItemSelected,
753 int itemIndex, DirectoryContentsDisplayComponent& dcc)
754{
756 fileSizeDescription, fileTimeDescription,
757 isDirectory, isItemSelected, itemIndex, dcc);
758}
759
760//==============================================================================
762 const bool isSeparator, const bool isActive,
763 const bool isHighlighted, const bool isTicked,
764 const bool hasSubMenu, const String& text,
765 const String& shortcutKeyText,
766 const Drawable* icon, const Colour* const textColourToUse)
767{
768 if (isSeparator)
769 {
770 auto r = area.reduced (5, 0);
771 r.removeFromTop (roundToInt (((float) r.getHeight() * 0.5f) - 0.5f));
772
773 g.setColour (findColour (PopupMenu::textColourId).withAlpha (0.3f));
774 g.fillRect (r.removeFromTop (1));
775 }
776 else
777 {
778 auto textColour = (textColourToUse == nullptr ? findColour (PopupMenu::textColourId)
779 : *textColourToUse);
780
781 auto r = area.reduced (1);
782
783 if (isHighlighted && isActive)
784 {
786 g.fillRect (r);
787
789 }
790 else
791 {
792 g.setColour (textColour.withMultipliedAlpha (isActive ? 1.0f : 0.5f));
793 }
794
795 r.reduce (jmin (5, area.getWidth() / 20), 0);
796
797 auto font = getPopupMenuFont();
798
799 auto maxFontHeight = (float) r.getHeight() / 1.3f;
800
801 if (font.getHeight() > maxFontHeight)
802 font.setHeight (maxFontHeight);
803
804 g.setFont (font);
805
806 auto iconArea = r.removeFromLeft (roundToInt (maxFontHeight)).toFloat();
807
808 if (icon != nullptr)
809 {
811 r.removeFromLeft (roundToInt (maxFontHeight * 0.5f));
812 }
813 else if (isTicked)
814 {
815 auto tick = getTickShape (1.0f);
816 g.fillPath (tick, tick.getTransformToScaleToFit (iconArea.reduced (iconArea.getWidth() / 5, 0).toFloat(), true));
817 }
818
819 if (hasSubMenu)
820 {
821 auto arrowH = 0.6f * getPopupMenuFont().getAscent();
822
823 auto x = static_cast<float> (r.removeFromRight ((int) arrowH).getX());
824 auto halfH = static_cast<float> (r.getCentreY());
825
826 Path path;
827 path.startNewSubPath (x, halfH - arrowH * 0.5f);
828 path.lineTo (x + arrowH * 0.6f, halfH);
829 path.lineTo (x, halfH + arrowH * 0.5f);
830
831 g.strokePath (path, PathStrokeType (2.0f));
832 }
833
834 r.removeFromRight (3);
835 g.drawFittedText (text, r, Justification::centredLeft, 1);
836
837 if (shortcutKeyText.isNotEmpty())
838 {
839 auto f2 = font;
840 f2.setHeight (f2.getHeight() * 0.75f);
841 f2.setHorizontalScale (0.95f);
842 g.setFont (f2);
843
844 g.drawText (shortcutKeyText, r, Justification::centredRight, true);
845 }
846 }
847}
848
849void LookAndFeel_V4::getIdealPopupMenuItemSize (const String& text, const bool isSeparator,
850 int standardMenuItemHeight, int& idealWidth, int& idealHeight)
851{
852 if (isSeparator)
853 {
854 idealWidth = 50;
855 idealHeight = standardMenuItemHeight > 0 ? standardMenuItemHeight / 10 : 10;
856 }
857 else
858 {
859 auto font = getPopupMenuFont();
860
861 if (standardMenuItemHeight > 0 && font.getHeight() > (float) standardMenuItemHeight / 1.3f)
862 font.setHeight ((float) standardMenuItemHeight / 1.3f);
863
864 idealHeight = standardMenuItemHeight > 0 ? standardMenuItemHeight : roundToInt (font.getHeight() * 1.3f);
865 idealWidth = font.getStringWidth (text) + idealHeight * 2;
866 }
867}
868
870 bool, MenuBarComponent& menuBar)
871{
872 auto colour = menuBar.findColour (TextButton::buttonColourId).withAlpha (0.4f);
873
875
876 g.setColour (colour.contrasting (0.15f));
877 g.fillRect (r.removeFromTop (1));
878 g.fillRect (r.removeFromBottom (1));
879
880 g.setGradientFill (ColourGradient::vertical (colour, 0, colour.darker (0.2f), (float) height));
881 g.fillRect (r);
882}
883
885 int itemIndex, const String& itemText,
886 bool isMouseOverItem, bool isMenuOpen,
887 bool /*isMouseOverBar*/, MenuBarComponent& menuBar)
888{
889 if (! menuBar.isEnabled())
890 {
891 g.setColour (menuBar.findColour (TextButton::textColourOffId)
892 .withMultipliedAlpha (0.5f));
893 }
894 else if (isMenuOpen || isMouseOverItem)
895 {
896 g.fillAll (menuBar.findColour (TextButton::buttonOnColourId));
897 g.setColour (menuBar.findColour (TextButton::textColourOnId));
898 }
899 else
900 {
901 g.setColour (menuBar.findColour (TextButton::textColourOffId));
902 }
903
904 g.setFont (getMenuBarFont (menuBar, itemIndex, itemText));
905 g.drawFittedText (itemText, 0, 0, width, height, Justification::centred, 1);
906}
907
908//==============================================================================
910 int, int, int, int, ComboBox& box)
911{
912 auto cornerSize = box.findParentComponentOfClass<ChoicePropertyComponent>() != nullptr ? 0.0f : 3.0f;
913 Rectangle<int> boxBounds (0, 0, width, height);
914
915 g.setColour (box.findColour (ComboBox::backgroundColourId));
916 g.fillRoundedRectangle (boxBounds.toFloat(), cornerSize);
917
918 g.setColour (box.findColour (ComboBox::outlineColourId));
919 g.drawRoundedRectangle (boxBounds.toFloat().reduced (0.5f, 0.5f), cornerSize, 1.0f);
920
921 Rectangle<int> arrowZone (width - 30, 0, 20, height);
922 Path path;
923 path.startNewSubPath ((float) arrowZone.getX() + 3.0f, (float) arrowZone.getCentreY() - 2.0f);
924 path.lineTo ((float) arrowZone.getCentreX(), (float) arrowZone.getCentreY() + 3.0f);
925 path.lineTo ((float) arrowZone.getRight() - 3.0f, (float) arrowZone.getCentreY() - 2.0f);
926
927 g.setColour (box.findColour (ComboBox::arrowColourId).withAlpha ((box.isEnabled() ? 0.9f : 0.2f)));
928 g.strokePath (path, PathStrokeType (2.0f));
929}
930
932{
933 return { jmin (16.0f, (float) box.getHeight() * 0.85f) };
934}
935
937{
938 label.setBounds (1, 1,
939 box.getWidth() - 30,
940 box.getHeight() - 2);
941
942 label.setFont (getComboBoxFont (box));
943}
944
945//==============================================================================
947{
948 return jmin (12, slider.isHorizontal() ? static_cast<int> ((float) slider.getHeight() * 0.5f)
949 : static_cast<int> ((float) slider.getWidth() * 0.5f));
950}
951
953 float sliderPos,
954 float minSliderPos,
955 float maxSliderPos,
956 const Slider::SliderStyle style, Slider& slider)
957{
958 if (slider.isBar())
959 {
960 g.setColour (slider.findColour (Slider::trackColourId));
961 g.fillRect (slider.isHorizontal() ? Rectangle<float> (static_cast<float> (x), (float) y + 0.5f, sliderPos - (float) x, (float) height - 1.0f)
962 : Rectangle<float> ((float) x + 0.5f, sliderPos, (float) width - 1.0f, (float) y + ((float) height - sliderPos)));
963 }
964 else
965 {
968
969 auto trackWidth = jmin (6.0f, slider.isHorizontal() ? (float) height * 0.25f : (float) width * 0.25f);
970
971 Point<float> startPoint (slider.isHorizontal() ? (float) x : (float) x + (float) width * 0.5f,
972 slider.isHorizontal() ? (float) y + (float) height * 0.5f : (float) (height + y));
973
974 Point<float> endPoint (slider.isHorizontal() ? (float) (width + x) : startPoint.x,
975 slider.isHorizontal() ? startPoint.y : (float) y);
976
977 Path backgroundTrack;
978 backgroundTrack.startNewSubPath (startPoint);
979 backgroundTrack.lineTo (endPoint);
980 g.setColour (slider.findColour (Slider::backgroundColourId));
981 g.strokePath (backgroundTrack, { trackWidth, PathStrokeType::curved, PathStrokeType::rounded });
982
983 Path valueTrack;
984 Point<float> minPoint, maxPoint, thumbPoint;
985
986 if (isTwoVal || isThreeVal)
987 {
988 minPoint = { slider.isHorizontal() ? minSliderPos : (float) width * 0.5f,
989 slider.isHorizontal() ? (float) height * 0.5f : minSliderPos };
990
991 if (isThreeVal)
992 thumbPoint = { slider.isHorizontal() ? sliderPos : (float) width * 0.5f,
993 slider.isHorizontal() ? (float) height * 0.5f : sliderPos };
994
995 maxPoint = { slider.isHorizontal() ? maxSliderPos : (float) width * 0.5f,
996 slider.isHorizontal() ? (float) height * 0.5f : maxSliderPos };
997 }
998 else
999 {
1000 auto kx = slider.isHorizontal() ? sliderPos : ((float) x + (float) width * 0.5f);
1001 auto ky = slider.isHorizontal() ? ((float) y + (float) height * 0.5f) : sliderPos;
1002
1003 minPoint = startPoint;
1004 maxPoint = { kx, ky };
1005 }
1006
1007 auto thumbWidth = getSliderThumbRadius (slider);
1008
1009 valueTrack.startNewSubPath (minPoint);
1010 valueTrack.lineTo (isThreeVal ? thumbPoint : maxPoint);
1011 g.setColour (slider.findColour (Slider::trackColourId));
1012 g.strokePath (valueTrack, { trackWidth, PathStrokeType::curved, PathStrokeType::rounded });
1013
1014 if (! isTwoVal)
1015 {
1016 g.setColour (slider.findColour (Slider::thumbColourId));
1017 g.fillEllipse (Rectangle<float> (static_cast<float> (thumbWidth), static_cast<float> (thumbWidth)).withCentre (isThreeVal ? thumbPoint : maxPoint));
1018 }
1019
1020 if (isTwoVal || isThreeVal)
1021 {
1022 auto sr = jmin (trackWidth, (slider.isHorizontal() ? (float) height : (float) width) * 0.4f);
1023 auto pointerColour = slider.findColour (Slider::thumbColourId);
1024
1025 if (slider.isHorizontal())
1026 {
1027 drawPointer (g, minSliderPos - sr,
1028 jmax (0.0f, (float) y + (float) height * 0.5f - trackWidth * 2.0f),
1029 trackWidth * 2.0f, pointerColour, 2);
1030
1031 drawPointer (g, maxSliderPos - trackWidth,
1032 jmin ((float) (y + height) - trackWidth * 2.0f, (float) y + (float) height * 0.5f),
1033 trackWidth * 2.0f, pointerColour, 4);
1034 }
1035 else
1036 {
1037 drawPointer (g, jmax (0.0f, (float) x + (float) width * 0.5f - trackWidth * 2.0f),
1038 minSliderPos - trackWidth,
1039 trackWidth * 2.0f, pointerColour, 1);
1040
1041 drawPointer (g, jmin ((float) (x + width) - trackWidth * 2.0f, (float) x + (float) width * 0.5f), maxSliderPos - sr,
1042 trackWidth * 2.0f, pointerColour, 3);
1043 }
1044 }
1045 }
1046}
1047
1048void LookAndFeel_V4::drawRotarySlider (Graphics& g, int x, int y, int width, int height, float sliderPos,
1049 const float rotaryStartAngle, const float rotaryEndAngle, Slider& slider)
1050{
1051 auto outline = slider.findColour (Slider::rotarySliderOutlineColourId);
1052 auto fill = slider.findColour (Slider::rotarySliderFillColourId);
1053
1054 auto bounds = Rectangle<int> (x, y, width, height).toFloat().reduced (10);
1055
1056 auto radius = jmin (bounds.getWidth(), bounds.getHeight()) / 2.0f;
1057 auto toAngle = rotaryStartAngle + sliderPos * (rotaryEndAngle - rotaryStartAngle);
1058 auto lineW = jmin (8.0f, radius * 0.5f);
1059 auto arcRadius = radius - lineW * 0.5f;
1060
1061 Path backgroundArc;
1062 backgroundArc.addCentredArc (bounds.getCentreX(),
1063 bounds.getCentreY(),
1064 arcRadius,
1065 arcRadius,
1066 0.0f,
1067 rotaryStartAngle,
1068 rotaryEndAngle,
1069 true);
1070
1071 g.setColour (outline);
1072 g.strokePath (backgroundArc, PathStrokeType (lineW, PathStrokeType::curved, PathStrokeType::rounded));
1073
1074 if (slider.isEnabled())
1075 {
1076 Path valueArc;
1077 valueArc.addCentredArc (bounds.getCentreX(),
1078 bounds.getCentreY(),
1079 arcRadius,
1080 arcRadius,
1081 0.0f,
1082 rotaryStartAngle,
1083 toAngle,
1084 true);
1085
1086 g.setColour (fill);
1087 g.strokePath (valueArc, PathStrokeType (lineW, PathStrokeType::curved, PathStrokeType::rounded));
1088 }
1089
1090 auto thumbWidth = lineW * 2.0f;
1091 Point<float> thumbPoint (bounds.getCentreX() + arcRadius * std::cos (toAngle - MathConstants<float>::halfPi),
1092 bounds.getCentreY() + arcRadius * std::sin (toAngle - MathConstants<float>::halfPi));
1093
1094 g.setColour (slider.findColour (Slider::thumbColourId));
1095 g.fillEllipse (Rectangle<float> (thumbWidth, thumbWidth).withCentre (thumbPoint));
1096}
1097
1098void LookAndFeel_V4::drawPointer (Graphics& g, const float x, const float y, const float diameter,
1099 const Colour& colour, const int direction) noexcept
1100{
1101 Path p;
1102 p.startNewSubPath (x + diameter * 0.5f, y);
1103 p.lineTo (x + diameter, y + diameter * 0.6f);
1104 p.lineTo (x + diameter, y + diameter);
1105 p.lineTo (x, y + diameter);
1106 p.lineTo (x, y + diameter * 0.6f);
1107 p.closeSubPath();
1108
1109 p.applyTransform (AffineTransform::rotation ((float) direction * MathConstants<float>::halfPi,
1110 x + diameter * 0.5f, y + diameter * 0.5f));
1111 g.setColour (colour);
1112 g.fillPath (p);
1113}
1114
1116{
1118
1120 || slider.getSliderStyle() == Slider::LinearBarVertical))
1121 {
1122 l->setColour (Label::textColourId, Colours::black.withAlpha (0.7f));
1123 }
1124
1125 return l;
1126}
1127
1128//==============================================================================
1130{
1131 Rectangle<int> bounds (width, height);
1132 auto cornerSize = 5.0f;
1133
1135 g.fillRoundedRectangle (bounds.toFloat(), cornerSize);
1136
1138 g.drawRoundedRectangle (bounds.toFloat().reduced (0.5f, 0.5f), cornerSize, 1.0f);
1139
1141 .draw (g, { static_cast<float> (width), static_cast<float> (height) });
1142}
1143
1144//==============================================================================
1146 bool isMouseOver, bool /*isMouseDown*/,
1147 ConcertinaPanel& concertina, Component& panel)
1148{
1149 auto bounds = area.toFloat().reduced (0.5f);
1150 auto cornerSize = 4.0f;
1151 auto isTopPanel = (concertina.getPanel (0) == &panel);
1152
1153 Path p;
1154 p.addRoundedRectangle (bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight(),
1155 cornerSize, cornerSize, isTopPanel, isTopPanel, false, false);
1156
1157 g.setGradientFill (ColourGradient::vertical (Colours::white.withAlpha (isMouseOver ? 0.4f : 0.2f), static_cast<float> (area.getY()),
1158 Colours::darkgrey.withAlpha (0.1f), static_cast<float> (area.getBottom())));
1159 g.fillPath (p);
1160}
1161
1162//==============================================================================
1164{
1165 auto outerCornerSize = 3.0f;
1166 auto outerBorderWidth = 2.0f;
1167 auto totalBlocks = 7;
1168 auto spacingFraction = 0.03f;
1169
1171 g.fillRoundedRectangle (0.0f, 0.0f, static_cast<float> (width), static_cast<float> (height), outerCornerSize);
1172
1173 auto doubleOuterBorderWidth = 2.0f * outerBorderWidth;
1174 auto numBlocks = roundToInt ((float) totalBlocks * level);
1175
1176 auto blockWidth = ((float) width - doubleOuterBorderWidth) / static_cast<float> (totalBlocks);
1177 auto blockHeight = (float) height - doubleOuterBorderWidth;
1178
1179 auto blockRectWidth = (1.0f - 2.0f * spacingFraction) * blockWidth;
1180 auto blockRectSpacing = spacingFraction * blockWidth;
1181
1182 auto blockCornerSize = 0.1f * blockWidth;
1183
1185
1186 for (auto i = 0; i < totalBlocks; ++i)
1187 {
1188 if (i >= numBlocks)
1189 g.setColour (c.withAlpha (0.5f));
1190 else
1191 g.setColour (i < totalBlocks - 1 ? c : Colours::red);
1192
1193 g.fillRoundedRectangle (outerBorderWidth + ((float) i * blockWidth) + blockRectSpacing,
1194 outerBorderWidth,
1195 blockRectWidth,
1196 blockHeight,
1197 blockCornerSize);
1198 }
1199}
1200
1201//==============================================================================
1203{
1204 auto background = toolbar.findColour (Toolbar::backgroundColourId);
1205
1206 g.setGradientFill ({ background, 0.0f, 0.0f,
1207 background.darker (0.2f),
1208 toolbar.isVertical() ? (float) w - 1.0f : 0.0f,
1209 toolbar.isVertical() ? 0.0f : (float) h - 1.0f,
1210 false });
1211 g.fillAll();
1212}
1213
1215 const String& text, ToolbarItemComponent& component)
1216{
1217 auto baseTextColour = component.findParentComponentOfClass<PopupMenu::CustomComponent>() != nullptr
1220
1221 g.setColour (baseTextColour.withAlpha (component.isEnabled() ? 1.0f : 0.25f));
1222
1223 auto fontHeight = jmin (14.0f, (float) height * 0.85f);
1224 g.setFont (fontHeight);
1225
1226 g.drawFittedText (text,
1227 x, y, width, height,
1229 jmax (1, height / (int) fontHeight));
1230}
1231
1232//==============================================================================
1234 bool isOpen, int width, int height)
1235{
1236 auto buttonSize = (float) height * 0.75f;
1237 auto buttonIndent = ((float) height - buttonSize) * 0.5f;
1238
1239 drawTreeviewPlusMinusBox (g, { buttonIndent, buttonIndent, buttonSize, buttonSize },
1241
1242 auto textX = static_cast<int> ((buttonIndent * 2.0f + buttonSize + 2.0f));
1243
1245
1246 g.setFont ({ (float) height * 0.7f, Font::bold });
1247 g.drawText (name, textX, 0, width - textX - 4, height, Justification::centredLeft, true);
1248}
1249
1251{
1252 g.setColour (component.findColour (PropertyComponent::backgroundColourId));
1253 g.fillRect (0, 0, width, height - 1);
1254}
1255
1257{
1259
1260 auto indent = getPropertyComponentIndent (component);
1261
1263 .withMultipliedAlpha (component.isEnabled() ? 1.0f : 0.6f));
1264
1265 g.setFont ((float) jmin (height, 24) * 0.65f);
1266
1267 auto r = getPropertyComponentContentPosition (component);
1268
1269 g.drawFittedText (component.getName(),
1270 indent, r.getY(), r.getX() - 5, r.getHeight(),
1272}
1273
1275{
1276 return jmin (10, component.getWidth() / 10);
1277}
1278
1280{
1281 auto textW = jmin (200, component.getWidth() / 2);
1282 return { textW, 0, component.getWidth() - textW, component.getHeight() - 1 };
1283}
1284
1285//==============================================================================
1287 const Path& path, Image& cachedImage)
1288{
1289 if (cachedImage.isNull())
1290 {
1291 cachedImage = { Image::ARGB, box.getWidth(), box.getHeight(), true };
1292 Graphics g2 (cachedImage);
1293
1294 DropShadow (Colours::black.withAlpha (0.7f), 8, { 0, 2 }).drawForPath (g2, path);
1295 }
1296
1297 g.setColour (Colours::black);
1298 g.drawImageAt (cachedImage, 0, 0);
1299
1300 g.setColour (currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).withAlpha (0.8f));
1301 g.fillPath (path);
1302
1303 g.setColour (currentColourScheme.getUIColour (ColourScheme::UIColour::outline).withAlpha (0.8f));
1304 g.strokePath (path, PathStrokeType (2.0f));
1305}
1306
1307//==============================================================================
1308void LookAndFeel_V4::drawStretchableLayoutResizerBar (Graphics& g, int /*w*/, int /*h*/, bool /*isVerticalBar*/,
1309 bool isMouseOver, bool isMouseDragging)
1310{
1311 if (isMouseOver || isMouseDragging)
1312 g.fillAll (currentColourScheme.getUIColour (ColourScheme::UIColour::defaultFill).withAlpha (0.5f));
1313}
1314
1315//==============================================================================
1317{
1318 const uint32 transparent = 0x00000000;
1319
1320 const uint32 coloursToUse[] =
1321 {
1326
1330
1337 TextEditor::shadowColourId, transparent,
1338
1340
1341 Label::backgroundColourId, transparent,
1343 Label::outlineColourId, transparent,
1345
1346 ScrollBar::backgroundColourId, transparent,
1348 ScrollBar::trackColourId, transparent,
1349
1350 TreeView::linesColourId, transparent,
1351 TreeView::backgroundColourId, transparent,
1354 TreeView::oddItemsColourId, transparent,
1355 TreeView::evenItemsColourId, transparent,
1356
1362
1369
1372
1376
1379
1383
1393
1395
1397
1401
1404
1407 TooltipWindow::outlineColourId, transparent,
1408
1413
1420
1425
1427
1430
1433
1437
1438 0x1000440, /*LassoComponent::lassoFillColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::defaultFill).getARGB(),
1439 0x1000441, /*LassoComponent::lassoOutlineColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::outline).getARGB(),
1440
1441 0x1004000, /*KeyboardComponentBase::upDownButtonBackgroundColourId*/ 0xffd3d3d3,
1442 0x1004001, /*KeyboardComponentBase::upDownButtonArrowColourId*/ 0xff000000,
1443
1444 0x1005000, /*MidiKeyboardComponent::whiteNoteColourId*/ 0xffffffff,
1445 0x1005001, /*MidiKeyboardComponent::blackNoteColourId*/ 0xff000000,
1446 0x1005002, /*MidiKeyboardComponent::keySeparatorLineColourId*/ 0x66000000,
1447 0x1005003, /*MidiKeyboardComponent::mouseOverKeyOverlayColourId*/ 0x80ffff00,
1448 0x1005004, /*MidiKeyboardComponent::keyDownOverlayColourId*/ 0xffb6b600,
1449 0x1005005, /*MidiKeyboardComponent::textLabelColourId*/ 0xff000000,
1450 0x1005006, /*MidiKeyboardComponent::shadowColourId*/ 0x4c000000,
1451
1452 0x1006000, /*MPEKeyboardComponent::whiteNoteColourId*/ 0xff1a1c27,
1453 0x1006001, /*MPEKeyboardComponent::blackNoteColourId*/ 0x99f1f1f1,
1454 0x1006002, /*MPEKeyboardComponent::textLabelColourId*/ 0xfff1f1f1,
1455 0x1006003, /*MPEKeyboardComponent::noteCircleFillColourId*/ 0x99ba00ff,
1456 0x1006004, /*MPEKeyboardComponent::noteCircleOutlineColourId*/ 0xfff1f1f1,
1457
1458 0x1004500, /*CodeEditorComponent::backgroundColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).getARGB(),
1459 0x1004502, /*CodeEditorComponent::highlightColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::defaultFill).withAlpha (0.4f).getARGB(),
1460 0x1004503, /*CodeEditorComponent::defaultTextColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(),
1461 0x1004504, /*CodeEditorComponent::lineNumberBackgroundId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::highlightedFill).withAlpha (0.5f).getARGB(),
1462 0x1004505, /*CodeEditorComponent::lineNumberTextId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::defaultFill).getARGB(),
1463
1464 0x1007000, /*ColourSelector::backgroundColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).getARGB(),
1465 0x1007001, /*ColourSelector::labelTextColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(),
1466
1467 0x100ad00, /*KeyMappingEditorComponent::backgroundColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::widgetBackground).getARGB(),
1468 0x100ad01, /*KeyMappingEditorComponent::textColourId*/ currentColourScheme.getUIColour (ColourScheme::UIColour::defaultText).getARGB(),
1469
1471
1473
1480
1486 };
1487
1488 for (int i = 0; i < numElementsInArray (coloursToUse); i += 2)
1489 setColour ((int) coloursToUse [i], Colour ((uint32) coloursToUse [i + 1]));
1490}
1491
1492} // namespace juce
Type jmin(const Type a, const Type b)
Definition MathsFunctions.h:60
Type jmax(const Type a, const Type b)
Definition MathsFunctions.h:48
float normal(const fft_t *freqs, off_t x)
Definition OscilGen.cpp:46
static void message(int level, const char *fmt,...)
Definition adplugdb.cpp:120
static String charToString(water_uchar character)
Definition String.cpp:311
static AffineTransform rotation(float angleInRadians) noexcept
Definition juce_AffineTransform.cpp:106
Definition juce_AlertWindow.h:45
@ textColourId
Definition juce_AlertWindow.h:444
@ outlineColourId
Definition juce_AlertWindow.h:445
@ backgroundColourId
Definition juce_AlertWindow.h:443
int getNumButtons() const
Definition juce_AlertWindow.cpp:143
MessageBoxIconType getAlertType() const noexcept
Definition juce_AlertWindow.h:69
bool containsAnyExtraComponents() const
Definition juce_AlertWindow.cpp:511
@ backgroundColourId
Definition juce_BooleanPropertyComponent.h:92
@ outlineColourId
Definition juce_BooleanPropertyComponent.h:93
@ outlineColourId
Definition juce_BubbleComponent.h:143
@ backgroundColourId
Definition juce_BubbleComponent.h:142
Definition juce_Button.h:43
bool getToggleState() const noexcept
Definition juce_Button.h:127
Button(const String &buttonName)
Definition juce_Button.cpp:76
Definition juce_CallOutBox.h:61
@ caretColourId
Definition juce_CaretComponent.h:65
Definition juce_ChoicePropertyComponent.h:51
static ColourGradient vertical(Colour colour1, float y1, Colour colour2, float y2)
Definition juce_ColourGradient.cpp:85
Definition juce_Colour.h:38
Colour withAlpha(uint8 newAlpha) const noexcept
Definition juce_Colour.cpp:317
JUCE_NODISCARD Colour withMultipliedSaturation(float multiplier) const noexcept
Definition juce_Colour.cpp:432
Colour withMultipliedAlpha(float alphaMultiplier) const noexcept
Definition juce_Colour.cpp:333
uint32 getARGB() const noexcept
Definition juce_Colour.cpp:301
JUCE_NODISCARD Colour contrasting(float amount=1.0f) const noexcept
Definition juce_Colour.cpp:491
Definition juce_ComboBox.h:49
@ arrowColourId
Definition juce_ComboBox.h:360
@ outlineColourId
Definition juce_ComboBox.h:358
@ focusedOutlineColourId
Definition juce_ComboBox.h:361
@ textColourId
Definition juce_ComboBox.h:357
@ buttonColourId
Definition juce_ComboBox.h:359
@ backgroundColourId
Definition juce_ComboBox.h:356
Definition juce_Component.h:36
Component * getParentComponent() const noexcept
Definition juce_Component.h:804
int getHeight() const noexcept
Definition juce_Component.h:274
bool hasKeyboardFocus(bool trueIfChildIsFocused) const
Definition juce_Component.cpp:3086
void setBounds(int x, int y, int width, int height)
Definition juce_Component.cpp:1147
TargetClass * findParentComponentOfClass() const
Definition juce_Component.h:813
Colour findColour(int colourID, bool inheritFromParent=false) const
Definition juce_Component.cpp:2219
int getWidth() const noexcept
Definition juce_Component.h:271
bool isEnabled() const noexcept
Definition juce_Component.cpp:3104
Rectangle< int > getLocalBounds() const noexcept
Definition juce_Component.cpp:2283
String getName() const noexcept
Definition juce_Component.h:76
Definition juce_ConcertinaPanel.h:40
Component * getPanel(int index) const noexcept
Definition juce_ConcertinaPanel.cpp:320
Definition juce_DirectoryContentsDisplayComponent.h:38
@ textColourId
Definition juce_DirectoryContentsDisplayComponent.h:96
@ highlightColourId
Definition juce_DirectoryContentsDisplayComponent.h:95
@ highlightedTextColourId
Definition juce_DirectoryContentsDisplayComponent.h:97
Definition juce_DocumentWindow.h:55
@ textColourId
Definition juce_DocumentWindow.h:236
@ closeButton
Definition juce_DocumentWindow.h:66
@ maximiseButton
Definition juce_DocumentWindow.h:65
@ minimiseButton
Definition juce_DocumentWindow.h:64
Definition juce_DrawableButton.h:41
@ ImageOnButtonBackground
Definition juce_DrawableButton.h:50
@ textColourOnId
Definition juce_DrawableButton.h:159
@ textColourId
Definition juce_DrawableButton.h:158
@ backgroundColourId
Definition juce_DrawableButton.h:161
@ backgroundOnColourId
Definition juce_DrawableButton.h:165
Definition juce_Drawable.h:38
void drawWithin(Graphics &g, Rectangle< float > destArea, RectanglePlacement placement, float opacity) const
Definition juce_Drawable.cpp:102
Definition juce_DrawablePath.h:40
void setPath(const Path &newPath)
Definition juce_DrawablePath.cpp:42
void setFill(const FillType &newFill)
Definition juce_DrawableShape.cpp:50
Definition juce_FileBrowserComponent.h:45
@ currentPathBoxTextColourId
Definition juce_FileBrowserComponent.h:226
@ filenameBoxBackgroundColourId
Definition juce_FileBrowserComponent.h:228
@ currentPathBoxBackgroundColourId
Definition juce_FileBrowserComponent.h:225
@ filenameBoxTextColourId
Definition juce_FileBrowserComponent.h:229
@ currentPathBoxArrowColourId
Definition juce_FileBrowserComponent.h:227
@ titleTextColourId
Definition juce_FileChooserDialogBox.h:142
Definition juce_File.h:45
Definition juce_FilePreviewComponent.h:44
@ backgroundColourId
Definition juce_FileSearchPathListComponent.h:70
Definition juce_Font.h:42
float getHeight() const noexcept
Definition juce_Font.cpp:735
int getStringWidth(const String &text) const
Definition juce_Font.cpp:742
@ bold
Definition juce_Font.h:51
@ plain
Definition juce_Font.h:50
@ italic
Definition juce_Font.h:52
Definition juce_GlyphArrangement.h:117
void createPath(Path &path) const
Definition juce_GlyphArrangement.cpp:748
void addFittedText(const Font &font, const String &text, float x, float y, float width, float height, Justification layout, int maximumLinesToUse, float minimumHorizontalScale=0.0f)
Definition juce_GlyphArrangement.cpp:310
Definition juce_GraphicsContext.h:45
void fillRoundedRectangle(float x, float y, float width, float height, float cornerSize) const
Definition juce_GraphicsContext.cpp:647
void setColour(Colour newColour)
Definition juce_GraphicsContext.cpp:278
@ textColourId
Definition juce_GroupComponent.h:81
@ outlineColourId
Definition juce_GroupComponent.h:80
Definition juce_Image.h:58
int getWidth() const noexcept
Definition juce_Image.cpp:271
int getHeight() const noexcept
Definition juce_Image.cpp:272
bool isNull() const noexcept
Definition juce_Image.h:155
@ ARGB
Definition juce_Image.h:67
Definition juce_Justification.h:41
@ centredRight
Definition juce_Justification.h:148
@ centred
Definition juce_Justification.h:138
@ centredLeft
Definition juce_Justification.h:143
const Rectangle< ValueType > appliedToRectangle(const Rectangle< ValueType > &areaToAdjust, const Rectangle< ValueType > &targetSpace) const noexcept
Definition juce_Justification.h:93
Definition juce_Label.h:41
@ outlineColourId
Definition juce_Label.h:108
@ backgroundColourId
Definition juce_Label.h:106
@ textWhenEditingColourId
Definition juce_Label.h:111
@ textColourId
Definition juce_Label.h:107
@ textColourId
Definition juce_ListBox.h:498
@ backgroundColourId
Definition juce_ListBox.h:494
@ outlineColourId
Definition juce_ListBox.h:496
void fillTextEditorBackground(Graphics &, int width, int height, TextEditor &) override
Definition juce_LookAndFeel_V2.cpp:1184
Font getMenuBarFont(MenuBarComponent &, int itemIndex, const String &itemText) override
Definition juce_LookAndFeel_V2.cpp:1123
AlertWindow * createAlertWindow(const String &title, const String &message, const String &button1, const String &button2, const String &button3, MessageBoxIconType iconType, int numButtons, Component *associatedComponent) override
Definition juce_LookAndFeel_V2.cpp:415
void drawFileBrowserRow(Graphics &, int width, int height, const File &file, const String &filename, Image *icon, const String &fileSizeDescription, const String &fileTimeDescription, bool isDirectory, bool isItemSelected, int itemIndex, DirectoryContentsDisplayComponent &) override
Definition juce_LookAndFeel_V2.cpp:2667
Label * createSliderTextBox(Slider &) override
Definition juce_LookAndFeel_V2.cpp:1615
Font getPopupMenuFont() override
Definition juce_LookAndFeel_V2.cpp:875
void drawTreeviewPlusMinusBox(Graphics &, const Rectangle< float > &area, Colour backgroundColour, bool isOpen, bool isMouseOver) override
Definition juce_LookAndFeel_V3.cpp:335
Definition juce_LookAndFeel_V4.h:43
ColourScheme(ItemColours... coloursToUse)
Definition juce_LookAndFeel_V4.h:62
Colour getUIColour(UIColour colourToGet) const noexcept
Definition juce_LookAndFeel_V4.cpp:29
UIColour
Definition juce_LookAndFeel_V4.h:47
@ defaultText
Definition juce_LookAndFeel_V4.h:52
@ highlightedText
Definition juce_LookAndFeel_V4.h:54
@ numColours
Definition juce_LookAndFeel_V4.h:58
@ outline
Definition juce_LookAndFeel_V4.h:51
@ widgetBackground
Definition juce_LookAndFeel_V4.h:49
@ highlightedFill
Definition juce_LookAndFeel_V4.h:55
@ windowBackground
Definition juce_LookAndFeel_V4.h:48
@ defaultFill
Definition juce_LookAndFeel_V4.h:53
@ menuBackground
Definition juce_LookAndFeel_V4.h:50
@ menuText
Definition juce_LookAndFeel_V4.h:56
Colour palette[numColours]
Definition juce_LookAndFeel_V4.h:86
void setUIColour(UIColour colourToSet, Colour newColour) noexcept
Definition juce_LookAndFeel_V4.cpp:38
Definition juce_LookAndFeel_V4.cpp:110
Path normalShape
Definition juce_LookAndFeel_V4.cpp:148
LookAndFeel_V4_DocumentWindowButton(const String &name, Colour c, const Path &normal, const Path &toggled)
Definition juce_LookAndFeel_V4.cpp:112
Colour colour
Definition juce_LookAndFeel_V4.cpp:147
void paintButton(Graphics &g, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override
Definition juce_LookAndFeel_V4.cpp:117
Path toggledShape
Definition juce_LookAndFeel_V4.cpp:148
Definition juce_LookAndFeel_V4.h:37
void positionComboBoxText(ComboBox &, Label &) override
Definition juce_LookAndFeel_V4.cpp:936
void drawToggleButton(Graphics &, ToggleButton &, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override
Definition juce_LookAndFeel_V4.cpp:328
void drawButtonBackground(Graphics &, Button &, const Colour &backgroundColour, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override
Definition juce_LookAndFeel_V4.cpp:281
void fillTextEditorBackground(Graphics &, int width, int height, TextEditor &) override
Definition juce_LookAndFeel_V4.cpp:665
void drawMenuBarItem(Graphics &, int width, int height, int itemIndex, const String &itemText, bool isMouseOverItem, bool isMenuOpen, bool isMouseOverBar, MenuBarComponent &) override
Definition juce_LookAndFeel_V4.cpp:884
void drawPointer(Graphics &, float x, float y, float diameter, const Colour &, int direction) noexcept
Definition juce_LookAndFeel_V4.cpp:1098
Label * createSliderTextBox(Slider &) override
Definition juce_LookAndFeel_V4.cpp:1115
Button * createDocumentWindowButton(int) override
Definition juce_LookAndFeel_V4.cpp:153
void drawScrollbar(Graphics &, ScrollBar &, int x, int y, int width, int height, bool isScrollbarVertical, int thumbStartPosition, int thumbSize, bool isMouseOver, bool isMouseDown) override
Definition juce_LookAndFeel_V4.cpp:621
Button * createFileBrowserGoUpButton() override
Definition juce_LookAndFeel_V4.cpp:702
int getPropertyComponentIndent(PropertyComponent &)
Definition juce_LookAndFeel_V4.cpp:1274
ColourScheme currentColourScheme
Definition juce_LookAndFeel_V4.h:252
void drawLinearSlider(Graphics &, int x, int y, int width, int height, float sliderPos, float minSliderPos, float maxSliderPos, const Slider::SliderStyle, Slider &) override
Definition juce_LookAndFeel_V4.cpp:952
void paintToolbarBackground(Graphics &, int width, int height, Toolbar &) override
Definition juce_LookAndFeel_V4.cpp:1202
static ColourScheme getDarkColourScheme()
Definition juce_LookAndFeel_V4.cpp:80
void drawPropertyComponentBackground(Graphics &, int width, int height, PropertyComponent &) override
Definition juce_LookAndFeel_V4.cpp:1250
void getIdealPopupMenuItemSize(const String &text, bool isSeparator, int standardMenuItemHeight, int &idealWidth, int &idealHeight) override
Definition juce_LookAndFeel_V4.cpp:849
void drawPropertyPanelSectionHeader(Graphics &, const String &name, bool isOpen, int width, int height) override
Definition juce_LookAndFeel_V4.cpp:1233
void positionDocumentWindowButtons(DocumentWindow &, int, int, int, int, Button *, Button *, Button *, bool) override
Definition juce_LookAndFeel_V4.cpp:194
Font getAlertWindowTitleFont() override
Definition juce_LookAndFeel_V4.cpp:481
int getSliderThumbRadius(Slider &) override
Definition juce_LookAndFeel_V4.cpp:946
void drawLinearProgressBar(Graphics &, ProgressBar &, int width, int height, double progress, const String &)
Definition juce_LookAndFeel_V4.cpp:495
int getAlertWindowButtonHeight() override
Definition juce_LookAndFeel_V4.cpp:480
Path getTickShape(float height) override
Definition juce_LookAndFeel_V4.cpp:639
void drawDocumentWindowTitleBar(DocumentWindow &, Graphics &, int, int, int, int, const Image *, bool) override
Definition juce_LookAndFeel_V4.cpp:226
void drawCircularProgressBar(Graphics &, ProgressBar &, const String &)
Definition juce_LookAndFeel_V4.cpp:554
void drawLevelMeter(Graphics &, int, int, float) override
Definition juce_LookAndFeel_V4.cpp:1163
static ColourScheme getLightColourScheme()
Definition juce_LookAndFeel_V4.cpp:101
void drawCallOutBoxBackground(CallOutBox &, Graphics &, const Path &, Image &) override
Definition juce_LookAndFeel_V4.cpp:1286
void drawMenuBarBackground(Graphics &, int width, int height, bool isMouseOverBar, MenuBarComponent &) override
Definition juce_LookAndFeel_V4.cpp:869
Font getComboBoxFont(ComboBox &) override
Definition juce_LookAndFeel_V4.cpp:931
Font getAlertWindowMessageFont() override
Definition juce_LookAndFeel_V4.cpp:482
void drawConcertinaPanelHeader(Graphics &, const Rectangle< int > &area, bool isMouseOver, bool isMouseDown, ConcertinaPanel &, Component &panel) override
Definition juce_LookAndFeel_V4.cpp:1145
~LookAndFeel_V4() override
Definition juce_LookAndFeel_V4.cpp:71
void initialiseColours()
Definition juce_LookAndFeel_V4.cpp:1316
void setColourScheme(ColourScheme)
Definition juce_LookAndFeel_V4.cpp:74
void drawAlertBox(Graphics &, AlertWindow &, const Rectangle< int > &textArea, TextLayout &) override
Definition juce_LookAndFeel_V4.cpp:407
Font getTextButtonFont(TextButton &, int buttonHeight) override
Definition juce_LookAndFeel_V4.cpp:276
ColourScheme & getCurrentColourScheme() noexcept
Definition juce_LookAndFeel_V4.h:101
static ColourScheme getGreyColourScheme()
Definition juce_LookAndFeel_V4.cpp:94
void layoutFileBrowserComponent(FileBrowserComponent &, DirectoryContentsDisplayComponent *, FilePreviewComponent *, ComboBox *currentPathBox, TextEditor *filenameBox, Button *goUpButton) override
Definition juce_LookAndFeel_V4.cpp:718
void drawTextEditorOutline(Graphics &, int width, int height, TextEditor &) override
Definition juce_LookAndFeel_V4.cpp:681
void drawStretchableLayoutResizerBar(Graphics &, int, int, bool, bool, bool) override
Definition juce_LookAndFeel_V4.cpp:1308
void drawTickBox(Graphics &, Component &, float x, float y, float w, float h, bool ticked, bool isEnabled, bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override
Definition juce_LookAndFeel_V4.cpp:353
void drawPropertyComponentLabel(Graphics &, int width, int height, PropertyComponent &) override
Definition juce_LookAndFeel_V4.cpp:1256
LookAndFeel_V4()
Definition juce_LookAndFeel_V4.cpp:61
void paintToolbarButtonLabel(Graphics &, int x, int y, int width, int height, const String &text, ToolbarItemComponent &) override
Definition juce_LookAndFeel_V4.cpp:1214
AlertWindow * createAlertWindow(const String &title, const String &message, const String &button1, const String &button2, const String &button3, MessageBoxIconType iconType, int numButtons, Component *associatedComponent) override
Definition juce_LookAndFeel_V4.cpp:386
Rectangle< int > getPropertyComponentContentPosition(PropertyComponent &) override
Definition juce_LookAndFeel_V4.cpp:1279
int getDefaultScrollbarWidth() override
Definition juce_LookAndFeel_V4.cpp:616
Path getCrossShape(float height) override
Definition juce_LookAndFeel_V4.cpp:651
void drawTooltip(Graphics &, const String &text, int width, int height) override
Definition juce_LookAndFeel_V4.cpp:1129
void changeToggleButtonWidthToFitText(ToggleButton &) override
Definition juce_LookAndFeel_V4.cpp:375
void drawRotarySlider(Graphics &, int x, int y, int width, int height, float sliderPosProportional, float rotaryStartAngle, float rotaryEndAngle, Slider &) override
Definition juce_LookAndFeel_V4.cpp:1048
void drawComboBox(Graphics &, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, ComboBox &) override
Definition juce_LookAndFeel_V4.cpp:909
void drawProgressBar(Graphics &, ProgressBar &, int width, int height, double progress, const String &textToShow) override
Definition juce_LookAndFeel_V4.cpp:486
void drawFileBrowserRow(Graphics &, int width, int height, const File &file, const String &filename, Image *icon, const String &fileSizeDescription, const String &fileTimeDescription, bool isDirectory, bool isItemSelected, int itemIndex, DirectoryContentsDisplayComponent &) override
Definition juce_LookAndFeel_V4.cpp:748
void drawPopupMenuItem(Graphics &, const Rectangle< int > &area, bool isSeparator, bool isActive, bool isHighlighted, bool isTicked, bool hasSubMenu, const String &text, const String &shortcutKeyText, const Drawable *icon, const Colour *textColour) override
Definition juce_LookAndFeel_V4.cpp:761
Font getAlertWindowFont() override
Definition juce_LookAndFeel_V4.cpp:483
static ColourScheme getMidnightColourScheme()
Definition juce_LookAndFeel_V4.cpp:87
bool isColourSpecified(int colourId) const noexcept
Definition juce_LookAndFeel.cpp:100
void setColour(int colourId, Colour colour) noexcept
Definition juce_LookAndFeel.cpp:89
Colour findColour(int colourId) const noexcept
Definition juce_LookAndFeel.cpp:77
Definition juce_MenuBarComponent.h:40
Definition juce_Path.h:65
void loadPathFromData(const void *data, size_t numberOfBytes)
Definition juce_Path.cpp:1293
void addRoundedRectangle(float x, float y, float width, float height, float cornerSize)
Definition juce_Path.cpp:412
void startNewSubPath(float startX, float startY)
Definition juce_Path.cpp:216
void addTriangle(float x1, float y1, float x2, float y2, float x3, float y3)
Definition juce_Path.cpp:417
void addEllipse(float x, float y, float width, float height)
Definition juce_Path.cpp:446
void addRectangle(float x, float y, float width, float height)
Definition juce_Path.cpp:323
void scaleToFit(float x, float y, float width, float height, bool preserveProportions) noexcept
Definition juce_Path.cpp:173
void applyTransform(const AffineTransform &transform) noexcept
Definition juce_Path.cpp:821
void addCentredArc(float centreX, float centreY, float radiusX, float radiusY, float rotationOfEllipse, float fromRadians, float toRadians, bool startAsNewSubPath=false)
Definition juce_Path.cpp:483
void lineTo(float endX, float endY)
Definition juce_Path.cpp:233
Path createPathWithRoundedCorners(float cornerRadius) const
Definition juce_Path.cpp:1075
void addLineSegment(Line< float > line, float lineThickness)
Definition juce_Path.cpp:581
void addArrow(Line< float > line, float lineThickness, float arrowheadWidth, float arrowheadLength)
Definition juce_Path.cpp:593
void setUsingNonZeroWinding(bool isNonZeroWinding) noexcept
Definition juce_Path.cpp:168
Definition juce_PathStrokeType.h:42
@ curved
Definition juce_PathStrokeType.h:53
void createStrokedPath(Path &destPath, const Path &sourcePath, const AffineTransform &transform=AffineTransform(), float extraAccuracy=1.0f) const
Definition juce_PathStrokeType.cpp:655
@ rounded
Definition juce_PathStrokeType.h:64
Definition juce_Point.h:42
ValueType y
Definition juce_Point.h:247
ValueType x
Definition juce_Point.h:246
Definition juce_PopupMenu.h:829
@ headerTextColourId
Definition juce_PopupMenu.h:763
@ highlightedTextColourId
Definition juce_PopupMenu.h:767
@ backgroundColourId
Definition juce_PopupMenu.h:760
@ highlightedBackgroundColourId
Definition juce_PopupMenu.h:765
@ textColourId
Definition juce_PopupMenu.h:761
Definition juce_ProgressBar.h:51
@ backgroundColourId
Definition juce_ProgressBar.h:95
@ foregroundColourId
Definition juce_ProgressBar.h:96
Definition juce_PropertyComponent.h:49
@ labelTextColourId
Definition juce_PropertyComponent.h:118
@ backgroundColourId
Definition juce_PropertyComponent.h:117
Definition juce_Rectangle.h:67
ValueType getRight() const noexcept
Definition juce_Rectangle.h:139
Rectangle< float > toFloat() const noexcept
Definition juce_Rectangle.h:873
ValueType getCentreX() const noexcept
Definition juce_Rectangle.h:145
ValueType getHeight() const noexcept
Definition juce_Rectangle.h:136
ValueType getCentreY() const noexcept
Definition juce_Rectangle.h:148
ValueType getBottom() const noexcept
Definition juce_Rectangle.h:142
ValueType getX() const noexcept
Definition juce_Rectangle.h:127
ValueType getWidth() const noexcept
Definition juce_Rectangle.h:133
Rectangle reduced(ValueType deltaX, ValueType deltaY) const noexcept
Definition juce_Rectangle.h:485
ValueType getY() const noexcept
Definition juce_Rectangle.h:130
@ onlyReduceInSize
Definition juce_RectanglePlacement.h:106
@ centred
Definition juce_RectanglePlacement.h:119
@ backgroundColourId
Definition juce_ResizableWindow.h:312
Definition juce_ScrollBar.h:54
@ thumbColourId
Definition juce_ScrollBar.h:295
@ trackColourId
Definition juce_ScrollBar.h:296
@ backgroundColourId
Definition juce_ScrollBar.h:294
@ titleTextColour
Definition juce_SidePanel.h:171
@ dismissButtonOverColour
Definition juce_SidePanel.h:174
@ dismissButtonDownColour
Definition juce_SidePanel.h:175
@ shadowBaseColour
Definition juce_SidePanel.h:172
@ backgroundColour
Definition juce_SidePanel.h:170
@ dismissButtonNormalColour
Definition juce_SidePanel.h:173
Definition juce_Slider.h:54
SliderStyle
Definition juce_Slider.h:62
@ LinearBarVertical
Definition juce_Slider.h:66
@ ThreeValueHorizontal
Definition juce_Slider.h:82
@ TwoValueHorizontal
Definition juce_Slider.h:77
@ LinearBar
Definition juce_Slider.h:65
@ ThreeValueVertical
Definition juce_Slider.h:85
@ TwoValueVertical
Definition juce_Slider.h:79
@ textBoxBackgroundColourId
Definition juce_Slider.h:874
@ textBoxTextColourId
Definition juce_Slider.h:873
@ rotarySliderFillColourId
Definition juce_Slider.h:870
@ textBoxHighlightColourId
Definition juce_Slider.h:875
@ textBoxOutlineColourId
Definition juce_Slider.h:876
@ trackColourId
Definition juce_Slider.h:869
@ backgroundColourId
Definition juce_Slider.h:866
@ rotarySliderOutlineColourId
Definition juce_Slider.h:871
@ thumbColourId
Definition juce_Slider.h:867
Definition juce_String.h:53
bool isNotEmpty() const noexcept
Definition juce_String.h:316
@ tabOutlineColourId
Definition juce_TabbedButtonBar.h:296
@ frontOutlineColourId
Definition juce_TabbedButtonBar.h:299
@ outlineColourId
Definition juce_TabbedComponent.h:189
@ backgroundColourId
Definition juce_TabbedComponent.h:188
Definition juce_TextButton.h:39
@ textColourOnId
Definition juce_TextButton.h:80
@ buttonColourId
Definition juce_TextButton.h:73
@ buttonOnColourId
Definition juce_TextButton.h:76
@ textColourOffId
Definition juce_TextButton.h:79
Definition juce_TextEditor.h:43
@ backgroundColourId
Definition juce_TextEditor.h:209
@ highlightColourId
Definition juce_TextEditor.h:217
@ textColourId
Definition juce_TextEditor.h:212
@ outlineColourId
Definition juce_TextEditor.h:223
@ highlightedTextColourId
Definition juce_TextEditor.h:221
@ focusedOutlineColourId
Definition juce_TextEditor.h:226
@ shadowColourId
Definition juce_TextEditor.h:229
bool isReadOnly() const noexcept
Definition juce_TextEditor.cpp:1042
Definition juce_TextLayout.h:41
void draw(Graphics &, Rectangle< float > area) const
Definition juce_TextLayout.cpp:197
@ backgroundColourId
Definition juce_TextPropertyComponent.h:121
@ outlineColourId
Definition juce_TextPropertyComponent.h:123
@ textColourId
Definition juce_TextPropertyComponent.h:122
static uint32 getMillisecondCounter() noexcept
Definition juce_Time.cpp:241
Definition juce_ToggleButton.h:41
@ tickDisabledColourId
Definition juce_ToggleButton.h:76
@ textColourId
Definition juce_ToggleButton.h:74
@ tickColourId
Definition juce_ToggleButton.h:75
Definition juce_Toolbar.h:55
@ backgroundColourId
Definition juce_Toolbar.h:237
@ editingModeOutlineColourId
Definition juce_Toolbar.h:249
@ buttonMouseOverBackgroundColourId
Definition juce_Toolbar.h:241
@ labelTextColourId
Definition juce_Toolbar.h:246
@ separatorColourId
Definition juce_Toolbar.h:239
@ buttonMouseDownBackgroundColourId
Definition juce_Toolbar.h:243
bool isVertical() const noexcept
Definition juce_Toolbar.h:84
Definition juce_ToolbarItemComponent.h:50
@ textColourId
Definition juce_TooltipWindow.h:115
@ outlineColourId
Definition juce_TooltipWindow.h:116
@ backgroundColourId
Definition juce_TooltipWindow.h:114
@ dragAndDropIndicatorColourId
Definition juce_TreeView.h:872
@ oddItemsColourId
Definition juce_TreeView.h:874
@ linesColourId
Definition juce_TreeView.h:871
@ evenItemsColourId
Definition juce_TreeView.h:875
@ selectedItemBackgroundColourId
Definition juce_TreeView.h:873
@ backgroundColourId
Definition juce_TreeView.h:870
UINT_D64 w
Definition inflate.c:942
int * l
Definition inflate.c:1579
int y
Definition inflate.c:1588
int g
Definition inflate.c:1573
register unsigned i
Definition inflate.c:1575
unsigned x[BMAX+1]
Definition inflate.c:1586
static char filename[]
Definition features.c:5
static const char * title
Definition pugl.h:1747
static const char * name
Definition pugl.h:1582
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 jassertfalse
static const SerdStyle style
Definition sratom.c:36
const Colour red
Definition juce_Colours.h:157
const Colour grey
Definition juce_Colours.h:93
const Colour black
Definition juce_Colours.h:50
const Colour darkgrey
Definition juce_Colours.h:67
const Colour white
Definition juce_Colours.h:180
const Colour blue
Definition juce_Colours.h:52
static TextLayout layoutTooltipText(const String &text, Colour colour) noexcept
Definition juce_LookAndFeel_V2.cpp:45
Definition carla_juce.cpp:31
constexpr Type jmin(Type a, Type b)
Definition juce_MathsFunctions.h:106
unsigned int uint32
Definition juce_MathsFunctions.h:45
constexpr Type jmax(Type a, Type b)
Definition juce_MathsFunctions.h:94
MessageBoxIconType
Definition juce_MessageBoxOptions.h:31
@ WarningIcon
Definition juce_MessageBoxOptions.h:35
@ NoIcon
Definition juce_MessageBoxOptions.h:32
@ InfoIcon
Definition juce_MessageBoxOptions.h:37
wchar_t juce_wchar
Definition juce_CharacterFunctions.h:42
void ignoreUnused(Types &&...) noexcept
Definition juce_MathsFunctions.h:333
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Definition juce_MathsFunctions.h:279
constexpr FloatType degreesToRadians(FloatType degrees) noexcept
Definition juce_MathsFunctions.h:409
unsigned char uint8
Definition juce_MathsFunctions.h:37
int roundToInt(const FloatType value) noexcept
Definition juce_MathsFunctions.h:465
@ window
Definition juce_AccessibilityRole.h:63
@ slider
Definition juce_AccessibilityRole.h:43
@ menuBar
Definition juce_AccessibilityRole.h:48
@ progressBar
Definition juce_AccessibilityRole.h:60
@ button
Definition juce_AccessibilityRole.h:38
@ label
Definition juce_AccessibilityRole.h:44
constexpr int numElementsInArray(Type(&)[N]) noexcept
Definition juce_MathsFunctions.h:344
Definition jquant2.c:258
Definition juce_DropShadowEffect.h:36
static constexpr FloatType halfPi
Definition juce_MathsFunctions.h:388
static constexpr FloatType twoPi
Definition juce_MathsFunctions.h:385
static constexpr FloatType pi
Definition juce_MathsFunctions.h:382
const char * text
Definition swell-functions.h:167
uch * p
Definition crypt.c:594
return c
Definition crypt.c:175
int r
Definition crypt.c:458
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
b
Definition crypt.c:628
struct zdirent * file
Definition win32.c:1500