Пример #1
0
    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();
        }
    }
Пример #2
0
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();
		}
    }

}
Пример #3
0
void ProcessorList::changeListenerCallback(ChangeBroadcaster* source)
{
    ColourSelector* cs = dynamic_cast <ColourSelector*>(source);

    setColour(currentColor, cs->getCurrentColour());

    repaint();

}
Пример #4
0
//==============================================================================
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();
    }
}
Пример #5
0
//==============================================================================
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 ();
        }
    }
}