+void View::set_current_segment(uint32_t segment_id)
+{
+ current_segment_ = segment_id;
+
+ for (shared_ptr<Signal> signal : signals_)
+ signal->set_current_segment(current_segment_);
+ for (shared_ptr<DecodeTrace> dt : decode_traces_)
+ dt->set_current_segment(current_segment_);
+
+ viewport_->update();
+}
+
+bool View::segment_is_selectable() const
+{
+ return segment_selectable_;
+}
+
+void View::set_segment_display_mode(Trace::SegmentDisplayMode mode)
+{
+ for (shared_ptr<Signal> signal : signals_)
+ signal->set_segment_display_mode(mode);
+
+ viewport_->update();
+
+ segment_selectable_ = true;
+
+ if (mode == Trace::ShowLastSegmentOnly)
+ segment_selectable_ = false;
+
+ segment_display_mode_changed(segment_selectable_);
+}
+