class_editorfiledialog.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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:`int<class_int>` **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:`int<class_int>` **display_mode** - The view format in which the ``EditorFileDialog`` displays resources to the user.
  47. .. _class_EditorFileDialog_mode:
  48. - :ref:`int<class_int>` **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. Numeric Constants
  52. -----------------
  53. - **MODE_OPEN_FILE** = **0** --- The ``EditorFileDialog`` can select only one file. Accepting the window will open the file.
  54. - **MODE_OPEN_FILES** = **1** --- The ``EditorFileDialog`` can select multiple files. Accepting the window will open all files.
  55. - **MODE_OPEN_DIR** = **2** --- The ``EditorFileDialog`` can select only one directory. Accepting the window will open the directory.
  56. - **MODE_OPEN_ANY** = **3** --- The ``EditorFileDialog`` can select a file or directory. Accepting the window will open it.
  57. - **MODE_SAVE_FILE** = **4** --- The ``EditorFileDialog`` can select only one file. Accepting the window will save the file.
  58. - **ACCESS_RESOURCES** = **0** --- The ``EditorFileDialog`` can only view ``res://`` directory contents.
  59. - **ACCESS_USERDATA** = **1** --- The ``EditorFileDialog`` can only view ``user://`` directory contents.
  60. - **ACCESS_FILESYSTEM** = **2** --- The ``EditorFileDialog`` can view the entire local file system.
  61. - **DISPLAY_THUMBNAILS** = **0** --- The ``EditorFileDialog`` displays resources as thumbnails.
  62. - **DISPLAY_LIST** = **1** --- The ``EditorFileDialog`` displays resources as a list of filenames.
  63. Member Function Description
  64. ---------------------------
  65. .. _class_EditorFileDialog_add_filter:
  66. - void **add_filter** **(** :ref:`String<class_string>` filter **)**
  67. Adds a comma-delimited file extension filter option to the ``EditorFileDialog`` with an optional semi-colon-delimited label.
  68. Example: "\*.tscn, \*.scn; Scenes", results in filter text "Scenes (\*.tscn, \*.scn)".
  69. .. _class_EditorFileDialog_clear_filters:
  70. - void **clear_filters** **(** **)**
  71. Removes all filters except for "All Files (\*)".
  72. .. _class_EditorFileDialog_get_vbox:
  73. - :ref:`VBoxContainer<class_vboxcontainer>` **get_vbox** **(** **)**
  74. Returns the ``VBoxContainer`` used to display the file system.
  75. .. _class_EditorFileDialog_invalidate:
  76. - void **invalidate** **(** **)**
  77. Notify the ``EditorFileDialog`` that its view of the data is no longer accurate. Updates the view contents on next view update.