| 728 | } |
| 729 | |
| 730 | SelectedPositionInfo RenderWindowBridge::GetMxNSelectedPosition(const std::string& windowId) const |
| 731 | { |
| 732 | MxNSelectedPositionGetter getter; |
| 733 | StorageThreadDispatcherBase::Pointer dispatcher; |
| 734 | { |
| 735 | std::lock_guard<std::mutex> lock(m_Mutex); |
| 736 | getter = m_MxNSelectedPositionGetter; |
| 737 | dispatcher = m_Dispatcher.Lock(); |
| 738 | } |
| 739 | |
| 740 | if (!getter) |
| 741 | throw std::runtime_error("No MxN selected-position getter is connected to the RenderWindowBridge"); |
| 742 | |
| 743 | SelectedPositionInfo result; |
| 744 | result.position.Fill(0.0); |
| 745 | Dispatch(dispatcher, [&]() { result = getter(windowId); }); |
| 746 | return result; |
| 747 | } |
| 748 | |
| 749 | void RenderWindowBridge::SetMxNSelectedPosition(const std::string& windowId, const Point3D& position) const |
| 750 | { |