pub fn select_path(ctx: &mut EventCtx, _data: &mut Self, _env: &Env) {
        let mp3 = FileSpec::new("MP3 file", &["mp3"]);
        let wav = FileSpec::new("WAV file", &["wav"]);
        let ogg = FileSpec::new("OGG file", &["ogg"]);
        let flac = FileSpec::new("FLAC file", &["flac"]);

        let open_dialog_options = FileDialogOptions::new()
            .allowed_types(vec![mp3, wav, ogg, flac])
            .name_label("Source")
            .title("Choose a file")
            .button_text("Playback");

        ctx.submit_command(Command::new(
            druid::commands::SHOW_OPEN_PANEL,
            open_dialog_options.clone(),
            Target::Auto,
        ))
    }
/// Select a new audio file after clicking on button
Select a new audio file after clicking on button
Select a new audio file after clicking on button
pub fn select_path(ctx: &mut EventCtx, _data: &mut Self, _env: &Env) {
        let mp3 = FileSpec::new("MP3 file", &["mp3"]);
        let wav = FileSpec::new("WAV file", &["wav"]);
        let ogg = FileSpec::new("OGG file", &["ogg"]);
        let flac = FileSpec::new("FLAC file", &["flac"]);
        let open_dialog_options = FileDialogOptions::new()
            .allowed_types(vec![mp3, wav, ogg, flac])
            .name_label("Source")
            .title("Choose a file")
            .button_text("Playback");
        ctx.submit_command(Command::new(
            druid::commands::SHOW_OPEN_PANEL,
            open_dialog_options.clone(),
            Target::Auto,
        ))
    }
pub fn select_path ( ctx : & mut EventCtx , _data : & mut Self , _env : & Env ) { let mp3 = FileSpec :: new ( " " , & [ " " ] ) ; let wav = FileSpec :: new ( " " , & [ " " ] ) ; let ogg = FileSpec :: new ( " " , & [ " " ] ) ; let flac = FileSpec :: new ( " " , & [ " " ] ) ; let open_dialog_options = FileDialogOptions :: new ( ) . allowed_types ( vec ! [ mp3 wav ogg flac ] ) . name_label ( " " ) . title ( " " ) . button_text ( " " ) ; ctx . submit_command ( Command :: new ( druid :: commands :: SHOW_OPEN_PANEL , open_dialog_options . clone ( ) , Target :: Auto , ) ) }
Select a new audio file after clicking on button
Select a new audio file after clicking on button
ctx
&mut EventCtx
_data
&mut Self
_env
&Env
ctx
&mut EventCtx
_data
&mut Self
_env
&Env