| @@ -318,7 +318,7 @@ public: | |||||
| addAndMakeVisible (startTestButton); | addAndMakeVisible (startTestButton); | ||||
| startTestButton.setButtonText ("Test Latency"); | startTestButton.setButtonText ("Test Latency"); | ||||
| startTestButton.onClick = [this]() { startTest(); }; | |||||
| startTestButton.onClick = [this] { startTest(); }; | |||||
| MainAppWindow::getSharedAudioDeviceManager().addAudioCallback (liveAudioScroller); | MainAppWindow::getSharedAudioDeviceManager().addAudioCallback (liveAudioScroller); | ||||
| } | } | ||||
| @@ -253,7 +253,7 @@ public: | |||||
| addAndMakeVisible (followTransportButton); | addAndMakeVisible (followTransportButton); | ||||
| followTransportButton.setButtonText ("Follow Transport"); | followTransportButton.setButtonText ("Follow Transport"); | ||||
| followTransportButton.onClick = [this]() { updateFollowTransportState(); }; | |||||
| followTransportButton.onClick = [this] { updateFollowTransportState(); }; | |||||
| addAndMakeVisible (explanation); | addAndMakeVisible (explanation); | ||||
| explanation.setText ("Select an audio file in the treeview above, and this page will display its waveform, and let you play it..", dontSendNotification); | explanation.setText ("Select an audio file in the treeview above, and this page will display its waveform, and let you play it..", dontSendNotification); | ||||
| @@ -277,7 +277,7 @@ public: | |||||
| startStopButton.setButtonText ("Play/Stop"); | startStopButton.setButtonText ("Play/Stop"); | ||||
| startStopButton.setColour (TextButton::buttonColourId, Colour (0xff79ed7f)); | startStopButton.setColour (TextButton::buttonColourId, Colour (0xff79ed7f)); | ||||
| startStopButton.setColour (TextButton::textColourOffId, Colours::black); | startStopButton.setColour (TextButton::textColourOffId, Colours::black); | ||||
| startStopButton.onClick = [this]() { startOrStop(); }; | |||||
| startStopButton.onClick = [this] { startOrStop(); }; | |||||
| addAndMakeVisible (fileTreeComp); | addAndMakeVisible (fileTreeComp); | ||||
| @@ -233,7 +233,7 @@ public: | |||||
| recordButton.setColour (TextButton::buttonColourId, Colour (0xffff5c5c)); | recordButton.setColour (TextButton::buttonColourId, Colour (0xffff5c5c)); | ||||
| recordButton.setColour (TextButton::textColourOnId, Colours::black); | recordButton.setColour (TextButton::textColourOnId, Colours::black); | ||||
| recordButton.onClick = [this]() | |||||
| recordButton.onClick = [this] | |||||
| { | { | ||||
| if (recorder.isRecording()) | if (recorder.isRecording()) | ||||
| stopRecording(); | stopRecording(); | ||||
| @@ -245,12 +245,12 @@ public: | |||||
| sineButton.setButtonText ("Use sine wave"); | sineButton.setButtonText ("Use sine wave"); | ||||
| sineButton.setRadioGroupId (321); | sineButton.setRadioGroupId (321); | ||||
| sineButton.setToggleState (true, dontSendNotification); | sineButton.setToggleState (true, dontSendNotification); | ||||
| sineButton.onClick = [this]() { synthAudioSource.setUsingSineWaveSound(); }; | |||||
| sineButton.onClick = [this] { synthAudioSource.setUsingSineWaveSound(); }; | |||||
| addAndMakeVisible (sampledButton); | addAndMakeVisible (sampledButton); | ||||
| sampledButton.setButtonText ("Use sampled sound"); | sampledButton.setButtonText ("Use sampled sound"); | ||||
| sampledButton.setRadioGroupId (321); | sampledButton.setRadioGroupId (321); | ||||
| sampledButton.onClick = [this]() { synthAudioSource.setUsingSampledSound(); }; | |||||
| sampledButton.onClick = [this] { synthAudioSource.setUsingSampledSound(); }; | |||||
| addAndMakeVisible (liveAudioDisplayComp); | addAndMakeVisible (liveAudioDisplayComp); | ||||
| @@ -48,11 +48,11 @@ public: | |||||
| cameraSelectorComboBox.onChange = [this] { cameraChanged(); }; | cameraSelectorComboBox.onChange = [this] { cameraChanged(); }; | ||||
| addAndMakeVisible (snapshotButton); | addAndMakeVisible (snapshotButton); | ||||
| snapshotButton.onClick = [this]() { takeSnapshot(); }; | |||||
| snapshotButton.onClick = [this] { takeSnapshot(); }; | |||||
| snapshotButton.setEnabled (false); | snapshotButton.setEnabled (false); | ||||
| addAndMakeVisible (recordMovieButton); | addAndMakeVisible (recordMovieButton); | ||||
| recordMovieButton.onClick = [this]() { startRecording(); }; | |||||
| recordMovieButton.onClick = [this] { startRecording(); }; | |||||
| recordMovieButton.setEnabled (false); | recordMovieButton.setEnabled (false); | ||||
| addAndMakeVisible (lastSnapshot); | addAndMakeVisible (lastSnapshot); | ||||
| @@ -63,15 +63,15 @@ public: | |||||
| addAndMakeVisible (launchButton); | addAndMakeVisible (launchButton); | ||||
| launchButton.setButtonText ("Launch Child Process"); | launchButton.setButtonText ("Launch Child Process"); | ||||
| launchButton.onClick = [this]() { launchChildProcess(); }; | |||||
| launchButton.onClick = [this] { launchChildProcess(); }; | |||||
| addAndMakeVisible (pingButton); | addAndMakeVisible (pingButton); | ||||
| pingButton.setButtonText ("Send Ping"); | pingButton.setButtonText ("Send Ping"); | ||||
| pingButton.onClick = [this]() { pingChildProcess(); }; | |||||
| pingButton.onClick = [this] { pingChildProcess(); }; | |||||
| addAndMakeVisible (killButton); | addAndMakeVisible (killButton); | ||||
| killButton.setButtonText ("Kill Child Process"); | killButton.setButtonText ("Kill Child Process"); | ||||
| killButton.onClick = [this]() { killChildProcess(); }; | |||||
| killButton.onClick = [this] { killChildProcess(); }; | |||||
| addAndMakeVisible (testResultsBox); | addAndMakeVisible (testResultsBox); | ||||
| testResultsBox.setMultiLine (true); | testResultsBox.setMultiLine (true); | ||||
| @@ -43,7 +43,7 @@ public: | |||||
| addAndMakeVisible (generateRSAButton); | addAndMakeVisible (generateRSAButton); | ||||
| generateRSAButton.setButtonText ("Generate RSA"); | generateRSAButton.setButtonText ("Generate RSA"); | ||||
| generateRSAButton.onClick = [this]() { createRSAKey(); }; | |||||
| generateRSAButton.onClick = [this] { createRSAKey(); }; | |||||
| addAndMakeVisible (rsaResultBox); | addAndMakeVisible (rsaResultBox); | ||||
| rsaResultBox.setReadOnly (true); | rsaResultBox.setReadOnly (true); | ||||
| @@ -137,7 +137,7 @@ public: | |||||
| hashEntryBox.setReturnKeyStartsNewLine (true); | hashEntryBox.setReturnKeyStartsNewLine (true); | ||||
| hashEntryBox.setText ("Type some text in this box and the resulting MD5, SHA and Whirlpool hashes will update below"); | hashEntryBox.setText ("Type some text in this box and the resulting MD5, SHA and Whirlpool hashes will update below"); | ||||
| auto updateHashes = [this]() | |||||
| auto updateHashes = [this] | |||||
| { | { | ||||
| auto text = hashEntryBox.getText(); | auto text = hashEntryBox.getText(); | ||||
| updateMD5Result (text.toUTF8()); | updateMD5Result (text.toUTF8()); | ||||
| @@ -117,7 +117,7 @@ public: | |||||
| addAndMakeVisible (nativeButton); | addAndMakeVisible (nativeButton); | ||||
| nativeButton.setButtonText ("Use Native Windows"); | nativeButton.setButtonText ("Use Native Windows"); | ||||
| nativeButton.onClick = [this]() { getLookAndFeel().setUsingNativeAlertWindows (nativeButton.getToggleState()); }; | |||||
| nativeButton.onClick = [this] { getLookAndFeel().setUsingNativeAlertWindows (nativeButton.getToggleState()); }; | |||||
| static const char* windowNames[] = | static const char* windowNames[] = | ||||
| { | { | ||||
| @@ -147,7 +147,7 @@ public: | |||||
| windowButtons.add (newButton); | windowButtons.add (newButton); | ||||
| addAndMakeVisible (newButton); | addAndMakeVisible (newButton); | ||||
| newButton->setButtonText (windowNames[i]); | newButton->setButtonText (windowNames[i]); | ||||
| newButton->onClick = [this, i, newButton]() { showWindow (*newButton, static_cast<DialogType> (i)); }; | |||||
| newButton->onClick = [this, i, newButton] { showWindow (*newButton, static_cast<DialogType> (i)); }; | |||||
| } | } | ||||
| } | } | ||||
| @@ -36,19 +36,19 @@ struct DemoFlexPanel : public juce::Component | |||||
| int x = 70; | int x = 70; | ||||
| int y = 3; | int y = 3; | ||||
| setupTextEditor (flexOrderEditor, { x, y, 20, 18 }, "0", [this]() { flexItem.order = (int) flexOrderEditor.getText().getFloatValue(); }); | |||||
| setupTextEditor (flexOrderEditor, { x, y, 20, 18 }, "0", [this] { flexItem.order = (int) flexOrderEditor.getText().getFloatValue(); }); | |||||
| addLabel ("order", flexOrderEditor); | addLabel ("order", flexOrderEditor); | ||||
| y += 20; | y += 20; | ||||
| setupTextEditor (flexGrowEditor, { x, y, 20, 18 }, "0", [this]() { flexItem.flexGrow = flexGrowEditor.getText().getFloatValue(); }); | |||||
| setupTextEditor (flexGrowEditor, { x, y, 20, 18 }, "0", [this] { flexItem.flexGrow = flexGrowEditor.getText().getFloatValue(); }); | |||||
| addLabel ("flex-grow", flexGrowEditor); | addLabel ("flex-grow", flexGrowEditor); | ||||
| y += 20; | y += 20; | ||||
| setupTextEditor (flexShrinkEditor, { x, y, 20, 18 }, "1", [this]() { flexItem.flexShrink = flexShrinkEditor.getText().getFloatValue(); }); | |||||
| setupTextEditor (flexShrinkEditor, { x, y, 20, 18 }, "1", [this] { flexItem.flexShrink = flexShrinkEditor.getText().getFloatValue(); }); | |||||
| addLabel ("flex-shrink", flexShrinkEditor); | addLabel ("flex-shrink", flexShrinkEditor); | ||||
| y += 20; | y += 20; | ||||
| setupTextEditor (flexBasisEditor, { x, y, 33, 18 }, "100", [this]() { flexItem.flexBasis = flexBasisEditor.getText().getFloatValue(); }); | |||||
| setupTextEditor (flexBasisEditor, { x, y, 33, 18 }, "100", [this] { flexItem.flexBasis = flexBasisEditor.getText().getFloatValue(); }); | |||||
| addLabel ("flex-basis", flexBasisEditor); | addLabel ("flex-basis", flexBasisEditor); | ||||
| y += 20; | y += 20; | ||||
| @@ -71,7 +71,7 @@ struct DemoFlexPanel : public juce::Component | |||||
| te.setBounds (b); | te.setBounds (b); | ||||
| te.setText (initialText); | te.setText (initialText); | ||||
| te.onTextChange = [this, updateFn]() | |||||
| te.onTextChange = [this, updateFn] | |||||
| { | { | ||||
| updateFn(); | updateFn(); | ||||
| @@ -176,10 +176,10 @@ struct FlexBoxDemo : public juce::Component | |||||
| int leftMargin = 15; | int leftMargin = 15; | ||||
| int topMargin = 45; | int topMargin = 45; | ||||
| createToggleButton ("row", groupID, leftMargin, topMargin + i++ * 22, true, [this]() { flexBox.flexDirection = FlexBox::Direction::row; }).setToggleState (true, dontSendNotification); | |||||
| createToggleButton ("row-reverse", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.flexDirection = FlexBox::Direction::rowReverse; }); | |||||
| createToggleButton ("column", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.flexDirection = FlexBox::Direction::column; }); | |||||
| createToggleButton ("column-reverse", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.flexDirection = FlexBox::Direction::columnReverse; }); | |||||
| createToggleButton ("row", groupID, leftMargin, topMargin + i++ * 22, true, [this] { flexBox.flexDirection = FlexBox::Direction::row; }).setToggleState (true, dontSendNotification); | |||||
| createToggleButton ("row-reverse", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.flexDirection = FlexBox::Direction::rowReverse; }); | |||||
| createToggleButton ("column", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.flexDirection = FlexBox::Direction::column; }); | |||||
| createToggleButton ("column-reverse", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.flexDirection = FlexBox::Direction::columnReverse; }); | |||||
| auto wrapGroup = addControl (new GroupComponent ("wrap", "flex-wrap")); | auto wrapGroup = addControl (new GroupComponent ("wrap", "flex-wrap")); | ||||
| wrapGroup->setBounds (160, 30, 140, 110); | wrapGroup->setBounds (160, 30, 140, 110); | ||||
| @@ -188,9 +188,9 @@ struct FlexBoxDemo : public juce::Component | |||||
| ++groupID; | ++groupID; | ||||
| leftMargin = 165; | leftMargin = 165; | ||||
| createToggleButton ("nowrap", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.flexWrap = FlexBox::Wrap::noWrap; }); | |||||
| createToggleButton ("wrap", groupID, leftMargin, topMargin + i++ * 22, true, [this]() { flexBox.flexWrap = FlexBox::Wrap::wrap; }); | |||||
| createToggleButton ("wrap-reverse", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.flexWrap = FlexBox::Wrap::wrapReverse; }); | |||||
| createToggleButton ("nowrap", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.flexWrap = FlexBox::Wrap::noWrap; }); | |||||
| createToggleButton ("wrap", groupID, leftMargin, topMargin + i++ * 22, true, [this] { flexBox.flexWrap = FlexBox::Wrap::wrap; }); | |||||
| createToggleButton ("wrap-reverse", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.flexWrap = FlexBox::Wrap::wrapReverse; }); | |||||
| auto justifyGroup = addControl (new GroupComponent ("justify", "justify-content")); | auto justifyGroup = addControl (new GroupComponent ("justify", "justify-content")); | ||||
| justifyGroup->setBounds (10, 150, 140, 140); | justifyGroup->setBounds (10, 150, 140, 140); | ||||
| @@ -200,11 +200,11 @@ struct FlexBoxDemo : public juce::Component | |||||
| leftMargin = 15; | leftMargin = 15; | ||||
| topMargin = 165; | topMargin = 165; | ||||
| createToggleButton ("flex-start", groupID, leftMargin, topMargin + i++ * 22, true, [this]() { flexBox.justifyContent = FlexBox::JustifyContent::flexStart; }); | |||||
| createToggleButton ("flex-end", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.justifyContent = FlexBox::JustifyContent::flexEnd; }); | |||||
| createToggleButton ("center", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.justifyContent = FlexBox::JustifyContent::center; }); | |||||
| createToggleButton ("space-between", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.justifyContent = FlexBox::JustifyContent::spaceBetween; }); | |||||
| createToggleButton ("space-around", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.justifyContent = FlexBox::JustifyContent::spaceAround; }); | |||||
| createToggleButton ("flex-start", groupID, leftMargin, topMargin + i++ * 22, true, [this] { flexBox.justifyContent = FlexBox::JustifyContent::flexStart; }); | |||||
| createToggleButton ("flex-end", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.justifyContent = FlexBox::JustifyContent::flexEnd; }); | |||||
| createToggleButton ("center", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.justifyContent = FlexBox::JustifyContent::center; }); | |||||
| createToggleButton ("space-between", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.justifyContent = FlexBox::JustifyContent::spaceBetween; }); | |||||
| createToggleButton ("space-around", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.justifyContent = FlexBox::JustifyContent::spaceAround; }); | |||||
| auto alignGroup = addControl (new GroupComponent ("align", "align-items")); | auto alignGroup = addControl (new GroupComponent ("align", "align-items")); | ||||
| alignGroup->setBounds (160, 150, 140, 140); | alignGroup->setBounds (160, 150, 140, 140); | ||||
| @@ -214,10 +214,10 @@ struct FlexBoxDemo : public juce::Component | |||||
| leftMargin = 165; | leftMargin = 165; | ||||
| topMargin = 165; | topMargin = 165; | ||||
| createToggleButton ("stretch", groupID, leftMargin, topMargin + i++ * 22, true, [this]() { flexBox.alignItems = FlexBox::AlignItems::stretch; }); | |||||
| createToggleButton ("flex-start", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignItems = FlexBox::AlignItems::flexStart; }); | |||||
| createToggleButton ("flex-end", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignItems = FlexBox::AlignItems::flexEnd; }); | |||||
| createToggleButton ("center", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignItems = FlexBox::AlignItems::center; }); | |||||
| createToggleButton ("stretch", groupID, leftMargin, topMargin + i++ * 22, true, [this] { flexBox.alignItems = FlexBox::AlignItems::stretch; }); | |||||
| createToggleButton ("flex-start", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignItems = FlexBox::AlignItems::flexStart; }); | |||||
| createToggleButton ("flex-end", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignItems = FlexBox::AlignItems::flexEnd; }); | |||||
| createToggleButton ("center", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignItems = FlexBox::AlignItems::center; }); | |||||
| auto alignContentGroup = addControl (new GroupComponent ("content", "align-content")); | auto alignContentGroup = addControl (new GroupComponent ("content", "align-content")); | ||||
| alignContentGroup->setBounds (10, 300, 140, 160); | alignContentGroup->setBounds (10, 300, 140, 160); | ||||
| @@ -227,12 +227,12 @@ struct FlexBoxDemo : public juce::Component | |||||
| leftMargin = 15; | leftMargin = 15; | ||||
| topMargin = 315; | topMargin = 315; | ||||
| createToggleButton ("stretch", groupID, leftMargin, topMargin + i++ * 22, true, [this]() { flexBox.alignContent = FlexBox::AlignContent::stretch; }); | |||||
| createToggleButton ("flex-start", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignContent = FlexBox::AlignContent::flexStart; }); | |||||
| createToggleButton ("flex-end", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignContent = FlexBox::AlignContent::flexEnd; }); | |||||
| createToggleButton ("center", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignContent = FlexBox::AlignContent::center; }); | |||||
| createToggleButton ("space-between", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignContent = FlexBox::AlignContent::spaceBetween; }); | |||||
| createToggleButton ("space-around", groupID, leftMargin, topMargin + i++ * 22, false, [this]() { flexBox.alignContent = FlexBox::AlignContent::spaceAround; }); | |||||
| createToggleButton ("stretch", groupID, leftMargin, topMargin + i++ * 22, true, [this] { flexBox.alignContent = FlexBox::AlignContent::stretch; }); | |||||
| createToggleButton ("flex-start", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignContent = FlexBox::AlignContent::flexStart; }); | |||||
| createToggleButton ("flex-end", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignContent = FlexBox::AlignContent::flexEnd; }); | |||||
| createToggleButton ("center", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignContent = FlexBox::AlignContent::center; }); | |||||
| createToggleButton ("space-between", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignContent = FlexBox::AlignContent::spaceBetween; }); | |||||
| createToggleButton ("space-around", groupID, leftMargin, topMargin + i++ * 22, false, [this] { flexBox.alignContent = FlexBox::AlignContent::spaceAround; }); | |||||
| } | } | ||||
| void setupFlexBoxItems() | void setupFlexBoxItems() | ||||
| @@ -58,9 +58,9 @@ public: | |||||
| kerningSlider.addListener (this); | kerningSlider.addListener (this); | ||||
| scaleSlider.addListener (this); | scaleSlider.addListener (this); | ||||
| boldToggle.onClick = [this]() { refreshPreviewBoxFont(); }; | |||||
| italicToggle.onClick = [this]() { refreshPreviewBoxFont(); }; | |||||
| styleBox.onChange = [this]() { refreshPreviewBoxFont(); }; | |||||
| boldToggle.onClick = [this] { refreshPreviewBoxFont(); }; | |||||
| italicToggle.onClick = [this] { refreshPreviewBoxFont(); }; | |||||
| styleBox.onChange = [this] { refreshPreviewBoxFont(); }; | |||||
| Font::findFonts (fonts); // Generate the list of fonts | Font::findFonts (fonts); // Generate the list of fonts | ||||
| @@ -74,7 +74,7 @@ public: | |||||
| addAndMakeVisible (descriptionLabel); | addAndMakeVisible (descriptionLabel); | ||||
| addAndMakeVisible (startButton); | addAndMakeVisible (startButton); | ||||
| addChildComponent (demoComp); | addChildComponent (demoComp); | ||||
| startButton.onClick = [this]() { start(); }; | |||||
| startButton.onClick = [this] { start(); }; | |||||
| } | } | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| @@ -535,12 +535,12 @@ public: | |||||
| addLookAndFeel (slaf, "Square Look And Feel"); | addLookAndFeel (slaf, "Square Look And Feel"); | ||||
| setupSquareLookAndFeelColours (*slaf); | setupSquareLookAndFeelColours (*slaf); | ||||
| lafBox.onChange = [this]() { setAllLookAndFeels (lookAndFeels[lafBox.getSelectedItemIndex()]); }; | |||||
| lafBox.onChange = [this] { setAllLookAndFeels (lookAndFeels[lafBox.getSelectedItemIndex()]); }; | |||||
| lafBox.setSelectedItemIndex (3); | lafBox.setSelectedItemIndex (3); | ||||
| addAndMakeVisible (randomButton); | addAndMakeVisible (randomButton); | ||||
| randomButton.setButtonText ("Assign Randomly"); | randomButton.setButtonText ("Assign Randomly"); | ||||
| randomButton.onClick = [this]() { lafBox.setSelectedItemIndex (Random().nextInt (lafBox.getNumItems())); }; | |||||
| randomButton.onClick = [this] { lafBox.setSelectedItemIndex (Random().nextInt (lafBox.getNumItems())); }; | |||||
| } | } | ||||
| void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
| @@ -49,7 +49,7 @@ public: | |||||
| editor.setReturnKeyStartsNewLine (true); | editor.setReturnKeyStartsNewLine (true); | ||||
| editor.getTextValue().referTo (textValueObject); | editor.getTextValue().referTo (textValueObject); | ||||
| addAndMakeVisible (editor); | addAndMakeVisible (editor); | ||||
| editor.onTextChange = [this]() { changed(); }; | |||||
| editor.onTextChange = [this] { changed(); }; | |||||
| } | } | ||||
| void resized() override | void resized() override | ||||
| @@ -155,11 +155,11 @@ public: | |||||
| showInTabsButton.setButtonText ("Show with tabs"); | showInTabsButton.setButtonText ("Show with tabs"); | ||||
| showInTabsButton.setToggleState (false, dontSendNotification); | showInTabsButton.setToggleState (false, dontSendNotification); | ||||
| showInTabsButton.onClick = [this]() { updateLayoutMode(); }; | |||||
| showInTabsButton.onClick = [this] { updateLayoutMode(); }; | |||||
| addAndMakeVisible (showInTabsButton); | addAndMakeVisible (showInTabsButton); | ||||
| addNoteButton.setButtonText ("Create a new note"); | addNoteButton.setButtonText ("Create a new note"); | ||||
| addNoteButton.onClick = [this]() { addNote (String ("Note ") + String (multiDocumentPanel.getNumDocuments() + 1), "Hello World!"); }; | |||||
| addNoteButton.onClick = [this] { addNote (String ("Note ") + String (multiDocumentPanel.getNumDocuments() + 1), "Hello World!"); }; | |||||
| addAndMakeVisible (addNoteButton); | addAndMakeVisible (addNoteButton); | ||||
| addAndMakeVisible (multiDocumentPanel); | addAndMakeVisible (multiDocumentPanel); | ||||
| @@ -90,7 +90,7 @@ public: | |||||
| auto midiInputs = MidiInput::getDevices(); | auto midiInputs = MidiInput::getDevices(); | ||||
| midiInputList.addItemList (midiInputs, 1); | midiInputList.addItemList (midiInputs, 1); | ||||
| midiInputList.onChange = [this]() { setMidiInput (midiInputList.getSelectedItemIndex()); }; | |||||
| midiInputList.onChange = [this] { setMidiInput (midiInputList.getSelectedItemIndex()); }; | |||||
| // find the first enabled device and use that by default | // find the first enabled device and use that by default | ||||
| for (int i = 0; i < midiInputs.size(); ++i) | for (int i = 0; i < midiInputs.size(); ++i) | ||||
| @@ -115,7 +115,7 @@ public: | |||||
| addAndMakeVisible (midiOutputList); | addAndMakeVisible (midiOutputList); | ||||
| midiOutputList.setTextWhenNoChoicesAvailable ("No MIDI Output Enabled"); | midiOutputList.setTextWhenNoChoicesAvailable ("No MIDI Output Enabled"); | ||||
| midiOutputList.addItemList (MidiOutput::getDevices(), 1); | midiOutputList.addItemList (MidiOutput::getDevices(), 1); | ||||
| midiOutputList.onChange = [this]() { setMidiOutput (midiOutputList.getSelectedItemIndex()); }; | |||||
| midiOutputList.onChange = [this] { setMidiOutput (midiOutputList.getSelectedItemIndex()); }; | |||||
| addAndMakeVisible (keyboardComponent); | addAndMakeVisible (keyboardComponent); | ||||
| keyboardState.addListener (this); | keyboardState.addListener (this); | ||||
| @@ -217,7 +217,7 @@ public: | |||||
| controlButton.setTopLeftPosition (20, 20); | controlButton.setTopLeftPosition (20, 20); | ||||
| controlButton.setTriggeredOnMouseDown (true); | controlButton.setTriggeredOnMouseDown (true); | ||||
| controlButton.setAlwaysOnTop (true); | controlButton.setAlwaysOnTop (true); | ||||
| controlButton.onClick = [this]() { showMenu(); }; | |||||
| controlButton.onClick = [this] { showMenu(); }; | |||||
| } | } | ||||
| ~MultithreadingDemo() | ~MultithreadingDemo() | ||||
| @@ -40,11 +40,11 @@ public: | |||||
| addAndMakeVisible (urlBox); | addAndMakeVisible (urlBox); | ||||
| urlBox.setText ("https://www.google.com"); | urlBox.setText ("https://www.google.com"); | ||||
| urlBox.onReturnKey = [this]() { fetchButton.triggerClick(); }; | |||||
| urlBox.onReturnKey = [this] { fetchButton.triggerClick(); }; | |||||
| addAndMakeVisible (fetchButton); | addAndMakeVisible (fetchButton); | ||||
| fetchButton.setButtonText ("Download URL Contents"); | fetchButton.setButtonText ("Download URL Contents"); | ||||
| fetchButton.onClick = [this]() { startThread(); }; | |||||
| fetchButton.onClick = [this] { startThread(); }; | |||||
| addAndMakeVisible (resultsBox); | addAndMakeVisible (resultsBox); | ||||
| } | } | ||||
| @@ -360,7 +360,7 @@ struct OpenGLDemoClasses | |||||
| speedLabel.attachToComponent (&speedSlider, true); | speedLabel.attachToComponent (&speedSlider, true); | ||||
| addAndMakeVisible (showBackgroundToggle); | addAndMakeVisible (showBackgroundToggle); | ||||
| showBackgroundToggle.onClick = [this]() { demo.doBackgroundDrawing = showBackgroundToggle.getToggleState(); }; | |||||
| showBackgroundToggle.onClick = [this] { demo.doBackgroundDrawing = showBackgroundToggle.getToggleState(); }; | |||||
| addAndMakeVisible (tabbedComp); | addAndMakeVisible (tabbedComp); | ||||
| tabbedComp.setTabBarDepth (25); | tabbedComp.setTabBarDepth (25); | ||||
| @@ -377,11 +377,11 @@ struct OpenGLDemoClasses | |||||
| textures.add (new DynamicTexture()); | textures.add (new DynamicTexture()); | ||||
| addAndMakeVisible (textureBox); | addAndMakeVisible (textureBox); | ||||
| textureBox.onChange = [this]() { selectTexture (textureBox.getSelectedId()); }; | |||||
| textureBox.onChange = [this] { selectTexture (textureBox.getSelectedId()); }; | |||||
| updateTexturesList(); | updateTexturesList(); | ||||
| addAndMakeVisible (presetBox); | addAndMakeVisible (presetBox); | ||||
| presetBox.onChange = [this]() { selectPreset (presetBox.getSelectedItemIndex()); }; | |||||
| presetBox.onChange = [this] { selectPreset (presetBox.getSelectedItemIndex()); }; | |||||
| auto presets = getPresets(); | auto presets = getPresets(); | ||||
| StringArray presetNames; | StringArray presetNames; | ||||
| @@ -57,7 +57,7 @@ public: | |||||
| presetLabel.attachToComponent (&presetBox, true); | presetLabel.attachToComponent (&presetBox, true); | ||||
| addAndMakeVisible (presetBox); | addAndMakeVisible (presetBox); | ||||
| presetBox.onChange = [this]() { selectPreset (presetBox.getSelectedItemIndex()); }; | |||||
| presetBox.onChange = [this] { selectPreset (presetBox.getSelectedItemIndex()); }; | |||||
| fragmentEditorComp.setOpaque (false); | fragmentEditorComp.setOpaque (false); | ||||
| fragmentDocument.addListener (this); | fragmentDocument.addListener (this); | ||||
| @@ -151,11 +151,11 @@ public: | |||||
| addAndMakeVisible (stopButton); | addAndMakeVisible (stopButton); | ||||
| stopButton.setButtonText ("Stop"); | stopButton.setButtonText ("Stop"); | ||||
| stopButton.onClick = [this]() { stopButtonClicked(); }; | |||||
| stopButton.onClick = [this] { stopButtonClicked(); }; | |||||
| addAndMakeVisible (randomColourButton); | addAndMakeVisible (randomColourButton); | ||||
| randomColourButton.setButtonText ("Set Random Colour"); | randomColourButton.setButtonText ("Set Random Colour"); | ||||
| randomColourButton.onClick = [this]() { randomColourButtonClicked(); }; | |||||
| randomColourButton.onClick = [this] { randomColourButtonClicked(); }; | |||||
| // lay out our components in a psudo random grid | // lay out our components in a psudo random grid | ||||
| Rectangle<int> area (0, 100, 150, 150); | Rectangle<int> area (0, 100, 150, 150); | ||||
| @@ -114,7 +114,7 @@ struct UnitTestClasses | |||||
| setOpaque (true); | setOpaque (true); | ||||
| addAndMakeVisible (startTestButton); | addAndMakeVisible (startTestButton); | ||||
| startTestButton.onClick = [this]() { start(); }; | |||||
| startTestButton.onClick = [this] { start(); }; | |||||
| addAndMakeVisible (testResultsBox); | addAndMakeVisible (testResultsBox); | ||||
| testResultsBox.setMultiLine (true); | testResultsBox.setMultiLine (true); | ||||
| @@ -173,8 +173,8 @@ public: | |||||
| addAndMakeVisible (undoButton); | addAndMakeVisible (undoButton); | ||||
| addAndMakeVisible (redoButton); | addAndMakeVisible (redoButton); | ||||
| undoButton.onClick = [this]() { undoManager.undo(); }; | |||||
| redoButton.onClick = [this]() { undoManager.redo(); }; | |||||
| undoButton.onClick = [this] { undoManager.undo(); }; | |||||
| redoButton.onClick = [this] { undoManager.redo(); }; | |||||
| startTimer (500); | startTimer (500); | ||||
| } | } | ||||
| @@ -143,8 +143,8 @@ public: | |||||
| loadLeftButton.setButtonText ("Load Left"); | loadLeftButton.setButtonText ("Load Left"); | ||||
| loadRightButton.setButtonText ("Load Right"); | loadRightButton.setButtonText ("Load Right"); | ||||
| loadLeftButton .onClick = [this]() { movieCompLeft .setFile (fileTree.getSelectedFile (0)); }; | |||||
| loadRightButton.onClick = [this]() { movieCompRight.setFile (fileTree.getSelectedFile (0)); }; | |||||
| loadLeftButton .onClick = [this] { movieCompLeft .setFile (fileTree.getSelectedFile (0)); }; | |||||
| loadRightButton.onClick = [this] { movieCompRight.setFile (fileTree.getSelectedFile (0)); }; | |||||
| addAndMakeVisible (loadLeftButton); | addAndMakeVisible (loadLeftButton); | ||||
| addAndMakeVisible (loadRightButton); | addAndMakeVisible (loadRightButton); | ||||
| @@ -78,18 +78,18 @@ public: | |||||
| // Create an address box.. | // Create an address box.. | ||||
| addAndMakeVisible (addressTextBox); | addAndMakeVisible (addressTextBox); | ||||
| addressTextBox.setTextToShowWhenEmpty ("Enter a web address, e.g. https://www.juce.com", Colours::grey); | addressTextBox.setTextToShowWhenEmpty ("Enter a web address, e.g. https://www.juce.com", Colours::grey); | ||||
| addressTextBox.onReturnKey = [this]() { webView->goToURL (addressTextBox.getText()); }; | |||||
| addressTextBox.onReturnKey = [this] { webView->goToURL (addressTextBox.getText()); }; | |||||
| // create the actual browser component | // create the actual browser component | ||||
| addAndMakeVisible (webView = new DemoBrowserComponent (addressTextBox)); | addAndMakeVisible (webView = new DemoBrowserComponent (addressTextBox)); | ||||
| // add some buttons.. | // add some buttons.. | ||||
| addAndMakeVisible (goButton); | addAndMakeVisible (goButton); | ||||
| goButton.onClick = [this]() { webView->goToURL (addressTextBox.getText()); }; | |||||
| goButton.onClick = [this] { webView->goToURL (addressTextBox.getText()); }; | |||||
| addAndMakeVisible (backButton); | addAndMakeVisible (backButton); | ||||
| backButton.onClick = [this]() { webView->goBack(); }; | |||||
| backButton.onClick = [this] { webView->goBack(); }; | |||||
| addAndMakeVisible (forwardButton); | addAndMakeVisible (forwardButton); | ||||
| forwardButton.onClick = [this]() { webView->goForward(); }; | |||||
| forwardButton.onClick = [this] { webView->goForward(); }; | |||||
| // send the browser to a start page.. | // send the browser to a start page.. | ||||
| webView->goToURL ("https://www.juce.com"); | webView->goToURL ("https://www.juce.com"); | ||||
| @@ -351,7 +351,7 @@ struct ButtonsPage : public Component | |||||
| down.setImage (ImageCache::getFromMemory (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize)); | down.setImage (ImageCache::getFromMemory (BinaryData::juce_icon_png, BinaryData::juce_icon_pngSize)); | ||||
| down.setOverlayColour (Colours::black.withAlpha (0.3f)); | down.setOverlayColour (Colours::black.withAlpha (0.3f)); | ||||
| auto popupMessageCallback = [this]() | |||||
| auto popupMessageCallback = [this] | |||||
| { | { | ||||
| if (auto* focused = Component::getCurrentlyFocusedComponent()) | if (auto* focused = Component::getCurrentlyFocusedComponent()) | ||||
| showBubbleMessage (*focused, | showBubbleMessage (*focused, | ||||
| @@ -516,12 +516,12 @@ public: | |||||
| depthLabel.attachToComponent (&depthSlider, false); | depthLabel.attachToComponent (&depthSlider, false); | ||||
| addAndMakeVisible (orientationButton); | addAndMakeVisible (orientationButton); | ||||
| orientationButton.onClick = [this]() { toolbar.setVertical (! toolbar.isVertical()); resized(); }; | |||||
| orientationButton.onClick = [this] { toolbar.setVertical (! toolbar.isVertical()); resized(); }; | |||||
| orientationButton.changeWidthToFitText (22); | orientationButton.changeWidthToFitText (22); | ||||
| orientationButton.setTopLeftPosition (depthSlider.getX(), depthSlider.getBottom() + 20); | orientationButton.setTopLeftPosition (depthSlider.getX(), depthSlider.getBottom() + 20); | ||||
| addAndMakeVisible (customiseButton); | addAndMakeVisible (customiseButton); | ||||
| customiseButton.onClick = [this]() { toolbar.showCustomisationDialog (factory); }; | |||||
| customiseButton.onClick = [this] { toolbar.showCustomisationDialog (factory); }; | |||||
| customiseButton.changeWidthToFitText (22); | customiseButton.changeWidthToFitText (22); | ||||
| customiseButton.setTopLeftPosition (orientationButton.getRight() + 20, orientationButton.getY()); | customiseButton.setTopLeftPosition (orientationButton.getRight() + 20, orientationButton.getY()); | ||||
| } | } | ||||
| @@ -965,7 +965,7 @@ private: | |||||
| comboBox.addItem ("swingin", 6); | comboBox.addItem ("swingin", 6); | ||||
| comboBox.addItem ("wild", 7); | comboBox.addItem ("wild", 7); | ||||
| comboBox.onChange = [this]() { owner.setRating (row, comboBox.getSelectedId()); }; | |||||
| comboBox.onChange = [this] { owner.setRating (row, comboBox.getSelectedId()); }; | |||||
| comboBox.setWantsKeyboardFocus (false); | comboBox.setWantsKeyboardFocus (false); | ||||
| } | } | ||||
| @@ -1277,7 +1277,7 @@ struct BurgerMenuHeader : public Component | |||||
| p.loadPathFromData (burgerMenuPathData, sizeof (burgerMenuPathData)); | p.loadPathFromData (burgerMenuPathData, sizeof (burgerMenuPathData)); | ||||
| burgerButton.setShape (p, true, true, false); | burgerButton.setShape (p, true, true, false); | ||||
| burgerButton.onClick = [this]() { showOrHide(); }; | |||||
| burgerButton.onClick = [this] { showOrHide(); }; | |||||
| addAndMakeVisible (burgerButton); | addAndMakeVisible (burgerButton); | ||||
| } | } | ||||
| @@ -1340,7 +1340,7 @@ public: | |||||
| popupButton.setButtonText ("Show Popup Menu"); | popupButton.setButtonText ("Show Popup Menu"); | ||||
| popupButton.setTriggeredOnMouseDown (true); | popupButton.setTriggeredOnMouseDown (true); | ||||
| popupButton.onClick = [this]() { getDummyPopupMenu().showMenuAsync (PopupMenu::Options().withTargetComponent (&popupButton), nullptr); }; | |||||
| popupButton.onClick = [this] { getDummyPopupMenu().showMenuAsync (PopupMenu::Options().withTargetComponent (&popupButton), nullptr); }; | |||||
| addAndMakeVisible (popupButton); | addAndMakeVisible (popupButton); | ||||
| addChildComponent (menuHeader); | addChildComponent (menuHeader); | ||||
| @@ -204,11 +204,11 @@ public: | |||||
| showWindowsButton.setButtonText ("Show Windows"); | showWindowsButton.setButtonText ("Show Windows"); | ||||
| addAndMakeVisible (showWindowsButton); | addAndMakeVisible (showWindowsButton); | ||||
| showWindowsButton.onClick = [this]() { showAllWindows(); }; | |||||
| showWindowsButton.onClick = [this] { showAllWindows(); }; | |||||
| closeWindowsButton.setButtonText ("Close Windows"); | closeWindowsButton.setButtonText ("Close Windows"); | ||||
| addAndMakeVisible (closeWindowsButton); | addAndMakeVisible (closeWindowsButton); | ||||
| closeWindowsButton.onClick = [this]() { closeAllWindows(); }; | |||||
| closeWindowsButton.onClick = [this] { closeAllWindows(); }; | |||||
| } | } | ||||
| ~WindowsDemo() | ~WindowsDemo() | ||||
| @@ -227,7 +227,7 @@ public: | |||||
| typeBox.addItem ("XML", 1); | typeBox.addItem ("XML", 1); | ||||
| typeBox.addItem ("JSON", 2); | typeBox.addItem ("JSON", 2); | ||||
| typeBox.onChange = [this]() | |||||
| typeBox.onChange = [this] | |||||
| { | { | ||||
| if (typeBox.getSelectedId() == 1) | if (typeBox.getSelectedId() == 1) | ||||
| reset (xml); | reset (xml); | ||||
| @@ -452,7 +452,7 @@ struct LicenseThread : NetWorkerThread | |||||
| if (owner.state.avatar.isValid() != newState.avatar.isValid()) { changed = true; } | if (owner.state.avatar.isValid() != newState.avatar.isValid()) { changed = true; } | ||||
| if (changed) | if (changed) | ||||
| executeOnMessageThreadAndBlock ([this, updatedState]() { owner.updateState (updatedState); }); | |||||
| executeOnMessageThreadAndBlock ([this, updatedState] { owner.updateState (updatedState); }); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -1787,7 +1787,7 @@ private: | |||||
| : owner (cd), device (d), | : owner (cd), device (d), | ||||
| useInputs (useIns), useOutputs (useOuts) | useInputs (useIns), useOutputs (useOuts) | ||||
| { | { | ||||
| d->setDeviceWrapperRestartCallback ([this]() { owner.restartAsync(); }); | |||||
| d->setDeviceWrapperRestartCallback ([this] { owner.restartAsync(); }); | |||||
| } | } | ||||
| ~DeviceWrapper() | ~DeviceWrapper() | ||||
| @@ -472,7 +472,7 @@ public: | |||||
| if (MessageManager::getInstance()->isThisTheMessageThread()) | if (MessageManager::getInstance()->isThisTheMessageThread()) | ||||
| instance->updateTrackProperties (trackProperties); | instance->updateTrackProperties (trackProperties); | ||||
| else | else | ||||
| MessageManager::callAsync ([trackProperties, instance]() | |||||
| MessageManager::callAsync ([trackProperties, instance] | |||||
| { instance->updateTrackProperties (trackProperties); }); | { instance->updateTrackProperties (trackProperties); }); | ||||
| } | } | ||||
| } | } | ||||
| @@ -159,7 +159,7 @@ PluginListComponent::PluginListComponent (AudioPluginFormatManager& manager, Kno | |||||
| addAndMakeVisible (table); | addAndMakeVisible (table); | ||||
| addAndMakeVisible (optionsButton); | addAndMakeVisible (optionsButton); | ||||
| optionsButton.onClick = [this]() { showOptionsMenu(); }; | |||||
| optionsButton.onClick = [this] { showOptionsMenu(); }; | |||||
| optionsButton.setTriggeredOnMouseDown (true); | optionsButton.setTriggeredOnMouseDown (true); | ||||
| setSize (400, 600); | setSize (400, 600); | ||||
| @@ -208,7 +208,7 @@ public: | |||||
| if (hideAdvancedOptionsWithButton) | if (hideAdvancedOptionsWithButton) | ||||
| { | { | ||||
| addAndMakeVisible (showAdvancedSettingsButton = new TextButton (TRANS("Show advanced settings..."))); | addAndMakeVisible (showAdvancedSettingsButton = new TextButton (TRANS("Show advanced settings..."))); | ||||
| showAdvancedSettingsButton->onClick = [this]() { showAdvanced(); }; | |||||
| showAdvancedSettingsButton->onClick = [this] { showAdvanced(); }; | |||||
| } | } | ||||
| type.scanForDevices(); | type.scanForDevices(); | ||||
| @@ -566,7 +566,7 @@ private: | |||||
| { | { | ||||
| addAndMakeVisible (showUIButton = new TextButton (TRANS ("Control Panel"), | addAndMakeVisible (showUIButton = new TextButton (TRANS ("Control Panel"), | ||||
| TRANS ("Opens the device's own control panel"))); | TRANS ("Opens the device's own control panel"))); | ||||
| showUIButton->onClick = [this]() { showDeviceUIPanel(); }; | |||||
| showUIButton->onClick = [this] { showDeviceUIPanel(); }; | |||||
| } | } | ||||
| resized(); | resized(); | ||||
| @@ -583,7 +583,7 @@ private: | |||||
| addAndMakeVisible (resetDeviceButton = new TextButton (TRANS ("Reset Device"), | addAndMakeVisible (resetDeviceButton = new TextButton (TRANS ("Reset Device"), | ||||
| TRANS ("Resets the audio interface - sometimes needed after changing a device's properties in its custom control panel"))); | TRANS ("Resets the audio interface - sometimes needed after changing a device's properties in its custom control panel"))); | ||||
| resetDeviceButton->onClick = [this]() { resetDevice(); }; | |||||
| resetDeviceButton->onClick = [this] { resetDevice(); }; | |||||
| resized(); | resized(); | ||||
| } | } | ||||
| @@ -601,7 +601,7 @@ private: | |||||
| if (outputDeviceDropDown == nullptr) | if (outputDeviceDropDown == nullptr) | ||||
| { | { | ||||
| outputDeviceDropDown = new ComboBox(); | outputDeviceDropDown = new ComboBox(); | ||||
| outputDeviceDropDown->onChange = [this]() { updateConfig (true, false, false, false); }; | |||||
| outputDeviceDropDown->onChange = [this] { updateConfig (true, false, false, false); }; | |||||
| addAndMakeVisible (outputDeviceDropDown); | addAndMakeVisible (outputDeviceDropDown); | ||||
| @@ -613,7 +613,7 @@ private: | |||||
| { | { | ||||
| addAndMakeVisible (testButton = new TextButton (TRANS("Test"), | addAndMakeVisible (testButton = new TextButton (TRANS("Test"), | ||||
| TRANS("Plays a test tone"))); | TRANS("Plays a test tone"))); | ||||
| testButton->onClick = [this]() { playTestSound(); }; | |||||
| testButton->onClick = [this] { playTestSound(); }; | |||||
| } | } | ||||
| } | } | ||||
| @@ -630,7 +630,7 @@ private: | |||||
| if (inputDeviceDropDown == nullptr) | if (inputDeviceDropDown == nullptr) | ||||
| { | { | ||||
| inputDeviceDropDown = new ComboBox(); | inputDeviceDropDown = new ComboBox(); | ||||
| inputDeviceDropDown->onChange = [this]() { updateConfig (false, true, false, false); }; | |||||
| inputDeviceDropDown->onChange = [this] { updateConfig (false, true, false, false); }; | |||||
| addAndMakeVisible (inputDeviceDropDown); | addAndMakeVisible (inputDeviceDropDown); | ||||
| inputDeviceLabel = new Label ({}, TRANS("Input:")); | inputDeviceLabel = new Label ({}, TRANS("Input:")); | ||||
| @@ -668,7 +668,7 @@ private: | |||||
| } | } | ||||
| sampleRateDropDown->setSelectedId (roundToInt (currentDevice->getCurrentSampleRate()), dontSendNotification); | sampleRateDropDown->setSelectedId (roundToInt (currentDevice->getCurrentSampleRate()), dontSendNotification); | ||||
| sampleRateDropDown->onChange = [this]() { updateConfig (false, false, true, false); }; | |||||
| sampleRateDropDown->onChange = [this] { updateConfig (false, false, true, false); }; | |||||
| } | } | ||||
| void updateBufferSizeComboBox (AudioIODevice* currentDevice) | void updateBufferSizeComboBox (AudioIODevice* currentDevice) | ||||
| @@ -695,7 +695,7 @@ private: | |||||
| bufferSizeDropDown->addItem (String (bs) + " samples (" + String (bs * 1000.0 / currentRate, 1) + " ms)", bs); | bufferSizeDropDown->addItem (String (bs) + " samples (" + String (bs * 1000.0 / currentRate, 1) + " ms)", bs); | ||||
| bufferSizeDropDown->setSelectedId (currentDevice->getCurrentBufferSizeSamples(), dontSendNotification); | bufferSizeDropDown->setSelectedId (currentDevice->getCurrentBufferSizeSamples(), dontSendNotification); | ||||
| bufferSizeDropDown->onChange = [this]() { updateConfig (false, false, false, true); }; | |||||
| bufferSizeDropDown->onChange = [this] { updateConfig (false, false, false, true); }; | |||||
| } | } | ||||
| public: | public: | ||||
| @@ -981,7 +981,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& | |||||
| deviceTypeDropDown->addItem (types.getUnchecked(i)->getTypeName(), i + 1); | deviceTypeDropDown->addItem (types.getUnchecked(i)->getTypeName(), i + 1); | ||||
| addAndMakeVisible (deviceTypeDropDown); | addAndMakeVisible (deviceTypeDropDown); | ||||
| deviceTypeDropDown->onChange = [this]() { updateDeviceType(); }; | |||||
| deviceTypeDropDown->onChange = [this] { updateDeviceType(); }; | |||||
| deviceTypeDropDownLabel = new Label ({}, TRANS("Audio device type:")); | deviceTypeDropDownLabel = new Label ({}, TRANS("Audio device type:")); | ||||
| deviceTypeDropDownLabel->setJustificationType (Justification::centredRight); | deviceTypeDropDownLabel->setJustificationType (Justification::centredRight); | ||||
| @@ -1002,7 +1002,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& | |||||
| { | { | ||||
| addAndMakeVisible (bluetoothButton = new TextButton (TRANS("Bluetooth MIDI"), | addAndMakeVisible (bluetoothButton = new TextButton (TRANS("Bluetooth MIDI"), | ||||
| TRANS("Scan for bluetooth MIDI devices"))); | TRANS("Scan for bluetooth MIDI devices"))); | ||||
| bluetoothButton->onClick = [this]() { handleBluetoothButton(); }; | |||||
| bluetoothButton->onClick = [this] { handleBluetoothButton(); }; | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| @@ -1015,7 +1015,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& | |||||
| if (showMidiOutputSelector) | if (showMidiOutputSelector) | ||||
| { | { | ||||
| addAndMakeVisible (midiOutputSelector = new ComboBox()); | addAndMakeVisible (midiOutputSelector = new ComboBox()); | ||||
| midiOutputSelector->onChange = [this]() { updateMidiOutput(); }; | |||||
| midiOutputSelector->onChange = [this] { updateMidiOutput(); }; | |||||
| midiOutputLabel = new Label ("lm", TRANS("MIDI Output:")); | midiOutputLabel = new Label ("lm", TRANS("MIDI Output:")); | ||||
| midiOutputLabel->attachToComponent (midiOutputSelector, true); | midiOutputLabel->attachToComponent (midiOutputSelector, true); | ||||
| @@ -107,10 +107,10 @@ public: | |||||
| { | { | ||||
| beginTest ("Lambdas"); | beginTest ("Lambdas"); | ||||
| std::function<int()> fStack ([]() { return 3; }); | |||||
| std::function<int()> fStack ([] { return 3; }); | |||||
| expectEquals (fStack(), 3); | expectEquals (fStack(), 3); | ||||
| std::function<int()> fHeap ([=]() { return bigData.sum(); }); | |||||
| std::function<int()> fHeap ([=] { return bigData.sum(); }); | |||||
| expectEquals (fHeap(), FunctionTestsHelpers::BigData::bigDataSum); | expectEquals (fHeap(), FunctionTestsHelpers::BigData::bigDataSum); | ||||
| } | } | ||||
| @@ -130,9 +130,9 @@ public: | |||||
| std::function<int()> fEmpty; | std::function<int()> fEmpty; | ||||
| std::function<int()> fStack ([]() { return 3; }); | |||||
| std::function<int()> fStack ([] { return 3; }); | |||||
| std::function<int()> fHeap ([=]() { return bigData.sum(); }); | |||||
| std::function<int()> fHeap ([=] { return bigData.sum(); }); | |||||
| { | { | ||||
| beginTest ("copy constructor"); | beginTest ("copy constructor"); | ||||
| @@ -1683,7 +1683,7 @@ void Component::exitModalState (int returnValue) | |||||
| { | { | ||||
| WeakReference<Component> target (this); | WeakReference<Component> target (this); | ||||
| MessageManager::callAsync ([=]() | |||||
| MessageManager::callAsync ([=] | |||||
| { | { | ||||
| if (auto* c = target.get()) | if (auto* c = target.get()) | ||||
| c->exitModalState (returnValue); | c->exitModalState (returnValue); | ||||
| @@ -2238,7 +2238,7 @@ void Component::postCommandMessage (int commandID) | |||||
| { | { | ||||
| WeakReference<Component> target (this); | WeakReference<Component> target (this); | ||||
| MessageManager::callAsync ([=]() | |||||
| MessageManager::callAsync ([=] | |||||
| { | { | ||||
| if (auto* c = target.get()) | if (auto* c = target.get()) | ||||
| c->handleCommandMessage (commandID); | c->handleCommandMessage (commandID); | ||||
| @@ -93,7 +93,7 @@ FileBrowserComponent::FileBrowserComponent (int flags_, | |||||
| addAndMakeVisible (currentPathBox); | addAndMakeVisible (currentPathBox); | ||||
| currentPathBox.setEditableText (true); | currentPathBox.setEditableText (true); | ||||
| resetRecentPaths(); | resetRecentPaths(); | ||||
| currentPathBox.onChange = [this]() { updateSelectedPath(); }; | |||||
| currentPathBox.onChange = [this] { updateSelectedPath(); }; | |||||
| addAndMakeVisible (filenameBox); | addAndMakeVisible (filenameBox); | ||||
| filenameBox.setMultiLine (false); | filenameBox.setMultiLine (false); | ||||
| @@ -106,7 +106,7 @@ FileBrowserComponent::FileBrowserComponent (int flags_, | |||||
| fileLabel.attachToComponent (&filenameBox, true); | fileLabel.attachToComponent (&filenameBox, true); | ||||
| addAndMakeVisible (goUpButton = getLookAndFeel().createFileBrowserGoUpButton()); | addAndMakeVisible (goUpButton = getLookAndFeel().createFileBrowserGoUpButton()); | ||||
| goUpButton->onClick = [this]() { goUp(); }; | |||||
| goUpButton->onClick = [this] { goUp(); }; | |||||
| goUpButton->setTooltip (TRANS ("Go up to parent directory")); | goUpButton->setTooltip (TRANS ("Go up to parent directory")); | ||||
| if (previewComp != nullptr) | if (previewComp != nullptr) | ||||
| @@ -104,9 +104,9 @@ FileChooserDialogBox::FileChooserDialogBox (const String& name, | |||||
| setResizable (true, true); | setResizable (true, true); | ||||
| setResizeLimits (300, 300, 1200, 1000); | setResizeLimits (300, 300, 1200, 1000); | ||||
| content->okButton.onClick = [this]() { okButtonPressed(); }; | |||||
| content->cancelButton.onClick = [this]() { closeButtonPressed(); }; | |||||
| content->newFolderButton.onClick = [this]() { createNewFolder(); }; | |||||
| content->okButton.onClick = [this] { okButtonPressed(); }; | |||||
| content->cancelButton.onClick = [this] { closeButtonPressed(); }; | |||||
| content->newFolderButton.onClick = [this] { createNewFolder(); }; | |||||
| content->chooserComponent.addListener (this); | content->chooserComponent.addListener (this); | ||||
| @@ -41,18 +41,18 @@ FileSearchPathListComponent::FileSearchPathListComponent() | |||||
| listBox.setOutlineThickness (1); | listBox.setOutlineThickness (1); | ||||
| addAndMakeVisible (addButton); | addAndMakeVisible (addButton); | ||||
| addButton.onClick = [this]() { addPath(); }; | |||||
| addButton.onClick = [this] { addPath(); }; | |||||
| addButton.setConnectedEdges (Button::ConnectedOnLeft | Button::ConnectedOnRight | Button::ConnectedOnBottom | Button::ConnectedOnTop); | addButton.setConnectedEdges (Button::ConnectedOnLeft | Button::ConnectedOnRight | Button::ConnectedOnBottom | Button::ConnectedOnTop); | ||||
| addAndMakeVisible (removeButton); | addAndMakeVisible (removeButton); | ||||
| removeButton.onClick = [this]() { deleteSelected(); }; | |||||
| removeButton.onClick = [this] { deleteSelected(); }; | |||||
| removeButton.setConnectedEdges (Button::ConnectedOnLeft | Button::ConnectedOnRight | Button::ConnectedOnBottom | Button::ConnectedOnTop); | removeButton.setConnectedEdges (Button::ConnectedOnLeft | Button::ConnectedOnRight | Button::ConnectedOnBottom | Button::ConnectedOnTop); | ||||
| addAndMakeVisible (changeButton); | addAndMakeVisible (changeButton); | ||||
| changeButton.onClick = [this]() { editSelected(); }; | |||||
| changeButton.onClick = [this] { editSelected(); }; | |||||
| addAndMakeVisible (upButton); | addAndMakeVisible (upButton); | ||||
| upButton.onClick = [this]() { moveSelection (-1); }; | |||||
| upButton.onClick = [this] { moveSelection (-1); }; | |||||
| auto arrowColour = findColour (ListBox::textColourId); | auto arrowColour = findColour (ListBox::textColourId); | ||||
| @@ -67,7 +67,7 @@ FileSearchPathListComponent::FileSearchPathListComponent() | |||||
| } | } | ||||
| addAndMakeVisible (downButton); | addAndMakeVisible (downButton); | ||||
| downButton.onClick = [this]() { moveSelection (1); }; | |||||
| downButton.onClick = [this] { moveSelection (1); }; | |||||
| { | { | ||||
| Path arrowPath; | Path arrowPath; | ||||
| @@ -45,7 +45,7 @@ FilenameComponent::FilenameComponent (const String& name, | |||||
| filenameBox.setEditableText (canEditFilename); | filenameBox.setEditableText (canEditFilename); | ||||
| filenameBox.setTextWhenNothingSelected (textWhenNothingSelected); | filenameBox.setTextWhenNothingSelected (textWhenNothingSelected); | ||||
| filenameBox.setTextWhenNoChoicesAvailable (TRANS ("(no recently selected files)")); | filenameBox.setTextWhenNoChoicesAvailable (TRANS ("(no recently selected files)")); | ||||
| filenameBox.onChange = [this]() { setCurrentFile (getCurrentFile(), true); }; | |||||
| filenameBox.onChange = [this] { setCurrentFile (getCurrentFile(), true); }; | |||||
| setBrowseButtonText ("..."); | setBrowseButtonText ("..."); | ||||
| @@ -90,7 +90,7 @@ void FilenameComponent::lookAndFeelChanged() | |||||
| addAndMakeVisible (browseButton = getLookAndFeel().createFilenameComponentBrowseButton (browseButtonText)); | addAndMakeVisible (browseButton = getLookAndFeel().createFilenameComponentBrowseButton (browseButtonText)); | ||||
| browseButton->setConnectedEdges (Button::ConnectedOnLeft); | browseButton->setConnectedEdges (Button::ConnectedOnLeft); | ||||
| browseButton->onClick = [this]() { showChooser(); }; | |||||
| browseButton->onClick = [this] { showChooser(); }; | |||||
| resized(); | resized(); | ||||
| } | } | ||||
| @@ -37,7 +37,7 @@ SidePanel::SidePanel (StringRef title, int width, bool positionOnLeft, | |||||
| addAndMakeVisible (titleLabel); | addAndMakeVisible (titleLabel); | ||||
| dismissButton.onClick = [this]() { showOrHide (false); }; | |||||
| dismissButton.onClick = [this] { showOrHide (false); }; | |||||
| addAndMakeVisible (dismissButton); | addAndMakeVisible (dismissButton); | ||||
| Desktop::getInstance().addGlobalMouseListener (this); | Desktop::getInstance().addGlobalMouseListener (this); | ||||
| @@ -436,7 +436,7 @@ void TabbedButtonBar::updateTabPositions (bool animate) | |||||
| addAndMakeVisible (extraTabsButton = lf.createTabBarExtrasButton()); | addAndMakeVisible (extraTabsButton = lf.createTabBarExtrasButton()); | ||||
| extraTabsButton->setAlwaysOnTop (true); | extraTabsButton->setAlwaysOnTop (true); | ||||
| extraTabsButton->setTriggeredOnMouseDown (true); | extraTabsButton->setTriggeredOnMouseDown (true); | ||||
| extraTabsButton->onClick = [this]() { showExtraItemsMenu(); }; | |||||
| extraTabsButton->onClick = [this] { showExtraItemsMenu(); }; | |||||
| } | } | ||||
| auto buttonSize = jmin (proportionOfWidth (0.7f), proportionOfHeight (0.7f)); | auto buttonSize = jmin (proportionOfWidth (0.7f), proportionOfHeight (0.7f)); | ||||
| @@ -323,7 +323,7 @@ private: | |||||
| if (owner.shouldDropFilesWhenDraggedExternally (details, files, canMoveFiles) && ! files.isEmpty()) | if (owner.shouldDropFilesWhenDraggedExternally (details, files, canMoveFiles) && ! files.isEmpty()) | ||||
| { | { | ||||
| MessageManager::callAsync ([=]() { DragAndDropContainer::performExternalDragDropOfFiles (files, canMoveFiles); }); | |||||
| MessageManager::callAsync ([=] { DragAndDropContainer::performExternalDragDropOfFiles (files, canMoveFiles); }); | |||||
| deleteSelf(); | deleteSelf(); | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -332,7 +332,7 @@ private: | |||||
| if (owner.shouldDropTextWhenDraggedExternally (details, text) && text.isNotEmpty()) | if (owner.shouldDropTextWhenDraggedExternally (details, text) && text.isNotEmpty()) | ||||
| { | { | ||||
| MessageManager::callAsync ([=]() { DragAndDropContainer::performExternalDragDropOfText (text); }); | |||||
| MessageManager::callAsync ([=] { DragAndDropContainer::performExternalDragDropOfText (text); }); | |||||
| deleteSelf(); | deleteSelf(); | ||||
| return; | return; | ||||
| } | } | ||||
| @@ -368,7 +368,7 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches; | |||||
| // On some devices the screen-size isn't yet updated at this point, so also trigger another | // On some devices the screen-size isn't yet updated at this point, so also trigger another | ||||
| // async update to double-check.. | // async update to double-check.. | ||||
| MessageManager::callAsync ([=]() { sendScreenBoundsUpdate (self); }); | |||||
| MessageManager::callAsync ([=] { sendScreenBoundsUpdate (self); }); | |||||
| } | } | ||||
| - (BOOL) prefersStatusBarHidden | - (BOOL) prefersStatusBarHidden | ||||
| @@ -134,7 +134,7 @@ namespace juce | |||||
| } | } | ||||
| }]; | }]; | ||||
| MessageManager::callAsync ([self,application,app]() { app->suspended(); }); | |||||
| MessageManager::callAsync ([self,application,app] { app->suspended(); }); | |||||
| #else | #else | ||||
| ignoreUnused (application); | ignoreUnused (application); | ||||
| app->suspended(); | app->suspended(); | ||||
| @@ -209,7 +209,7 @@ public: | |||||
| item.commandManager->invoke (info, true); | item.commandManager->invoke (info, true); | ||||
| } | } | ||||
| MessageManager::callAsync ([=]() | |||||
| MessageManager::callAsync ([=] | |||||
| { | { | ||||
| if (instance != nullptr) | if (instance != nullptr) | ||||
| instance->invokeDirectly (item.itemID, topLevelIndex); | instance->invokeDirectly (item.itemID, topLevelIndex); | ||||
| @@ -279,7 +279,7 @@ private: | |||||
| threadHasReference.signal(); | threadHasReference.signal(); | ||||
| Array<URL> r = openDialog (true); | Array<URL> r = openDialog (true); | ||||
| MessageManager::callAsync ([safeThis, r]() | |||||
| MessageManager::callAsync ([safeThis, r] | |||||
| { | { | ||||
| safeThis->results = r; | safeThis->results = r; | ||||
| @@ -36,7 +36,7 @@ BooleanPropertyComponent::BooleanPropertyComponent (const String& name, | |||||
| { | { | ||||
| addAndMakeVisible (button); | addAndMakeVisible (button); | ||||
| button.setClickingTogglesState (false); | button.setClickingTogglesState (false); | ||||
| button.onClick = [this]() { setState (! getState()); }; | |||||
| button.onClick = [this] { setState (! getState()); }; | |||||
| } | } | ||||
| BooleanPropertyComponent::BooleanPropertyComponent (const Value& valueToControl, | BooleanPropertyComponent::BooleanPropertyComponent (const Value& valueToControl, | ||||
| @@ -32,7 +32,7 @@ ButtonPropertyComponent::ButtonPropertyComponent (const String& name, bool trigg | |||||
| { | { | ||||
| addAndMakeVisible (button); | addAndMakeVisible (button); | ||||
| button.setTriggeredOnMouseDown (triggerOnMouseDown); | button.setTriggeredOnMouseDown (triggerOnMouseDown); | ||||
| button.onClick = [this]() { buttonClicked(); }; | |||||
| button.onClick = [this] { buttonClicked(); }; | |||||
| } | } | ||||
| ButtonPropertyComponent::~ButtonPropertyComponent() | ButtonPropertyComponent::~ButtonPropertyComponent() | ||||
| @@ -567,10 +567,10 @@ public: | |||||
| if (style == IncDecButtons) | if (style == IncDecButtons) | ||||
| { | { | ||||
| owner.addAndMakeVisible (incButton = lf.createSliderButton (owner, true)); | owner.addAndMakeVisible (incButton = lf.createSliderButton (owner, true)); | ||||
| incButton->onClick = [this]() { incrementOrDecrement (interval); }; | |||||
| incButton->onClick = [this] { incrementOrDecrement (interval); }; | |||||
| owner.addAndMakeVisible (decButton = lf.createSliderButton (owner, false)); | owner.addAndMakeVisible (decButton = lf.createSliderButton (owner, false)); | ||||
| decButton->onClick = [this]() { incrementOrDecrement (-interval); }; | |||||
| decButton->onClick = [this] { incrementOrDecrement (-interval); }; | |||||
| if (incDecButtonMode != incDecButtonsNotDraggable) | if (incDecButtonMode != incDecButtonsNotDraggable) | ||||
| { | { | ||||
| @@ -246,7 +246,7 @@ Toolbar::Toolbar() | |||||
| addChildComponent (missingItemsButton = getLookAndFeel().createToolbarMissingItemsButton (*this)); | addChildComponent (missingItemsButton = getLookAndFeel().createToolbarMissingItemsButton (*this)); | ||||
| missingItemsButton->setAlwaysOnTop (true); | missingItemsButton->setAlwaysOnTop (true); | ||||
| missingItemsButton->onClick = [this]() { showMissingItems(); }; | |||||
| missingItemsButton->onClick = [this] { showMissingItems(); }; | |||||
| } | } | ||||
| Toolbar::~Toolbar() | Toolbar::~Toolbar() | ||||
| @@ -733,13 +733,13 @@ private: | |||||
| styleBox.setSelectedId (selectedStyle); | styleBox.setSelectedId (selectedStyle); | ||||
| styleBox.onChange = [this]() { updateStyle(); }; | |||||
| styleBox.onChange = [this] { updateStyle(); }; | |||||
| } | } | ||||
| if ((optionFlags & Toolbar::showResetToDefaultsButton) != 0) | if ((optionFlags & Toolbar::showResetToDefaultsButton) != 0) | ||||
| { | { | ||||
| addAndMakeVisible (defaultButton); | addAndMakeVisible (defaultButton); | ||||
| defaultButton.onClick = [this]() { toolbar.addDefaultItems (factory); }; | |||||
| defaultButton.onClick = [this] { toolbar.addDefaultItems (factory); }; | |||||
| } | } | ||||
| addAndMakeVisible (instructions); | addAndMakeVisible (instructions); | ||||
| @@ -540,7 +540,7 @@ bool ComponentPeer::handleDragDrop (const ComponentPeer::DragInfo& info) | |||||
| // We'll use an async message to deliver the drop, because if the target decides | // We'll use an async message to deliver the drop, because if the target decides | ||||
| // to run a modal loop, it can gum-up the operating system.. | // to run a modal loop, it can gum-up the operating system.. | ||||
| MessageManager::callAsync ([=]() | |||||
| MessageManager::callAsync ([=] | |||||
| { | { | ||||
| if (auto* c = targetComp.get()) | if (auto* c = targetComp.get()) | ||||
| { | { | ||||
| @@ -393,7 +393,7 @@ KeyMappingEditorComponent::KeyMappingEditorComponent (KeyPressMappingSet& mappin | |||||
| { | { | ||||
| addAndMakeVisible (resetButton); | addAndMakeVisible (resetButton); | ||||
| resetButton.onClick = [this]() | |||||
| resetButton.onClick = [this] | |||||
| { | { | ||||
| AlertWindow::showOkCancelBox (AlertWindow::QuestionIcon, | AlertWindow::showOkCancelBox (AlertWindow::QuestionIcon, | ||||
| TRANS("Reset to defaults"), | TRANS("Reset to defaults"), | ||||
| @@ -492,7 +492,7 @@ struct PushNotifications::Pimpl | |||||
| void notifyListenersTokenRefreshed (const String& token) | void notifyListenersTokenRefreshed (const String& token) | ||||
| { | { | ||||
| #if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) | #if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) | ||||
| MessageManager::callAsync ([this, token]() | |||||
| MessageManager::callAsync ([this, token] | |||||
| { | { | ||||
| owner.listeners.call ([&] (Listener& l) { l.deviceTokenRefreshed (token); }); | owner.listeners.call ([&] (Listener& l) { l.deviceTokenRefreshed (token); }); | ||||
| }); | }); | ||||
| @@ -587,7 +587,7 @@ struct PushNotifications::Pimpl | |||||
| #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | ||||
| GlobalRef rn (remoteNotification.get()); | GlobalRef rn (remoteNotification.get()); | ||||
| MessageManager::callAsync ([this, rn]() | |||||
| MessageManager::callAsync ([this, rn] | |||||
| { | { | ||||
| auto notification = firebaseRemoteNotificationToJuceNotification (rn.get()); | auto notification = firebaseRemoteNotificationToJuceNotification (rn.get()); | ||||
| owner.listeners.call ([&] (Listener& l) { l.handleNotification (false, notification); }); | owner.listeners.call ([&] (Listener& l) { l.handleNotification (false, notification); }); | ||||
| @@ -600,7 +600,7 @@ struct PushNotifications::Pimpl | |||||
| void notifyListenersAboutRemoteNotificationsDeleted() | void notifyListenersAboutRemoteNotificationsDeleted() | ||||
| { | { | ||||
| #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | ||||
| MessageManager::callAsync ([this]() | |||||
| MessageManager::callAsync ([this] | |||||
| { | { | ||||
| owner.listeners.call ([] (Listener& l) { l.remoteNotificationsDeleted(); }); | owner.listeners.call ([] (Listener& l) { l.remoteNotificationsDeleted(); }); | ||||
| }); | }); | ||||
| @@ -612,7 +612,7 @@ struct PushNotifications::Pimpl | |||||
| #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | ||||
| GlobalRef mid (messageId); | GlobalRef mid (messageId); | ||||
| MessageManager::callAsync ([this, mid]() | |||||
| MessageManager::callAsync ([this, mid] | |||||
| { | { | ||||
| auto midString = juceString ((jstring) mid.get()); | auto midString = juceString ((jstring) mid.get()); | ||||
| owner.listeners.call ([&] (Listener& l) { l.upstreamMessageSent (midString); }); | owner.listeners.call ([&] (Listener& l) { l.upstreamMessageSent (midString); }); | ||||
| @@ -628,7 +628,7 @@ struct PushNotifications::Pimpl | |||||
| #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) | ||||
| GlobalRef mid (messageId), e (error); | GlobalRef mid (messageId), e (error); | ||||
| MessageManager::callAsync ([this, mid, e]() | |||||
| MessageManager::callAsync ([this, mid, e] | |||||
| { | { | ||||
| auto midString = juceString ((jstring) mid.get()); | auto midString = juceString ((jstring) mid.get()); | ||||
| auto eString = juceString ((jstring) e.get()); | auto eString = juceString ((jstring) e.get()); | ||||
| @@ -523,7 +523,7 @@ private: | |||||
| if (allowResize) | if (allowResize) | ||||
| configureNotify(); | configureNotify(); | ||||
| else | else | ||||
| MessageManager::callAsync ([this]() {componentMovedOrResized (owner, true, true);}); | |||||
| MessageManager::callAsync ([this] {componentMovedOrResized (owner, true, true);}); | |||||
| return true; | return true; | ||||
| } | } | ||||
| @@ -633,7 +633,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver | |||||
| } | } | ||||
| } | } | ||||
| MessageManager::callAsync ([this, purchases]() { owner.listeners.call ([&] (Listener& l) { l.purchasesListRestored (purchases, true, NEEDS_TRANS ("Success")); }); }); | |||||
| MessageManager::callAsync ([this, purchases] { owner.listeners.call ([&] (Listener& l) { l.purchasesListRestored (purchases, true, NEEDS_TRANS ("Success")); }); }); | |||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| @@ -649,7 +649,7 @@ struct InAppPurchases::Pimpl : public SKDelegateAndPaymentObserver | |||||
| void sendReceiptFetchFailAsync() | void sendReceiptFetchFailAsync() | ||||
| { | { | ||||
| MessageManager::callAsync ([this]() { sendReceiptFetchFail(); }); | |||||
| MessageManager::callAsync ([this] { sendReceiptFetchFail(); }); | |||||
| } | } | ||||
| static int64 getPurchaseDateMs (id date) | static int64 getPurchaseDateMs (id date) | ||||