MCPcopy Create free account
hub / github.com/bajrangCoder/setu / on_progress_mouse_down

Method on_progress_mouse_down

src/components/audio_player.rs:382–390  ·  view source on GitHub ↗
(
        &mut self,
        event: &MouseDownEvent,
        window: &mut Window,
        cx: &mut Context<Self>,
    )

Source from the content-addressed store, hash-verified

380 event: &MouseDownEvent,
381 window: &mut Window,
382 cx: &mut Context<Self>,
383 ) {
384 window.focus(&self.focus_handle, cx);
385 self.seek_to_pointer(event.position, cx);
386 }
387
388 fn on_key_down(&mut self, event: &KeyDownEvent, _window: &mut Window, cx: &mut Context<Self>) {
389 match event.keystroke.key.as_str() {
390 "space" => self.toggle_playback(cx),
391 "left" => self.seek_by(-SEEK_STEP_SECS, cx),
392 "right" => self.seek_by(SEEK_STEP_SECS, cx),
393 "home" => self.seek_to(Duration::ZERO, cx),

Callers

nothing calls this directly

Calls 1

seek_to_pointerMethod · 0.80

Tested by

no test coverage detected