mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
NO-OP: clang-format, cleanup
This commit is contained in:
parent
96e1735646
commit
efed7343e0
12 changed files with 430 additions and 499 deletions
|
|
@ -17,12 +17,12 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include "pbd/compose.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "gtkmm2ext/actions.h"
|
||||
|
||||
#include "canvas/canvas.h"
|
||||
#include "canvas/debug.h"
|
||||
|
|
@ -56,9 +56,8 @@ using namespace ARDOUR;
|
|||
using namespace ArdourCanvas;
|
||||
using namespace ArdourWaveView;
|
||||
using namespace ArdourWidgets;
|
||||
using std::min;
|
||||
using std::max;
|
||||
|
||||
using std::min;
|
||||
|
||||
Glib::RefPtr<Gtk::ActionGroup> ClipEditorBox::clip_editor_actions;
|
||||
|
||||
|
|
@ -69,8 +68,7 @@ ClipEditorBox::init ()
|
|||
|
||||
register_clip_editor_actions (bindings);
|
||||
|
||||
//_track_canvas_viewport->canvas()->set_data ("ardour-bindings",
|
||||
//midi_bindings);
|
||||
//_track_canvas_viewport->canvas()->set_data ("ardour-bindings", midi_bindings);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -84,31 +82,6 @@ ClipEditorBox::register_clip_editor_actions (Bindings* clip_editor_bindings)
|
|||
// ActionManager::register_action (clip_editor_actions, X_("zoom-in"), _("Zoom In"), sigc::mem_fun (*this, &ClipEditorBox::zoom_out));
|
||||
}
|
||||
|
||||
/* ------------ */
|
||||
|
||||
class ClipBBTMetric : public ArdourCanvas::Ruler::Metric
|
||||
{
|
||||
public:
|
||||
ClipBBTMetric () { units_per_pixel = 1; }
|
||||
|
||||
void get_marks (std::vector<ArdourCanvas::Ruler::Mark>& marks, int64_t lower, int64_t upper, int maxchars) const {
|
||||
ArdourCanvas::Ruler::Mark mark;
|
||||
|
||||
std::cerr << "get marks between " << lower << " .. " << upper << std::endl;
|
||||
|
||||
for (int64_t n = lower; n < upper; n += 4000) {
|
||||
mark.style = ArdourCanvas::Ruler::Mark::Major;
|
||||
mark.label = string_compose ("%1", n);
|
||||
mark.position = n / 100;
|
||||
marks.push_back (mark);
|
||||
std::cerr << "mark at " << mark.label << " @ " << mark.position << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
AudioClipEditor::AudioClipEditor ()
|
||||
: _spp (0)
|
||||
, scroll_fraction (0)
|
||||
|
|
@ -191,7 +164,6 @@ AudioClipEditor::line_event_handler (GdkEvent* ev, ArdourCanvas::Line* l)
|
|||
}
|
||||
break;
|
||||
|
||||
|
||||
case GDK_KEY_PRESS:
|
||||
return key_press (&ev->key);
|
||||
|
||||
|
|
@ -227,7 +199,6 @@ AudioClipEditor::scroll_event_handler (GdkEvent* ev)
|
|||
}
|
||||
break;
|
||||
|
||||
|
||||
case GDK_KEY_PRESS:
|
||||
return key_press (&ev->key);
|
||||
|
||||
|
|
@ -270,7 +241,6 @@ AudioClipEditor::pixel_to_sample (double p)
|
|||
return round (p * _spp);
|
||||
}
|
||||
|
||||
|
||||
AudioClipEditor::LineDrag::LineDrag (AudioClipEditor& ed, ArdourCanvas::Line& l)
|
||||
: editor (ed)
|
||||
, line (l)
|
||||
|
|
@ -303,9 +273,6 @@ AudioClipEditor::set_colors ()
|
|||
|
||||
frame->set_outline_color (UIConfiguration::instance ().color (X_ ("neutral:midground")));
|
||||
|
||||
ruler->set_fill_color (UIConfiguration::instance().color (X_("theme:bg1")));
|
||||
ruler->set_outline_color (UIConfiguration::instance().color (X_("theme:contrasting less")));
|
||||
|
||||
start_line->set_outline_color (UIConfiguration::instance ().color (X_ ("theme:contrasting clock")));
|
||||
end_line->set_outline_color (UIConfiguration::instance ().color (X_ ("theme:contrasting alt")));
|
||||
loop_line->set_outline_color (UIConfiguration::instance ().color (X_ ("theme:contrasting selection")));
|
||||
|
|
@ -394,7 +361,6 @@ AudioClipEditor::set_region (boost::shared_ptr<AudioRegion> r)
|
|||
len = r->source (0)->length ().samples ();
|
||||
|
||||
for (uint32_t n = 0; n < n_chans; ++n) {
|
||||
|
||||
boost::shared_ptr<Region> wr = RegionFactory::get_whole_region_for_source (r->source (n));
|
||||
if (!wr) {
|
||||
continue;
|
||||
|
|
@ -430,9 +396,6 @@ AudioClipEditor::on_size_allocate (Gtk::Allocation& alloc)
|
|||
ArdourCanvas::Rect r (1, 1, alloc.get_width () - 2, alloc.get_height () - 2);
|
||||
frame->set (r);
|
||||
|
||||
const double ruler_height = 25.;
|
||||
ruler->set (Rect (2, 2, alloc.get_width() - 4, ruler_height));
|
||||
|
||||
const double scroll_bar_height = 10.;
|
||||
const double scroll_bar_width = alloc.get_width () - 2;
|
||||
const double scroll_bar_handle_left = scroll_bar_width * scroll_fraction;
|
||||
|
|
@ -480,7 +443,7 @@ AudioClipEditor::set_wave_heights ()
|
|||
}
|
||||
|
||||
uint32_t n = 0;
|
||||
const Distance w = frame->get().height() - scroll_bar_trough->get().height() - 2. - ruler->get().height();
|
||||
const Distance w = frame->get ().height () - scroll_bar_trough->get ().height () - 2.;
|
||||
Distance ht = w / waves.size ();
|
||||
|
||||
for (auto& wave : waves) {
|
||||
|
|
@ -505,28 +468,23 @@ AudioClipEditor::set_waveform_colors ()
|
|||
wave->set_zero_color (zero);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
AudioClipEditor::event_handler (GdkEvent* ev)
|
||||
{
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
// PublicEditor::instance().get_selection().set (this);
|
||||
break;
|
||||
case GDK_ENTER_NOTIFY:
|
||||
// redraw ();
|
||||
break;
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
// redraw ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* ====================================================== */
|
||||
|
||||
AudioClipEditorBox::AudioClipEditorBox ()
|
||||
{
|
||||
_header_label.set_text (_ ("AUDIO Region Trimmer:"));
|
||||
|
|
@ -592,16 +550,5 @@ AudioClipEditorBox::set_region (boost::shared_ptr<Region> r)
|
|||
|
||||
void
|
||||
AudioClipEditorBox::region_changed (const PBD::PropertyChange& what_changed)
|
||||
{
|
||||
//ToDo: refactor the region_editor.cc to cover this basic stuff
|
||||
// if (what_changed.contains (ARDOUR::Properties::name)) {
|
||||
// name_changed ();
|
||||
// }
|
||||
|
||||
// PBD::PropertyChange interesting_stuff;
|
||||
// interesting_stuff.add (ARDOUR::Properties::length);
|
||||
// interesting_stuff.add (ARDOUR::Properties::start);
|
||||
// if (what_changed.contains (interesting_stuff))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#include <gtkmm/table.h>
|
||||
|
||||
#include "ardour/ardour.h"
|
||||
#include "ardour/types.h"
|
||||
#include "ardour/session_handle.h"
|
||||
#include "ardour/types.h"
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/bindings.h"
|
||||
|
|
@ -45,18 +45,20 @@
|
|||
|
||||
#include "audio_clock.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
namespace ARDOUR
|
||||
{
|
||||
class Session;
|
||||
class Location;
|
||||
}
|
||||
|
||||
namespace ArdourCanvas {
|
||||
namespace ArdourCanvas
|
||||
{
|
||||
class Text;
|
||||
class Polygon;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
namespace ArdourWaveView {
|
||||
namespace ArdourWaveView
|
||||
{
|
||||
class WaveView;
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +97,10 @@ class AudioClipEditor : public ArdourCanvas::GtkCanvas
|
|||
samplepos_t pixel_to_sample (double);
|
||||
|
||||
void set_spp (double);
|
||||
double spp() const { return _spp; }
|
||||
double spp () const
|
||||
{
|
||||
return _spp;
|
||||
}
|
||||
|
||||
bool key_press (GdkEventKey*);
|
||||
|
||||
|
|
@ -108,9 +113,6 @@ class AudioClipEditor : public ArdourCanvas::GtkCanvas
|
|||
ArdourCanvas::Line* loop_line;
|
||||
ArdourCanvas::Rectangle* scroll_bar_trough;
|
||||
ArdourCanvas::Rectangle* scroll_bar_handle;
|
||||
ArdourCanvas::Container* ruler_container;
|
||||
ArdourCanvas::Ruler* ruler;
|
||||
ArdourCanvas::Ruler::Metric* clip_metric;
|
||||
std::vector<ArdourWaveView::WaveView*> waves;
|
||||
double non_wave_height;
|
||||
samplepos_t left_origin;
|
||||
|
|
@ -138,7 +140,8 @@ class AudioClipEditor : public ArdourCanvas::GtkCanvas
|
|||
void position_lines ();
|
||||
void scroll_changed ();
|
||||
|
||||
class LineDrag {
|
||||
class LineDrag
|
||||
{
|
||||
public:
|
||||
LineDrag (AudioClipEditor&, ArdourCanvas::Line&);
|
||||
|
||||
|
|
@ -154,7 +157,8 @@ class AudioClipEditor : public ArdourCanvas::GtkCanvas
|
|||
friend class LineDrag;
|
||||
LineDrag* current_line_drag;
|
||||
|
||||
class ScrollDrag {
|
||||
class ScrollDrag
|
||||
{
|
||||
public:
|
||||
ScrollDrag (AudioClipEditor&);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include "pbd/compose.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "gtkmm2ext/actions.h"
|
||||
|
||||
#include "ardour/location.h"
|
||||
#include "ardour/profile.h"
|
||||
|
|
@ -41,11 +41,11 @@
|
|||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourWidgets;
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::min;
|
||||
|
||||
RegionPropertiesBox::RegionPropertiesBox() :
|
||||
length_clock (X_("regionlength"), true, "", true, false, true)
|
||||
RegionPropertiesBox::RegionPropertiesBox ()
|
||||
: length_clock (X_("regionlength"), true, "", true, false, true)
|
||||
, start_clock (X_("regionstart"), true, "", false, false)
|
||||
, loop_length_clock (X_("regionlength"), true, "", true, false, true)
|
||||
, loop_start_clock (X_("regionstart"), true, "", false, false)
|
||||
|
|
@ -62,9 +62,11 @@ RegionPropertiesBox::RegionPropertiesBox() :
|
|||
bpm_table->set_homogeneous (false);
|
||||
bpm_table->set_spacings (4);
|
||||
bpm_table->set_border_width (2);
|
||||
label = manage(new Gtk::Label(_("BPM:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("BPM:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
bpm_table->attach (*label, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
bpm_table->attach(bpm_button, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
bpm_table->attach (bpm_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
pack_start (*bpm_table, false, false);
|
||||
|
||||
|
|
@ -72,31 +74,41 @@ RegionPropertiesBox::RegionPropertiesBox() :
|
|||
metrum_table->set_homogeneous (false);
|
||||
metrum_table->set_spacings (4);
|
||||
metrum_table->set_border_width (2);
|
||||
label = manage(new Gtk::Label(_("Time Sig:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Time Sig:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
bpm_table->attach (*label, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
bpm_table->attach(metrum_button, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
bpm_table->attach (metrum_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
pack_start (*metrum_table, false, false);
|
||||
|
||||
row = 0;
|
||||
|
||||
bbt_toggle.set_text (_("BBT Sync"));
|
||||
table.attach(bbt_toggle, 0, 1, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
table.attach (bbt_toggle, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
label = manage(new Gtk::Label(_("Start:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Start:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
table.attach (*label, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
table.attach(start_clock, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
table.attach (start_clock, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
label = manage(new Gtk::Label(_("Length:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Length:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
table.attach (*label, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
table.attach(length_clock, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
table.attach (length_clock, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
loop_toggle.set_text (_("Loop"));
|
||||
table.attach(loop_toggle, 0, 1, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
table.attach (loop_toggle, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
label = manage(new Gtk::Label(_("Loop Start:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Loop Start:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
table.attach (*label, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
table.attach(loop_start_clock, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
table.attach (loop_start_clock, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
table.set_homogeneous (false);
|
||||
table.set_spacings (4);
|
||||
|
|
@ -138,15 +150,7 @@ RegionPropertiesBox::set_region (boost::shared_ptr<Region> r)
|
|||
void
|
||||
RegionPropertiesBox::region_changed (const PBD::PropertyChange& what_changed)
|
||||
{
|
||||
//ToDo: refactor the region_editor.cc to cover this basic stuff
|
||||
// if (what_changed.contains (ARDOUR::Properties::name)) {
|
||||
// name_changed ();
|
||||
// }
|
||||
|
||||
// PBD::PropertyChange interesting_stuff;
|
||||
// interesting_stuff.add (ARDOUR::Properties::length);
|
||||
// interesting_stuff.add (ARDOUR::Properties::start);
|
||||
// if (what_changed.contains (interesting_stuff))
|
||||
// TODO: refactor the region_editor.cc to cover this basic stuff
|
||||
{
|
||||
AudioClock::Mode mode = _region->position_time_domain () == Temporal::AudioTime ? AudioClock::Samples : AudioClock::BBT;
|
||||
|
||||
|
|
@ -161,8 +165,6 @@ RegionPropertiesBox::region_changed (const PBD::PropertyChange& what_changed)
|
|||
}
|
||||
}
|
||||
|
||||
/* ================== */
|
||||
|
||||
AudioRegionPropertiesBox::AudioRegionPropertiesBox ()
|
||||
{
|
||||
_header_label.set_text (_("AUDIO Region Properties:"));
|
||||
|
|
@ -175,35 +177,34 @@ AudioRegionPropertiesBox::AudioRegionPropertiesBox ()
|
|||
|
||||
int row = 0;
|
||||
|
||||
label = manage(new Gtk::Label(_("Stretch Mode:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Stretch Mode:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
audio_t->attach (*label, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
stretch_selector.set_text ("Mixed");
|
||||
stretch_selector.set_name ("generic button");
|
||||
// stretch_selector.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
audio_t->attach (stretch_selector, 1, 3, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
row++;
|
||||
|
||||
label = manage(new Gtk::Label(_("Fades:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Fades:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
fade_in_enable_button.set_text (_("In"));
|
||||
fade_in_enable_button.set_name ("generic button");
|
||||
// fade_in_enable_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
fade_out_enable_button.set_text (_("Out"));
|
||||
fade_out_enable_button.set_name ("generic button");
|
||||
// fade_out_enable_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
audio_t->attach (*label, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
audio_t->attach (fade_in_enable_button, 1, 2, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
audio_t->attach (fade_out_enable_button, 2, 3, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
row++;
|
||||
|
||||
label = manage(new Gtk::Label(_("Gain:"))); label->set_alignment(1.0, 0.5);
|
||||
label = manage (new Gtk::Label (_("Gain:")));
|
||||
label->set_alignment (1.0, 0.5);
|
||||
audio_t->attach (*label, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
gain_control.set_text (_("+6dB"));
|
||||
gain_control.set_name ("generic button");
|
||||
// gain_control.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
audio_t->attach (gain_control, 1, 3, row, row + 1, Gtk::FILL, Gtk::SHRINK);
|
||||
|
||||
row++;
|
||||
|
|
@ -220,4 +221,3 @@ AudioRegionPropertiesBox::set_region (boost::shared_ptr<Region> r)
|
|||
{
|
||||
RegionPropertiesBox::set_region (r);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
|
||||
#include "audio_clock.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
namespace ARDOUR
|
||||
{
|
||||
class Session;
|
||||
class Location;
|
||||
}
|
||||
|
|
@ -54,7 +55,10 @@ protected:
|
|||
boost::shared_ptr<ARDOUR::Region> _region;
|
||||
|
||||
Gtk::Label _header_label;
|
||||
|
||||
private:
|
||||
void region_changed (const PBD::PropertyChange& what_changed);
|
||||
|
||||
Gtk::Table table;
|
||||
|
||||
AudioClock length_clock;
|
||||
|
|
@ -69,7 +73,6 @@ private:
|
|||
ArdourWidgets::ArdourButton bbt_toggle;
|
||||
ArdourWidgets::ArdourButton loop_toggle;
|
||||
|
||||
void region_changed (const PBD::PropertyChange& what_changed);
|
||||
PBD::ScopedConnection state_connection;
|
||||
};
|
||||
|
||||
|
|
@ -82,7 +85,6 @@ public:
|
|||
virtual void set_region (boost::shared_ptr<ARDOUR::Region>);
|
||||
|
||||
private:
|
||||
|
||||
ArdourWidgets::ArdourButton fade_in_enable_button;
|
||||
ArdourWidgets::ArdourButton fade_out_enable_button;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include "pbd/compose.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "gtkmm2ext/actions.h"
|
||||
|
||||
#include "canvas/canvas.h"
|
||||
#include "canvas/debug.h"
|
||||
|
|
@ -48,24 +48,17 @@
|
|||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourCanvas;
|
||||
using std::min;
|
||||
using std::max;
|
||||
|
||||
/* ------------ */
|
||||
using std::min;
|
||||
|
||||
MidiClipEditor::MidiClipEditor ()
|
||||
{
|
||||
// set_homogenous (true);
|
||||
// set_row_spacing (4);
|
||||
|
||||
set_background_color (UIConfiguration::instance ().color (X_("theme:darkest")));
|
||||
|
||||
const double scale = UIConfiguration::instance ().get_ui_scale ();
|
||||
const double width = 600. * scale;
|
||||
const double height = 210. * scale;
|
||||
|
||||
// name = string_compose ("trigger %1", _trigger.index());
|
||||
|
||||
frame = new Rectangle (this);
|
||||
|
||||
ArdourCanvas::Rect r (0, 0, width, height);
|
||||
|
|
@ -73,8 +66,6 @@ MidiClipEditor::MidiClipEditor ()
|
|||
frame->set_outline_all ();
|
||||
|
||||
frame->Event.connect (sigc::mem_fun (*this, &MidiClipEditor::event_handler));
|
||||
|
||||
// selection_connection = PublicEditor::instance().get_selection().TriggersChanged.connect (sigc::mem_fun (*this, &TriggerBoxUI::selection_changed));
|
||||
}
|
||||
|
||||
MidiClipEditor::~MidiClipEditor ()
|
||||
|
|
@ -86,13 +77,10 @@ MidiClipEditor::event_handler (GdkEvent* ev)
|
|||
{
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
// PublicEditor::instance().get_selection().set (this);
|
||||
break;
|
||||
case GDK_ENTER_NOTIFY:
|
||||
// redraw ();
|
||||
break;
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
// redraw ();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -101,8 +89,6 @@ MidiClipEditor::event_handler (GdkEvent* ev)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* ====================================================== */
|
||||
|
||||
MidiClipEditorBox::MidiClipEditorBox ()
|
||||
{
|
||||
_header_label.set_text (_("MIDI Region Trimmer:"));
|
||||
|
|
@ -143,19 +129,5 @@ MidiClipEditorBox::set_region (boost::shared_ptr<Region> r)
|
|||
|
||||
void
|
||||
MidiClipEditorBox::region_changed (const PBD::PropertyChange& what_changed)
|
||||
{
|
||||
//ToDo: refactor the region_editor.cc to cover this basic stuff
|
||||
// if (what_changed.contains (ARDOUR::Properties::name)) {
|
||||
// name_changed ();
|
||||
// }
|
||||
|
||||
// PBD::PropertyChange interesting_stuff;
|
||||
// interesting_stuff.add (ARDOUR::Properties::length);
|
||||
// interesting_stuff.add (ARDOUR::Properties::start);
|
||||
// if (what_changed.contains (interesting_stuff))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,15 +38,17 @@
|
|||
|
||||
#include "audio_clock.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
namespace ARDOUR
|
||||
{
|
||||
class Session;
|
||||
class Location;
|
||||
}
|
||||
|
||||
namespace ArdourCanvas {
|
||||
namespace ArdourCanvas
|
||||
{
|
||||
class Text;
|
||||
class Polygon;
|
||||
};
|
||||
}
|
||||
|
||||
class MidiClipEditor : public ArdourCanvas::GtkCanvas
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include "pbd/compose.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
#include "gtkmm2ext/gui_thread.h"
|
||||
#include "gtkmm2ext/utils.h"
|
||||
#include "gtkmm2ext/actions.h"
|
||||
|
||||
#include "ardour/location.h"
|
||||
#include "ardour/profile.h"
|
||||
|
|
@ -43,11 +43,11 @@
|
|||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
using namespace ArdourWidgets;
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::min;
|
||||
|
||||
MidiRegionPropertiesBox::MidiRegionPropertiesBox () :
|
||||
patch_enable_button (ArdourButton::led_default_elements)
|
||||
MidiRegionPropertiesBox::MidiRegionPropertiesBox ()
|
||||
: patch_enable_button (ArdourButton::led_default_elements)
|
||||
, cc_enable_button (ArdourButton::led_default_elements)
|
||||
{
|
||||
_header_label.set_text (_("MIDI Region Properties:"));
|
||||
|
|
@ -60,25 +60,23 @@ MidiRegionPropertiesBox::MidiRegionPropertiesBox () :
|
|||
|
||||
patch_enable_button.set_text (_("Send Patches"));
|
||||
patch_enable_button.set_name ("generic button");
|
||||
// patch_enable_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
|
||||
patch_selector_button.set_text (_("Patches..."));
|
||||
patch_selector_button.set_name ("generic button");
|
||||
// patch_selector_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
|
||||
midi_t->attach (patch_enable_button, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
midi_t->attach(patch_selector_button, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
midi_t->attach (patch_selector_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
cc_enable_button.set_text (_("Send CCs"));
|
||||
cc_enable_button.set_name ("generic button");
|
||||
// cc_enable_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
|
||||
cc_selector_button.set_text (_("CCs..."));
|
||||
cc_selector_button.set_name ("generic button");
|
||||
// cc_selector_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiRegionPropertiesBox::patch_enable_button_clicked));
|
||||
|
||||
midi_t->attach (cc_enable_button, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
midi_t->attach(cc_selector_button, 1, 2, row, row+1, Gtk::SHRINK, Gtk::SHRINK ); row++;
|
||||
midi_t->attach (cc_selector_button, 1, 2, row, row + 1, Gtk::SHRINK, Gtk::SHRINK);
|
||||
row++;
|
||||
|
||||
pack_start (*midi_t);
|
||||
}
|
||||
|
|
@ -98,6 +96,5 @@ MidiRegionPropertiesBox::set_region (boost::shared_ptr<Region> r)
|
|||
void
|
||||
MidiRegionPropertiesBox::region_changed (const PBD::PropertyChange& what_changed)
|
||||
{
|
||||
//CC and Pgm stuff ...?
|
||||
/* CC and Pgm stuff ...? */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@
|
|||
|
||||
#include "audio_region_properties_box.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
namespace ARDOUR
|
||||
{
|
||||
class Session;
|
||||
class Location;
|
||||
}
|
||||
|
|
@ -47,9 +48,9 @@ public:
|
|||
void set_region (boost::shared_ptr<ARDOUR::Region>);
|
||||
|
||||
private:
|
||||
void region_changed (const PBD::PropertyChange& what_changed);
|
||||
|
||||
PBD::ScopedConnection midi_state_connection;
|
||||
void region_changed (const PBD::PropertyChange& what_changed);
|
||||
|
||||
ArdourWidgets::ArdourButton patch_enable_button;
|
||||
ArdourWidgets::ArdourButton patch_selector_button;
|
||||
|
|
|
|||
|
|
@ -37,17 +37,17 @@
|
|||
#include "public_editor.h"
|
||||
#include "timers.h"
|
||||
|
||||
#include "audio_region_properties_box.h"
|
||||
#include "midi_region_properties_box.h"
|
||||
#include "audio_region_operations_box.h"
|
||||
#include "midi_region_operations_box.h"
|
||||
#include "slot_properties_box.h"
|
||||
#include "audio_region_properties_box.h"
|
||||
#include "midi_clip_editor.h"
|
||||
#include "midi_region_operations_box.h"
|
||||
#include "midi_region_properties_box.h"
|
||||
#include "slot_properties_box.h"
|
||||
|
||||
#include "trigger_page.h"
|
||||
#include "trigger_strip.h"
|
||||
#include "cuebox_ui.h"
|
||||
#include "trigger_master.h"
|
||||
#include "trigger_page.h"
|
||||
#include "trigger_strip.h"
|
||||
#include "ui_config.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
|
@ -100,14 +100,20 @@ TriggerPage::TriggerPage ()
|
|||
table->attach (*_slot_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
|
||||
col = 1;
|
||||
table->attach(*_audio_prop_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_audio_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_audio_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach (*_audio_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
col++;
|
||||
table->attach (*_audio_trim_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
col++;
|
||||
table->attach (*_audio_ops_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
col++;
|
||||
|
||||
col = 1; /* audio and midi boxen share the same table locations; shown and hidden depending on region type */
|
||||
table->attach(*_midi_prop_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_midi_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_midi_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach (*_midi_prop_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
col++;
|
||||
table->attach (*_midi_trim_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
col++;
|
||||
table->attach (*_midi_ops_box, col, col + 1, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL | Gtk::EXPAND);
|
||||
col++;
|
||||
|
||||
_parameter_box.pack_start (*table);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue