LMMS
Loading...
Searching...
No Matches
juce_ComboBox.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 : Component (name),
31 noChoicesMessage (TRANS("(no choices)"))
32{
35 currentId.addListener (this);
36}
37
39{
40 currentId.removeListener (this);
41 hidePopup();
42 label.reset();
43}
44
45//==============================================================================
46void ComboBox::setEditableText (const bool isEditable)
47{
48 if (label->isEditableOnSingleClick() != isEditable || label->isEditableOnDoubleClick() != isEditable)
49 {
50 label->setEditable (isEditable, isEditable, false);
52
53 const auto isLabelEditable = (labelEditableState == labelIsEditable);
54
55 setWantsKeyboardFocus (! isLabelEditable);
56 label->setAccessible (isLabelEditable);
57
58 resized();
59 }
60}
61
63{
64 return label->isEditable();
65}
66
68{
69 label->setJustificationType (justification);
70}
71
73{
74 return label->getJustificationType();
75}
76
77void ComboBox::setTooltip (const String& newTooltip)
78{
80 label->setTooltip (newTooltip);
81}
82
83//==============================================================================
84void ComboBox::addItem (const String& newItemText, int newItemId)
85{
86 // you can't add empty strings to the list..
87 jassert (newItemText.isNotEmpty());
88
89 // IDs must be non-zero, as zero is used to indicate a lack of selection.
90 jassert (newItemId != 0);
91
92 // you shouldn't use duplicate item IDs!
93 jassert (getItemForId (newItemId) == nullptr);
94
95 if (newItemText.isNotEmpty() && newItemId != 0)
96 currentMenu.addItem (newItemId, newItemText, true, false);
97}
98
99void ComboBox::addItemList (const StringArray& itemsToAdd, int firstItemID)
100{
101 for (auto& i : itemsToAdd)
102 currentMenu.addItem (firstItemID++, i);
103}
104
106{
107 currentMenu.addSeparator();
108}
109
110void ComboBox::addSectionHeading (const String& headingName)
111{
112 // you can't add empty strings to the list..
113 jassert (headingName.isNotEmpty());
114
115 if (headingName.isNotEmpty())
116 currentMenu.addSectionHeader (headingName);
117}
118
119void ComboBox::setItemEnabled (int itemId, bool shouldBeEnabled)
120{
121 if (auto* item = getItemForId (itemId))
122 item->isEnabled = shouldBeEnabled;
123}
124
125bool ComboBox::isItemEnabled (int itemId) const noexcept
126{
127 if (auto* item = getItemForId (itemId))
128 return item->isEnabled;
129
130 return false;
131}
132
133void ComboBox::changeItemText (int itemId, const String& newText)
134{
135 if (auto* item = getItemForId (itemId))
136 item->text = newText;
137 else
139}
140
141void ComboBox::clear (const NotificationType notification)
142{
143 currentMenu.clear();
144
145 if (! label->isEditable())
146 setSelectedItemIndex (-1, notification);
147}
148
149//==============================================================================
150PopupMenu::Item* ComboBox::getItemForId (int itemId) const noexcept
151{
152 if (itemId != 0)
153 {
154 for (PopupMenu::MenuItemIterator iterator (currentMenu, true); iterator.next();)
155 {
156 auto& item = iterator.getItem();
157
158 if (item.itemID == itemId)
159 return &item;
160 }
161 }
162
163 return nullptr;
164}
165
166PopupMenu::Item* ComboBox::getItemForIndex (const int index) const noexcept
167{
168 int n = 0;
169
170 for (PopupMenu::MenuItemIterator iterator (currentMenu, true); iterator.next();)
171 {
172 auto& item = iterator.getItem();
173
174 if (item.itemID != 0)
175 if (n++ == index)
176 return &item;
177 }
178
179 return nullptr;
180}
181
183{
184 int n = 0;
185
186 for (PopupMenu::MenuItemIterator iterator (currentMenu, true); iterator.next();)
187 {
188 auto& item = iterator.getItem();
189
190 if (item.itemID != 0)
191 n++;
192 }
193
194 return n;
195}
196
197String ComboBox::getItemText (const int index) const
198{
199 if (auto* item = getItemForIndex (index))
200 return item->text;
201
202 return {};
203}
204
205int ComboBox::getItemId (const int index) const noexcept
206{
207 if (auto* item = getItemForIndex (index))
208 return item->itemID;
209
210 return 0;
211}
212
213int ComboBox::indexOfItemId (const int itemId) const noexcept
214{
215 if (itemId != 0)
216 {
217 int n = 0;
218
219 for (PopupMenu::MenuItemIterator iterator (currentMenu, true); iterator.next();)
220 {
221 auto& item = iterator.getItem();
222
223 if (item.itemID == itemId)
224 return n;
225
226 else if (item.itemID != 0)
227 n++;
228 }
229 }
230
231 return -1;
232}
233
234//==============================================================================
236{
237 auto index = indexOfItemId (currentId.getValue());
238
239 if (getText() != getItemText (index))
240 index = -1;
241
242 return index;
243}
244
245void ComboBox::setSelectedItemIndex (const int index, const NotificationType notification)
246{
247 setSelectedId (getItemId (index), notification);
248}
249
251{
252 if (auto* item = getItemForId (currentId.getValue()))
253 if (getText() == item->text)
254 return item->itemID;
255
256 return 0;
257}
258
259void ComboBox::setSelectedId (const int newItemId, const NotificationType notification)
260{
261 auto* item = getItemForId (newItemId);
262 auto newItemText = item != nullptr ? item->text : String();
263
264 if (lastCurrentId != newItemId || label->getText() != newItemText)
265 {
266 label->setText (newItemText, dontSendNotification);
267 lastCurrentId = newItemId;
268 currentId = newItemId;
269
270 repaint(); // for the benefit of the 'none selected' text
271
272 sendChange (notification);
273 }
274}
275
276bool ComboBox::selectIfEnabled (const int index)
277{
278 if (auto* item = getItemForIndex (index))
279 {
280 if (item->isEnabled)
281 {
282 setSelectedItemIndex (index);
283 return true;
284 }
285 }
286
287 return false;
288}
289
291{
292 for (int i = getSelectedItemIndex() + delta; isPositiveAndBelow (i, getNumItems()); i += delta)
293 if (selectIfEnabled (i))
294 return true;
295
296 return false;
297}
298
300{
301 if (lastCurrentId != (int) currentId.getValue())
302 setSelectedId (currentId.getValue());
303}
304
305//==============================================================================
307{
308 return label->getText();
309}
310
311void ComboBox::setText (const String& newText, const NotificationType notification)
312{
313 for (PopupMenu::MenuItemIterator iterator (currentMenu, true); iterator.next();)
314 {
315 auto& item = iterator.getItem();
316
317 if (item.itemID != 0
318 && item.text == newText)
319 {
320 setSelectedId (item.itemID, notification);
321 return;
322 }
323 }
324
325 lastCurrentId = 0;
326 currentId = 0;
327 repaint();
328
329 if (label->getText() != newText)
330 {
331 label->setText (newText, dontSendNotification);
332 sendChange (notification);
333 }
334}
335
337{
338 jassert (isTextEditable()); // you probably shouldn't do this to a non-editable combo box?
339
340 label->showEditor();
341}
342
343//==============================================================================
345{
346 if (textWhenNothingSelected != newMessage)
347 {
348 textWhenNothingSelected = newMessage;
349 repaint();
350 }
351}
352
357
359{
360 noChoicesMessage = newMessage;
361}
362
367
368//==============================================================================
370{
371 getLookAndFeel().drawComboBox (g, getWidth(), getHeight(), isButtonDown,
372 label->getRight(), 0, getWidth() - label->getRight(), getHeight(),
373 *this);
374
375 if (textWhenNothingSelected.isNotEmpty() && label->getText().isEmpty() && ! label->isBeingEdited())
376 getLookAndFeel().drawComboBoxTextWhenNothingSelected (g, *this, *label);
377}
378
380{
381 if (getHeight() > 0 && getWidth() > 0)
382 getLookAndFeel().positionComboBoxText (*this, *label);
383}
384
386{
387 if (! isEnabled())
388 hidePopup();
389
390 repaint();
391}
392
397
402
404{
405 repaint();
406
407 {
408 std::unique_ptr<Label> newLabel (getLookAndFeel().createComboBoxTextBox (*this));
409 jassert (newLabel != nullptr);
410
411 if (label != nullptr)
412 {
413 newLabel->setEditable (label->isEditable());
414 newLabel->setJustificationType (label->getJustificationType());
415 newLabel->setTooltip (label->getTooltip());
416 newLabel->setText (label->getText(), dontSendNotification);
417 }
418
419 std::swap (label, newLabel);
420 }
421
422 addAndMakeVisible (label.get());
423
424 EditableState newEditableState = (label->isEditable() ? labelIsEditable : labelIsNotEditable);
425
426 if (newEditableState != labelEditableState)
427 {
428 labelEditableState = newEditableState;
430 }
431
432 label->onTextChange = [this] { triggerAsyncUpdate(); };
433 label->addMouseListener (this, false);
434 label->setAccessible (labelEditableState == labelIsEditable);
435
438
443
444 resized();
445}
446
447//==============================================================================
449{
451 {
453 return true;
454 }
455
457 {
459 return true;
460 }
461
463 {
465 return true;
466 }
467
468 return false;
469}
470
471bool ComboBox::keyStateChanged (const bool isKeyDown)
472{
473 // only forward key events that aren't used by this component
474 return isKeyDown
479}
480
481//==============================================================================
484
485//==============================================================================
487{
488 if (! menuActive)
489 {
490 menuActive = true;
491
492 // as this method was triggered by a mouse event, the same mouse event may have
493 // exited the modal state of other popups currently on the screen. By calling
494 // showPopup asynchronously, we are giving the other popups a chance to properly
495 // close themselves
496 MessageManager::callAsync ([safePointer = SafePointer<ComboBox> { this }]() mutable { if (safePointer != nullptr) safePointer->showPopup(); });
497 repaint();
498 }
499}
500
502{
503 if (menuActive)
504 {
505 menuActive = false;
507 repaint();
508 }
509}
510
512{
513 if (combo != nullptr)
514 {
515 combo->hidePopup();
516
517 if (result != 0)
518 combo->setSelectedId (result);
519 }
520}
521
523{
524 if (! menuActive)
525 menuActive = true;
526
527 auto menu = currentMenu;
528
529 if (menu.getNumItems() > 0)
530 {
531 auto selectedId = getSelectedId();
532
533 for (PopupMenu::MenuItemIterator iterator (menu, true); iterator.next();)
534 {
535 auto& item = iterator.getItem();
536
537 if (item.itemID != 0)
538 item.isTicked = (item.itemID == selectedId);
539 }
540 }
541 else
542 {
543 menu.addItem (1, noChoicesMessage, false, false);
544 }
545
546 auto& lf = getLookAndFeel();
547
548 menu.setLookAndFeel (&lf);
549 menu.showMenuAsync (lf.getOptionsForComboBoxPopupMenu (*this, *label),
551}
552
553//==============================================================================
555{
557
558 isButtonDown = isEnabled() && ! e.mods.isPopupMenu();
559
560 if (isButtonDown && (e.eventComponent == this || ! label->isEditable()))
562}
563
565{
567
568 if (isButtonDown && e.mouseWasDraggedSinceMouseDown())
570}
571
573{
574 if (isButtonDown)
575 {
576 isButtonDown = false;
577 repaint();
578
579 auto e = e2.getEventRelativeTo (this);
580
581 if (reallyContains (e.getPosition(), true)
582 && (e2.eventComponent == this || ! label->isEditable()))
583 {
585 }
586 }
587}
588
590{
591 if (! menuActive && scrollWheelEnabled && e.eventComponent == this && wheel.deltaY != 0.0f)
592 {
593 mouseWheelAccumulator += wheel.deltaY * 5.0f;
594
595 while (mouseWheelAccumulator > 1.0f)
596 {
597 mouseWheelAccumulator -= 1.0f;
599 }
600
601 while (mouseWheelAccumulator < -1.0f)
602 {
603 mouseWheelAccumulator += 1.0f;
605 }
606 }
607 else
608 {
610 }
611}
612
613void ComboBox::setScrollWheelEnabled (bool enabled) noexcept
614{
615 scrollWheelEnabled = enabled;
616}
617
618//==============================================================================
621
623{
624 Component::BailOutChecker checker (this);
625 listeners.callChecked (checker, [this] (Listener& l) { l.comboBoxChanged (this); });
626
627 if (checker.shouldBailOut())
628 return;
629
630 if (onChange != nullptr)
631 onChange();
632
633 if (auto* handler = getAccessibilityHandler())
634 handler->notifyAccessibilityEvent (AccessibilityEvent::valueChanged);
635}
636
637void ComboBox::sendChange (const NotificationType notification)
638{
639 if (notification != dontSendNotification)
641
642 if (notification == sendNotificationSync)
644}
645
646// Old deprecated methods - remove eventually...
647void ComboBox::clear (const bool dontSendChange) { clear (dontSendChange ? dontSendNotification : sendNotification); }
648void ComboBox::setSelectedItemIndex (const int index, const bool dontSendChange) { setSelectedItemIndex (index, dontSendChange ? dontSendNotification : sendNotification); }
649void ComboBox::setSelectedId (const int newItemId, const bool dontSendChange) { setSelectedId (newItemId, dontSendChange ? dontSendNotification : sendNotification); }
650void ComboBox::setText (const String& newText, const bool dontSendChange) { setText (newText, dontSendChange ? dontSendNotification : sendNotification); }
651
652//==============================================================================
654{
655public:
656 explicit ComboBoxAccessibilityHandler (ComboBox& comboBoxToWrap)
657 : AccessibilityHandler (comboBoxToWrap,
659 getAccessibilityActions (comboBoxToWrap),
660 { std::make_unique<ComboBoxValueInterface> (comboBoxToWrap) }),
661 comboBox (comboBoxToWrap)
662 {
663 }
664
666 {
667 auto state = AccessibilityHandler::getCurrentState().withExpandable();
668
669 return comboBox.isPopupActive() ? state.withExpanded() : state.withCollapsed();
670 }
671
672 String getTitle() const override { return comboBox.getText(); }
673 String getHelp() const override { return comboBox.getTooltip(); }
674
675private:
677 {
678 public:
679 explicit ComboBoxValueInterface (ComboBox& comboBoxToWrap)
680 : comboBox (comboBoxToWrap)
681 {
682 }
683
684 bool isReadOnly() const override { return true; }
685 String getCurrentValueAsString() const override { return comboBox.getText(); }
686 void setValueAsString (const String&) override {}
687
688 private:
690
691 //==============================================================================
693 };
694
700
702
703 //==============================================================================
705};
706
707std::unique_ptr<AccessibilityHandler> ComboBox::createAccessibilityHandler()
708{
709 return std::make_unique<ComboBoxAccessibilityHandler> (*this);
710}
711
712} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_AccessibilityActions.h:73
AccessibilityActions & addAction(AccessibilityActionType type, std::function< void()> actionCallback)
Definition juce_AccessibilityActions.h:88
virtual AccessibleState getCurrentState() const
Definition juce_AccessibilityHandler.cpp:75
AccessibilityHandler(Component &componentToWrap, AccessibilityRole accessibilityRole, AccessibilityActions actions={}, Interfaces interfaces={})
Definition juce_AccessibilityHandler.cpp:55
Definition juce_AccessibilityValueInterface.h:140
Definition juce_AccessibilityState.h:39
void handleUpdateNowIfNeeded()
Definition juce_AsyncUpdater.cpp:79
void triggerAsyncUpdate()
Definition juce_AsyncUpdater.cpp:62
Definition juce_ComboBox.h:290
String getCurrentValueAsString() const override
Definition juce_ComboBox.cpp:685
ComboBoxValueInterface(ComboBox &comboBoxToWrap)
Definition juce_ComboBox.cpp:679
void setValueAsString(const String &) override
Definition juce_ComboBox.cpp:686
bool isReadOnly() const override
Definition juce_ComboBox.cpp:684
ComboBox & comboBox
Definition juce_ComboBox.cpp:689
String getHelp() const override
Definition juce_ComboBox.cpp:673
String getTitle() const override
Definition juce_ComboBox.cpp:672
AccessibleState getCurrentState() const override
Definition juce_ComboBox.cpp:665
ComboBox & comboBox
Definition juce_ComboBox.cpp:701
ComboBoxAccessibilityHandler(ComboBox &comboBoxToWrap)
Definition juce_ComboBox.cpp:656
static AccessibilityActions getAccessibilityActions(ComboBox &comboBox)
Definition juce_ComboBox.cpp:695
Definition juce_ComboBox.h:49
bool menuActive
Definition juce_ComboBox.h:444
void handleAsyncUpdate() override
Definition juce_ComboBox.cpp:622
@ textColourId
Definition juce_ComboBox.h:357
void showEditor()
Definition juce_ComboBox.cpp:336
void valueChanged(Value &) override
Definition juce_ComboBox.cpp:299
void colourChanged() override
Definition juce_ComboBox.cpp:393
void setText(const String &newText, NotificationType notification=sendNotificationAsync)
Definition juce_ComboBox.cpp:311
void addItemList(const StringArray &items, int firstItemIdOffset)
Definition juce_ComboBox.cpp:99
bool selectIfEnabled(int index)
Definition juce_ComboBox.cpp:276
bool scrollWheelEnabled
Definition juce_ComboBox.h:444
String noChoicesMessage
Definition juce_ComboBox.h:448
void setJustificationType(Justification justification)
Definition juce_ComboBox.cpp:67
float mouseWheelAccumulator
Definition juce_ComboBox.h:445
bool nudgeSelectedItem(int delta)
Definition juce_ComboBox.cpp:290
void clear(NotificationType notification=sendNotificationAsync)
Definition juce_ComboBox.cpp:141
int lastCurrentId
Definition juce_ComboBox.h:443
ListenerList< Listener > listeners
Definition juce_ComboBox.h:446
void resized() override
Definition juce_ComboBox.cpp:379
PopupMenu currentMenu
Definition juce_ComboBox.h:441
void lookAndFeelChanged() override
Definition juce_ComboBox.cpp:403
bool isItemEnabled(int itemId) const noexcept
Definition juce_ComboBox.cpp:125
bool isButtonDown
Definition juce_ComboBox.h:444
void addSectionHeading(const String &headingName)
Definition juce_ComboBox.cpp:110
void mouseDrag(const MouseEvent &) override
Definition juce_ComboBox.cpp:564
void focusGained(Component::FocusChangeType) override
Definition juce_ComboBox.cpp:482
PopupMenu::Item * getItemForId(int) const noexcept
Definition juce_ComboBox.cpp:150
void hidePopup()
Definition juce_ComboBox.cpp:501
virtual void showPopup()
Definition juce_ComboBox.cpp:522
Value currentId
Definition juce_ComboBox.h:442
void setItemEnabled(int itemId, bool shouldBeEnabled)
Definition juce_ComboBox.cpp:119
void setSelectedItemIndex(int newItemIndex, NotificationType notification=sendNotificationAsync)
Definition juce_ComboBox.cpp:245
void mouseUp(const MouseEvent &) override
Definition juce_ComboBox.cpp:572
void showPopupIfNotActive()
Definition juce_ComboBox.cpp:486
void addListener(Listener *listener)
Definition juce_ComboBox.cpp:619
void paint(Graphics &) override
Definition juce_ComboBox.cpp:369
void setSelectedId(int newItemId, NotificationType notification=sendNotificationAsync)
Definition juce_ComboBox.cpp:259
String textWhenNothingSelected
Definition juce_ComboBox.h:448
EditableState
Definition juce_ComboBox.h:435
@ labelIsEditable
Definition juce_ComboBox.h:438
@ labelIsNotEditable
Definition juce_ComboBox.h:437
void parentHierarchyChanged() override
Definition juce_ComboBox.cpp:398
bool keyStateChanged(bool) override
Definition juce_ComboBox.cpp:471
void setScrollWheelEnabled(bool enabled) noexcept
Definition juce_ComboBox.cpp:613
void mouseDown(const MouseEvent &) override
Definition juce_ComboBox.cpp:554
Justification getJustificationType() const noexcept
Definition juce_ComboBox.cpp:72
void mouseWheelMove(const MouseEvent &, const MouseWheelDetails &) override
Definition juce_ComboBox.cpp:589
std::function< void()> onChange
Definition juce_ComboBox.h:307
std::unique_ptr< AccessibilityHandler > createAccessibilityHandler() override
Definition juce_ComboBox.cpp:707
void setTextWhenNothingSelected(const String &newMessage)
Definition juce_ComboBox.cpp:344
String getItemText(int index) const
Definition juce_ComboBox.cpp:197
void setTooltip(const String &newTooltip) override
Definition juce_ComboBox.cpp:77
bool isTextEditable() const noexcept
Definition juce_ComboBox.cpp:62
void setEditableText(bool isEditable)
Definition juce_ComboBox.cpp:46
int indexOfItemId(int itemId) const noexcept
Definition juce_ComboBox.cpp:213
int getItemId(int index) const noexcept
Definition juce_ComboBox.cpp:205
void addSeparator()
Definition juce_ComboBox.cpp:105
ComboBox(const String &componentName={})
Definition juce_ComboBox.cpp:29
String getTextWhenNoChoicesAvailable() const
Definition juce_ComboBox.cpp:363
PopupMenu::Item * getItemForIndex(int) const noexcept
Definition juce_ComboBox.cpp:166
void changeItemText(int itemId, const String &newText)
Definition juce_ComboBox.cpp:133
void focusLost(Component::FocusChangeType) override
Definition juce_ComboBox.cpp:483
void sendChange(NotificationType)
Definition juce_ComboBox.cpp:637
int getSelectedId() const noexcept
Definition juce_ComboBox.cpp:250
String getText() const
Definition juce_ComboBox.cpp:306
void addItem(const String &newItemText, int newItemId)
Definition juce_ComboBox.cpp:84
int getNumItems() const noexcept
Definition juce_ComboBox.cpp:182
String getTextWhenNothingSelected() const
Definition juce_ComboBox.cpp:353
std::unique_ptr< Label > label
Definition juce_ComboBox.h:447
bool keyPressed(const KeyPress &) override
Definition juce_ComboBox.cpp:448
~ComboBox() override
Definition juce_ComboBox.cpp:38
void enablementChanged() override
Definition juce_ComboBox.cpp:385
int getSelectedItemIndex() const
Definition juce_ComboBox.cpp:235
EditableState labelEditableState
Definition juce_ComboBox.h:449
void removeListener(Listener *listener)
Definition juce_ComboBox.cpp:620
void setTextWhenNoChoicesAvailable(const String &newMessage)
Definition juce_ComboBox.cpp:358
Definition juce_Component.h:2331
bool shouldBailOut() const noexcept
Definition juce_Component.cpp:3252
Definition juce_Component.h:2287
void setRepaintsOnMouseActivity(bool shouldRepaint) noexcept
Definition juce_Component.cpp:1881
bool reallyContains(Point< int > localPoint, bool returnTrueIfWithinAChild)
Definition juce_Component.cpp:1454
int getHeight() const noexcept
Definition juce_Component.h:274
void addAndMakeVisible(Component *child, int zOrder=-1)
Definition juce_Component.cpp:1554
FocusChangeType
Definition juce_Component.h:1890
AccessibilityHandler * getAccessibilityHandler()
Definition juce_Component.cpp:3302
void repaint()
Definition juce_Component.cpp:1917
Component() noexcept
Definition juce_Component.cpp:517
void setWantsKeyboardFocus(bool wantsFocus) noexcept
Definition juce_Component.cpp:2842
Colour findColour(int colourID, bool inheritFromParent=false) const
Definition juce_Component.cpp:2219
int getWidth() const noexcept
Definition juce_Component.h:271
void mouseWheelMove(const MouseEvent &event, const MouseWheelDetails &wheel) override
Definition juce_Component.cpp:2303
static void JUCE_CALLTYPE beginDragAutoRepeat(int millisecondsBetweenCallbacks)
Definition juce_Component.cpp:2745
bool isEnabled() const noexcept
Definition juce_Component.cpp:3104
LookAndFeel & getLookAndFeel() const noexcept
Definition juce_Component.cpp:2173
Definition juce_GraphicsContext.h:45
Definition juce_Justification.h:41
Definition juce_KeyPress.h:40
static const int upKey
Definition juce_KeyPress.h:198
static bool isKeyCurrentlyDown(int keyCode)
Definition juce_linux_Windowing.cpp:804
static const int rightKey
Definition juce_KeyPress.h:201
static const int downKey
Definition juce_KeyPress.h:199
static const int returnKey
Definition juce_KeyPress.h:191
static const int leftKey
Definition juce_KeyPress.h:200
@ backgroundColourId
Definition juce_Label.h:106
@ textColourId
Definition juce_Label.h:107
static bool callAsync(std::function< void()> functionToCall)
Definition juce_MessageManager.cpp:192
static ModalComponentManager::Callback * forComponent(void(*functionToCall)(int, ComponentType *), ComponentType *component)
Definition juce_ModalComponentManager.h:276
Definition juce_MouseEvent.h:39
MouseEvent getEventRelativeTo(Component *newComponent) const noexcept
Definition juce_MouseEvent.cpp:61
Component *const eventComponent
Definition juce_MouseEvent.h:173
Definition juce_PopupMenu.h:782
bool next()
Definition juce_PopupMenu.cpp:2318
static bool JUCE_CALLTYPE dismissAllActiveMenus()
Definition juce_PopupMenu.cpp:2201
virtual void setTooltip(const String &newTooltip)
Definition juce_TooltipClient.h:76
Definition juce_StringArray.h:35
Definition juce_String.h:53
bool isNotEmpty() const noexcept
Definition juce_String.h:316
@ backgroundColourId
Definition juce_TextEditor.h:209
@ highlightColourId
Definition juce_TextEditor.h:217
@ textColourId
Definition juce_TextEditor.h:212
@ outlineColourId
Definition juce_TextEditor.h:223
Definition juce_Value.h:51
* e
Definition inflate.c:1404
int * l
Definition inflate.c:1579
int g
Definition inflate.c:1573
register unsigned i
Definition inflate.c:1575
static const char * name
Definition pugl.h:1582
#define TRANS(stringLiteral)
Definition juce_LocalisedStrings.h:208
#define jassert(expression)
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define jassertfalse
const Colour transparentBlack
Definition juce_Colours.h:40
Definition carla_juce.cpp:31
@ valueChanged
Definition juce_AccessibilityEvent.h:44
NotificationType
Definition juce_NotificationType.h:32
@ sendNotification
Definition juce_NotificationType.h:34
@ sendNotificationSync
Definition juce_NotificationType.h:35
@ dontSendNotification
Definition juce_NotificationType.h:33
@ showMenu
Definition juce_AccessibilityActions.h:61
@ press
Definition juce_AccessibilityActions.h:40
static void comboBoxPopupMenuFinishedCallback(int result, ComboBox *combo)
Definition juce_ComboBox.cpp:511
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Definition juce_MathsFunctions.h:279
AccessibilityRole
Definition juce_AccessibilityRole.h:37
Definition juce_MouseEvent.h:392
float deltaY
Definition juce_MouseEvent.h:410
Definition juce_PopupMenu.h:111
int n
Definition crypt.c:458
ZCONST char * key
Definition crypt.c:587
void handler(int signal)
Definition fileio.c:1632
int result
Definition process.c:1455
#define const
Definition zconf.h:137