Compare commits

...

5 Commits

Author SHA1 Message Date
Gordon JC Pearce
d512c6b4ff peacock graphics 2024-12-31 21:52:21 +00:00
Gordon JC Pearce
3260430800 deleted file 2024-09-12 20:19:21 +01:00
Gordon JC Pearce
47dc94531f removed aboutwindow 2024-09-12 17:13:05 +01:00
Gordon JC Pearce
0f0a592295 removed file 2024-09-12 17:03:13 +01:00
Gordon JC Pearce
c722ee7e96 initial attempt at GUI 2024-09-12 16:23:48 +01:00
8 changed files with 35516 additions and 1 deletions

View File

@ -28,6 +28,7 @@
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1
#define DISTRHO_PLUGIN_HAS_UI 1
enum Parameters {
paramProg,

View File

@ -15,9 +15,17 @@ FILES_DSP = \
chassis.cpp \
voice.cpp
FILES_UI = \
peacock.cpp \
ui.cpp
UI_TYPE = generic
USE_FILE_BROWSER = false
SKIP_NATIVE_AUDIO_FALLBACK = true
include ../dpf/Makefile.plugins.mk
TARGETS += jack lv2
TARGETS += jack lv2_sep
all: $(TARGETS)

19800
plugin/back.cpp Normal file

File diff suppressed because it is too large Load Diff

11
plugin/back.hpp Normal file
View File

@ -0,0 +1,11 @@
#ifndef _BACK_HPP
#define _BACK_HPP
namespace Artwork {
extern const char *backgroundData;
const unsigned int backgroundDataSize = 677980;
const unsigned int backgroundWidth = 545;
const unsigned int backgroundHeight = 311;
} // namespace Artwork
#endif

15620
plugin/peacock.cpp Normal file

File diff suppressed because it is too large Load Diff

15
plugin/peacock.hpp Normal file
View File

@ -0,0 +1,15 @@
#pragma once
namespace Artwork {
/*
extern const char *orangeData;
const uint32_t orangeDataSize = 38*17*3;
const uint32_t orangeWidth = 38;
const uint32_t orangeHeight = 17;
*/
extern const char *backgroundData;
const unsigned int backgroundDataSize = 700*400*3;
const unsigned int backgroundWidth = 700;
const unsigned int backgroundHeight = 400;
} // namespace Artwork

32
plugin/ui.cpp Normal file
View File

@ -0,0 +1,32 @@
#include "ui.hpp"
#include "chassis.hpp"
START_NAMESPACE_DISTRHO
namespace Art = Artwork;
DistrhoUIchassis::DistrhoUIchassis() : UI(Art::backgroundWidth, Art::backgroundHeight, true),
// UI
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatRGB)
{
}
void DistrhoUIchassis::programLoaded(uint32_t index) {
//printf("in programLoaded %d\n", index);
}
void DistrhoUIchassis::parameterChanged(uint32_t index, float value) {
//printf("in parameterchanged %d %f\n", index, value);
}
void DistrhoUIchassis::onDisplay() {
const GraphicsContext& context(getGraphicsContext());
fImgBackground.draw(context);
};
UI* createUI() {
return new DistrhoUIchassis();
}
END_NAMESPACE_DISTRHO

28
plugin/ui.hpp Normal file
View File

@ -0,0 +1,28 @@
#ifndef _UI_HPP
#define _UI_HPP
#include "DistrhoUI.hpp"
#include "ImageWidgets.hpp"
#include "peacock.hpp"
START_NAMESPACE_DISTRHO
class DistrhoUIchassis : public UI {
public:
DistrhoUIchassis();
protected:
void parameterChanged(uint32_t index, float value) override;
void programLoaded(uint32_t index) override;
void onDisplay() override;
private:
Image fImgBackground;
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIchassis)
// ImageAboutWindow fAboutWindow;
};
END_NAMESPACE_DISTRHO
#endif