コード例 #1
0
ファイル: GenericEditor.cpp プロジェクト: LabPF/plugin-GUI
void GenericEditor::constructorInitialize(GenericProcessor* owner, bool useDefaultParameterEditors)
{

    name = getAudioProcessor()->getName();
    displayName = name;

    nodeId = owner->getNodeId();

    //MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
    //Typeface::Ptr typeface = new CustomTypeface(mis);
    titleFont = Font ("Default", 14, Font::bold);

    if (!owner->isMerger() && !owner->isSplitter() && !owner->isUtility())
    {
        // std::cout << "Adding drawer button." << std::endl;

        drawerButton = new DrawerButton("name");
        drawerButton->addListener(this);
        addAndMakeVisible(drawerButton);

        if (!owner->isSink())
        {
            channelSelector = new ChannelSelector (true, titleFont);
        }
        else
        {
            channelSelector = new ChannelSelector (false, titleFont);
        }

        addChildComponent(channelSelector);
        channelSelector->setVisible(false);

        isSplitOrMerge=false;
    }
    else
    {
        isSplitOrMerge=true;
    }

    backgroundGradient = ColourGradient(Colour(190, 190, 190), 0.0f, 0.0f,
                                        Colour(185, 185, 185), 0.0f, 120.0f, false);
    backgroundGradient.addColour(0.2f, Colour(155, 155, 155));

    addParameterEditors(useDefaultParameterEditors);

    backgroundColor = Colour(10,10,10);

    //fadeIn();

}
コード例 #2
0
GenericEditor::GenericEditor (GenericProcessor* owner) 
	: AudioProcessorEditor (owner), isSelected(false),
	  desiredWidth(150), tNum(-1), isEnabled(true),
	  accumulator(0.0), isFading(false), drawerButton(0),
	  channelSelector(0)

{
	name = getAudioProcessor()->getName();

	nodeId = owner->getNodeId();

	MemoryInputStream mis(BinaryData::silkscreenserialized, BinaryData::silkscreenserializedSize, false);
    Typeface::Ptr typeface = new CustomTypeface(mis);
    titleFont = Font(typeface);

    if (!owner->isMerger() && !owner->isSplitter())
    {
    	drawerButton = new DrawerButton("name");
    	drawerButton->addListener(this);
    	addAndMakeVisible(drawerButton);

    	if (!owner->isSink())
    	{
    		channelSelector = new ChannelSelector(true, titleFont);
    	} else {
    		channelSelector = new ChannelSelector(false, titleFont);
    	}

    	addChildComponent(channelSelector);
    	channelSelector->setVisible(false);


	}

	backgroundGradient = ColourGradient(Colour(190, 190, 190), 0.0f, 0.0f, 
										 Colour(185, 185, 185), 0.0f, 120.0f, false);
	backgroundGradient.addColour(0.2f, Colour(155, 155, 155));

	addParameterEditors();

	backgroundColor = Colour(10,10,10);

	//fadeIn();
}