Browse Source

Update to latest dpf, make UI generic

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 3 months ago
parent
commit
c9eefe927e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 37 additions and 28 deletions
  1. +1
    -1
      Makefile
  2. +1
    -1
      dpf
  3. +11
    -9
      plugins/3BandEQ/DistrhoUI3BandEQ.cpp
  4. +1
    -0
      plugins/3BandEQ/Makefile
  5. +11
    -9
      plugins/3BandSplitter/DistrhoUI3BandSplitter.cpp
  6. +1
    -0
      plugins/3BandSplitter/Makefile
  7. +10
    -8
      plugins/PingPongPan/DistrhoUIPingPongPan.cpp
  8. +1
    -0
      plugins/PingPongPan/Makefile

+ 1
- 1
Makefile View File

@@ -11,7 +11,7 @@ all: dgl plugins gen
# --------------------------------------------------------------

dgl:
ifeq ($(HAVE_DGL),true)
ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
$(MAKE) -C dpf/dgl
endif



+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit ea7545a13ab9793b5608b13a82f1ad9cf9ec5e98
Subproject commit 66aa0ee878ba4ca6feb85c29d3fcdad09e595f26

+ 11
- 9
plugins/3BandEQ/DistrhoUI3BandEQ.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO 3BandEQ Plugin, based on 3BandEQ by Michael Gruhn
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,15 +25,15 @@ namespace Art = DistrhoArtwork3BandEQ;

DistrhoUI3BandEQ::DistrhoUI3BandEQ()
: UI(Art::backgroundWidth, Art::backgroundHeight),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatBGR),
fAboutWindow(this)
{
// about
Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR);
Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, kImageFormatBGR);
fAboutWindow.setImage(aboutImage);

// sliders
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight);
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight, kImageFormatBGRA);
Point<int> sliderPosStart(57, 43);
Point<int> sliderPosEnd(57, 43 + 160);

@@ -80,7 +80,7 @@ DistrhoUI3BandEQ::DistrhoUI3BandEQ()
fSliderMaster->setCallback(this);

// knobs
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight);
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight, kImageFormatBGRA);

// knob Low-Mid
fKnobLowMid = new ImageKnob(this, knobImage, ImageKnob::Vertical);
@@ -101,8 +101,8 @@ DistrhoUI3BandEQ::DistrhoUI3BandEQ()
fKnobMidHigh->setCallback(this);

// about button
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight);
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight);
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight, kImageFormatBGRA);
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight, kImageFormatBGRA);
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
fButtonAbout->setAbsolutePos(264, 300);
fButtonAbout->setCallback(this);
@@ -161,7 +161,7 @@ void DistrhoUI3BandEQ::imageButtonClicked(ImageButton* button, int)
if (button != fButtonAbout)
return;

fAboutWindow.exec();
fAboutWindow.runAsModal();
}

void DistrhoUI3BandEQ::imageKnobDragStarted(ImageKnob* knob)
@@ -196,7 +196,9 @@ void DistrhoUI3BandEQ::imageSliderValueChanged(ImageSlider* slider, float value)

void DistrhoUI3BandEQ::onDisplay()
{
fImgBackground.draw();
const GraphicsContext& context(getGraphicsContext());

fImgBackground.draw(context);
}

// -----------------------------------------------------------------------


+ 1
- 0
plugins/3BandEQ/Makefile View File

@@ -22,6 +22,7 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic

UI_TYPE = generic
include ../../dpf/Makefile.plugins.mk

# --------------------------------------------------------------


+ 11
- 9
plugins/3BandSplitter/DistrhoUI3BandSplitter.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO 3BandSplitter Plugin, based on 3BandSplitter by Michael Gruhn
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,15 +25,15 @@ namespace Art = DistrhoArtwork3BandSplitter;

DistrhoUI3BandSplitter::DistrhoUI3BandSplitter()
: UI(Art::backgroundWidth, Art::backgroundHeight),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatBGR),
fAboutWindow(this)
{
// about
Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR);
Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, kImageFormatBGR);
fAboutWindow.setImage(aboutImage);

// sliders
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight);
Image sliderImage(Art::sliderData, Art::sliderWidth, Art::sliderHeight, kImageFormatBGRA);
Point<int> sliderPosStart(57, 43);
Point<int> sliderPosEnd(57, 43 + 160);

