-vector< shared_ptr<RowItem> > View::child_items() const
-{
- vector< shared_ptr<RowItem> > row_items;
-
- const vector< shared_ptr<Signal> > sigs(
- session().get_signals());
- copy(sigs.begin(), sigs.end(), back_inserter(row_items));
-
-#ifdef ENABLE_DECODE
- const vector< shared_ptr<DecodeTrace> > decode_sigs(
- session().get_decode_signals());
- copy(decode_sigs.begin(), decode_sigs.end(), back_inserter(row_items));
-#endif
-
- stable_sort(row_items.begin(), row_items.end(),
- [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
- return a->v_offset() < b->v_offset(); });
-
- return row_items;
-}
-
-list<weak_ptr<SelectableItem> > View::selected_items() const
-{
- list<weak_ptr<SelectableItem> > items;
-
- // List the selected signals
- const vector< shared_ptr<RowItem> > row_items(child_items());
- for (shared_ptr<RowItem> r : row_items) {
- assert(r);
- if (r->selected())
- items.push_back(r);
- }
-
- // List the selected cursors
- if (_cursors.first()->selected())
- items.push_back(_cursors.first());
- if (_cursors.second()->selected())
- items.push_back(_cursors.second());
-
- return items;
-}
-