#include "pbd/enumwriter.h"
#include "midi++/parser.h"
-#include "timecode/time.h"
-#include "timecode/bbt_time.h"
+#include "temporal/time.h"
+#include "temporal/bbt_time.h"
#include "ardour/async_midi_port.h"
#include "ardour/audioengine.h"
#include "ardour/utils.h"
#include "ardour/vca_manager.h"
-#include "canvas/colors.h"
+#include "gtkmm2ext/colors.h"
#include "canvas/line.h"
#include "canvas/rectangle.h"
#include "canvas/text.h"
#include "pbd/i18n.h"
+#ifdef __APPLE__
+#define Rect ArdourCanvas::Rect
+#endif
+
using namespace ARDOUR;
using namespace std;
using namespace PBD;
using namespace Glib;
using namespace ArdourSurface;
+using namespace Gtkmm2ext;
using namespace ArdourCanvas;
MixLayout::MixLayout (Push2& p, Session & s, std::string const & name)
{
/* background */
- bg = new Rectangle (this);
+ bg = new ArdourCanvas::Rectangle (this);
bg->set (Rect (0, 0, display_width(), display_height()));
bg->set_fill_color (p2.get_color (Push2::DarkBackground));
/* background for text labels for knob function */
- Rectangle* r = new Rectangle (this);
+ ArdourCanvas::Rectangle* r = new ArdourCanvas::Rectangle (this);
Coord x0 = 10 + (n*Push2Canvas::inter_button_spacing()) - 5;
r->set (Rect (x0, 2, x0 + Push2Canvas::inter_button_spacing(), 2 + 21));
upper_backgrounds.push_back (r);
- r = new Rectangle (this);
+ r = new ArdourCanvas::Rectangle (this);
r->set (Rect (x0, 137, x0 + Push2Canvas::inter_button_spacing(), 137 + 21));
lower_backgrounds.push_back (r);
if (s) {
boost::shared_ptr<AutomationControl> ac = s->solo_control();
if (ac) {
- ac->set_value (!ac->get_value(), PBD::Controllable::UseGroup);
+ session.set_control (ac, !ac->get_value(), PBD::Controllable::UseGroup);
}
}
}
boost::shared_ptr<AutomationControl> ac = stripable[n]->gain_control();
if (ac) {
if (touching) {
- ac->start_touch (session.audible_frame());
+ ac->start_touch (session.audible_sample());
} else {
- ac->stop_touch (true, session.audible_frame());
+ ac->stop_touch (session.audible_sample());
}
}
}
if (what_changed.contains (Properties::color)) {
lower_backgrounds[which]->set_fill_color (stripable[which]->presentation_info().color());
- if (stripable[which]->presentation_info().selected()) {
+ if (stripable[which]->is_selected()) {
lower_text[which]->set_fill_color (contrasting_text_color (stripable[which]->presentation_info().color()));
/* might not be a MIDI track, in which case this will
do nothing
return;
}
- if (stripable[which]->presentation_info().selected()) {
+ if (stripable[which]->is_selected()) {
show_selection (which);
} else {
hide_selection (which);
{
lower_backgrounds[n]->show ();
lower_backgrounds[n]->set_fill_color (stripable[n]->presentation_info().color());
- lower_text[n]->set_color (ArdourCanvas::contrasting_text_color (lower_backgrounds[n]->fill_color()));
+ lower_text[n]->set_color (contrasting_text_color (lower_backgrounds[n]->fill_color()));
}
void
if (!s[0]) {
/* not even the first stripable exists, do nothing */
+ for (int n = 0; n < 8; ++n) {
+ stripable[n].reset ();
+ gain_meter[n]->knob->set_controllable (boost::shared_ptr<AutomationControl>());
+ gain_meter[n]->meter->set_meter (0);
+ }
return;
}
if (!stripable[n]) {
lower_text[n]->hide ();
hide_selection (n);
+ gain_meter[n]->knob->set_controllable (boost::shared_ptr<AutomationControl>());
+ gain_meter[n]->meter->set_meter (0);
} else {
lower_text[n]->show ();
stripable[n]->solo_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&MixLayout::solo_changed, this, n), &p2);
stripable[n]->mute_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&MixLayout::mute_changed, this, n), &p2);
- if (stripable[n]->presentation_info().selected()) {
+ if (stripable[n]->is_selected()) {
show_selection (n);
} else {
hide_selection (n);
for (int n = 0; n < 8; ++n) {
if (stripable[n]) {
- if (stripable[n]->presentation_info().selected()) {
+ if (stripable[n]->is_selected()) {
selected = n;
break;
}