@@ -80,7 +80,7 @@ DistrhoUI3BandSplitter::DistrhoUI3BandSplitter()
fSliderMaster->setCallback(this);

// knobs
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight);
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight, kImageFormatBGRA);

// knob Low-Mid
fKnobLowMid = new ImageKnob(this, knobImage, ImageKnob::Vertical);
@@ -101,8 +101,8 @@ DistrhoUI3BandSplitter::DistrhoUI3BandSplitter()
fKnobMidHigh->setCallback(this);

// about button
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight);
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight);
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight, kImageFormatBGRA);
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight, kImageFormatBGRA);
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
fButtonAbout->setAbsolutePos(264, 300);
fButtonAbout->setCallback(this);
@@ -161,7 +161,7 @@ void DistrhoUI3BandSplitter::imageButtonClicked(ImageButton* button, int)
if (button != fButtonAbout)
return;

fAboutWindow.exec();
fAboutWindow.runAsModal();
}

void DistrhoUI3BandSplitter::imageKnobDragStarted(ImageKnob* knob)
@@ -196,7 +196,9 @@ void DistrhoUI3BandSplitter::imageSliderValueChanged(ImageSlider* slider, float

void DistrhoUI3BandSplitter::onDisplay()
{
fImgBackground.draw();
const GraphicsContext& context(getGraphicsContext());

fImgBackground.draw(context);
}

// -----------------------------------------------------------------------


+ 1
- 0
plugins/3BandSplitter/Makefile View File

@@ -22,6 +22,7 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic

UI_TYPE = generic
include ../../dpf/Makefile.plugins.mk

# --------------------------------------------------------------


+ 10
- 8
plugins/PingPongPan/DistrhoUIPingPongPan.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO PingPongPan Plugin, based on PingPongPan by Michael Gruhn
* Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2012-2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -25,15 +25,15 @@ namespace Art = DistrhoArtworkPingPongPan;

DistrhoUIPingPongPan::DistrhoUIPingPongPan()
: UI(Art::backgroundWidth, Art::backgroundHeight),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR),
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatBGR),
fAboutWindow(this)
{
// about
Image imageAbout(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR);
Image imageAbout(Art::aboutData, Art::aboutWidth, Art::aboutHeight, kImageFormatBGR);
fAboutWindow.setImage(imageAbout);

// knobs
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight);
Image knobImage(Art::knobData, Art::knobWidth, Art::knobHeight, kImageFormatBGRA);

// knob Low-Mid
fKnobFreq = new ImageKnob(this, knobImage, ImageKnob::Vertical);
@@ -54,8 +54,8 @@ DistrhoUIPingPongPan::DistrhoUIPingPongPan()
fKnobWidth->setCallback(this);

// about button
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight);
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight);
Image aboutImageNormal(Art::aboutButtonNormalData, Art::aboutButtonNormalWidth, Art::aboutButtonNormalHeight, kImageFormatBGRA);
Image aboutImageHover(Art::aboutButtonHoverData, Art::aboutButtonHoverWidth, Art::aboutButtonHoverHeight, kImageFormatBGRA);
fButtonAbout = new ImageButton(this, aboutImageNormal, aboutImageHover, aboutImageHover);
fButtonAbout->setAbsolutePos(183, 8);
fButtonAbout->setCallback(this);
@@ -98,7 +98,7 @@ void DistrhoUIPingPongPan::imageButtonClicked(ImageButton* button, int)
if (button != fButtonAbout)
return;

fAboutWindow.exec();
fAboutWindow.runAsModal();
}

void DistrhoUIPingPongPan::imageKnobDragStarted(ImageKnob* knob)
@@ -118,7 +118,9 @@ void DistrhoUIPingPongPan::imageKnobValueChanged(ImageKnob* knob, float value)

void DistrhoUIPingPongPan::onDisplay()
{
fImgBackground.draw();
const GraphicsContext& context(getGraphicsContext());

fImgBackground.draw(context);
}

// -----------------------------------------------------------------------


+ 1
- 0
plugins/PingPongPan/Makefile View File

@@ -22,6 +22,7 @@ FILES_UI = \
# --------------------------------------------------------------
# Do some magic

UI_TYPE = generic
include ../../dpf/Makefile.plugins.mk

# --------------------------------------------------------------


Loading…
Cancel
Save