MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / for_each_target

Function for_each_target

src/host/ui/panels/toolbar_panel.cpp:57–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55// crashing the frame.
56template <typename Fn>
57void for_each_target(const UiState& ui,
58 StageManager& stages,
59 const BufferModel& model,
60 Fn&& fn) {
61 if (ui.link_views()) {
62 for (std::size_t i = 0; i < model.size(); ++i) {
63 if (oid::Stage* s = stages.stage_for(i); s != nullptr) {
64 fn(*s);
65 }
66 }
67 return;
68 }
69
70 if (oid::Stage* s = stages.selected_stage(ui.selected()); s != nullptr) {
71 fn(*s);
72 }
73}
74
75// Combo entries, in order, exactly matching the legacy Qt frontend's
76// PixelDisplayFormat/apply_format() (see tag legacy-qt).

Callers 1

draw_toolbarFunction · 0.85

Calls 5

link_viewsMethod · 0.80
stage_forMethod · 0.80
selected_stageMethod · 0.80
selectedMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected