+void
+BasicUI::toggle_selection (PresentationInfo::order_t o, PresentationInfo::Flag flags)
+{
+ boost::shared_ptr<Stripable> s = session->get_remote_nth_stripable (o, flags);
+
+ if (s) {
+ s->presentation_info().set_selected (!s->presentation_info().selected());
+ }
+}
+
+void
+BasicUI::clear_stripable_selection ()
+{
+ session->clear_stripable_selection ();
+}
+
+void
+BasicUI::toggle_stripable_selection (boost::shared_ptr<Stripable> s)
+{
+ session->toggle_stripable_selection (s);
+}
+
+void
+BasicUI::add_stripable_selection (boost::shared_ptr<Stripable> s)
+{
+ session->add_stripable_selection (s);
+}
+
+void
+BasicUI::set_stripable_selection (boost::shared_ptr<Stripable> s)
+{
+ session->set_stripable_selection (s);
+}
+
+
+void
+BasicUI::cancel_all_solo ()
+{
+ if (session) {
+ session->cancel_all_solo ();
+ }
+}
+
+struct SortLocationsByPosition {
+ bool operator() (Location* a, Location* b) {
+ return a->start() < b->start();
+ }
+};
+
+void
+BasicUI::goto_nth_marker (int n)
+{
+ if (!session) {
+ return;
+ }
+
+ const Locations::LocationList& l (session->locations()->list());
+ Locations::LocationList ordered;
+ ordered = l;
+
+ SortLocationsByPosition cmp;
+ ordered.sort (cmp);
+
+ for (Locations::LocationList::iterator i = ordered.begin(); n >= 0 && i != ordered.end(); ++i) {
+ if ((*i)->is_mark() && !(*i)->is_hidden() && !(*i)->is_session_range()) {
+ if (n == 0) {
+ session->request_locate ((*i)->start(), session->transport_rolling());
+ break;
+ }
+ --n;
+ }
+ }
+}
+