Class FileDialog
- Namespace
- Forma
- Assembly
- Forma.dll
Filesystem-selection dialog with navigation, filtering, sorting and list presentation.
public sealed class FileDialog : ConfirmationDialog, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
- Inheritance
-
FileDialog
- Implements
- Inherited Members
Constructors
FileDialog()
public FileDialog()
Properties
Access
public FileDialogAccess Access { get; set; }
Property Value
CanCreateFolders
public bool CanCreateFolders { get; set; }
Property Value
CanGoBack
Whether GoBack() has an earlier directory to return to, matching Godot's dir_prev enablement.
public bool CanGoBack { get; }
Property Value
CanGoForward
Whether GoForward() has a later directory to redo, matching Godot's dir_next enablement.
public bool CanGoForward { get; }
Property Value
CancelButtonBounds
protected override Rectangle CancelButtonBounds { get; }
Property Value
- Rectangle
CurrentFile
public string CurrentFile { get; }
Property Value
CurrentPath
public string CurrentPath { get; }
Property Value
DisplayMode
public FileDialogDisplayMode DisplayMode { get; set; }
Property Value
EffectiveCanCreateFolders
Matches Godot's _update_make_dir_visible: folder creation is force-disabled while merely picking a file/files to open, regardless of the CanCreateFolders customization flag.
public bool EffectiveCanCreateFolders { get; }
Property Value
Entries
public IReadOnlyList<string> Entries { get; }
Property Value
EntryHeight
public float EntryHeight { get; set; }
Property Value
FileMode
public FileDialogMode FileMode { get; set; }
Property Value
FileSystem
public IFileDialogFileSystem FileSystem { get; set; }
Property Value
FilenameFilter
public string FilenameFilter { get; set; }
Property Value
FilterIndex
public int FilterIndex { get; set; }
Property Value
Filters
public IReadOnlyList<string> Filters { get; }
Property Value
GetIconCallback
public static Func<string, ThemeIcon?> GetIconCallback { get; set; }
Property Value
GetThumbnailCallback
public static Func<string, int, ThemeIcon?> GetThumbnailCallback { get; set; }
Property Value
IsFileSystemAvailable
public bool IsFileSystemAvailable { get; }
Property Value
IsOverwriteConfirmationVisible
public bool IsOverwriteConfirmationVisible { get; }
Property Value
Message
Non-empty when the last Refresh hit a permission error, matching Godot's own "You don't have permission..." message label shown in place of the file list.
public string Message { get; }
Property Value
ModeOverridesTitle
public bool ModeOverridesTitle { get; set; }
Property Value
NativeDialogHandler
public static Func<FileDialog, bool> NativeDialogHandler { get; set; }
Property Value
OkButtonBounds
protected override Rectangle OkButtonBounds { get; }
Property Value
- Rectangle
Options
public IReadOnlyList<FileDialogOption> Options { get; }
Property Value
OverwriteConfirmationDialog
public ConfirmationDialog OverwriteConfirmationDialog { get; }
Property Value
OverwriteWarningEnabled
public bool OverwriteWarningEnabled { get; set; }
Property Value
PendingOverwritePath
public string PendingOverwritePath { get; }
Property Value
RootSubfolder
public string RootSubfolder { get; set; }
Property Value
SelectedFiles
public IReadOnlyList<string> SelectedFiles { get; }
Property Value
ShowFilenameFilter
public bool ShowFilenameFilter { get; set; }
Property Value
ShowHiddenFiles
public bool ShowHiddenFiles { get; set; }
Property Value
SortOption
public FileDialogSortOption SortOption { get; set; }
Property Value
UseNativeDialog
public bool UseNativeDialog { get; set; }
Property Value
Methods
ActivateEntry(int)
public void ActivateEntry(int index)
Parameters
indexint
AddFilter(string)
public void AddFilter(string filter)
Parameters
filterstring
AddOption(string, IEnumerable<string>, int)
public void AddOption(string name, IEnumerable<string> values, int defaultValueIndex = 0)
Parameters
namestringvaluesIEnumerable<string>defaultValueIndexint
ArrangeChildren()
protected override void ArrangeChildren()
CancelPendingOverwrite()
public void CancelPendingOverwrite()
ClearFilenameFilter()
public void ClearFilenameFilter()
ClearFilters()
public void ClearFilters()
ClearSelection()
public void ClearSelection()
Confirm()
public override void Confirm()
ConfirmPendingOverwrite()
public void ConfirmPendingOverwrite()
CreateFolder(string)
public string CreateFolder(string name)
Parameters
namestring
Returns
DeselectAll()
public void DeselectAll()
GetCurrentDir()
public string GetCurrentDir()
Returns
GetCurrentFile()
public string GetCurrentFile()
Returns
GetCurrentPath()
public string GetCurrentPath()
Returns
GetDefaultDisplayMode()
public static FileDialogDisplayMode GetDefaultDisplayMode()
Returns
GetDefaultShowHiddenFiles()
public static bool GetDefaultShowHiddenFiles()
Returns
GetFavoriteList()
public static IReadOnlyList<string> GetFavoriteList()
Returns
GetFileMode()
public FileDialogMode GetFileMode()
Returns
GetFilterIndex()
public int GetFilterIndex()
Returns
GetMinimumSize()
public override Vector2 GetMinimumSize()
Returns
- Vector2
GetOptionCount()
public int GetOptionCount()
Returns
GetOptionDefault(int)
public int GetOptionDefault(int option)
Parameters
optionint
Returns
GetOptionName(int)
public string GetOptionName(int option)
Parameters
optionint
Returns
GetOptionValues(int)
public IReadOnlyList<string> GetOptionValues(int option)
Parameters
optionint
Returns
GetRecentList()
public static IReadOnlyList<string> GetRecentList()
Returns
GetRootSubfolder()
public string GetRootSubfolder()
Returns
GetSelectedFiles()
public IReadOnlyList<string> GetSelectedFiles()
Returns
GetSelectedOptions()
public IReadOnlyDictionary<string, object> GetSelectedOptions()
Returns
GoBack()
Navigates to the previously-visited directory without disturbing forward history, matching Godot's _go_back (which calls _change_dir directly, bypassing _push_history).
public void GoBack()
GoForward()
Redoes a GoBack(), matching Godot's _go_forward.
public void GoForward()
GoUp()
public void GoUp()
Invalidate()
public void Invalidate()
IsCustomizationFlagEnabled(FileDialogCustomization)
public bool IsCustomizationFlagEnabled(FileDialogCustomization flag)
Parameters
Returns
IsModeOverridingTitle()
public bool IsModeOverridingTitle()
Returns
NavigateTo(string)
public void NavigateTo(string path)
Parameters
pathstring
PopupFileDialog()
public bool PopupFileDialog()
Returns
Refresh(string)
public void Refresh(string path)
Parameters
pathstring
SelectEntry(int, bool)
public void SelectEntry(int index, bool append = false)
Parameters
SelectFile(string, bool)
public void SelectFile(string path, bool append = false)
Parameters
SetCurrentDir(string)
public void SetCurrentDir(string path)
Parameters
pathstring
SetCurrentFile(string)
public void SetCurrentFile(string path)
Parameters
pathstring
SetCurrentPath(string)
public void SetCurrentPath(string path)
Parameters
pathstring
SetCustomizationFlagEnabled(FileDialogCustomization, bool)
public void SetCustomizationFlagEnabled(FileDialogCustomization flag, bool enabled)
Parameters
flagFileDialogCustomizationenabledbool
SetDefaultDisplayMode(FileDialogDisplayMode)
public static void SetDefaultDisplayMode(FileDialogDisplayMode mode)
Parameters
SetDefaultShowHiddenFiles(bool)
public static void SetDefaultShowHiddenFiles(bool show)
Parameters
showbool
SetFavoriteList(IEnumerable<string>)
public static void SetFavoriteList(IEnumerable<string> favorites)
Parameters
favoritesIEnumerable<string>
SetFileMode(FileDialogMode)
public void SetFileMode(FileDialogMode mode)
Parameters
modeFileDialogMode
SetFilterIndex(int)
public void SetFilterIndex(int index)
Parameters
indexint
SetFilters(IEnumerable<string>)
public void SetFilters(IEnumerable<string> filters)
Parameters
filtersIEnumerable<string>
SetModeOverridesTitle(bool)
public void SetModeOverridesTitle(bool enabled)
Parameters
enabledbool
SetOptionCount(int)
public void SetOptionCount(int count)
Parameters
countint
SetOptionDefault(int, int)
public void SetOptionDefault(int option, int defaultValueIndex)
Parameters
SetOptionName(int, string)
public void SetOptionName(int option, string name)
Parameters
SetOptionValues(int, IEnumerable<string>)
public void SetOptionValues(int option, IEnumerable<string> values)
Parameters
optionintvaluesIEnumerable<string>
SetRecentList(IEnumerable<string>)
public static void SetRecentList(IEnumerable<string> recents)
Parameters
recentsIEnumerable<string>
SetRootSubfolder(string)
public void SetRootSubfolder(string path)
Parameters
pathstring
ToggleCurrentDirectoryFavorite()
public void ToggleCurrentDirectoryFavorite()
Events
DirectorySelected
public event Action<FileDialog, string> DirectorySelected
Event Type
FileSelected
public event Action<FileDialog, string> FileSelected
Event Type
FilenameFilterChanged
public event Action<FileDialog, string> FilenameFilterChanged
Event Type
FilesSelected
public event Action<FileDialog, IReadOnlyList<string>> FilesSelected
Event Type
FolderCreated
public event Action<FileDialog, string> FolderCreated