LMMS
Loading...
Searching...
No Matches
juce_ColourSelector.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{
32 {
33 setRange (0.0, 255.0, 1.0);
34 }
35
36 String getTextFromValue (double value) override
37 {
38 return String::toHexString ((int) value).toUpperCase().paddedLeft ('0', 2);
39 }
40
41 double getValueFromText (const String& text) override
42 {
43 return (double) text.getHexValue32();
44 }
45};
46
47//==============================================================================
49{
50public:
51 ColourSpaceView (ColourSelector& cs, float& hue, float& sat, float& val, int edgeSize)
52 : owner (cs), h (hue), s (sat), v (val), edge (edgeSize)
53 {
56 }
57
58 void paint (Graphics& g) override
59 {
60 if (colours.isNull())
61 {
62 auto width = getWidth() / 2;
63 auto height = getHeight() / 2;
64 colours = Image (Image::RGB, width, height, false);
65
67
68 for (int y = 0; y < height; ++y)
69 {
70 auto val = 1.0f - (float) y / (float) height;
71
72 for (int x = 0; x < width; ++x)
73 {
74 auto sat = (float) x / (float) width;
75 pixels.setPixelColour (x, y, Colour (h, sat, val, 1.0f));
76 }
77 }
78 }
79
80 g.setOpacity (1.0f);
81 g.drawImageTransformed (colours,
83 .getTransformToFit (colours.getBounds().toFloat(),
84 getLocalBounds().reduced (edge).toFloat()),
85 false);
86 }
87
88 void mouseDown (const MouseEvent& e) override
89 {
90 mouseDrag (e);
91 }
92
93 void mouseDrag (const MouseEvent& e) override
94 {
95 auto sat = (float) (e.x - edge) / (float) (getWidth() - edge * 2);
96 auto val = 1.0f - (float) (e.y - edge) / (float) (getHeight() - edge * 2);
97
98 owner.setSV (sat, val);
99 }
100
102 {
103 if (lastHue != h)
104 {
105 lastHue = h;
106 colours = {};
107 repaint();
108 }
109
110 updateMarker();
111 }
112
113 void resized() override
114 {
115 colours = {};
116 updateMarker();
117 }
118
119private:
121 float& h;
122 float& s;
123 float& v;
124 float lastHue = 0;
125 const int edge;
127
129 {
131 {
132 setInterceptsMouseClicks (false, false);
133 }
134
135 void paint (Graphics& g) override
136 {
137 g.setColour (Colour::greyLevel (0.1f));
138 g.drawEllipse (1.0f, 1.0f, (float) getWidth() - 2.0f, (float) getHeight() - 2.0f, 1.0f);
139 g.setColour (Colour::greyLevel (0.9f));
140 g.drawEllipse (2.0f, 2.0f, (float) getWidth() - 4.0f, (float) getHeight() - 4.0f, 1.0f);
141 }
142 };
143
145
147 {
148 auto markerSize = jmax (14, edge * 2);
149 auto area = getLocalBounds().reduced (edge);
150
151 marker.setBounds (Rectangle<int> (markerSize, markerSize)
152 .withCentre (area.getRelativePoint (s, 1.0f - v)));
153 }
154
156};
157
158//==============================================================================
160{
161public:
162 HueSelectorComp (ColourSelector& cs, float& hue, int edgeSize)
163 : owner (cs), h (hue), edge (edgeSize)
164 {
166 }
167
168 void paint (Graphics& g) override
169 {
171 cg.isRadial = false;
172 cg.point1.setXY (0.0f, (float) edge);
173 cg.point2.setXY (0.0f, (float) getHeight());
174
175 for (float i = 0.0f; i <= 1.0f; i += 0.02f)
176 cg.addColour (i, Colour (i, 1.0f, 1.0f, 1.0f));
177
178 g.setGradientFill (cg);
179 g.fillRect (getLocalBounds().reduced (edge));
180 }
181
182 void resized() override
183 {
184 auto markerSize = jmax (14, edge * 2);
185 auto area = getLocalBounds().reduced (edge);
186
187 marker.setBounds (Rectangle<int> (getWidth(), markerSize)
188 .withCentre (area.getRelativePoint (0.5f, h)));
189 }
190
191 void mouseDown (const MouseEvent& e) override
192 {
193 mouseDrag (e);
194 }
195
196 void mouseDrag (const MouseEvent& e) override
197 {
198 owner.setHue ((float) (e.y - edge) / (float) (getHeight() - edge * 2));
199 }
200
202 {
203 resized();
204 }
205
206private:
208 float& h;
209 const int edge;
210
212 {
214 {
215 setInterceptsMouseClicks (false, false);
216 }
217
218 void paint (Graphics& g) override
219 {
220 auto cw = (float) getWidth();
221 auto ch = (float) getHeight();
222
223 Path p;
224 p.addTriangle (1.0f, 1.0f,
225 cw * 0.3f, ch * 0.5f,
226 1.0f, ch - 1.0f);
227
228 p.addTriangle (cw - 1.0f, 1.0f,
229 cw * 0.7f, ch * 0.5f,
230 cw - 1.0f, ch - 1.0f);
231
232 g.setColour (Colours::white.withAlpha (0.75f));
233 g.fillPath (p);
234
235 g.setColour (Colours::black.withAlpha (0.75f));
236 g.strokePath (p, PathStrokeType (1.2f));
237 }
238 };
239
241
243};
244
245//==============================================================================
247{
248public:
249 SwatchComponent (ColourSelector& cs, int itemIndex)
250 : owner (cs), index (itemIndex)
251 {
252 }
253
254 void paint (Graphics& g) override
255 {
256 auto col = owner.getSwatchColour (index);
257
258 g.fillCheckerBoard (getLocalBounds().toFloat(), 6.0f, 6.0f,
259 Colour (0xffdddddd).overlaidWith (col),
260 Colour (0xffffffff).overlaidWith (col));
261 }
262
263 void mouseDown (const MouseEvent&) override
264 {
265 PopupMenu m;
266 m.addItem (1, TRANS("Use this swatch as the current colour"));
267 m.addSeparator();
268 m.addItem (2, TRANS("Set this swatch to the current colour"));
269
270 m.showMenuAsync (PopupMenu::Options().withTargetComponent (this),
272 }
273
274private:
276 const int index;
277
279 {
280 if (comp != nullptr)
281 {
282 if (result == 1) comp->setColourFromSwatch();
283 if (result == 2) comp->setSwatchFromColour();
284 }
285 }
286
288 {
289 owner.setCurrentColour (owner.getSwatchColour (index));
290 }
291
293 {
294 if (owner.getSwatchColour (index) != owner.getCurrentColour())
295 {
296 owner.setSwatchColour (index, owner.getCurrentColour());
297 repaint();
298 }
299 }
300
302};
303
304//==============================================================================
306{
307public:
308 ColourPreviewComp (ColourSelector& cs, bool isEditable)
309 : owner (cs)
310 {
311 colourLabel.setFont (labelFont);
312 colourLabel.setJustificationType (Justification::centred);
313
314 if (isEditable)
315 {
316 colourLabel.setEditable (true);
317
318 colourLabel.onEditorShow = [this]
319 {
320 if (auto* ed = colourLabel.getCurrentTextEditor())
321 ed->setInputRestrictions ((owner.flags & showAlphaChannel) ? 8 : 6, "1234567890ABCDEFabcdef");
322 };
323
324 colourLabel.onEditorHide = [this]
325 {
327 };
328 }
329
331 }
332
334 {
335 auto newColour = owner.getCurrentColour();
336
337 if (currentColour != newColour)
338 {
339 currentColour = newColour;
340 auto textColour = (Colours::white.overlaidWith (currentColour).contrasting());
341
342 colourLabel.setColour (Label::textColourId, textColour);
343 colourLabel.setColour (Label::textWhenEditingColourId, textColour);
344 colourLabel.setText (currentColour.toDisplayString ((owner.flags & showAlphaChannel) != 0), dontSendNotification);
345
346 labelWidth = labelFont.getStringWidth (colourLabel.getText());
347
348 repaint();
349 }
350 }
351
352 void paint (Graphics& g) override
353 {
354 g.fillCheckerBoard (getLocalBounds().toFloat(), 10.0f, 10.0f,
355 Colour (0xffdddddd).overlaidWith (currentColour),
356 Colour (0xffffffff).overlaidWith (currentColour));
357 }
358
359 void resized() override
360 {
361 colourLabel.centreWithSize (labelWidth + 10, (int) labelFont.getHeight() + 10);
362 }
363
364private:
365 void updateColourIfNecessary (const String& newColourString)
366 {
367 auto newColour = Colour::fromString (newColourString);
368
369 if (newColour != currentColour)
370 owner.setCurrentColour (newColour);
371 }
372
374
377 int labelWidth = 0;
379
381};
382
383//==============================================================================
384ColourSelector::ColourSelector (int sectionsToShow, int edge, int gapAroundColourSpaceComponent)
385 : colour (Colours::white),
386 flags (sectionsToShow),
387 edgeGap (edge)
388{
389 // not much point having a selector with no components in it!
391
392 updateHSV();
393
394 if ((flags & showColourAtTop) != 0)
395 {
396 previewComponent.reset (new ColourPreviewComp (*this, (flags & editableColour) != 0));
398 }
399
400 if ((flags & showSliders) != 0)
401 {
402 sliders[0].reset (new ColourComponentSlider (TRANS ("red")));
403 sliders[1].reset (new ColourComponentSlider (TRANS ("green")));
404 sliders[2].reset (new ColourComponentSlider (TRANS ("blue")));
405 sliders[3].reset (new ColourComponentSlider (TRANS ("alpha")));
406
407 addAndMakeVisible (sliders[0].get());
408 addAndMakeVisible (sliders[1].get());
409 addAndMakeVisible (sliders[2].get());
410 addChildComponent (sliders[3].get());
411
412 sliders[3]->setVisible ((flags & showAlphaChannel) != 0);
413
414 for (auto& slider : sliders)
415 slider->onValueChange = [this] { changeColour(); };
416 }
417
418 if ((flags & showColourspace) != 0)
419 {
420 colourSpace.reset (new ColourSpaceView (*this, h, s, v, gapAroundColourSpaceComponent));
421 hueSelector.reset (new HueSelectorComp (*this, h, gapAroundColourSpaceComponent));
422
425 }
426
428}
429
435
436//==============================================================================
438{
439 return ((flags & showAlphaChannel) != 0) ? colour : colour.withAlpha ((uint8) 0xff);
440}
441
443{
444 if (c != colour)
445 {
446 colour = ((flags & showAlphaChannel) != 0) ? c : c.withAlpha ((uint8) 0xff);
447
448 updateHSV();
449 update (notification);
450 }
451}
452
453void ColourSelector::setHue (float newH)
454{
455 newH = jlimit (0.0f, 1.0f, newH);
456
457 if (h != newH)
458 {
459 h = newH;
460 colour = Colour (h, s, v, colour.getFloatAlpha());
462 }
463}
464
465void ColourSelector::setSV (float newS, float newV)
466{
467 newS = jlimit (0.0f, 1.0f, newS);
468 newV = jlimit (0.0f, 1.0f, newV);
469
470 if (s != newS || v != newV)
471 {
472 s = newS;
473 v = newV;
474 colour = Colour (h, s, v, colour.getFloatAlpha());
476 }
477}
478
479//==============================================================================
481{
482 colour.getHSB (h, s, v);
483}
484
486{
487 if (sliders[0] != nullptr)
488 {
489 sliders[0]->setValue ((int) colour.getRed(), notification);
490 sliders[1]->setValue ((int) colour.getGreen(), notification);
491 sliders[2]->setValue ((int) colour.getBlue(), notification);
492 sliders[3]->setValue ((int) colour.getAlpha(), notification);
493 }
494
495 if (colourSpace != nullptr)
496 {
497 colourSpace->updateIfNeeded();
498 hueSelector->updateIfNeeded();
499 }
500
501 if (previewComponent != nullptr)
502 previewComponent->updateIfNeeded();
503
504 if (notification != dontSendNotification)
506
507 if (notification == sendNotificationSync)
509}
510
511//==============================================================================
513{
514 g.fillAll (findColour (backgroundColourId));
515
516 if ((flags & showSliders) != 0)
517 {
518 g.setColour (findColour (labelTextColourId));
519 g.setFont (11.0f);
520
521 for (auto& slider : sliders)
522 {
523 if (slider->isVisible())
524 g.drawText (slider->getName() + ":",
525 0, slider->getY(),
526 slider->getX() - 8, slider->getHeight(),
528 }
529 }
530}
531
533{
534 const int swatchesPerRow = 8;
535 const int swatchHeight = 22;
536
537 const int numSliders = ((flags & showAlphaChannel) != 0) ? 4 : 3;
538 const int numSwatches = getNumSwatches();
539
540 const int swatchSpace = numSwatches > 0 ? edgeGap + swatchHeight * ((numSwatches + 7) / swatchesPerRow) : 0;
541 const int sliderSpace = ((flags & showSliders) != 0) ? jmin (22 * numSliders + edgeGap, proportionOfHeight (0.3f)) : 0;
542 const int topSpace = ((flags & showColourAtTop) != 0) ? jmin (30 + edgeGap * 2, proportionOfHeight (0.2f)) : edgeGap;
543
544 if (previewComponent != nullptr)
545 previewComponent->setBounds (edgeGap, edgeGap, getWidth() - edgeGap * 2, topSpace - edgeGap * 2);
546
547 int y = topSpace;
548
549 if ((flags & showColourspace) != 0)
550 {
551 const int hueWidth = jmin (50, proportionOfWidth (0.15f));
552
553 colourSpace->setBounds (edgeGap, y,
554 getWidth() - hueWidth - edgeGap - 4,
555 getHeight() - topSpace - sliderSpace - swatchSpace - edgeGap);
556
557 hueSelector->setBounds (colourSpace->getRight() + 4, y,
558 getWidth() - edgeGap - (colourSpace->getRight() + 4),
559 colourSpace->getHeight());
560
561 y = getHeight() - sliderSpace - swatchSpace - edgeGap;
562 }
563
564 if ((flags & showSliders) != 0)
565 {
566 auto sliderHeight = jmax (4, sliderSpace / numSliders);
567
568 for (int i = 0; i < numSliders; ++i)
569 {
570 sliders[i]->setBounds (proportionOfWidth (0.2f), y,
571 proportionOfWidth (0.72f), sliderHeight - 2);
572
573 y += sliderHeight;
574 }
575 }
576
577 if (numSwatches > 0)
578 {
579 const int startX = 8;
580 const int xGap = 4;
581 const int yGap = 4;
582 const int swatchWidth = (getWidth() - startX * 2) / swatchesPerRow;
583 y += edgeGap;
584
585 if (swatchComponents.size() != numSwatches)
586 {
587 swatchComponents.clear();
588
589 for (int i = 0; i < numSwatches; ++i)
590 {
591 auto* sc = new SwatchComponent (*this, i);
592 swatchComponents.add (sc);
594 }
595 }
596
597 int x = startX;
598
599 for (int i = 0; i < swatchComponents.size(); ++i)
600 {
601 auto* sc = swatchComponents.getUnchecked(i);
602
603 sc->setBounds (x + xGap / 2,
604 y + yGap / 2,
605 swatchWidth - xGap,
606 swatchHeight - yGap);
607
608 if (((i + 1) % swatchesPerRow) == 0)
609 {
610 x = startX;
611 y += swatchHeight;
612 }
613 else
614 {
615 x += swatchWidth;
616 }
617 }
618 }
619}
620
622{
623 if (sliders[0] != nullptr)
624 setCurrentColour (Colour ((uint8) sliders[0]->getValue(),
625 (uint8) sliders[1]->getValue(),
626 (uint8) sliders[2]->getValue(),
627 (uint8) sliders[3]->getValue()));
628}
629
630//==============================================================================
632{
633 return 0;
634}
635
637{
638 jassertfalse; // if you've overridden getNumSwatches(), you also need to implement this method
639 return Colours::black;
640}
641
643{
644 jassertfalse; // if you've overridden getNumSwatches(), you also need to implement this method
645}
646
647} // 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
static String toHexString(int number)
Definition String.cpp:1830
void sendChangeMessage()
Definition juce_ChangeBroadcaster.cpp:65
void dispatchPendingMessages()
Definition juce_ChangeBroadcaster.cpp:80
Definition juce_ColourGradient.h:38
Point< float > point2
Definition juce_ColourGradient.h:195
bool isRadial
Definition juce_ColourGradient.h:202
Point< float > point1
Definition juce_ColourGradient.h:195
int addColour(double proportionAlongGradient, Colour colour)
Definition juce_ColourGradient.cpp:113
Definition juce_Colour.h:38
static JUCE_NODISCARD Colour greyLevel(float brightness) noexcept
Definition juce_Colour.cpp:484
static JUCE_NODISCARD Colour fromString(StringRef encodedColourString)
Definition juce_Colour.cpp:543
Definition juce_ColourSelector.cpp:306
Font labelFont
Definition juce_ColourSelector.cpp:376
ColourPreviewComp(ColourSelector &cs, bool isEditable)
Definition juce_ColourSelector.cpp:308
Label colourLabel
Definition juce_ColourSelector.cpp:378
void paint(Graphics &g) override
Definition juce_ColourSelector.cpp:352
void updateIfNeeded()
Definition juce_ColourSelector.cpp:333
ColourSelector & owner
Definition juce_ColourSelector.cpp:373
void updateColourIfNecessary(const String &newColourString)
Definition juce_ColourSelector.cpp:365
void resized() override
Definition juce_ColourSelector.cpp:359
Colour currentColour
Definition juce_ColourSelector.cpp:375
int labelWidth
Definition juce_ColourSelector.cpp:377
Definition juce_ColourSelector.cpp:49
float & v
Definition juce_ColourSelector.cpp:123
float & s
Definition juce_ColourSelector.cpp:122
float lastHue
Definition juce_ColourSelector.cpp:124
void resized() override
Definition juce_ColourSelector.cpp:113
ColourSpaceMarker marker
Definition juce_ColourSelector.cpp:144
ColourSpaceView(ColourSelector &cs, float &hue, float &sat, float &val, int edgeSize)
Definition juce_ColourSelector.cpp:51
void updateMarker()
Definition juce_ColourSelector.cpp:146
Image colours
Definition juce_ColourSelector.cpp:126
void mouseDown(const MouseEvent &e) override
Definition juce_ColourSelector.cpp:88
void paint(Graphics &g) override
Definition juce_ColourSelector.cpp:58
ColourSelector & owner
Definition juce_ColourSelector.cpp:120
float & h
Definition juce_ColourSelector.cpp:121
const int edge
Definition juce_ColourSelector.cpp:125
void mouseDrag(const MouseEvent &e) override
Definition juce_ColourSelector.cpp:93
void updateIfNeeded()
Definition juce_ColourSelector.cpp:101
Definition juce_ColourSelector.cpp:160
void mouseDown(const MouseEvent &e) override
Definition juce_ColourSelector.cpp:191
HueSelectorComp(ColourSelector &cs, float &hue, int edgeSize)
Definition juce_ColourSelector.cpp:162
void mouseDrag(const MouseEvent &e) override
Definition juce_ColourSelector.cpp:196
HueSelectorMarker marker
Definition juce_ColourSelector.cpp:240
void resized() override
Definition juce_ColourSelector.cpp:182
float & h
Definition juce_ColourSelector.cpp:208
void updateIfNeeded()
Definition juce_ColourSelector.cpp:201
const int edge
Definition juce_ColourSelector.cpp:209
void paint(Graphics &g) override
Definition juce_ColourSelector.cpp:168
ColourSelector & owner
Definition juce_ColourSelector.cpp:207
Definition juce_ColourSelector.cpp:247
static void menuStaticCallback(int result, SwatchComponent *comp)
Definition juce_ColourSelector.cpp:278
const int index
Definition juce_ColourSelector.cpp:276
void setSwatchFromColour()
Definition juce_ColourSelector.cpp:292
void paint(Graphics &g) override
Definition juce_ColourSelector.cpp:254
void setColourFromSwatch()
Definition juce_ColourSelector.cpp:287
void mouseDown(const MouseEvent &) override
Definition juce_ColourSelector.cpp:263
SwatchComponent(ColourSelector &cs, int itemIndex)
Definition juce_ColourSelector.cpp:249
ColourSelector & owner
Definition juce_ColourSelector.cpp:275
std::unique_ptr< ColourSpaceView > colourSpace
Definition juce_ColourSelector.h:149
std::unique_ptr< Slider > sliders[4]
Definition juce_ColourSelector.h:148
OwnedArray< SwatchComponent > swatchComponents
Definition juce_ColourSelector.h:152
std::unique_ptr< HueSelectorComp > hueSelector
Definition juce_ColourSelector.h:150
~ColourSelector() override
Definition juce_ColourSelector.cpp:430
virtual int getNumSwatches() const
Definition juce_ColourSelector.cpp:631
std::unique_ptr< ColourPreviewComp > previewComponent
Definition juce_ColourSelector.h:151
void changeColour()
Definition juce_ColourSelector.cpp:621
ColourSelector(int flags=(showAlphaChannel|showColourAtTop|showSliders|showColourspace), int edgeGap=4, int gapAroundColourSpaceComponent=7)
Definition juce_ColourSelector.cpp:384
float v
Definition juce_ColourSelector.h:147
int edgeGap
Definition juce_ColourSelector.h:154
void paint(Graphics &) override
Definition juce_ColourSelector.cpp:512
Colour colour
Definition juce_ColourSelector.h:146
virtual void setSwatchColour(int index, const Colour &newColour)
Definition juce_ColourSelector.cpp:642
virtual Colour getSwatchColour(int index) const
Definition juce_ColourSelector.cpp:636
void resized() override
Definition juce_ColourSelector.cpp:532
@ backgroundColourId
Definition juce_ColourSelector.h:132
@ labelTextColourId
Definition juce_ColourSelector.h:133
const int flags
Definition juce_ColourSelector.h:153
void updateHSV()
Definition juce_ColourSelector.cpp:480
Colour getCurrentColour() const
Definition juce_ColourSelector.cpp:437
float h
Definition juce_ColourSelector.h:147
void update(NotificationType)
Definition juce_ColourSelector.cpp:485
void setSV(float newS, float newV)
Definition juce_ColourSelector.cpp:465
void setCurrentColour(Colour newColour, NotificationType notificationType=sendNotification)
Definition juce_ColourSelector.cpp:442
@ showColourAtTop
Definition juce_ColourSelector.h:50
@ editableColour
Definition juce_ColourSelector.h:51
@ showSliders
Definition juce_ColourSelector.h:52
@ showColourspace
Definition juce_ColourSelector.h:53
@ showAlphaChannel
Definition juce_ColourSelector.h:48
void setHue(float newH)
Definition juce_ColourSelector.cpp:453
float s
Definition juce_ColourSelector.h:147
int proportionOfWidth(float proportion) const noexcept
Definition juce_Component.cpp:1111
void setInterceptsMouseClicks(bool allowClicksOnThisComponent, bool allowClicksOnChildComponents) noexcept
Definition juce_Component.cpp:1420
int proportionOfHeight(float proportion) const noexcept
Definition juce_Component.cpp:1112
int getHeight() const noexcept
Definition juce_Component.h:274
void addAndMakeVisible(Component *child, int zOrder=-1)
Definition juce_Component.cpp:1554
void setMouseCursor(const MouseCursor &cursorType)
Definition juce_Component.cpp:1859
void repaint()
Definition juce_Component.cpp:1917
Component() noexcept
Definition juce_Component.cpp:517
Colour findColour(int colourID, bool inheritFromParent=false) const
Definition juce_Component.cpp:2219
int getWidth() const noexcept
Definition juce_Component.h:271
Rectangle< int > getLocalBounds() const noexcept
Definition juce_Component.cpp:2283
void addChildComponent(Component *child, int zOrder=-1)
Definition juce_Component.cpp:1548
Definition juce_Font.h:42
@ bold
Definition juce_Font.h:51
Definition juce_GraphicsContext.h:45
Definition juce_Image.h:310
@ writeOnly
Definition juce_Image.h:315
void setPixelColour(int x, int y, Colour colour) const noexcept
Definition juce_Image.cpp:435
Definition juce_Image.h:58
@ RGB
Definition juce_Image.h:66
@ centredRight
Definition juce_Justification.h:148
@ centred
Definition juce_Justification.h:138
Definition juce_Label.h:41
@ textWhenEditingColourId
Definition juce_Label.h:111
@ textColourId
Definition juce_Label.h:107
static ModalComponentManager::Callback * forComponent(void(*functionToCall)(int, ComponentType *), ComponentType *component)
Definition juce_ModalComponentManager.h:276
@ CrosshairCursor
Definition juce_MouseCursor.h:52
Definition juce_MouseEvent.h:39
Definition juce_Path.h:65
Definition juce_PathStrokeType.h:42
void setXY(ValueType newX, ValueType newY) noexcept
Definition juce_Point.h:85
Definition juce_PopupMenu.h:457
Definition juce_PopupMenu.h:80
Definition juce_Rectangle.h:67
Definition juce_RectanglePlacement.h:40
@ stretchToFit
Definition juce_RectanglePlacement.h:90
Slider()
Definition juce_Slider.cpp:1411
void setRange(double newMinimum, double newMaximum, double newInterval=0)
Definition juce_Slider.cpp:1556
Definition juce_String.h:53
String toUpperCase() const
Definition String.cpp:1331
String paddedLeft(water_uchar padCharacter, int minimumLength) const
Definition String.cpp:1042
* e
Definition inflate.c:1404
unsigned * m
Definition inflate.c:1559
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 PuglViewHint int value
Definition pugl.h:1708
static const char * name
Definition pugl.h:1582
static int int height
Definition pugl.h:1594
static int width
Definition pugl.h:1593
int val
Definition jpeglib.h:956
#define TRANS(stringLiteral)
Definition juce_LocalisedStrings.h:208
#define jassert(expression)
#define JUCE_DECLARE_NON_COPYABLE(className)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define jassertfalse
static int JUCE_CDECL comp(const void *a, const void *b)
Definition lsp.c:298
Definition juce_Colours.h:38
const Colour black
Definition juce_Colours.h:50
const Colour white
Definition juce_Colours.h:180
Definition carla_juce.cpp:31
constexpr Type jmin(Type a, Type b)
Definition juce_MathsFunctions.h:106
Type jlimit(Type lowerLimit, Type upperLimit, Type valueToConstrain) noexcept
Definition juce_MathsFunctions.h:262
NotificationType
Definition juce_NotificationType.h:32
@ sendNotification
Definition juce_NotificationType.h:34
@ sendNotificationSync
Definition juce_NotificationType.h:35
@ dontSendNotification
Definition juce_NotificationType.h:33
unsigned char uint8
Definition juce_MathsFunctions.h:37
@ slider
Definition juce_AccessibilityRole.h:43
Definition juce_ColourSelector.cpp:30
ColourComponentSlider(const String &name)
Definition juce_ColourSelector.cpp:31
double getValueFromText(const String &text) override
Definition juce_ColourSelector.cpp:41
String getTextFromValue(double value) override
Definition juce_ColourSelector.cpp:36
Definition juce_ColourSelector.cpp:129
ColourSpaceMarker()
Definition juce_ColourSelector.cpp:130
void paint(Graphics &g) override
Definition juce_ColourSelector.cpp:135
Definition juce_ColourSelector.cpp:212
void paint(Graphics &g) override
Definition juce_ColourSelector.cpp:218
HueSelectorMarker()
Definition juce_ColourSelector.cpp:213
const char * text
Definition swell-functions.h:167
uch * p
Definition crypt.c:594
return c
Definition crypt.c:175
int result
Definition process.c:1455