예제 #1
0
//==============================================================================
MidiChsEditor::MidiChsEditor (MidiChsProcessor* const ownerFilter)
    : AudioProcessorEditor (ownerFilter)
{

    static OldSchoolLookAndFeel* MyLook = 0;
    if (MyLook == 0) MyLook = new OldSchoolLookAndFeel(); 
    OldSchoolLookAndFeel::setDefaultLookAndFeel (MyLook);
    setMouseClickGrabsKeyboardFocus(false);

    bgcolor=Colour(getFilter()->getParameter(18),getFilter()->getParameter(19),getFilter()->getParameter(20),1.0f);
    fgcolor=Colour(bgcolor.contrasting(getFilter()->getParameter(21)));

    addAndMakeVisible (resetButton = new TextButton ("reset"));
    resetButton->setButtonText ("Reset");
    resetButton->addListener (this);
    resetButton->setColour (TextButton::buttonColourId, bgcolor);
    resetButton->setColour (TextButton::textColourOnId, fgcolor);
	resetButton->setColour (TextButton::textColourOffId, fgcolor);
    resetButton->setMouseClickGrabsKeyboardFocus(false);

    addAndMakeVisible (clearButton = new TextButton ("clear"));
    clearButton->setButtonText ("Clear");
    clearButton->addListener (this);
    clearButton->setColour (TextButton::buttonColourId, bgcolor);
    clearButton->setColour (TextButton::textColourOnId, fgcolor);
    clearButton->setColour (TextButton::textColourOffId, fgcolor);
    clearButton->setMouseClickGrabsKeyboardFocus(false);

    for (int i=0;i<16;i++) {
        addAndMakeVisible (slider[i] = new Slider ("new slider"));
        slider[i]->setRange (0, 16, 1);
        slider[i]->setSliderStyle (Slider::LinearBar);
        slider[i]->setTextBoxStyle (Slider::TextBoxLeft, false, 80, 20);
        slider[i]->setColour (Slider::thumbColourId, Colour (0x5effff));
        slider[i]->setColour (Slider::trackColourId, Colour (0x5e2b2b));
        slider[i]->setColour (Slider::textBoxTextColourId, fgcolor);
        slider[i]->setColour (Slider::textBoxOutlineColourId, Colour (0xff808080));
        slider[i]->setValue ((getFilter()->getParameter(i))*16.0);
        slider[i]->addListener (this);
        slider[i]->setMouseClickGrabsKeyboardFocus(false);

        addAndMakeVisible (label[i] = new Label ("new label", String(i+1)));
        label[i]->setFont (Font (15.0000f, Font::plain));
        label[i]->setJustificationType (Justification::centred);
        label[i]->setEditable (false, false, false);
        label[i]->setColour (Label::textColourId, fgcolor);
        label[i]->setMouseClickGrabsKeyboardFocus(false);
    }



    // set our component's initial size to be the last one that was stored in the filter's settings
    setSize (ownerFilter->lastUIWidth,
             ownerFilter->lastUIHeight);

    // register ourselves with the filter - it will use its ChangeBroadcaster base
    // class to tell us when something has changed, and this will call our changeListenerCallback()
    // method.
    ownerFilter->addChangeListener (this);
}
예제 #2
0
TimeDisplay::TimeDisplay ()
    : Button (String::empty)
{
    setSize (600, 400);
    textcolor = Colour(0xff000000);
    setMouseClickGrabsKeyboardFocus (false);
}
BEGIN_JUCE_NAMESPACE

#include "jucetice_DrawablePad.h"

