class_editorfiledialog.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the EditorFileDialog.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_EditorFileDialog:
  5. EditorFileDialog
  6. ================
  7. **Inherits:** :ref:`ConfirmationDialog<class_confirmationdialog>` **<** :ref:`AcceptDialog<class_acceptdialog>` **<** :ref:`WindowDialog<class_windowdialog>` **<** :ref:`Popup<class_popup>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Member Functions
  12. ----------------
  13. +--------------------------------------------+-----------------------------------------------------------------------------------------------------+
  14. | void | :ref:`add_filter<class_EditorFileDialog_add_filter>` **(** :ref:`String<class_string>` filter **)** |
  15. +--------------------------------------------+-----------------------------------------------------------------------------------------------------+
  16. | void | :ref:`clear_filters<class_EditorFileDialog_clear_filters>` **(** **)** |
  17. +--------------------------------------------+-----------------------------------------------------------------------------------------------------+
  18. | :ref:`VBoxContainer<class_vboxcontainer>` | :ref:`get_vbox<class_EditorFileDialog_get_vbox>` **(** **)** |
  19. +--------------------------------------------+-----------------------------------------------------------------------------------------------------+
  20. | void | :ref:`invalidate<class_EditorFileDialog_invalidate>` **(** **)** |
  21. +--------------------------------------------+-----------------------------------------------------------------------------------------------------+
  22. Signals
  23. -------
  24. .. _class_EditorFileDialog_dir_selected:
  25. - **dir_selected** **(** :ref:`String<class_string>` dir **)**
  26. Emitted when a directory is selected.
  27. .. _class_EditorFileDialog_file_selected:
  28. - **file_selected** **(** :ref:`String<class_string>` path **)**
  29. Emitted when a file is selected.
  30. .. _class_EditorFileDialog_files_selected:
  31. - **files_selected** **(** :ref:`PoolStringArray<class_poolstringarray>` paths **)**
  32. Emitted when multiple files are selected.
  33. Member Variables
  34. ----------------
  35. .. _class_EditorFileDialog_access:
  36. - :ref:`Access<enum_editorfiledialog_access>` **access** - The location from which the user may select a file, including ``res://``, ``user://``, and the local file system.
  37. .. _class_EditorFileDialog_current_dir:
  38. - :ref:`String<class_string>` **current_dir** - The currently occupied directory.
  39. .. _class_EditorFileDialog_current_file:
  40. - :ref:`String<class_string>` **current_file** - The currently selected file.
  41. .. _class_EditorFileDialog_current_path:
  42. - :ref:`String<class_string>` **current_path** - The file system path in the address bar.
  43. .. _class_EditorFileDialog_disable_overwrite_warning:
  44. - :ref:`bool<class_bool>` **disable_overwrite_warning** - If ``true`` the ``EditorFileDialog`` will not warn the user before overwriting files.
  45. .. _class_EditorFileDialog_display_mode:
  46. - :ref:`DisplayMode<enum_editorfiledialog_displaymode>` **display_mode** - The view format in which the ``EditorFileDialog`` displays resources to the user.
  47. .. _class_EditorFileDialog_mode:
  48. - :ref:`Mode<enum_editorfiledialog_mode>` **mode** - The purpose of the ``EditorFileDialog``. Changes allowed behaviors.
  49. .. _class_EditorFileDialog_show_hidden_files:
  50. - :ref:`bool<class_bool>` **show_hidden_files** - If ``true`` hidden files and directories will be visible in the ``EditorFileDialog``.
  51. Enums
  52. -----
  53. .. _enum_EditorFileDialog_Access:
  54. enum **Access**
  55. - **ACCESS_RESOURCES** = **0** --- The ``EditorFileDialog`` can only view ``res://`` directory contents.
  56. - **ACCESS_USERDATA** = **1** --- The ``EditorFileDialog`` can only view ``user://`` directory contents.
  57. - **ACCESS_FILESYSTEM** = **2** --- The ``EditorFileDialog`` can view the entire local file system.
  58. .. _enum_EditorFileDialog_DisplayMode:
  59. enum **DisplayMode**
  60. - **DISPLAY_THUMBNAILS** = **0** --- The ``EditorFileDialog`` displays resources as thumbnails.
  61. - **DISPLAY_LIST** = **1** --- The ``EditorFileDialog`` displays resources as a list of filenames.
  62. .. _enum_EditorFileDialog_Mode:
  63. enum **Mode**
  64. - **MODE_OPEN_FILE** = **0** --- The ``EditorFileDialog`` can select only one file. Accepting the window will open the file.
  65. - **MODE_OPEN_FILES** = **1** --- The ``EditorFileDialog`` can select multiple files. Accepting the window will open all files.
  66. - **MODE_OPEN_DIR** = **2** --- The ``EditorFileDialog`` can select only one directory. Accepting the window will open the directory.
  67. - **MODE_OPEN_ANY** = **3** --- The ``EditorFileDialog`` can select a file or directory. Accepting the window will open it.
  68. - **MODE_SAVE_FILE** = **4** --- The ``EditorFileDialog`` can select only one file. Accepting the window will save the file.
  69. Member Function Description
  70. ---------------------------
  71. .. _class_EditorFileDialog_add_filter:
  72. - void **add_filter** **(** :ref:`String<class_string>` filter **)**
  73. Adds a comma-delimited file extension filter option to the ``EditorFileDialog`` with an optional semi-colon-delimited label.
  74. Example: "\*.tscn, \*.scn; Scenes", results in filter text "Scenes (\*.tscn, \*.scn)".
  75. .. _class_EditorFileDialog_clear_filters:
  76. - void **clear_filters** **(** **)**
  77. Removes all filters except for "All Files (\*)".
  78. .. _class_EditorFileDialog_get_vbox:
  79. - :ref:`VBoxContainer<class_vboxcontainer>` **get_vbox** **(** **)**
  80. Returns the ``VBoxContainer`` used to display the file system.
  81. .. _class_EditorFileDialog_invalidate:
  82. - void **invalidate** **(** **)**
  83. Notify the ``EditorFileDialog`` that its view of the data is no longer accurate. Updates the view contents on next view update.