2017-09-12 20:42:36 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.0.alpha.custom_build">
|
|
|
|
<brief_description>
|
|
|
|
Dialog for selecting files or directories in the filesystem.
|
|
|
|
</brief_description>
|
|
|
|
<description>
|
|
|
|
FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks.
|
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<demos>
|
|
|
|
</demos>
|
|
|
|
<methods>
|
|
|
|
<method name="add_filter">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="filter" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Add a custom filter. Filter format is: "mask ; description", example (C++): dialog->add_filter("*.png ; PNG Images");
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="clear_filters">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Clear all the added filters in the dialog.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_access" qualifiers="const">
|
|
|
|
<return type="int" enum="FileDialog.Access">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Return the file access permission of the dialog.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_current_dir" qualifiers="const">
|
|
|
|
<return type="String">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Get the current working directory of the file dialog.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_current_file" qualifiers="const">
|
|
|
|
<return type="String">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Get the current selected file of the file dialog (empty if none).
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_current_path" qualifiers="const">
|
|
|
|
<return type="String">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Get the current selected path (directory and file) of the file dialog (empty if none).
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_filters" qualifiers="const">
|
|
|
|
<return type="PoolStringArray">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_mode" qualifiers="const">
|
|
|
|
<return type="int" enum="FileDialog.Mode">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Get the file dialog mode from the MODE_* enum.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_vbox">
|
|
|
|
<return type="VBoxContainer">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Return the vertical box container of the dialog, custom controls can be added to it.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="invalidate">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Invalidate and update the current dialog content list.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="is_showing_hidden_files" qualifiers="const">
|
|
|
|
<return type="bool">
|
|
|
|
</return>
|
|
|
|
<description>
|
|
|
|
Return true if the diaog allows show hidden files.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_access">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="access" type="int" enum="FileDialog.Access">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]).
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_current_dir">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="dir" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Set the current working directory of the file dialog.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_current_file">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="file" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Set the current selected file name of the file dialog.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_current_path">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="path" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Set the current selected file path of the file dialog.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_filters">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="filters" type="PoolStringArray">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_mode">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="mode" type="int" enum="FileDialog.Mode">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Set the file dialog mode from the MODE_* enum.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_show_hidden_files">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="show" type="bool">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Set the dialog should show hidden files.
|
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
</methods>
|
|
|
|
<members>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access">
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters">
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode">
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2017-09-13 06:49:40 +00:00
|
|
|
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files">
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
|
|
|
</members>
|
|
|
|
<signals>
|
|
|
|
<signal name="dir_selected">
|
|
|
|
<argument index="0" name="dir" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Event emitted when the user selects a directory.
|
|
|
|
</description>
|
|
|
|
</signal>
|
|
|
|
<signal name="file_selected">
|
|
|
|
<argument index="0" name="path" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Event emitted when the user selects a file (double clicks it or presses the OK button).
|
|
|
|
</description>
|
|
|
|
</signal>
|
|
|
|
<signal name="files_selected">
|
|
|
|
<argument index="0" name="paths" type="PoolStringArray">
|
|
|
|
</argument>
|
|
|
|
<description>
|
|
|
|
Event emitted when the user selects multiple files.
|
|
|
|
</description>
|
|
|
|
</signal>
|
|
|
|
</signals>
|
|
|
|
<constants>
|
|
|
|
<constant name="MODE_OPEN_FILE" value="0">
|
|
|
|
The dialog allows the selection of one, and only one file.
|
|
|
|
</constant>
|
|
|
|
<constant name="MODE_OPEN_FILES" value="1">
|
|
|
|
The dialog allows the selection of multiple files.
|
|
|
|
</constant>
|
|
|
|
<constant name="MODE_OPEN_DIR" value="2">
|
|
|
|
The dialog functions as a folder selector, disallowing the selection of any file.
|
|
|
|
</constant>
|
|
|
|
<constant name="MODE_OPEN_ANY" value="3">
|
|
|
|
The dialog allows the selection of a file or a directory.
|
|
|
|
</constant>
|
|
|
|
<constant name="MODE_SAVE_FILE" value="4">
|
|
|
|
The dialog will warn when a file exists.
|
|
|
|
</constant>
|
|
|
|
<constant name="ACCESS_RESOURCES" value="0">
|
|
|
|
The dialog allows the selection of file and directory.
|
|
|
|
</constant>
|
|
|
|
<constant name="ACCESS_USERDATA" value="1">
|
|
|
|
The dialog allows ascess files under [Resource] path(res://) .
|
|
|
|
</constant>
|
|
|
|
<constant name="ACCESS_FILESYSTEM" value="2">
|
|
|
|
The dialog allows ascess files in whole file system.
|
|
|
|
</constant>
|
|
|
|
</constants>
|
|
|
|
<theme_items>
|
|
|
|
<theme_item name="files_disabled" type="Color">
|
|
|
|
</theme_item>
|
|
|
|
<theme_item name="folder" type="Texture">
|
|
|
|
</theme_item>
|
|
|
|
<theme_item name="reload" type="Texture">
|
|
|
|
</theme_item>
|
|
|
|
</theme_items>
|
|
|
|
</class>
|