summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/editor_mouse.cc79
-rw-r--r--gtk2_ardour/midi_automation_line.cc2
-rw-r--r--gtk2_ardour/midi_streamview.cc4
-rw-r--r--gtk2_ardour/patch_change_dialog.cc12
-rw-r--r--gtk2_ardour/patch_change_dialog.h18
-rw-r--r--gtk2_ardour/region_view.cc12
-rw-r--r--gtk2_ardour/route_time_axis.cc2
-rw-r--r--gtk2_ardour/step_editor.h14
-rw-r--r--gtk2_ardour/tempo_curve.h23
-rw-r--r--gtk2_ardour/tempo_lines.cc12
-rw-r--r--gtk2_ardour/tempo_lines.h12
-rw-r--r--gtk2_ardour/time_axis_view.h18
12 files changed, 108 insertions, 100 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 9c50ea99d0..9018f4938f 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -442,8 +442,8 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
if (get_smart_mode() && eff_mouse_mode == MouseRange && event->button.button == 3 && item_type == RegionItem) {
/* context clicks are always about object properties, even if
- we're in range mode within smart mode.
- */
+ * we're in range mode within smart mode.
+ */
eff_mouse_mode = MouseObject;
}
@@ -462,11 +462,11 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
}
if (((mouse_mode != MouseObject) &&
- (mouse_mode != MouseAudition || item_type != RegionItem) &&
- (mouse_mode != MouseTimeFX || item_type != RegionItem) &&
- (mouse_mode != MouseDraw) &&
- (mouse_mode != MouseContent || item_type == RegionItem)) ||
- ((event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE) || event->button.button > 3)) {
+ (mouse_mode != MouseAudition || item_type != RegionItem) &&
+ (mouse_mode != MouseTimeFX || item_type != RegionItem) &&
+ (mouse_mode != MouseDraw) &&
+ (mouse_mode != MouseContent || item_type == RegionItem)) ||
+ ((event->type != GDK_BUTTON_PRESS && event->type != GDK_BUTTON_RELEASE) || event->button.button > 3)) {
return;
}
@@ -477,8 +477,8 @@ Editor::button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType it
/* almost no selection action on modified button-2 or button-3 events */
if ((item_type != RegionItem && event->button.button != 2)
- /* for selection of control points prior to delete (shift-right click) */
- && !(item_type == ControlPointItem && event->button.button == 3 && event->type == GDK_BUTTON_PRESS)) {
+ /* for selection of control points prior to delete (shift-right click) */
+ && !(item_type == ControlPointItem && event->button.button == 3 && event->type == GDK_BUTTON_PRESS)) {
return;
}
}
@@ -682,10 +682,10 @@ bool
Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
/* single mouse clicks on any of these item types operate
- independent of mouse mode, mostly because they are
- not on the main track canvas or because we want
- them to be modeless.
- */
+ * independent of mouse mode, mostly because they are
+ * not on the main track canvas or because we want
+ * them to be modeless.
+ */
NoteBase* note = NULL;
@@ -753,10 +753,10 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
case MinsecRulerItem:
case BBTRulerItem:
if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)
- && !ArdourKeyboard::indicates_constraint (event->button.state)) {
+ && !ArdourKeyboard::indicates_constraint (event->button.state)) {
_drags->set (new CursorDrag (this, *playhead_cursor, false), event);
} else if (ArdourKeyboard::indicates_constraint (event->button.state)
- && Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier)) {
+ && Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier)) {
_drags->set (new TempoTwistDrag (this, item), event);
} else if (ArdourKeyboard::indicates_constraint (event->button.state)) {
_drags->set (new BBTRulerDrag (this, item), event);
@@ -800,11 +800,11 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
if (_join_object_range_state == JOIN_OBJECT_RANGE_OBJECT) {
/* special case: allow trim of range selections in joined object mode;
- in theory eff should equal MouseRange in this case, but it doesn't
- because entering the range selection canvas item results in entered_regionview
- being set to 0, so update_join_object_range_location acts as if we aren't
- over a region.
- */
+ * in theory eff should equal MouseRange in this case, but it doesn't
+ * because entering the range selection canvas item results in entered_regionview
+ * being set to 0, so update_join_object_range_location acts as if we aren't
+ * over a region.
+ */
if (item_type == StartSelectionTrimItem) {
_drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionStartTrim), event);
} else if (item_type == EndSelectionTrimItem) {
@@ -847,8 +847,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
/* grab selection for moving */
_drags->set (new SelectionDrag (this, item, SelectionDrag::SelectionMove), event);
} else {
- /* this was debated, but decided the more common action was to
- make a new selection */
+ /* this was debated, but decided the more common action was to make a new selection */
_drags->set (new SelectionDrag (this, item, SelectionDrag::CreateSelection), event);
}
break;
@@ -2138,13 +2137,13 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from
gint x, y;
/* We call this so that MOTION_NOTIFY events continue to be
- delivered to the canvas. We need to do this because we set
- Gdk::POINTER_MOTION_HINT_MASK on the canvas. This reduces
- the density of the events, at the expense of a round-trip
- to the server. Given that this will mostly occur on cases
- where DISPLAY = :0.0, and given the cost of what the motion
- event might do, its a good tradeoff.
- */
+ * delivered to the canvas. We need to do this because we set
+ * Gdk::POINTER_MOTION_HINT_MASK on the canvas. This reduces
+ * the density of the events, at the expense of a round-trip
+ * to the server. Given that this will mostly occur on cases
+ * where DISPLAY = :0.0, and given the cost of what the motion
+ * event might do, its a good tradeoff.
+ */
_track_canvas->get_pointer (x, y);
}
@@ -2294,8 +2293,8 @@ void
Editor::region_view_item_click (AudioRegionView& rv, GdkEventButton* event)
{
/* Either add to or set the set the region selection, unless
- this is an alignment click (control used)
- */
+ * this is an alignment click (control used)
+ */
if (Keyboard::modifier_state_contains (event->state, Keyboard::PrimaryModifier)) {
@@ -2573,18 +2572,18 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
boost::shared_ptr<Region> region (new_regions.front());
/* add it to the current stream/playlist.
-
- tricky: the streamview for the track will add a new regionview. we will
- catch the signal it sends when it creates the regionview to
- set the regionview we want to then drag.
- */
+ *
+ * tricky: the streamview for the track will add a new regionview. we will
+ * catch the signal it sends when it creates the regionview to
+ * set the regionview we want to then drag.
+ */
latest_regionviews.clear();
sigc::connection c = clicked_routeview->view()->RegionViewAdded.connect (sigc::mem_fun(*this, &Editor::collect_new_region_view));
/* A selection grab currently creates two undo/redo operations, one for
- creating the new region and another for moving it.
- */
+ * creating the new region and another for moving it.
+ */
begin_reversible_command (Operations::selection_grab);
boost::shared_ptr<Playlist> playlist = clicked_axisview->playlist();
@@ -2602,8 +2601,8 @@ Editor::start_selection_grab (ArdourCanvas::Item* /*item*/, GdkEvent* event)
}
/* we need to deselect all other regionviews, and select this one
- i'm ignoring undo stuff, because the region creation will take care of it
- */
+ * i'm ignoring undo stuff, because the region creation will take care of it
+ */
selection->set (latest_regionviews);
diff --git a/gtk2_ardour/midi_automation_line.cc b/gtk2_ardour/midi_automation_line.cc
index 6f86efbea6..fb94de8a85 100644
--- a/gtk2_ardour/midi_automation_line.cc
+++ b/gtk2_ardour/midi_automation_line.cc
@@ -36,7 +36,7 @@ MidiAutomationLine::MidiAutomationLine (
boost::shared_ptr<ARDOUR::AutomationList> list,
boost::shared_ptr<ARDOUR::MidiRegion> region,
Evoral::Parameter parameter,
- Evoral::TimeConverter<double, ARDOUR::samplepos_t>* converter)
+ Evoral::TimeConverter<double, ARDOUR::samplepos_t>* converter)
: AutomationLine (name, tav, parent, list, parameter, converter)
, _region (region)
, _parameter (parameter)
diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc
index 5e2f055582..52ac8ff3e7 100644
--- a/gtk2_ardour/midi_streamview.cc
+++ b/gtk2_ardour/midi_streamview.cc
@@ -470,7 +470,7 @@ MidiStreamView::setup_rec_box ()
samplepos_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start()
- + _trackview.track()->get_captured_samples(rec_regions.size()-1);
+ + _trackview.track()->get_captured_samples (rec_regions.size() - 1);
}
if (!rec_regions.empty()) {
@@ -521,7 +521,7 @@ MidiStreamView::setup_rec_box ()
/* start a new rec box */
- create_rec_box(_trackview.midi_track()->current_capture_start(), 0);
+ create_rec_box (_trackview.midi_track()->current_capture_start(), 0);
} else if (rec_active &&
(_trackview.session()->record_status() != Session::Recording ||
diff --git a/gtk2_ardour/patch_change_dialog.cc b/gtk2_ardour/patch_change_dialog.cc
index 961f91b512..8f587580ac 100644
--- a/gtk2_ardour/patch_change_dialog.cc
+++ b/gtk2_ardour/patch_change_dialog.cc
@@ -42,12 +42,12 @@ using namespace Gtkmm2ext;
/** @param tc If non-0, a time converter for this patch change. If 0, time control will be desensitized */
PatchChangeDialog::PatchChangeDialog (
const ARDOUR::BeatsSamplesConverter* tc,
- ARDOUR::Session* session,
- Evoral::PatchChange<Temporal::Beats> const & patch,
- ARDOUR::InstrumentInfo& info,
- const Gtk::BuiltinStockID& ok,
- bool allow_delete,
- bool modal)
+ ARDOUR::Session* session,
+ Evoral::PatchChange<Temporal::Beats> const& patch,
+ ARDOUR::InstrumentInfo& info,
+ const Gtk::BuiltinStockID& ok,
+ bool allow_delete,
+ bool modal)
: ArdourDialog (_("Patch Change"), modal)
, _time_converter (tc)
, _info (info)
diff --git a/gtk2_ardour/patch_change_dialog.h b/gtk2_ardour/patch_change_dialog.h
index 8e322a736f..c78573fa33 100644
--- a/gtk2_ardour/patch_change_dialog.h
+++ b/gtk2_ardour/patch_change_dialog.h
@@ -41,11 +41,11 @@ class PatchChangeDialog : public ArdourDialog
{
public:
PatchChangeDialog (
- const ARDOUR::BeatsSamplesConverter *,
- ARDOUR::Session *,
- Evoral::PatchChange<Temporal::Beats> const &,
+ const ARDOUR::BeatsSamplesConverter*,
+ ARDOUR::Session*,
+ Evoral::PatchChange<Temporal::Beats> const&,
ARDOUR::InstrumentInfo&,
- const Gtk::BuiltinStockID &,
+ const Gtk::BuiltinStockID&,
bool allow_delete = false,
bool modal = true
);
@@ -71,14 +71,16 @@ private:
const ARDOUR::BeatsSamplesConverter* _time_converter;
ARDOUR::InstrumentInfo& _info;
AudioClock _time;
- Gtk::SpinButton _channel;
- Gtk::SpinButton _program;
- Gtk::SpinButton _bank_msb;
- Gtk::SpinButton _bank_lsb;
+
+ Gtk::SpinButton _channel;
+ Gtk::SpinButton _program;
+ Gtk::SpinButton _bank_msb;
+ Gtk::SpinButton _bank_lsb;
Gtk::ComboBoxText _bank_combo;
Gtk::ComboBoxText _patch_combo;
boost::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank;
+
bool _ignore_signals;
bool _keep_open;
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index 128b848aa8..a0e2fb77f6 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -854,7 +854,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
_region->trim_front (new_bound, sub_num);
if (no_overlap) {
- // Get the next region on the left of this region and shrink/expand it.
+ /* Get the next region on the left of this region and shrink/expand it. */
boost::shared_ptr<Playlist> playlist (_region->playlist());
boost::shared_ptr<Region> region_left = playlist->find_next_region (pre_trim_first_sample, End, 0);
@@ -864,7 +864,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
regions_touching = true;
}
- // Only trim region on the left if the first sample has gone beyond the left region's last sample.
+ /* Only trim region on the left if the first sample has gone beyond the left region's last sample. */
if (region_left != 0 && (region_left->last_sample() > _region->first_sample() || regions_touching)) {
region_left->trim_end (_region->first_sample() - 1);
}
@@ -872,7 +872,7 @@ RegionView::trim_front (samplepos_t new_bound, bool no_overlap, const int32_t su
region_changed (ARDOUR::bounds_change);
- return (pre_trim_first_sample != _region->first_sample()); //return true if we actually changed something
+ return (pre_trim_first_sample != _region->first_sample()); // return true if we actually changed something
}
bool
@@ -887,7 +887,7 @@ RegionView::trim_end (samplepos_t new_bound, bool no_overlap, const int32_t sub_
_region->trim_end (new_bound, sub_num);
if (no_overlap) {
- // Get the next region on the right of this region and shrink/expand it.
+ /* Get the next region on the right of this region and shrink/expand it. */
boost::shared_ptr<Playlist> playlist (_region->playlist());
boost::shared_ptr<Region> region_right = playlist->find_next_region (pre_trim_last_sample, Start, 1);
@@ -897,7 +897,7 @@ RegionView::trim_end (samplepos_t new_bound, bool no_overlap, const int32_t sub_
regions_touching = true;
}
- // Only trim region on the right if the last sample has gone beyond the right region's first sample.
+ /* Only trim region on the right if the last sample has gone beyond the right region's first sample. */
if (region_right != 0 && (region_right->first_sample() < _region->last_sample() || regions_touching)) {
region_right->trim_front (_region->last_sample() + 1, sub_num);
}
@@ -908,7 +908,7 @@ RegionView::trim_end (samplepos_t new_bound, bool no_overlap, const int32_t sub_
region_changed (PropertyChange (ARDOUR::Properties::length));
}
- return (pre_trim_last_sample != _region->last_sample()); //return true if we actually changed something
+ return (pre_trim_last_sample != _region->last_sample()); // return true if we actually changed something
}
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 90f23c323b..e6cd7b6942 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -1502,7 +1502,7 @@ RouteTimeAxisView::paste (samplepos_t pos, const Selection& selection, PasteCont
DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("paste to %1\n", pos));
/* add multi-paste offset if applicable */
- std::pair<samplepos_t, samplepos_t> extent = (*p)->get_extent();
+ std::pair<samplepos_t, samplepos_t> extent = (*p)->get_extent();
const samplecnt_t duration = extent.second - extent.first;
pos += _editor.get_paste_offset(pos, ctx.count, duration);
diff --git a/gtk2_ardour/step_editor.h b/gtk2_ardour/step_editor.h
index dca0129c9f..6eee44cd9a 100644
--- a/gtk2_ardour/step_editor.h
+++ b/gtk2_ardour/step_editor.h
@@ -75,25 +75,25 @@ public:
void move_step_edit_beat_pos (Temporal::Beats beats);
void set_step_edit_cursor_width (Temporal::Beats beats);
- std::string name() const;
+ std::string name () const;
void start_step_editing ();
void stop_step_editing ();
private:
ARDOUR::samplepos_t step_edit_insert_position;
- Temporal::Beats step_edit_beat_pos;
- boost::shared_ptr<ARDOUR::MidiRegion> step_edit_region;
- MidiRegionView* step_edit_region_view;
+ Temporal::Beats step_edit_beat_pos;
+ boost::shared_ptr<ARDOUR::MidiRegion> step_edit_region;
+ MidiRegionView* step_edit_region_view;
uint8_t _step_edit_triplet_countdown;
bool _step_edit_within_chord;
Temporal::Beats _step_edit_chord_duration;
- PBD::ScopedConnection step_edit_region_connection;
+ PBD::ScopedConnection step_edit_region_connection;
PublicEditor& _editor;
boost::shared_ptr<ARDOUR::MidiTrack> _track;
MidiTimeAxisView& _mtv;
- int8_t last_added_pitch;
- Temporal::Beats last_added_end;
+ int8_t last_added_pitch;
+ Temporal::Beats last_added_end;
sigc::connection delete_connection;
sigc::connection hide_connection;
diff --git a/gtk2_ardour/tempo_curve.h b/gtk2_ardour/tempo_curve.h
index 55ce76db3a..e64a7168b9 100644
--- a/gtk2_ardour/tempo_curve.h
+++ b/gtk2_ardour/tempo_curve.h
@@ -49,28 +49,31 @@ public:
protected:
PublicEditor& editor;
- ArdourCanvas::Container* _parent;
- ArdourCanvas::Container *group;
- ArdourCanvas::Points *points;
+ ArdourCanvas::Container* parent;
+ ArdourCanvas::Container* group;
+ ArdourCanvas::Points* points;
ArdourCanvas::FramedCurve* _curve;
double unit_position;
- samplepos_t sample_position;
- samplepos_t _end_sample;
+ samplepos_t sample_position;
+ samplepos_t _end_sample;
bool _shown;
double _canvas_height;
uint32_t _color;
void reposition ();
+
private:
- double _min_tempo;
- double _max_tempo;
/* disallow copy construction */
TempoCurve (TempoCurve const &);
+
TempoCurve & operator= (TempoCurve const &);
- ARDOUR::TempoSection& _tempo;
- ArdourCanvas::Text *_start_text;
- ArdourCanvas::Text *_end_text;
+ double _min_tempo;
+ double _max_tempo;
+
+ ARDOUR::TempoSection& _tempo;
+ ArdourCanvas::Text* _start_text;
+ ArdourCanvas::Text* _end_text;
};
#endif /* __gtk_ardour_tempo_curve_h__ */
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc
index 921c962d75..56d0f547f4 100644
--- a/gtk2_ardour/tempo_lines.cc
+++ b/gtk2_ardour/tempo_lines.cc
@@ -63,9 +63,9 @@ TempoLines::hide ()
void
TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
- unsigned divisions,
- samplecnt_t leftmost_sample,
- samplecnt_t sample_rate)
+ unsigned divisions,
+ samplecnt_t leftmost_sample,
+ samplecnt_t sample_rate)
{
const uint32_t base = UIConfiguration::instance().color_mod("measure line beat", "measure line beat");
@@ -90,9 +90,9 @@ TempoLines::draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
void
TempoLines::draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
- unsigned divisions,
- samplecnt_t leftmost_sample,
- samplecnt_t sample_rate)
+ unsigned divisions,
+ samplecnt_t leftmost_sample,
+ samplecnt_t sample_rate)
{
std::vector<ARDOUR::TempoMap::BBTPoint>::const_iterator i;
double beat_density;
diff --git a/gtk2_ardour/tempo_lines.h b/gtk2_ardour/tempo_lines.h
index 5d1d7d71fa..1eec627138 100644
--- a/gtk2_ardour/tempo_lines.h
+++ b/gtk2_ardour/tempo_lines.h
@@ -32,18 +32,18 @@ public:
void tempo_map_changed(samplepos_t new_origin);
void draw (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
- unsigned divisions,
- ARDOUR::samplecnt_t leftmost_sample,
- ARDOUR::samplecnt_t sample_rate);
+ unsigned divisions,
+ ARDOUR::samplecnt_t leftmost_sample,
+ ARDOUR::samplecnt_t sample_rate);
void show();
void hide();
private:
void draw_ticks (std::vector<ARDOUR::TempoMap::BBTPoint>& grid,
- unsigned divisions,
- ARDOUR::samplecnt_t leftmost_sample,
- ARDOUR::samplecnt_t sample_rate);
+ unsigned divisions,
+ ARDOUR::samplecnt_t leftmost_sample,
+ ARDOUR::samplecnt_t sample_rate);
ArdourCanvas::LineSet lines;
ARDOUR::BeatsSamplesConverter* _bfc;
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 390a533b50..a6055c8634 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -90,13 +90,13 @@ class PasteContext;
*/
class TimeAxisView : public virtual AxisView
{
- private:
+private:
enum NamePackingBits {
NameLabelPacked = 0x1,
NameEntryPacked = 0x2
};
- public:
+public:
TimeAxisView(ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* parent, ArdourCanvas::Canvas& canvas);
virtual ~TimeAxisView ();
@@ -183,9 +183,13 @@ class TimeAxisView : public virtual AxisView
* @param ctx Paste context.
*/
virtual bool paste (ARDOUR::samplepos_t pos,
- const Selection& selection,
- PasteContext& ctx,
- const int32_t sub_num) { return false; }
+ const Selection& selection,
+ PasteContext& ctx,
+ const int32_t sub_num)
+ {
+ return false;
+ }
+
virtual void set_selected_regionviews (RegionSelection&) {}
virtual void set_selected_points (PointSelection&);
@@ -220,7 +224,7 @@ class TimeAxisView : public virtual AxisView
static uint32_t preset_height (Height);
- protected:
+protected:
static Glib::RefPtr<Gtk::SizeGroup> controls_meters_size_group;
static Glib::RefPtr<Gtk::SizeGroup> midi_scroomer_size_group;
static unsigned int name_width_px;
@@ -305,7 +309,7 @@ class TimeAxisView : public virtual AxisView
void build_size_menu ();
- private:
+private:
Gtk::VBox* control_parent;
int _order;
uint32_t _effective_height;