//==============================================================================
MidiSliderComponent::MidiSliderComponent(const String &componentName)
    : Slider(componentName)
    , snapsBackOnRelease(0)
{
    setRange(0, 127, 1);
    setTextBoxStyle(Slider::NoTextBox, true, 80, 20);
}
Example #2
0
void SliderSwitch::resized()
{
    Slider::resized();

    int nWidth = getBounds().getWidth();
    setTextBoxStyle(Slider::TextBoxBelow, true, nWidth, 18);
}
void MouseOverKnob::mouseExit(const MouseEvent &e)
{
    if (e.eventComponent == this)
    {
        knobLabel->setVisible(true);
        setTextBoxStyle(MouseOverKnob::NoTextBox, true, this->getTextBoxWidth(), this->getTextBoxHeight());
    }
}
void MouseOverKnob::mouseEnter(const MouseEvent &e)
{
    if (e.eventComponent == this)
    {
        knobLabel->setVisible(false);
        setTextBoxStyle(MouseOverKnob::TextBoxBelow, false, this->getTextBoxWidth(), this->getTextBoxHeight());
    }
}
Example #5
0
MainKnob::MainKnob(String n, int i, double minimum, double maximum, double interval) : 
                                           MidiSlider(), id(i)
{
    setSliderStyle(Slider::SliderStyle::RotaryVerticalDrag);
    setTextBoxStyle(Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
    setRange(minimum, maximum, interval);
    setName(n);
}
Example #6
0
MainVerticalSlider::MainVerticalSlider(String n, int i, double minimum, double maximum, double interval) : 
                                       MidiSlider(), id(i), image(nullptr)
{
    setSliderStyle(Slider::SliderStyle::LinearVertical);
    setTextBoxStyle(Slider::TextEntryBoxPosition::NoTextBox, true, 0, 0);
    setRange(minimum, maximum, interval);
    setName(n);
}
ThresholdSlider::ThresholdSlider(Font f) : Slider("name"), font(f)
{

    setSliderStyle(Slider::Rotary);
    setRange(-400,400.0f,10.0f);
    setValue(-20.0f);
    setTextBoxStyle(Slider::NoTextBox, false, 40, 20);

}
ChannelSlider::ChannelSlider(const String& componentName, int nNumChannels) : Slider(componentName)
{
    setRange(-1.0f, nNumChannels, 1.0f);
    setSliderStyle(Slider::IncDecButtons);
    setTextBoxStyle(Slider::TextBoxLeft, true, 30, 20);
    setIncDecButtonsMode(Slider::incDecButtonsNotDraggable);

    setValue(-1, dontSendNotification);
}
Example #9
0
ParameterSlider::ParameterSlider(float min, float max, 
						float def, Font labelFont) : Slider("name"), font(labelFont), isEnabled(true)
{

	setSliderStyle(Slider::Rotary);
    setRange(min,max,1.0f);
    setValue(def);
    setTextBoxStyle(Slider::NoTextBox, false, 40, 20);

}
Example #10
0
CSpeedControl::CSpeedControl (Param& param)
  : m_param (param)
{
  m_param.addListener (this, vf::MessageThread::getInstance ());

  setSliderStyle (Slider::LinearVertical);
  setTextBoxStyle (Slider::NoTextBox, true, 0, 0);
  setRange (-1, 1);
  setValue (0);
}
Example #11
0
//==============================================================================
Knob::Knob(const String &name, const int &_singleImageWidth, const int &_singleImageHeight, Image _image)
    : Slider(name)
    , singleImageWidth(_singleImageWidth)
    , singleImageHeight(_singleImageHeight)
    , image(_image)
{
    setSliderStyle(Slider::RotaryVerticalDrag);
    setTextBoxStyle(Slider::NoTextBox, true, 0, 0);
    setSize(singleImageWidth, singleImageHeight);
}
Example #12
0
SynthSlider::SynthSlider(String name) : Slider(name), bipolar_(false), active_(true),
                                        string_lookup_(nullptr), parent_(nullptr) {
  mopo::ValueDetails details = mopo::Parameters::getDetails(name.toStdString());
  if (details.steps)
    setRange(details.min, details.max, (details.max - details.min) / (details.steps - 1));
  else
    setRange(details.min, details.max);

  post_multiply_ = details.display_multiply;
  scaling_type_ = details.display_skew;
  units_ = details.display_units;
  setDoubleClickReturnValue(true, details.default_value);
  setTextBoxStyle(Slider::NoTextBox, true, 0, 0);

  setBufferedToImage(true);
  setColour(Slider::backgroundColourId, Colour(0xff303030));
  setColour(Slider::textBoxOutlineColourId, Colour(0x00000000));
}
AlphaRotarySlider::AlphaRotarySlider(const float startAngleRadians,
									  const float endAngleRadians, const float _theWidth)
{
	setSliderStyle(Slider::Rotary);
	setTextBoxStyle(Slider::NoTextBox, false, 80, 40);
    
	rotaryStart = startAngleRadians;
	rotaryEnd = endAngleRadians;
	theWidth = _theWidth;
	hitPath.addPieSegment (0, 0, theWidth, theWidth, rotaryStart, rotaryEnd, ((1 - 0.2) + (0.2 * (theWidth * 0.5) * 0.003)));
    
    addChildComponent (textBox = new TextEditor());
    textBox->setOpaque(true);
    textBox->setSelectAllWhenFocused (true);
    textBox->addListener(this);
    
    //set this component to listen to itself
    addKeyListener(this);
	
}