#pragma once #include "interaction-manager.h" #include "nlohmann/json.hpp" #include "canvas.h" #include "graph-manager.h" #include "midi-node.h" #include "signal-manager.h" #include "state.h" #include "ui.h" #include using json = nlohmann::json; namespace VISEQ::APP { class AppManager{ public: AppManager() : im(gm->getPtr(), sm->getPtr(), canvas), ui(sm->getPtr(), gm->getPtr()) {} std::mutex mutex; std::shared_ptr state = APP::State::get(); std::shared_ptr canvas = std::make_shared(); std::shared_ptr gm = std::make_shared(); std::shared_ptr sm = std::make_shared(gm->getPtr(), &mutex); VISEQ::INTERACTION::InteractionManager im; UI::AppUI ui; void init(); void close(); void startSignals(); void loadState(); void updateMidiPorts(); void update(); void draw(); void drawUI(); }; NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(AppManager, gm, sm) }