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

Function for_each_view_target

src/main.cpp:109–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107// pan/zoom/rotation).
108template <typename Fn>
109void for_each_view_target(const oid::host::UiState& ui,
110 oid::host::StageManager& stages,
111 const oid::host::BufferModel& model,
112 oid::Stage& sel,
113 Fn&& fn) {
114 if (ui.link_views()) {
115 for (std::size_t i = 0; i < model.size(); ++i) {
116 if (oid::Stage* s = stages.stage_for(i); s != nullptr) {
117 fn(*s);
118 }
119 }
120 } else {
121 fn(sel);
122 }
123}
124
125// Draws the canvas pane's content: the StageView image plus its
126// drag/scroll/key input handling, sized to whatever rect the caller's

Callers 1

draw_canvas_paneFunction · 0.85

Calls 3

link_viewsMethod · 0.80
stage_forMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected