pub struct IFileDialogEvents(/* private fields */);
Available on crate feature
shell
only.Expand description
IFileDialogEvents
COM interface.
Automatically calls
IUnknown::Release
when the object goes out of scope.
§Examples
use winsafe::{self as w, prelude::*, co};
let hparent: w::HWND; // initialized somewhere
let file_open = w::CoCreateInstance::<w::IFileOpenDialog>(
&co::CLSID::FileOpenDialog,
None,
co::CLSCTX::INPROC_SERVER,
)?;
let file_dialog_events = w::IFileDialogEvents::new_impl();
file_dialog_events.OnFolderChanging(
move |fd: &w::IFileDialog, si: &w::IShellItem| -> w::AnyResult<()> {
println!("New folder: {}",
si.GetDisplayName(co::SIGDN::FILESYSPATH)?);
Ok(())
},
);
file_open.Advise(&file_dialog_events)?;
Implementations§
Source§impl IFileDialogEvents
impl IFileDialogEvents
Sourcepub fn OnFileOk<F>(&self, func: F) -> &Self
pub fn OnFileOk<F>(&self, func: F) -> &Self
IFileDialogEvents::OnFileOk
method.
Sourcepub fn OnFolderChange<F>(&self, func: F) -> &Self
pub fn OnFolderChange<F>(&self, func: F) -> &Self
Sourcepub fn OnFolderChanging<F>(&self, func: F) -> &Self
pub fn OnFolderChanging<F>(&self, func: F) -> &Self
Sourcepub fn OnOverwrite<F>(&self, func: F) -> &Self
pub fn OnOverwrite<F>(&self, func: F) -> &Self
IFileDialogEvents::OnOverwrite
method.
Sourcepub fn OnSelectionChange<F>(&self, func: F) -> &Self
pub fn OnSelectionChange<F>(&self, func: F) -> &Self
Sourcepub fn OnTypeChange<F>(&self, func: F) -> &Self
pub fn OnTypeChange<F>(&self, func: F) -> &Self
IFileDialogEvents::OnTypeChange
method.
Trait Implementations§
Source§impl Clone for IFileDialogEvents
impl Clone for IFileDialogEvents
Source§impl Drop for IFileDialogEvents
impl Drop for IFileDialogEvents
Source§impl ole_IUnknown for IFileDialogEvents
impl ole_IUnknown for IFileDialogEvents
Source§unsafe fn from_ptr(_p: *mut c_void) -> Self
unsafe fn from_ptr(_p: *mut c_void) -> Self
Available on crate feature
ole
only.Creates an object from a COM virtual table pointer. Read more
Source§unsafe fn as_mut(&mut self) -> &mut *mut c_void
unsafe fn as_mut(&mut self) -> &mut *mut c_void
Available on crate feature
ole
only.Returns a mutable reference do the underlying COM virtual table pointer. Read more
Source§fn ptr(&self) -> *mut c_void
fn ptr(&self) -> *mut c_void
Available on crate feature
ole
only.Returns the pointer to the underlying COM virtual table. Read more
Source§unsafe fn null() -> Self
unsafe fn null() -> Self
Available on crate feature
ole
only.Creates an object from a null COM virtual table pointer. Read more
Source§fn QueryInterface<T>(&self) -> HrResult<T>where
T: ole_IUnknown,
fn QueryInterface<T>(&self) -> HrResult<T>where
T: ole_IUnknown,
Available on crate feature
ole
only.IUnknown::QueryInterface
method.impl Send for IFileDialogEvents
Auto Trait Implementations§
impl Freeze for IFileDialogEvents
impl !RefUnwindSafe for IFileDialogEvents
impl !Sync for IFileDialogEvents
impl Unpin for IFileDialogEvents
impl !UnwindSafe for IFileDialogEvents
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more