Skip to main content

FileDialogUiState

Struct FileDialogUiState 

Source
pub struct FileDialogUiState {
Show 48 fields pub visible: bool, pub header_style: HeaderStyle, pub layout: LayoutStyle, pub validation_buttons: ValidationButtonsConfig, pub toolbar: ToolbarConfig, pub places_pane_shown: bool, pub places_pane_width: f32, pub file_list_view: FileListViewMode, pub file_list_columns: FileListColumnsConfig, pub path_bar_style: PathBarStyle, pub path_input_mode: bool, pub breadcrumbs_quick_select: bool, pub breadcrumbs_max_segments: usize, pub empty_hint_enabled: bool, pub empty_hint_color: [f32; 4], pub empty_hint_static_message: Option<String>, pub path_edit: bool, pub path_edit_buffer: String, pub focus_path_edit_next: bool, pub focus_search_next: bool, pub ui_error: Option<String>, pub new_folder_enabled: bool, pub new_folder_inline_active: bool, pub new_folder_open_next: bool, pub new_folder_name: String, pub new_folder_focus_next: bool, pub new_folder_error: Option<String>, pub rename_open_next: bool, pub rename_focus_next: bool, pub rename_target_id: Option<EntryId>, pub rename_to: String, pub rename_error: Option<String>, pub delete_open_next: bool, pub delete_target_ids: Vec<EntryId>, pub delete_recursive: bool, pub delete_error: Option<String>, pub clipboard: Option<FileClipboard>, pub file_style_fonts: HashMap<String, FontId>, pub file_styles: FileStyleRegistry, pub thumbnails_enabled: bool, pub thumbnail_size: [f32; 2], pub thumbnails: ThumbnailCache, pub type_select_enabled: bool, pub type_select_timeout_ms: u64, pub custom_pane_enabled: bool, pub custom_pane_dock: CustomPaneDock, pub custom_pane_height: f32, pub custom_pane_width: f32, /* private fields */
}
Expand description

UI-only state for hosting a FileDialogCore in Dear ImGui.

This struct contains transient UI state (visibility, focus requests, text buffers) and does not affect the core selection/navigation semantics.

Fields§

§visible: bool

Whether to draw the dialog (show/hide). Prefer FileDialogState::open/FileDialogState::close.

§header_style: HeaderStyle

Header layout style.

§layout: LayoutStyle

Layout style for the dialog UI.

§validation_buttons: ValidationButtonsConfig

Validation button row configuration (Ok/Cancel).

§toolbar: ToolbarConfig

Top toolbar (“chrome”) configuration.

§places_pane_shown: bool

Whether to show the left “Places” pane in LayoutStyle::Standard.

§places_pane_width: f32

Width of the left “Places” pane in pixels (Standard layout only).

§file_list_view: FileListViewMode

File list view mode (list vs grid).

§file_list_columns: FileListColumnsConfig

List-view column visibility configuration.

§path_bar_style: PathBarStyle

Path bar style (editable text input vs breadcrumb-style composer).

§path_input_mode: bool

When true (and path_bar_style is PathBarStyle::Breadcrumbs), show the editable path text input instead of the breadcrumb composer.

This mimics IGFD’s path composer “Edit” toggle behavior.

§breadcrumbs_quick_select: bool

Enable quick parallel directory selection popups when clicking breadcrumb separators.

This mimics IGFD’s “quick path selection” feature in the path composer.

§breadcrumbs_max_segments: usize

Max breadcrumb segments to display (compress with ellipsis when exceeded).

§empty_hint_enabled: bool

Show a hint row when no entries match filters/search.

§empty_hint_color: [f32; 4]

RGBA color of the empty hint text.

§empty_hint_static_message: Option<String>

Custom static hint message when entries list is empty; if None, a default message is built.

§path_edit: bool

Whether the path input is currently being edited (best-effort; updated by UI).

This is UI-only state and should not be treated as a stable API contract.

§path_edit_buffer: String

Path input buffer (editable “address bar”).

§focus_path_edit_next: bool

Focus path edit on next frame.

§focus_search_next: bool

Focus search on next frame (Ctrl+F).

§ui_error: Option<String>

Error string to display in UI (non-fatal).

§new_folder_enabled: bool

Whether to show and allow the “New Folder” action.

§new_folder_inline_active: bool

Whether the “New Folder” inline editor is active (toolbar-local, IGFD-like).

§new_folder_open_next: bool

Open the “New Folder” modal on next frame.

§new_folder_name: String

New folder name buffer (used by the “New Folder” modal).

§new_folder_focus_next: bool

Focus the new folder input on next frame.

§new_folder_error: Option<String>

Error string shown inside the “New Folder” modal.

§rename_open_next: bool

Open the “Rename” modal on next frame.

§rename_focus_next: bool

Focus the rename input on next frame.

§rename_target_id: Option<EntryId>

Rename target entry id.

§rename_to: String

Rename “to” buffer.

§rename_error: Option<String>

Error string shown inside the rename modal.

§delete_open_next: bool

Open the “Delete” confirmation modal on next frame.

§delete_target_ids: Vec<EntryId>

Pending delete target ids.

§delete_recursive: bool

Whether directory deletion should be recursive (remove_dir_all) instead of requiring empty directories.

§delete_error: Option<String>

Error string shown inside the delete modal.

§clipboard: Option<FileClipboard>

Clipboard state for copy/cut/paste operations.

§file_style_fonts: HashMap<String, FontId>

Optional font mapping used by file style font_token.

§file_styles: FileStyleRegistry

Style registry used to decorate the file list (icons/colors/tooltips).

§thumbnails_enabled: bool

Enable thumbnails in the file list (adds a Preview column).

§thumbnail_size: [f32; 2]

Thumbnail preview size in pixels.

§thumbnails: ThumbnailCache

Thumbnail cache (requests + LRU).

§type_select_enabled: bool

Enable “type-to-select” behavior in the file list (IGFD-style).

§type_select_timeout_ms: u64

Timeout (milliseconds) after which the type-to-select buffer resets.

§custom_pane_enabled: bool

Whether to render a custom pane region (when a pane is provided by the caller).

§custom_pane_dock: CustomPaneDock

Dock position for the custom pane.

§custom_pane_height: f32

Height of the custom pane region (in pixels).

§custom_pane_width: f32

Width of the custom pane region when right-docked (in pixels).

Implementations§

Source§

impl FileDialogUiState

Source

pub fn apply_igfd_classic_preset(&mut self)

Applies an “IGFD classic” UI preset (opt-in).

This tunes UI defaults to feel closer to ImGuiFileDialog (IGFD) while staying Rust-first:

  • standard layout with places pane,
  • IGFD-like single-row header layout,
  • list view as the default,
  • right-docked custom pane (when provided) with a splitter-resizable width,
  • dialog-style button row aligned to the right.

Trait Implementations§

Source§

impl Debug for FileDialogUiState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for FileDialogUiState

Source§

fn default() -> Self

Returns the “default value” for a type. 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