(self, context)
| 107 | """ |
| 108 | |
| 109 | def __init__(self, context): |
| 110 | super().__init__() |
| 111 | self.on_move = util.QuietSet() |
| 112 | self.on_click = util.QuietSet() |
| 113 | self.on_double_click = util.QuietSet() |
| 114 | self.on_scroll = util.QuietSet() |
| 115 | self._double_click_detector = base.DoubleClickDetector() |
| 116 | with context.make_current() as ctx: |
| 117 | framebuffer_width, window_width = ctx.call( |
| 118 | self._glfw_setup, context.window) |
| 119 | |
| 120 | self._scale = framebuffer_width * 1.0 / window_width |
| 121 | self._last_mouse_pos = np.zeros(2, int) |
| 122 | |
| 123 | self._double_clicks = {} |
| 124 | |
| 125 | def _glfw_setup(self, window): |
| 126 | glfw.set_cursor_pos_callback(window, self._handle_move) |
no test coverage detected