| 107 | // pan/zoom/rotation). |
| 108 | template <typename Fn> |
| 109 | void 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 |
no test coverage detected