Class FileChooserNative
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class FileChooserNative : NativeDialog, FileChooser, NativeObject, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
FileChooserNative
- Implements
- Inherited Members
Constructors
FileChooserNative(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public FileChooserNative(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
FileChooserNative(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected FileChooserNative(CreationData data)
Parameters
dataCreationData
FileChooserNative(FileChooserNativeHandle)
protected FileChooserNative(FileChooserNativeHandle handle)
Parameters
handleFileChooserNativeHandle
Fields
AcceptLabelPropertyDefinition
public static readonly Property<string?, FileChooserNative> AcceptLabelPropertyDefinition
Field Value
CancelLabelPropertyDefinition
public static readonly Property<string?, FileChooserNative> CancelLabelPropertyDefinition
Field Value
Properties
AcceptLabel
public string? AcceptLabel { get; set; }
Property Value
Action
public FileChooserAction Action { get; set; }
Property Value
CancelLabel
public string? CancelLabel { get; set; }
Property Value
CreateFolders
public bool CreateFolders { get; set; }
Property Value
Filter
public FileFilter? Filter { get; set; }
Property Value
Filters
public ListModel Filters { get; }
Property Value
SelectMultiple
public bool SelectMultiple { get; set; }
Property Value
ShortcutFolders
public ListModel ShortcutFolders { get; }
Property Value
Methods
AddChoice(string, string, string[]?, string[]?)
public void AddChoice(string id, string label, string[]? options, string[]? optionLabels)
Parameters
AddFilter(FileFilter)
public void AddFilter(FileFilter filter)
Parameters
filterFileFilter
AddShortcutFolder(File)
public bool AddShortcutFolder(File folder)
Parameters
folderFile
Returns
GetAcceptLabel()
public string? GetAcceptLabel()
Returns
GetAction()
public FileChooserAction GetAction()
Returns
GetCancelLabel()
public string? GetCancelLabel()
Returns
GetChoice(string)
public string? GetChoice(string id)
Parameters
idstring
Returns
GetCreateFolders()
public bool GetCreateFolders()
Returns
GetCurrentFolder()
public File? GetCurrentFolder()
Returns
GetCurrentName()
public string? GetCurrentName()
Returns
GetFile()
public File? GetFile()
Returns
GetFiles()
public ListModel GetFiles()
Returns
GetFilter()
public FileFilter? GetFilter()
Returns
GetFilters()
public ListModel GetFilters()
Returns
GetGType()
public static Type GetGType()
Returns
GetSelectMultiple()
public bool GetSelectMultiple()
Returns
GetShortcutFolders()
public ListModel GetShortcutFolders()
Returns
New(string?, Window?, FileChooserAction, string?, string?)
public static FileChooserNative New(string? title, Window? parent, FileChooserAction action, string? acceptLabel, string? cancelLabel)
Parameters
titlestringparentWindowactionFileChooserActionacceptLabelstringcancelLabelstring
Returns
NewFromPointer(nint, bool)
Creates a new managed FileChooserNative instance for a given pointer.
public static FileChooserNative NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new FileChooserNative and sets the properties specified by the construct arguments.
public static FileChooserNative NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
RemoveChoice(string)
public void RemoveChoice(string id)
Parameters
idstring
RemoveFilter(FileFilter)
public void RemoveFilter(FileFilter filter)
Parameters
filterFileFilter
RemoveShortcutFolder(File)
public bool RemoveShortcutFolder(File folder)
Parameters
folderFile
Returns
SetAcceptLabel(string?)
public void SetAcceptLabel(string? acceptLabel)
Parameters
acceptLabelstring
SetAction(FileChooserAction)
public void SetAction(FileChooserAction action)
Parameters
actionFileChooserAction
SetCancelLabel(string?)
public void SetCancelLabel(string? cancelLabel)
Parameters
cancelLabelstring
SetChoice(string, string)
public void SetChoice(string id, string option)
Parameters
SetCreateFolders(bool)
public void SetCreateFolders(bool createFolders)
Parameters
createFoldersbool
SetCurrentFolder(File?)
public bool SetCurrentFolder(File? file)
Parameters
fileFile
Returns
SetCurrentName(string)
public void SetCurrentName(string name)
Parameters
namestring
SetFile(File)
public bool SetFile(File file)
Parameters
fileFile
Returns
SetFilter(FileFilter)
public void SetFilter(FileFilter filter)
Parameters
filterFileFilter
SetSelectMultiple(bool)
public void SetSelectMultiple(bool selectMultiple)
Parameters
selectMultiplebool