Skip to main content

Crate dear_file_browser

Crate dear_file_browser 

Source
Expand description

File dialogs and in-UI file browser for dear-imgui-rs.

Note on UTF-8/CJK: Dear ImGui’s default font does not include CJK glyphs. If you need Chinese/Japanese/Korean or emoji, load a font that contains those glyphs (e.g., Noto Sans SC) into the font atlas during initialization. For best quality, enable the freetype feature and follow the pattern in examples/style_and_fonts.rs to add fonts and ranges (e.g., Simplified Chinese common glyphs).

Two backends:

  • Native (via rfd) for OS dialogs (desktop) and Web File Picker (wasm)
  • ImGui (pure-UI) browser that works everywhere and is fully themeable

Structs§

ConfirmGate
Per-frame gate for whether the dialog is allowed to confirm.
CustomPaneCtx
Context passed to a CustomPane while rendering.
DecodedRgbaImage
Decoded thumbnail image in RGBA8 format.
DialogId
Opaque identifier for an in-UI file browser dialog instance.
DialogManager
Manager for multiple in-UI file browser dialogs (IGFD-style open/display separation).
DirSnapshot
Snapshot of one directory listing refresh.
EntryId
Stable identifier for a directory entry within dialog snapshots.
FileClipboard
In-dialog clipboard for file operations (copy/cut/paste).
FileDialog
Builder for launching file dialogs
FileDialogCore
Core state machine for the ImGui-embedded file dialog.
FileDialogState
Combined state for the in-UI file dialog.
FileDialogUiState
UI-only state for hosting a FileDialogCore in Dear ImGui.
FileFilter
File filter (e.g., “Images” -> [“png”, “jpg”]).
FileListColumnWeightOverrides
Optional per-column width overrides for list view.
FileListColumnsConfig
Column visibility configuration for list view.
FileListColumnsDeserializeError
Error returned by FileListColumnsConfig::deserialize_compact.
FileMeta
Rich metadata attached to a filesystem entry.
FileStyle
A style applied to an entry in the file list.
FileStyleCallback
Callback handle for dynamic style resolution.
FileStyleRegistry
Registry of file styles applied in the in-UI file browser.
FsEntry
Directory entry returned by FileSystem::read_dir.
FsMetadata
Minimal file metadata used by the in-UI file browser.
ModalHostConfig
Configuration for hosting the file browser in an ImGui modal popup.
Modifiers
Keyboard/mouse modifier keys used by selection/navigation logic.
Place
A single place entry shown in the left “Places” pane.
PlaceGroup
A group of places (e.g. “System”, “Bookmarks”).
Places
Storage for user-defined and code-defined places.
PlacesDeserializeError
Error returned by Places::deserialize_compact.
PlacesMergeOptions
Options for merging places.
PlacesSerializeOptions
Options for serializing places.
SavePolicy
SaveFile mode policy knobs.
ScanBatch
One batch emitted by the scan pipeline.
ScanRequest
Immutable scan request descriptor.
Selection
Selection result containing one or more paths
StdFileSystem
Default filesystem implementation using std::fs.
StyleRule
A single style rule (matcher + style).
ThumbnailBackend
Convenience wrapper passed to ThumbnailCache::maintain.
ThumbnailCache
An in-memory thumbnail request queue + LRU cache.
ThumbnailCacheConfig
Configuration for ThumbnailCache.
ThumbnailRequest
A thumbnail request produced by ThumbnailCache.
ToolbarConfig
Configuration for the dialog top toolbar (“chrome”).
ToolbarIcons
Optional toolbar icons (host-provided glyphs, typically from an icon font).
ValidationButtonsConfig
Configuration for the validation button row (Ok/Cancel).
WindowHostConfig
Configuration for hosting the file browser in an ImGui window.

Enums§

Backend
Backend preference
ClickAction
Click behavior for directory rows
ClipboardOp
Clipboard operation kind used by the in-UI file browser.
CoreEvent
Input event for driving the dialog core without direct UI coupling.
CoreEventOutcome
Side effect emitted after applying a CoreEvent.
CustomPaneDock
Dock position for the custom pane.
DialogMode
Dialog mode
EntryKind
Kind of filesystem entry for styling.
ExtensionPolicy
Extension handling policy for SaveFile mode.
FileDialogError
Errors returned by file dialogs and in-UI browser
FileListDataColumn
Data column identifier for list view (excluding optional preview thumbnail column).
FileListViewMode
View mode for the file list region.
HeaderStyle
Header layout style.
LayoutStyle
Layout style for the in-UI file browser
PathBarStyle
Path bar style (text input vs breadcrumb composer).
PlaceOrigin
Place entry origin.
ScanBatchKind
Payload kind for ScanBatch.
ScanHookAction
Decision returned by a scan hook for one filesystem entry.
ScanPolicy
Directory scan strategy.
ScanStatus
Current scan status for the dialog core.
SortBy
Sort keys for file list
SortMode
String comparison mode used for sorting.
StyleMatcher
Matcher for a style rule.
ToolbarDensity
Density preset for the dialog top toolbar (“chrome”).
ToolbarIconMode
How to render toolbar buttons when optional icons are provided.
ValidationButtonsAlign
Alignment of the validation button row (Ok/Cancel).
ValidationButtonsOrder
Button ordering for the validation row (Ok/Cancel).

Traits§

CustomPane
IGFD-style custom pane that can draw extra UI and optionally block confirmation.
FileDialogExt
Extend Ui with a file browser entry point
FileSystem
File system abstraction (IGFD IFileSystem-like).
ThumbnailProvider
Thumbnail decoder/provider.
ThumbnailRenderer
Thumbnail renderer interface (upload/destroy).