Esempio n. 1
0
void ChannelSelector::addButton()
{

    int size = parameterButtons.size();

    ChannelSelectorButton* b = new ChannelSelectorButton(size+1, PARAMETER, titleFont);
    parameterButtons.add(b);
    channelSelectorRegion->addAndMakeVisible(b);

    if (paramsToggled)
        b->setToggleState(true, false);
    else
        b->setToggleState(false, false);

    if (!paramsActive)
        b->setActive(false);

    b->addListener(this);

    if (isNotSink)
    {
        ChannelSelectorButton* br = new ChannelSelectorButton(size+1, RECORD, titleFont);
        recordButtons.add(br);
        channelSelectorRegion->addAndMakeVisible(br);
        br->addListener(this);

        ChannelSelectorButton* ba = new ChannelSelectorButton(size+1, AUDIO, titleFont);
        audioButtons.add(ba);
        channelSelectorRegion->addAndMakeVisible(ba);
        ba->addListener(this);
    }
}
void ChannelSelector::addButton()
{
    const int size = parameterButtonsManager.getNumButtons();

    ChannelSelectorButton* b = new ChannelSelectorButton (size + 1, PARAMETER, titleFont);
    parameterButtonsManager.addButton (b);

    if (paramsToggled)
        b->setToggleState(true, dontSendNotification);
    else
        b->setToggleState(false, dontSendNotification);

    if (!paramsActive)
        b->setActive(false);

    if (isNotSink)
    {
        ChannelSelectorButton* br = new ChannelSelectorButton(size + 1, RECORD, titleFont);
        recordButtonsManager.addButton (br);

        ChannelSelectorButton* ba = new ChannelSelectorButton(size + 1, AUDIO, titleFont);
        audioButtonsManager.addButton (ba);
    }
}