2021-11-29 17:30:34 -05:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2021 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2021 Ben Loftis <ben@harrisonconsoles.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 2 of the License, or
|
|
|
|
* (at your option) 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __slot_properties_box_h__
|
|
|
|
#define __slot_properties_box_h__
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/label.h>
|
2021-12-30 11:25:00 -05:00
|
|
|
#include "gtkmm/sizegroup.h"
|
2021-11-29 17:30:34 -05:00
|
|
|
#include <gtkmm/table.h>
|
|
|
|
|
|
|
|
#include "ardour/ardour.h"
|
|
|
|
#include "ardour/session_handle.h"
|
|
|
|
|
|
|
|
#include "widgets/ardour_button.h"
|
2021-12-30 11:25:00 -05:00
|
|
|
#include "widgets/slider_controller.h"
|
|
|
|
#include "widgets/ardour_dropdown.h"
|
2021-11-29 17:30:34 -05:00
|
|
|
|
|
|
|
#include "gtkmm2ext/cairo_packer.h"
|
|
|
|
|
2022-02-11 11:39:53 -05:00
|
|
|
#include "patch_change_widget.h"
|
2021-12-30 11:25:00 -05:00
|
|
|
#include "trigger_ui.h"
|
|
|
|
|
2021-11-29 17:30:34 -05:00
|
|
|
namespace ARDOUR {
|
|
|
|
class Session;
|
|
|
|
class Location;
|
|
|
|
}
|
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
class TriggerPropertiesBox;
|
|
|
|
class RegionPropertiesBox;
|
|
|
|
class RegionOperationsBox;
|
2024-01-08 16:38:16 -05:00
|
|
|
class MidiCueEditor;
|
2021-12-30 11:25:00 -05:00
|
|
|
class ClipEditorBox;
|
|
|
|
|
|
|
|
class SlotPropertyTable : public TriggerUI, public Gtk::Table
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SlotPropertyTable ();
|
|
|
|
~SlotPropertyTable ();
|
|
|
|
|
2022-02-11 11:39:53 -05:00
|
|
|
virtual void on_trigger_set ();
|
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
Glib::RefPtr<Gtk::SizeGroup> _follow_size_group;
|
2022-01-16 17:56:59 -05:00
|
|
|
|
|
|
|
ArdourWidgets::ArdourButton _color_button;
|
|
|
|
Gtk::Label _color_label;
|
2021-12-30 11:25:00 -05:00
|
|
|
|
|
|
|
ArdourWidgets::ArdourButton _load_button;
|
|
|
|
|
|
|
|
Gtk::Adjustment _velocity_adjustment;
|
|
|
|
ArdourWidgets::HSliderController _velocity_slider;
|
|
|
|
|
2022-01-14 11:06:49 -05:00
|
|
|
Gtk::Table _trigger_table;
|
|
|
|
Gtk::Table _launch_table;
|
|
|
|
Gtk::Table _follow_table;
|
|
|
|
|
2022-01-16 17:56:59 -05:00
|
|
|
Gtk::Adjustment _gain_adjustment;
|
|
|
|
Gtk::SpinButton _gain_spinner;
|
|
|
|
Gtk::Label _gain_label;
|
|
|
|
|
2022-02-11 11:39:53 -05:00
|
|
|
ArdourWidgets::ArdourButton _patch_button;
|
2022-03-15 09:54:23 -04:00
|
|
|
ArdourWidgets::ArdourButton _allow_button;
|
2022-02-11 11:39:53 -05:00
|
|
|
|
2022-01-18 09:12:17 -05:00
|
|
|
Gtk::Label _beat_label;
|
|
|
|
Gtk::Label _follow_length_label;
|
|
|
|
Gtk::Label _follow_count_label;
|
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
Gtk::Label _left_probability_label;
|
|
|
|
Gtk::Label _right_probability_label;
|
|
|
|
Gtk::Adjustment _follow_probability_adjustment;
|
|
|
|
ArdourWidgets::HSliderController _follow_probability_slider;
|
|
|
|
|
|
|
|
Gtk::Adjustment _follow_count_adjustment;
|
|
|
|
Gtk::SpinButton _follow_count_spinner;
|
|
|
|
|
2022-01-16 11:56:30 -05:00
|
|
|
ArdourWidgets::ArdourButton _use_follow_length_button;
|
|
|
|
Gtk::Adjustment _follow_length_adjustment;
|
|
|
|
Gtk::SpinButton _follow_length_spinner;
|
2022-01-14 11:06:49 -05:00
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
ArdourWidgets::ArdourDropdown _follow_left;
|
|
|
|
ArdourWidgets::ArdourDropdown _follow_right;
|
|
|
|
|
2022-01-18 09:12:17 -05:00
|
|
|
Gtk::Label _vel_sense_label;
|
|
|
|
Gtk::Label _launch_style_label;
|
|
|
|
Gtk::Label _launch_quant_label;
|
|
|
|
Gtk::Label _legato_label;
|
2022-01-25 08:20:15 -05:00
|
|
|
Gtk::Label _isolate_label;
|
2022-01-18 09:12:17 -05:00
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
ArdourWidgets::ArdourButton _legato_button;
|
|
|
|
|
2022-01-25 08:20:15 -05:00
|
|
|
ArdourWidgets::ArdourButton _isolate_button;
|
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
ArdourWidgets::ArdourDropdown _quantize_button;
|
|
|
|
|
|
|
|
ArdourWidgets::ArdourDropdown _launch_style_button;
|
|
|
|
|
|
|
|
void set_quantize (Temporal::BBT_Offset);
|
|
|
|
void set_launch_style (ARDOUR::Trigger::LaunchStyle);
|
2022-01-19 17:50:47 -05:00
|
|
|
void set_follow_action (ARDOUR::FollowAction const &, uint64_t);
|
2021-12-30 11:25:00 -05:00
|
|
|
|
2021-12-30 13:10:50 -05:00
|
|
|
void on_trigger_changed (PBD::PropertyChange const& );
|
2021-12-30 11:25:00 -05:00
|
|
|
|
2022-03-15 09:54:23 -04:00
|
|
|
bool allow_button_event (GdkEvent*);
|
2021-12-30 11:25:00 -05:00
|
|
|
bool legato_button_event (GdkEvent*);
|
|
|
|
void follow_count_event ();
|
2022-01-16 11:56:30 -05:00
|
|
|
|
2022-01-25 08:20:15 -05:00
|
|
|
bool isolate_button_event (GdkEvent*);
|
|
|
|
|
2022-01-16 17:56:59 -05:00
|
|
|
void gain_change_event ();
|
|
|
|
|
2022-01-16 11:56:30 -05:00
|
|
|
bool use_follow_length_event (GdkEvent*);
|
2022-01-14 11:06:49 -05:00
|
|
|
void follow_length_event ();
|
2021-12-30 11:25:00 -05:00
|
|
|
|
|
|
|
void probability_adjusted ();
|
|
|
|
void velocity_adjusted ();
|
2022-01-16 11:56:30 -05:00
|
|
|
|
2022-02-11 11:39:53 -05:00
|
|
|
void patch_button_event ();
|
|
|
|
|
2022-01-16 11:56:30 -05:00
|
|
|
private:
|
|
|
|
bool _ignore_changes;
|
2022-02-11 11:39:53 -05:00
|
|
|
|
|
|
|
PatchChangeTriggerWindow _patch_change_window;
|
2021-12-30 11:25:00 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
class SlotPropertyWidget : public Gtk::VBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SlotPropertyWidget ();
|
|
|
|
void set_trigger (ARDOUR::TriggerReference tr) const { ui->set_trigger(tr); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
SlotPropertyTable* ui;
|
|
|
|
};
|
2021-11-29 17:30:34 -05:00
|
|
|
|
|
|
|
class SlotPropertiesBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SlotPropertiesBox ();
|
|
|
|
~SlotPropertiesBox ();
|
|
|
|
|
|
|
|
void set_session (ARDOUR::Session*);
|
|
|
|
|
2021-12-24 16:13:36 -05:00
|
|
|
void set_slot (ARDOUR::TriggerReference);
|
2021-11-29 17:30:34 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
Gtk::Table table;
|
|
|
|
|
|
|
|
Gtk::Label _header_label;
|
|
|
|
|
2021-12-30 10:05:24 -05:00
|
|
|
SlotPropertyWidget* _triggerwidget;
|
2021-11-29 17:30:34 -05:00
|
|
|
};
|
|
|
|
|
2021-12-30 11:25:00 -05:00
|
|
|
/* XXX probably for testing only */
|
|
|
|
|
|
|
|
class SlotPropertyWindow : public Gtk::Window
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SlotPropertyWindow (ARDOUR::TriggerReference);
|
|
|
|
|
|
|
|
bool on_key_press_event (GdkEventKey*);
|
|
|
|
bool on_key_release_event (GdkEventKey*);
|
|
|
|
|
|
|
|
TriggerPropertiesBox *_trig_box;
|
|
|
|
RegionOperationsBox *_ops_box;
|
|
|
|
ClipEditorBox *_trim_box;
|
2024-01-08 16:38:16 -05:00
|
|
|
MidiCueEditor* _midi_editor;
|
2021-12-30 11:25:00 -05:00
|
|
|
};
|
2021-11-29 17:30:34 -05:00
|
|
|
#endif /* __multi_region_properties_box_h__ */
|