示例#1
0
CodeEditor::CodeEditor(PMixAudioEngine& audioEngine, GraphEditor& graphEditor)
: audioEngine(audioEngine)
, graphEditor(graphEditor)
, selectedFaustAudioPluginInstance(nullptr)
, selectedNodeID(0)
, show(CodeEditorBottomViewIDs::diagram)
{
  addAndMakeVisible (menuBar = new MenuBarComponent (this));

  verticalLayout.setItemLayout (0, 100, -1., -0.35);
  verticalLayout.setItemLayout (1, 8, 8, 8);
  verticalLayout.setItemLayout (2, 2, -1.0, 100);
  
  addAndMakeVisible (editor = new CodeEditorComponent (codeDocument, &tokeniser));
  addAndMakeVisible(dividerBar1 = new StretchableLayoutResizerBar (&verticalLayout, 1, false));
  addAndMakeVisible (webBrowser = new WebBrowser(audioEngine, graphEditor));
  addAndMakeVisible(console = new Console());
  audioEngine.getLogger().addChangeListener(console);

  editor->setFont(Font(Font::getDefaultMonospacedFontName(), 16.f, 0));
  editor->setTabSize(2, true);
  
  graphEditor.addChangeListener(this);
  
  audioEngine.getLogger().logMessage("Ready.");
  
  clear();
}
示例#2
0
PinComponent::PinComponent (PMixAudioEngine& audioEngine, const uint32 nodeId_, const int index_, const bool isInput_)
: nodeId (nodeId_)
, index (index_)
, isInput (isInput_)
, mouseOver(false)
, audioEngine(audioEngine)
{
  if (const AudioProcessorGraph::Node::Ptr node = audioEngine.getDoc().getNodeForId (nodeId_))
  {
    String tip;
    
    if (index_ == PMixDocument::midiChannelNumber)
    {
      tip = isInput ? "MIDI Input" : "MIDI Output";
    }
    else
    {
      if (isInput)
        tip = node->getProcessor()->getInputChannelName (index_);
      else
        tip = node->getProcessor()->getOutputChannelName (index_);
      
      if (tip.isEmpty())
        tip = (isInput ? "Input " : "Output ") + String (index_ + 1);
    }
    
    setTooltip (tip);
  }
  
  setSize (16, 16);
}
示例#3
0
ParamView::ParamView(PMixAudioEngine& audioEngine)
: audioEngine (audioEngine)
{
  audioEngine.getDoc().addChangeListener (this);
  
  setOpaque (true);
  addAndMakeVisible (&panel);
}
示例#4
0
WebBrowser::WebBrowser(PMixAudioEngine& audioEngine, GraphEditor& graphEditor)
: audioEngine(audioEngine)
, graphEditor(graphEditor)
{
  addAndMakeVisible (browser = new WebBrowserComponent ());
  graphEditor.addChangeListener(this);
  audioEngine.getDoc().addChangeListener(this);
  browser->goToURL("");
}
PMixInterpolationSpaceLayout::PMixInterpolationSpaceLayout(PMixAudioEngine& audioEngine, GraphEditor& graphEditor)
: audioEngine(audioEngine)
, graphEditor(graphEditor)
{
  audioEngine.getDoc().addChangeListener (this);
  selectedItems.addChangeListener(this);
  setMouseClickGrabsKeyboardFocus(true);
  setWantsKeyboardFocus(true);
  
#if PMIX_PLUGIN==0
  getCommandManager().registerAllCommandsForTarget (this);
#endif
}
示例#6
0
//==============================================================================
PMixPrefsPlugins::PMixPrefsPlugins (PMixAudioEngine& audioEngine)
    : audioEngine(audioEngine)
{
    addAndMakeVisible (pluginListComponent = new PluginListComponent (audioEngine.getFormatManager(), audioEngine.getKnownPluginList(), audioEngine.getDMPFile(), audioEngine.getAppProperties().getUserSettings()));


    //[UserPreSize]
    //[/UserPreSize]

    setSize (600, 400);


    //[Constructor] You can add your own custom stuff here..
    //[/Constructor]
}
示例#7
0
PinComponent::PinComponent (PMixAudioEngine& audioEngine, const uint32 nodeID_, const int index_, const bool isInput_)
: nodeID (nodeID_)
, index (index_)
, isInput (isInput_)
, mouseOver(false)
, busIdx(0)
, audioEngine(audioEngine)
{
  if (const AudioProcessorGraph::Node::Ptr node = audioEngine.getDoc().getNodeForId (nodeID_))
  {
    String tip;
    
    if (index_ == PMixDocument::midiChannelNumber)
    {
      tip = isInput ? "MIDI Input" : "MIDI Output";
    }
    else
    {
      const AudioProcessor& processor = *node->getProcessor();
      
      int channel;
      channel = processor.getOffsetInBusBufferForAbsoluteChannelIndex (isInput, index, busIdx);
      
      if (const AudioProcessor::Bus* bus = processor.getBus (isInput, busIdx))
        tip = bus->getName() + String (": ")
        + AudioChannelSet::getAbbreviatedChannelTypeName (bus->getCurrentLayout().getTypeOfChannel (channel));
      else
        tip = (isInput ? "Main Input: "
               : "Main Output: ") + String (index + 1);
    }
    
    setTooltip (tip);
  }
  
  setSize (16, 16);
}