#include <libsigrokcxx/libsigrokcxx.hpp>
+#include "analogsignal.hpp"
#include "decodetrace.hpp"
#include "header.hpp"
#include "logicsignal.hpp"
sticky_scrolling_ = state;
}
+void View::enable_coloured_bg(bool state)
+{
+ const vector<shared_ptr<TraceTreeItem>> items(
+ list_by_type<TraceTreeItem>());
+
+ for (shared_ptr<TraceTreeItem> i : items) {
+ // Can't cast to Trace because it's abstract, so we need to
+ // check for any derived classes individually
+
+ shared_ptr<AnalogSignal> a = dynamic_pointer_cast<AnalogSignal>(i);
+ if (a)
+ a->set_coloured_bg(state);
+
+ shared_ptr<LogicSignal> l = dynamic_pointer_cast<LogicSignal>(i);
+ if (l)
+ l->set_coloured_bg(state);
+
+ shared_ptr<DecodeTrace> d = dynamic_pointer_cast<DecodeTrace>(i);
+ if (d)
+ d->set_coloured_bg(state);
+ }
+
+ viewport_->update();
+}
+
bool View::cursors_shown() const
{
return show_cursors_;
for (auto &o : sorted_owners)
o->restack_items();
+ // Re-assign background colors
+ bool next_bgcolour_state = 0;
+
+ for (auto &o : sorted_owners)
+ next_bgcolour_state = o->reassign_bgcolour_states(next_bgcolour_state);
+
// Animate the items to their destination
for (const auto &i : items)
i->animate_to_layout_v_offset();