summaryrefslogtreecommitdiff
path: root/doc/classes/FileDialog.xml
blob: 50deecee72f21269cea8d13b67f64a58179ef6e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FileDialog" inherits="ConfirmationDialog" category="Core" version="3.1-dev">
	<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-&gt;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="deselect_items">
			<return type="void">
			</return>
			<description>
			</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>
	</methods>
	<members>
		<member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access">
		</member>
		<member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir">
			The current working directory of the file dialog.
		</member>
		<member name="current_file" type="String" setter="set_current_file" getter="get_current_file">
			The currently selected file of the file dialog.
		</member>
		<member name="current_path" type="String" setter="set_current_path" getter="get_current_path">
			The currently selected file path of the file dialog.
		</member>
		<member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters">
		</member>
		<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode">
		</member>
		<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title">
			If [code]true[/code], changing the [code]mode[/code] property will set the window title accordingly (e. g. setting mode to [code]MODE_OPEN_FILE[/code] will change the window title to "Open a File").
		</member>
		<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files">
		</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" enum="Mode">
			The dialog allows the selection of one, and only one file.
		</constant>
		<constant name="MODE_OPEN_FILES" value="1" enum="Mode">
			The dialog allows the selection of multiple files.
		</constant>
		<constant name="MODE_OPEN_DIR" value="2" enum="Mode">
			The dialog functions as a folder selector, disallowing the selection of any file.
		</constant>
		<constant name="MODE_OPEN_ANY" value="3" enum="Mode">
			The dialog allows the selection of a file or a directory.
		</constant>
		<constant name="MODE_SAVE_FILE" value="4" enum="Mode">
			The dialog will warn when a file exists.
		</constant>
		<constant name="ACCESS_RESOURCES" value="0" enum="Access">
			The dialog allows the selection of file and directory.
		</constant>
		<constant name="ACCESS_USERDATA" value="1" enum="Access">
			The dialog allows access files under [Resource] path(res://) .
		</constant>
		<constant name="ACCESS_FILESYSTEM" value="2" enum="Access">
			The dialog allows access 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="parent_folder" type="Texture">
		</theme_item>
		<theme_item name="reload" type="Texture">
		</theme_item>
	</theme_items>
</class>