#include <utility>
#include <gtkmm2ext/barcontroller.h>
-#include <pbd/memento_command.h>
-#include <ardour/automation_control.h>
-#include <ardour/event_type_map.h>
-#include <ardour/route.h>
+#include "pbd/memento_command.h"
+#include "ardour/automation_control.h"
+#include "ardour/event_type_map.h"
+#include "ardour/route.h"
#include "ardour_ui.h"
#include "automation_time_axis.h"
#include "i18n.h"
+using namespace std;
using namespace ARDOUR;
using namespace PBD;
using namespace Gtk;
_base_rect (0),
_view (show_regions ? new AutomationStreamView(*this) : NULL),
_name (nom),
- clear_button (_("clear")),
auto_button (X_("")) /* force addition of a label */
{
if (!have_name_font) {
_base_rect->set_data ("trackview", this);
- _base_rect->signal_event().connect (bind (mem_fun (_editor, &PublicEditor::canvas_automation_track_event),
- _base_rect, this));
+ _base_rect->signal_event().connect (bind (
+ mem_fun (_editor, &PublicEditor::canvas_automation_track_event),
+ _base_rect, this));
- _base_rect->lower_to_bottom();
+ // _base_rect->lower_to_bottom();
hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
auto_button.set_name ("TrackVisualButton");
- clear_button.set_name ("TrackVisualButton");
hide_button.set_name ("TrackRemoveButton");
auto_button.unset_flags (Gtk::CAN_FOCUS);
- clear_button.unset_flags (Gtk::CAN_FOCUS);
hide_button.unset_flags (Gtk::CAN_FOCUS);
controls_table.set_no_show_all();
ARDOUR_UI::instance()->tooltips().set_tip(auto_button, _("automation state"));
- ARDOUR_UI::instance()->tooltips().set_tip(clear_button, _("clear track"));
ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("hide track"));
/* rearrange the name display */
controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (auto_button, 5, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
- controls_table.attach (clear_button, 5, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
/* add bar controller */
- controls_table.attach (*_controller.get(), 0, 8, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
+ controls_table.attach (*_controller.get(), 0, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.show_all ();
- clear_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::clear_clicked));
hide_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::hide_clicked));
auto_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::auto_clicked));
controls_base_unselected_name = X_("AutomationTrackControlsBase");
controls_ebox.set_name (controls_base_unselected_name);
- controls_frame.set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
-
XMLNode* xml_node = get_parent_with_state()->get_automation_child_xml_node (
_control->parameter());
AutomationTimeAxisView::set_automation_state (AutoState state)
{
if (!ignore_state_request) {
+ _automatable->set_parameter_automation_state (_control->parameter(), state);
+#if 0
if (_route == _automatable) { // This is a time axis for route (not region) automation
_route->set_parameter_automation_state (_control->parameter(), state);
}
if (_control->list())
_control->alist()->set_automation_state(state);
+#endif
}
- if (_view)
+
+ if (_view) {
_view->set_automation_state (state);
+ }
}
void
name_hbox.show_all ();
auto_button.show();
- clear_button.show();
hide_button.show_all();
} else if (h >= hSmall) {
name_hbox.show_all ();
auto_button.hide();
- clear_button.hide();
hide_button.hide();
}
} else if (h >= hNormal){
}
void
-AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
+AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkEvent* /*event*/, nframes_t when, double y)
{
if (!_line)
return;
AutomationSelection::iterator p;
boost::shared_ptr<AutomationList> alist(line.the_list());
- for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth);
+ for (p = selection.lines.begin(); p != selection.lines.end() && nth; ++p, --nth) {}
if (p == selection.lines.end()) {
return false;