Make preset save/load actions work, requires rebuild
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
6be9bac686
commit
18f6e9a9b4
7 changed files with 374 additions and 0 deletions
40
include/app/ModuleWidget.hpp
Normal file
40
include/app/ModuleWidget.hpp
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 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 General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of
|
||||
* the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* For a full copy of the GNU General Public License see the LICENSE file.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILDING_PLUGIN_MODULES
|
||||
# include <plugin/Model.hpp>
|
||||
# undef ModuleWidget
|
||||
#endif
|
||||
|
||||
#include_next <app/ModuleWidget.hpp>
|
||||
|
||||
#ifdef BUILDING_PLUGIN_MODULES
|
||||
namespace rack {
|
||||
namespace app {
|
||||
struct CardinalModuleWidget : ModuleWidget {
|
||||
CardinalModuleWidget() : ModuleWidget() {}
|
||||
DEPRECATED CardinalModuleWidget(engine::Module* module) : ModuleWidget() {
|
||||
setModule(module);
|
||||
}
|
||||
void onButton(const ButtonEvent& e) override;
|
||||
};
|
||||
}
|
||||
}
|
||||
# define ModuleWidget CardinalModuleWidget
|
||||
#endif
|
||||
28
include/app/RackWidget.hpp
Normal file
28
include/app/RackWidget.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 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 General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of
|
||||
* the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* For a full copy of the GNU General Public License see the LICENSE file.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILDING_PLUGIN_MODULES
|
||||
# undef ModuleWidget
|
||||
#endif
|
||||
|
||||
#include_next <app/RackWidget.hpp>
|
||||
|
||||
#ifdef BUILDING_PLUGIN_MODULES
|
||||
# define ModuleWidget CardinalModuleWidget
|
||||
#endif
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
// check if PRIVATE is defined already before including any headers
|
||||
#ifdef PRIVATE
|
||||
# define PRIVATE_WAS_DEFINED
|
||||
#endif
|
||||
|
|
@ -34,10 +35,12 @@
|
|||
#define BINARY_END(sym) ((const void*) sym + sym##_len)
|
||||
#define BINARY_SIZE(sym) (sym##_len)
|
||||
|
||||
// undefine PRIVATE if needed
|
||||
#if defined(PRIVATE) && !defined(PRIVATE_WAS_DEFINED)
|
||||
# undef PRIVATE
|
||||
#endif
|
||||
|
||||
// and also our flag
|
||||
#undef PRIVATE_WAS_DEFINED
|
||||
|
||||
// Cardinal specific API
|
||||
|
|
|
|||
29
include/plugin/Model.hpp
Normal file
29
include/plugin/Model.hpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 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 General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of
|
||||
* the License, or any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* For a full copy of the GNU General Public License see the LICENSE file.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILDING_PLUGIN_MODULES
|
||||
namespace rack {
|
||||
namespace app {
|
||||
struct CardinalModuleWidget;
|
||||
}
|
||||
}
|
||||
# define ModuleWidget CardinalModuleWidget
|
||||
#endif
|
||||
|
||||
#include_next <plugin/Model.hpp>
|
||||
Loading…
Add table
Add a link
Reference in a new issue