summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-03-05 19:39:16 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-03-05 19:39:16 +0000
commit5a39bf595c737dbb36666a9e718ac267e9131380 (patch)
tree12219a08eec7305a135eafff4210a037ff5f8804 /gtk2_ardour/editor_ops.cc
parentcaeb564748e7ece1025f55f005fe5591795ec234 (diff)
export range markers patch (revisited), change selection model, copy-drag tempo+meter marker patch
git-svn-id: svn://localhost/trunk/ardour2@349 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc36
1 files changed, 27 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 7a7101d831..747b4d47ec 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1200,7 +1200,7 @@ Editor::temporal_zoom_to_frame (bool coarser, jack_nframes_t frame)
}
void
-Editor::select_all_in_track (bool add)
+Editor::select_all_in_track (Selection::Operation op)
{
list<Selectable *> touched;
@@ -1210,15 +1210,21 @@ Editor::select_all_in_track (bool add)
clicked_trackview->get_selectables (0, max_frames, 0, DBL_MAX, touched);
- if (add) {
+ switch (op) {
+ case Selection::Toggle:
selection->add (touched);
- } else {
+ break;
+ case Selection::Set:
selection->set (touched);
+ break;
+ case Selection::Extend:
+ /* not defined yet */
+ break;
}
}
void
-Editor::select_all (bool add)
+Editor::select_all (Selection::Operation op)
{
list<Selectable *> touched;
@@ -1229,10 +1235,16 @@ Editor::select_all (bool add)
(*iter)->get_selectables (0, max_frames, 0, DBL_MAX, touched);
}
begin_reversible_command (_("select all"));
- if (add) {
+ switch (op) {
+ case Selection::Toggle:
selection->add (touched);
- } else {
+ break;
+ case Selection::Set:
selection->set (touched);
+ break;
+ case Selection::Extend:
+ /* not defined yet */
+ break;
}
commit_reversible_command ();
}
@@ -1266,7 +1278,7 @@ Editor::invert_selection ()
}
bool
-Editor::select_all_within (jack_nframes_t start, jack_nframes_t end, double top, double bot, bool add)
+Editor::select_all_within (jack_nframes_t start, jack_nframes_t end, double top, double bot, Selection::Operation op)
{
list<Selectable *> touched;
@@ -1277,10 +1289,16 @@ Editor::select_all_within (jack_nframes_t start, jack_nframes_t end, double top,
(*iter)->get_selectables (start, end, top, bot, touched);
}
begin_reversible_command (_("select all within"));
- if (add) {
+ switch (op) {
+ case Selection::Toggle:
selection->add (touched);
- } else {
+ break;
+ case Selection::Set:
selection->set (touched);
+ break;
+ case Selection::Extend:
+ /* not defined yet */
+ break;
}
commit_reversible_command ();
return !touched.empty();