Documentation
¶
Overview ¶
Package EditorFileDialog provides methods for working with EditorFileDialog object instances.
Index ¶
- type Access
- type Advanced
- type Any
- type DisplayMode
- type FileMode
- type Instance
- func (self Instance) Access() gdclass.EditorFileDialogAccess
- func (self Instance) AddFilter(filter string)
- func (self Instance) AddOption(name string, values []string, default_value_index int)
- func (self Instance) AddSideMenu(menu [1]gdclass.Control)
- func (self Instance) AsAcceptDialog() AcceptDialog.Instance
- func (self Instance) AsConfirmationDialog() ConfirmationDialog.Instance
- func (self Instance) AsEditorFileDialog() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsViewport() Viewport.Instance
- func (self Instance) AsWindow() Window.Instance
- func (self Instance) ClearFilters()
- func (self Instance) CurrentDir() string
- func (self Instance) CurrentFile() string
- func (self Instance) CurrentPath() string
- func (self Instance) DisableOverwriteWarning() bool
- func (self Instance) DisplayMode() gdclass.EditorFileDialogDisplayMode
- func (self Instance) FileMode() gdclass.EditorFileDialogFileMode
- func (self Instance) Filters() []string
- func (self Instance) GetLineEdit() [1]gdclass.LineEdit
- func (self Instance) GetOptionDefault(option int) int
- func (self Instance) GetOptionName(option int) string
- func (self Instance) GetOptionValues(option int) []string
- func (self Instance) GetSelectedOptions() map[string]int
- func (self Instance) GetVbox() [1]gdclass.VBoxContainer
- func (self Instance) Invalidate()
- func (self Instance) OnDirSelected(cb func(dir string))
- func (self Instance) OnFileSelected(cb func(path string))
- func (self Instance) OnFilesSelected(cb func(paths []string))
- func (self Instance) OptionCount() int
- func (self Instance) PopupFileDialog()
- func (self Instance) SetAccess(value gdclass.EditorFileDialogAccess)
- func (self Instance) SetCurrentDir(value string)
- func (self Instance) SetCurrentFile(value string)
- func (self Instance) SetCurrentPath(value string)
- func (self Instance) SetDisableOverwriteWarning(value bool)
- func (self Instance) SetDisplayMode(value gdclass.EditorFileDialogDisplayMode)
- func (self Instance) SetFileMode(value gdclass.EditorFileDialogFileMode)
- func (self Instance) SetFilters(value []string)
- func (self Instance) SetOptionCount(value int)
- func (self Instance) SetOptionDefault(option int, default_value_index int)
- func (self Instance) SetOptionName(option int, name string)
- func (self Instance) SetOptionValues(option int, values []string)
- func (self Instance) SetShowHiddenFiles(value bool)
- func (self Instance) ShowHiddenFiles() bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access = gdclass.EditorFileDialogAccess //gd:EditorFileDialog.Access
const ( /*The [EditorFileDialog] can only view [code]res://[/code] directory contents.*/ AccessResources Access = 0 /*The [EditorFileDialog] can only view [code]user://[/code] directory contents.*/ AccessUserdata Access = 1 /*The [EditorFileDialog] can view the entire local file system.*/ AccessFilesystem Access = 2 )
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type DisplayMode ¶
type DisplayMode = gdclass.EditorFileDialogDisplayMode //gd:EditorFileDialog.DisplayMode
const ( /*The [EditorFileDialog] displays resources as thumbnails.*/ DisplayThumbnails DisplayMode = 0 /*The [EditorFileDialog] displays resources as a list of filenames.*/ DisplayList DisplayMode = 1 )
type FileMode ¶
type FileMode = gdclass.EditorFileDialogFileMode //gd:EditorFileDialog.FileMode
const ( /*The [EditorFileDialog] can select only one file. Accepting the window will open the file.*/ FileModeOpenFile FileMode = 0 /*The [EditorFileDialog] can select multiple files. Accepting the window will open all files.*/ FileModeOpenFiles FileMode = 1 /*The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.*/ FileModeOpenDir FileMode = 2 /*The [EditorFileDialog] can select a file or directory. Accepting the window will open it.*/ FileModeOpenAny FileMode = 3 /*The [EditorFileDialog] can select only one file. Accepting the window will save the file.*/ FileModeSaveFile FileMode = 4 )
type Instance ¶
type Instance [1]gdclass.EditorFileDialog
[EditorFileDialog] is an enhanced version of [FileDialog] available only to editor plugins. Additional features include list of favorited/recent files and the ability to see files as thumbnails grid instead of list.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) Access ¶
func (self Instance) Access() gdclass.EditorFileDialogAccess
func (Instance) AddFilter ¶
Adds a comma-delimited file name [param filter] option to the [EditorFileDialog] with an optional [param description], which restricts what files can be picked. A [param filter] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. For example, a [param filter] of [code]"*.tscn, *.scn"[/code] and a [param description] of [code]"Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)".
func (Instance) AddOption ¶
Adds an additional [OptionButton] to the file dialog. If [param values] is empty, a [CheckBox] is added instead. [param default_value_index] should be an index of the value in the [param values]. If [param values] is empty it should be either [code]1[/code] (checked), or [code]0[/code] (unchecked).
func (Instance) AddSideMenu ¶
Adds the given [param menu] to the side of the file dialog with the given [param title] text on top. Only one side menu is allowed.
func (Instance) AsAcceptDialog ¶
func (self Instance) AsAcceptDialog() AcceptDialog.Instance
func (Instance) AsConfirmationDialog ¶
func (self Instance) AsConfirmationDialog() ConfirmationDialog.Instance
func (Instance) AsEditorFileDialog ¶
func (Instance) AsViewport ¶
func (Instance) ClearFilters ¶
func (self Instance) ClearFilters()
Removes all filters except for "All Files (*)".
func (Instance) CurrentDir ¶
func (Instance) CurrentFile ¶
func (Instance) CurrentPath ¶
func (Instance) DisableOverwriteWarning ¶
func (Instance) DisplayMode ¶
func (self Instance) DisplayMode() gdclass.EditorFileDialogDisplayMode
func (Instance) FileMode ¶
func (self Instance) FileMode() gdclass.EditorFileDialogFileMode
func (Instance) GetLineEdit ¶
Returns the LineEdit for the selected file. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
func (Instance) GetOptionDefault ¶
Returns the default value index of the [OptionButton] or [CheckBox] with index [param option].
func (Instance) GetOptionName ¶
Returns the name of the [OptionButton] or [CheckBox] with index [param option].
func (Instance) GetOptionValues ¶
Returns an array of values of the [OptionButton] with index [param option].
func (Instance) GetSelectedOptions ¶
Returns a [Dictionary] with the selected values of the additional [OptionButton]s and/or [CheckBox]es. [Dictionary] keys are names and values are selected value indices.
func (Instance) GetVbox ¶
func (self Instance) GetVbox() [1]gdclass.VBoxContainer
Returns the [VBoxContainer] used to display the file system. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
func (Instance) Invalidate ¶
func (self Instance) Invalidate()
Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update.
func (Instance) OnDirSelected ¶
func (Instance) OnFileSelected ¶
func (Instance) OnFilesSelected ¶
func (Instance) OptionCount ¶
func (Instance) PopupFileDialog ¶
func (self Instance) PopupFileDialog()
Shows the [EditorFileDialog] at the default size and position for file dialogs in the editor, and selects the file name if there is a current file.
func (Instance) SetAccess ¶
func (self Instance) SetAccess(value gdclass.EditorFileDialogAccess)
func (Instance) SetCurrentDir ¶
func (Instance) SetCurrentFile ¶
func (Instance) SetCurrentPath ¶
func (Instance) SetDisableOverwriteWarning ¶
func (Instance) SetDisplayMode ¶
func (self Instance) SetDisplayMode(value gdclass.EditorFileDialogDisplayMode)
func (Instance) SetFileMode ¶
func (self Instance) SetFileMode(value gdclass.EditorFileDialogFileMode)
func (Instance) SetFilters ¶
func (Instance) SetOptionCount ¶
func (Instance) SetOptionDefault ¶
Sets the default value index of the [OptionButton] or [CheckBox] with index [param option].
func (Instance) SetOptionName ¶
Sets the name of the [OptionButton] or [CheckBox] with index [param option].
func (Instance) SetOptionValues ¶
Sets the option values of the [OptionButton] with index [param option].