#ifndef XTC_MIXER_WIDGET_HPP #define XTC_MIXER_WIDGET_HPP #include "xtc/xtc_mixer.h" #include class Fl_Choice; class Fl_Value_Slider; class Fl_Check_Button; class Fl_Progress; class Fl_Value_Input; class AutomationLane; class MixerWidget : public Fl_Group { public: using BeforeEdit = xtc_result (*)(void *); MixerWidget(int, int, int, int, xtc_project *, BeforeEdit, void *); void set_project(xtc_project *); void peaks(float left, float right); uint64_t selected_track() const; xtc_project *project() const { return project_; } xtc_automation_parameter parameter() const; uint64_t lane_start() const; xtc_result point(uint64_t tick, float value, bool remove = false); xtc_result mix(float gain, float pan, int mute, int solo); int handle(int) override; private: xtc_project *project_; BeforeEdit before_; void *context_; Fl_Choice *tracks_, *parameter_; Fl_Value_Slider *gain_, *pan_; Fl_Check_Button *mute_, *solo_; Fl_Progress *left_, *right_; Fl_Value_Input *start_; AutomationLane *lane_; xtc_result changed(xtc_result); void selection(); static void control(Fl_Widget *, void *); static void select(Fl_Widget *, void *); }; #endif