+ scale_offset_changed();
+}
+
+vector< shared_ptr<Trace> > View::get_traces() const
+{
+ const vector< shared_ptr<Signal> > sigs(
+ session().get_signals());
+ const vector< shared_ptr<DecodeSignal> > decode_sigs(
+ session().get_decode_signals());
+ vector< shared_ptr<Trace> > traces(
+ sigs.size() + decode_sigs.size());
+
+ vector< shared_ptr<Trace> >::iterator i = traces.begin();
+ i = copy(sigs.begin(), sigs.end(), i);
+ i = copy(decode_sigs.begin(), decode_sigs.end(), i);
+
+ sort(traces.begin(), traces.end(), compare_trace_v_offsets);
+ return traces;
+}
+
+list<weak_ptr<SelectableItem> > View::selected_items() const
+{
+ list<weak_ptr<SelectableItem> > items;
+
+ // List the selected signals
+ const vector< shared_ptr<Trace> > traces(get_traces());
+ BOOST_FOREACH (shared_ptr<Trace> t, traces) {
+ assert(t);
+ if (t->selected())
+ items.push_back(t);
+ }
+
+ // List the selected cursors
+ if (_cursors.first()->selected())
+ items.push_back(_cursors.first());
+ if (_cursors.second()->selected())
+ items.push_back(_cursors.second());
+
+ return items;