Trait winsafe::prelude::shell_IFileDialog

source ·
pub trait shell_IFileDialog: shell_IModalWindow {
Show 22 methods // Provided methods fn AddPlace(&self, si: &impl shell_IShellItem, fdap: FDAP) -> HrResult<()> { ... } fn Advise(&self, fde: &IFileDialogEvents) -> HrResult<u32> { ... } fn ClearClientData(&self) -> HrResult<()> { ... } fn Close(&self, hr: ERROR) -> HrResult<()> { ... } fn GetCurrentSelection(&self) -> HrResult<IShellItem> { ... } fn GetFileName(&self) -> HrResult<String> { ... } fn GetFileTypeIndex(&self) -> HrResult<u32> { ... } fn GetFolder(&self) -> HrResult<IShellItem> { ... } fn GetOptions(&self) -> HrResult<FOS> { ... } fn GetResult(&self) -> HrResult<IShellItem> { ... } fn SetClientGuid(&self, guid: &GUID) -> HrResult<()> { ... } fn SetDefaultExtension(&self, default_extension: &str) -> HrResult<()> { ... } fn SetDefaultFolder(&self, si: &impl shell_IShellItem) -> HrResult<()> { ... } fn SetFileName(&self, name: &str) -> HrResult<()> { ... } fn SetFileNameLabel(&self, label: &str) -> HrResult<()> { ... } fn SetFileTypeIndex(&self, index: u32) -> HrResult<()> { ... } fn SetFileTypes<S: AsRef<str>>( &self, filter_spec: &[(S, S)] ) -> HrResult<()> { ... } fn SetFolder(&self, si: &impl shell_IShellItem) -> HrResult<()> { ... } fn SetOkButtonLabel(&self, text: &str) -> HrResult<()> { ... } fn SetOptions(&self, opts: FOS) -> HrResult<()> { ... } fn SetTitle(&self, text: &str) -> HrResult<()> { ... } fn Unadvise(&self, cookie: u32) -> HrResult<()> { ... }
}
Available on crate features kernel and shell only.
Expand description

This trait is enabled with the shell feature, and provides methods for IFileDialog.

Prefer importing this trait through the prelude:

use winsafe::prelude::*;

Provided Methods§

source

fn AddPlace(&self, si: &impl shell_IShellItem, fdap: FDAP) -> HrResult<()>

source

fn Advise(&self, fde: &IFileDialogEvents) -> HrResult<u32>

source

fn ClearClientData(&self) -> HrResult<()>

source

fn Close(&self, hr: ERROR) -> HrResult<()>

source

fn GetCurrentSelection(&self) -> HrResult<IShellItem>

source

fn GetFileName(&self) -> HrResult<String>

source

fn GetFileTypeIndex(&self) -> HrResult<u32>

source

fn GetFolder(&self) -> HrResult<IShellItem>

source

fn GetOptions(&self) -> HrResult<FOS>

source

fn GetResult(&self) -> HrResult<IShellItem>

IFileDialog::GetResult method.

If you chose a single file, this is the method to retrieve its path.

source

fn SetClientGuid(&self, guid: &GUID) -> HrResult<()>

source

fn SetDefaultExtension(&self, default_extension: &str) -> HrResult<()>

source

fn SetDefaultFolder(&self, si: &impl shell_IShellItem) -> HrResult<()>

source

fn SetFileName(&self, name: &str) -> HrResult<()>

source

fn SetFileNameLabel(&self, label: &str) -> HrResult<()>

source

fn SetFileTypeIndex(&self, index: u32) -> HrResult<()>

IFileDialog::SetFileTypeIndex method.

Note: The index is one-based.

source

fn SetFileTypes<S: AsRef<str>>(&self, filter_spec: &[(S, S)]) -> HrResult<()>

IFileDialog::SetFileTypes method.

§Examples
use winsafe::{self as w, prelude::*};

let file_dlg: w::IFileDialog; // initialized somewhere

file_dlg.SetFileTypes(&[
    ("Documents", "*.docx;*.txt"),
    ("Images", "*.jpg;*.png;*.bmp"),
    ("All files", "*.*"),
])?;
source

fn SetFolder(&self, si: &impl shell_IShellItem) -> HrResult<()>

source

fn SetOkButtonLabel(&self, text: &str) -> HrResult<()>

source

fn SetOptions(&self, opts: FOS) -> HrResult<()>

source

fn SetTitle(&self, text: &str) -> HrResult<()>

source

fn Unadvise(&self, cookie: u32) -> HrResult<()>

Object Safety§

This trait is not object safe.

Implementors§