//==============================================================================
DrawablePad::DrawablePad (const String& name)
    : Button (name),
      normalImage (0),
      overImage (0),
      downImage (0),
      disabledImage (0),
      normalImageOn (0),
      overImageOn (0),
      downImageOn (0),
      disabledImageOn (0)
{
    setSize (200, 200);
    backgroundOff = Colour (0xffbbbbff);
    backgroundOn = Colour (0xff3333ff);
    Label = T("Pad");
    Description = T("x:0 y:0");
    showdot = false;
    showx = false;
    showy = false;
    hex = false;
    x = 0;
    y = 0;
    roundness = 0.4f;

    setMouseClickGrabsKeyboardFocus (false);
}
예제 #4
0
파일: MidiPad.cpp 프로젝트: Amcut/pizmidi
MidiPad::MidiPad ()
: drawableButton (0)
{
    addAndMakeVisible (drawableButton = new DrawablePad(T("MidiPad")));
    drawableButton->addButtonListener (this);
	addAndMakeVisible (label = new Label("Label",String::empty));
    label->setFont (Font (9.0000f, Font::plain));
	label->setJustificationType(Justification::centred);
    setMouseClickGrabsKeyboardFocus (false);
}
MenuBarComponent::MenuBarComponent (MenuBarModel* model_)
    : model (nullptr),
      itemUnderMouse (-1),
      currentPopupIndex (-1),
      topLevelIndexClicked (0)
{
    setRepaintsOnMouseActivity (true);
    setWantsKeyboardFocus (false);
    setMouseClickGrabsKeyboardFocus (false);

    setModel (model_);
}
예제 #6
0
//==============================================================================
CpuRamEditor::CpuRamEditor (CpuRam* const ownerFilter)
    : AudioProcessorEditor (ownerFilter)
{
	static OldSchoolLookAndFeel* MyLook = 0;
	if (MyLook == 0) MyLook = new OldSchoolLookAndFeel(); 
	LookAndFeel::setDefaultLookAndFeel (MyLook);
	setMouseClickGrabsKeyboardFocus(false);

	addAndMakeVisible (infoLabel = new Label(String("CPU"),String::empty));
	infoLabel->setMouseClickGrabsKeyboardFocus(false);
	infoLabel->setInterceptsMouseClicks(false,false);

	addAndMakeVisible (memLabel2 = new Label(String("RAM"),String::empty));
	memLabel2->setMouseClickGrabsKeyboardFocus(false);
	memLabel2->setInterceptsMouseClicks(false,false);

	addAndMakeVisible (slider = new Slider(String("interval")));
    slider->setMouseClickGrabsKeyboardFocus(false);
    slider->setSliderStyle(Slider::LinearBar);
    slider->setRange(300,2000,1);
    slider->setTextValueSuffix(String(" ms"));
    slider->addListener(this);

	addAndMakeVisible (graph = new CpuGraph());

    colourSelector = new ColourSelector(ColourSelector::showColourAtTop|ColourSelector::showSliders|ColourSelector::showColourspace);
    colourSelector->setName (String("color"));
    colourSelector->setCurrentColour (getFilter()->bgcolor);
    colourSelector->addChangeListener (this);

    // add the triangular resizer component for the bottom-right of the UI
    //addAndMakeVisible (resizer = new ResizableCornerComponent (this, &resizeLimits));
    //resizer->setMouseClickGrabsKeyboardFocus(false);
    //resizeLimits.setSizeLimits (10, 10, 1200, 200);

    // set our component's initial size to be the last one that was stored in the filter's settings
    setSize (ownerFilter->lastUIWidth,
             ownerFilter->lastUIHeight);

    lastMinimize=getFilter()->getParameter(1);

    // register ourselves with the filter - it will use its ChangeBroadcaster base
    // class to tell us when something has changed, and this will call our changeListenerCallback()
    // method.
    ownerFilter->addChangeListener (this);

    oi64.QuadPart=0;
    ok64.QuadPart=0;
    ou64.QuadPart=0;

    updateParametersFromFilter();
}
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
}
예제 #8
0
BEGIN_JUCE_NAMESPACE

//==============================================================================
MidiPad::MidiPad ()
    : isPlaying (false),
      drawableButton (0)
{
    setMouseClickGrabsKeyboardFocus (false);

    addAndMakeVisible (drawableButton = new DrawablePad("MidiPad"));
    drawableButton->addListener (this);

    setSize (32, 16);
}
예제 #9
0
파일: MidiPad.cpp 프로젝트: Amcut/pizmidi
MidiPad::MidiPad ()
    : Button ("MidiPad"),
      normalImage (0),
      index(0),
	  text (0)

{
	bgColour = Colours::white;
	textColour = Colours::black;

	centeredText=false;
	imageSize=1.f;
    setMouseClickGrabsKeyboardFocus (true);

	addAndMakeVisible(text = new Label("label",""));
    text->setJustificationType (Justification::centredTop);
    text->setEditable (false, false, false);
	text->setInterceptsMouseClicks(false,false);

    setSize (200, 200);
}
예제 #10
0
BEGIN_JUCE_NAMESPACE

#include "juce_MenuBarComponent.h"
#include "../juce_Desktop.h"
#include "../lookandfeel/juce_LookAndFeel.h"


//==============================================================================
MenuBarComponent::MenuBarComponent (MenuBarModel* model_)
    : model (nullptr),
      itemUnderMouse (-1),
      currentPopupIndex (-1),
      topLevelIndexClicked (0),
      lastMouseX (0),
      lastMouseY (0)
{
    setRepaintsOnMouseActivity (true);
    setWantsKeyboardFocus (false);
    setMouseClickGrabsKeyboardFocus (false);

    setModel (model_);
}