Skip to main content

FileDialogState

Struct FileDialogState 

Source
pub struct FileDialogState {
    pub core: FileDialogCore,
    pub ui: FileDialogUiState,
}
Expand description

Combined state for the in-UI file dialog.

Fields§

§core: FileDialogCore

Core state machine.

§ui: FileDialogUiState

UI-only state.

Implementations§

Source§

impl FileDialogState

Source

pub fn new(mode: DialogMode) -> Self

Creates a new dialog state for a mode.

Source

pub fn open(&mut self)

Opens (or reopens) the dialog.

This mirrors IGFD’s OpenDialog step before Display.

Source

pub fn reopen(&mut self)

Reopens the dialog.

Alias of FileDialogState::open.

Source

pub fn close(&mut self)

Closes the dialog.

This mirrors IGFD’s Close call.

Source

pub fn is_open(&self) -> bool

Returns whether the dialog is currently open.

Source

pub fn scan_policy(&self) -> ScanPolicy

Returns the active scan policy.

Source

pub fn set_scan_policy(&mut self, policy: ScanPolicy)

Sets scan policy for future directory refreshes.

Source

pub fn scan_status(&self) -> &ScanStatus

Returns the latest scan status from core.

Source

pub fn request_rescan(&mut self)

Requests a rescan on the next draw tick.

Source

pub fn set_scan_hook<F>(&mut self, hook: F)
where F: FnMut(&mut FsEntry) -> ScanHookAction + 'static,

Installs a scan hook on the core listing pipeline.

The hook runs during directory scan and can mutate or drop entries.

Source

pub fn clear_scan_hook(&mut self)

Clears the scan hook and restores raw filesystem listing.

Source

pub fn apply_igfd_classic_preset(&mut self)

Applies an “IGFD classic” preset for both UI and core.

This is a convenience wrapper over FileDialogUiState::apply_igfd_classic_preset that also tunes core defaults to match typical IGFD behavior.

Trait Implementations§

Source§

impl Debug for FileDialogState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more