| 49 | } |
| 50 | |
| 51 | void SetWindow(CoreWindow const &window) |
| 52 | { |
| 53 | Compositor compositor; |
| 54 | ContainerVisual root = compositor.CreateContainerVisual(); |
| 55 | m_target = compositor.CreateTargetForCurrentView(); |
| 56 | m_target.Root(root); |
| 57 | m_visuals = root.Children(); |
| 58 | |
| 59 | window.PointerPressed({this, &App::OnPointerPressed}); |
| 60 | window.PointerMoved({this, &App::OnPointerMoved}); |
| 61 | |
| 62 | window.PointerReleased([&](auto &&...) { m_selected = nullptr; }); |
| 63 | } |
| 64 | |
| 65 | void OnPointerPressed(IInspectable const &, PointerEventArgs const &args) |
| 66 | { |