void buttonClicked(Button* button) { if (button == &colourButton) { ColourSelector colourSelector (ColourSelector::showColourAtTop | ColourSelector::showColourspace); colourSelector.setSize (200, 200); CallOutBox callOut (colourSelector, colourButton, nullptr); callOut.runModalLoop(); setProperties(startTime, endTime, colourSelector.getCurrentColour().getARGB()); } else if (button == &timeButton) { // ownerListBoxModel->filePlayer->setActiveLoopPoint (startTime, endTime, loopIndex, timeButton.getToggleState()); ownerListBoxModel->filePlayer->setLoopTimes (startTime, endTime); ownerListBoxModel->filePlayer->setLoopBetweenTimes (timeButton.getToggleState()); } else if (button == &removeButton) { ownerListBoxModel->dataList.removeProperty(propertyName, nullptr); ownerListBoxModel->getNumRows(); ownerListBoxModel->reorderLoopPoints(); } }
void BigClockEditor::changeListenerCallback (ChangeBroadcaster* source) { if (source==getFilter()) { updateParametersFromFilter(); } else { ColourSelector* cs = 0; cs = (ColourSelector*) source; if (cs) { getFilter()->bgcolor=(cs->getCurrentColour()); infoLabel->textcolor = cs->getCurrentColour().contrasting(getFilter()->getParameter(kLook)); repaint(); } } }
void ProcessorList::changeListenerCallback(ChangeBroadcaster* source) { ColourSelector* cs = dynamic_cast <ColourSelector*>(source); setColour(currentColor, cs->getCurrentColour()); repaint(); }
//============================================================================== void CpuRamEditor::changeListenerCallback (ChangeBroadcaster* source) { if (source==getFilter()) { updateParametersFromFilter(); } else { ColourSelector* cs = (ColourSelector*) source; getFilter()->bgcolor=(cs->getCurrentColour()); infoLabel->setColour(Label::textColourId,getFilter()->bgcolor.contrasting(0.8f)); memLabel2->setColour(Label::textColourId,getFilter()->bgcolor.contrasting(0.8f)); slider->setColour(Slider::textBoxTextColourId,getFilter()->bgcolor.contrasting(0.8f)); repaint(); } }
//============================================================================== void GraphComponent::changeListenerCallback (void* source) { ColourSelector* cs = (ColourSelector*) source; if (currentClickedNode) { Colour currentColour = cs->getCurrentColour(); BasePlugin* plugin = (BasePlugin*) currentClickedNode->getUserData (); if (plugin) plugin->setValue (PROP_GRAPHCOLOUR, currentColour.toString ()); currentClickedNode->setNodeColour (currentColour); currentClickedNode->repaint (); Viewport* parent = findParentComponentOfClass ((Viewport*) 0); if (parent) { parent->notifyComponentChanged (); } } }