2 * @defgroup File_Selector_Entry File Selector Entry
5 * @image html img/widget/fileselector_entry/preview-00.png
6 * @image latex img/widget/fileselector_entry/preview-00.eps
8 * This is an entry made to be filled with or display a <b>file
9 * system path string</b>. Besides the entry itself, the widget has
10 * a @ref File_Selector_Button "file selector button" on its side,
11 * which will raise an internal @ref Fileselector "file selector widget",
12 * when clicked, for path selection aided by file system
15 * This file selector may appear in an Elementary window or in an
16 * inner window. When a file is chosen from it, the (inner) window
17 * is closed and the selected file's path string is exposed both as
18 * a smart event and as the new text on the entry.
20 * This widget encapsulates operations on its internal file
21 * selector on its own API. There is less control over its file
22 * selector than that one would have instantiating one directly.
24 * Smart callbacks one can register to:
25 * - @c "changed" - The text within the entry was changed
26 * - @c "activated" - The entry has had editing finished and
27 * changes are to be "committed"
28 * - @c "press" - The entry has been clicked
29 * - @c "longpressed" - The entry has been clicked (and held) for a
31 * - @c "clicked" - The entry has been clicked
32 * - @c "clicked,double" - The entry has been double clicked
33 * - @c "focused" - The entry has received focus
34 * - @c "unfocused" - The entry has lost focus
35 * - @c "selection,paste" - A paste action has occurred on the
37 * - @c "selection,copy" - A copy action has occurred on the entry
38 * - @c "selection,cut" - A cut action has occurred on the entry
39 * - @c "unpressed" - The file selector entry's button was released
40 * after being pressed.
41 * - @c "file,chosen" - The user has selected a path via the file
42 * selector entry's internal file selector, whose string pointer
43 * comes as the @c event_info data (a stringshared string)
45 * Default text parts of the fileselector_button widget that you can use for
47 * @li "default" - Label of the fileselector_button
49 * Default content parts of the fileselector_entry widget that you can use for
51 * @li "button icon" - Button icon of the fileselector_entry
53 * Supported elm_object common APIs.
54 * @li @ref elm_object_part_text_set
55 * @li @ref elm_object_part_text_get
56 * @li @ref elm_object_part_content_set
57 * @li @ref elm_object_part_content_get
58 * @li @ref elm_object_part_content_unset
59 * @li @ref elm_object_disabled_set
60 * @li @ref elm_object_disabled_get
62 * Here is an example on its usage:
63 * @li @ref fileselector_entry_example
65 * @see @ref File_Selector_Button for a similar widget.
70 * Add a new file selector entry widget to the given parent
71 * Elementary (container) object
73 * @param parent The parent object
74 * @return a new file selector entry widget handle or @c NULL, on
77 * @ingroup File_Selector_Entry
79 EAPI Evas_Object *elm_fileselector_entry_add(Evas_Object *parent);
82 * Set the title for a given file selector entry widget's window
84 * @param obj The file selector entry widget
85 * @param title The title string
87 * This will change the window's title, when the file selector pops
88 * out after a click on the entry's button. Those windows have the
89 * default (unlocalized) value of @c "Select a file" as titles.
91 * @note It will only take any effect if the file selector
92 * entry widget is @b not under "inwin mode".
94 * @see elm_fileselector_entry_window_title_get()
96 * @ingroup File_Selector_Entry
98 EAPI void elm_fileselector_entry_window_title_set(Evas_Object *obj, const char *title);
101 * Get the title set for a given file selector entry widget's
104 * @param obj The file selector entry widget
105 * @return Title of the file selector entry's window
107 * @see elm_fileselector_entry_window_title_get() for more details
109 * @ingroup File_Selector_Entry
111 EAPI const char *elm_fileselector_entry_window_title_get(const Evas_Object *obj);
114 * Set the size of a given file selector entry widget's window,
115 * holding the file selector itself.
117 * @param obj The file selector entry widget
118 * @param width The window's width
119 * @param height The window's height
121 * @note it will only take any effect if the file selector entry
122 * widget is @b not under "inwin mode". The default size for the
123 * window (when applicable) is 400x400 pixels.
125 * @see elm_fileselector_entry_window_size_get()
127 * @ingroup File_Selector_Entry
129 EAPI void elm_fileselector_entry_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height);
132 * Get the size of a given file selector entry widget's window,
133 * holding the file selector itself.
135 * @param obj The file selector entry widget
136 * @param width Pointer into which to store the width value
137 * @param height Pointer into which to store the height value
139 * @note Use @c NULL pointers on the size values you're not
140 * interested in: they'll be ignored by the function.
142 * @see elm_fileselector_entry_window_size_set(), for more details
144 * @ingroup File_Selector_Entry
146 EAPI void elm_fileselector_entry_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height);
149 * Set the initial file system path and the entry's path string for
150 * a given file selector entry widget
152 * @param obj The file selector entry widget
153 * @param path The path string
155 * It must be a <b>directory</b> path, which will have the contents
156 * displayed initially in the file selector's view, when invoked
157 * from @p obj. The default initial path is the @c "HOME"
158 * environment variable's value.
160 * @see elm_fileselector_entry_path_get()
162 * @ingroup File_Selector_Entry
164 EAPI void elm_fileselector_entry_path_set(Evas_Object *obj, const char *path);
167 * Get the entry's path string for a given file selector entry
170 * @param obj The file selector entry widget
171 * @return path The path string
173 * @see elm_fileselector_entry_path_set() for more details
175 * @ingroup File_Selector_Entry
177 EAPI const char *elm_fileselector_entry_path_get(const Evas_Object *obj);
180 * Enable/disable a tree view in the given file selector entry
181 * widget's internal file selector
183 * @param obj The file selector entry widget
184 * @param value @c EINA_TRUE to enable tree view, @c EINA_FALSE to disable
186 * This has the same effect as elm_fileselector_expandable_set(),
187 * but now applied to a file selector entry's internal file
190 * @note There's no way to put a file selector entry's internal
191 * file selector in "grid mode", as one may do with "pure" file
194 * @see elm_fileselector_expandable_get()
196 * @ingroup File_Selector_Entry
198 EAPI void elm_fileselector_entry_expandable_set(Evas_Object *obj, Eina_Bool value);
201 * Get whether tree view is enabled for the given file selector
202 * entry widget's internal file selector
204 * @param obj The file selector entry widget
205 * @return @c EINA_TRUE if @p obj widget's internal file selector
206 * is in tree view, @c EINA_FALSE otherwise (and or errors)
208 * @see elm_fileselector_expandable_set() for more details
210 * @ingroup File_Selector_Entry
212 EAPI Eina_Bool elm_fileselector_entry_expandable_get(const Evas_Object *obj);
215 * Set whether a given file selector entry widget's internal file
216 * selector is to display folders only or the directory contents,
219 * @param obj The file selector entry widget
220 * @param value @c EINA_TRUE to make @p obj widget's internal file
221 * selector only display directories, @c EINA_FALSE to make files
222 * to be displayed in it too
224 * This has the same effect as elm_fileselector_folder_only_set(),
225 * but now applied to a file selector entry's internal file
228 * @see elm_fileselector_folder_only_get()
230 * @ingroup File_Selector_Entry
232 EAPI void elm_fileselector_entry_folder_only_set(Evas_Object *obj, Eina_Bool value);
235 * Get whether a given file selector entry widget's internal file
236 * selector is displaying folders only or the directory contents,
239 * @param obj The file selector entry widget
240 * @return @c EINA_TRUE if @p obj widget's internal file
241 * selector is only displaying directories, @c EINA_FALSE if files
242 * are being displayed in it too (and on errors)
244 * @see elm_fileselector_entry_folder_only_set() for more details
246 * @ingroup File_Selector_Entry
248 EAPI Eina_Bool elm_fileselector_entry_folder_only_get(const Evas_Object *obj);
251 * Enable/disable the file name entry box where the user can type
252 * in a name for a file, in a given file selector entry widget's
253 * internal file selector.
255 * @param obj The file selector entry widget
256 * @param value @c EINA_TRUE to make @p obj widget's internal
257 * file selector a "saving dialog", @c EINA_FALSE otherwise
259 * This has the same effect as elm_fileselector_is_save_set(),
260 * but now applied to a file selector entry's internal file
263 * @see elm_fileselector_is_save_get()
265 * @ingroup File_Selector_Entry
267 EAPI void elm_fileselector_entry_is_save_set(Evas_Object *obj, Eina_Bool value);
270 * Get whether the given file selector entry widget's internal
271 * file selector is in "saving dialog" mode
273 * @param obj The file selector entry widget
274 * @return @c EINA_TRUE, if @p obj widget's internal file selector
275 * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
278 * @see elm_fileselector_entry_is_save_set() for more details
280 * @ingroup File_Selector_Entry
282 EAPI Eina_Bool elm_fileselector_entry_is_save_get(const Evas_Object *obj);
285 * Set whether a given file selector entry widget's internal file
286 * selector will raise an Elementary "inner window", instead of a
287 * dedicated Elementary window. By default, it won't.
289 * @param obj The file selector entry widget
290 * @param value @c EINA_TRUE to make it use an inner window, @c
291 * EINA_TRUE to make it use a dedicated window
293 * @see elm_win_inwin_add() for more information on inner windows
294 * @see elm_fileselector_entry_inwin_mode_get()
296 * @ingroup File_Selector_Entry
298 EAPI void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value);
301 * Get whether a given file selector entry widget's internal file
302 * selector will raise an Elementary "inner window", instead of a
303 * dedicated Elementary window.
305 * @param obj The file selector entry widget
306 * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
307 * if it will use a dedicated window
309 * @see elm_fileselector_entry_inwin_mode_set() for more details
311 * @ingroup File_Selector_Entry
313 EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj);
316 * Set the initial file system path for a given file selector entry
319 * @param obj The file selector entry widget
320 * @param path The path string
322 * It must be a <b>directory</b> path, which will have the contents
323 * displayed initially in the file selector's view, when invoked
324 * from @p obj. The default initial path is the @c "HOME"
325 * environment variable's value.
327 * @see elm_fileselector_entry_path_get()
329 * @ingroup File_Selector_Entry
331 EAPI void elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path);
334 * Get the parent directory's path to the latest file selection on
335 * a given filer selector entry widget
337 * @param obj The file selector object
338 * @return The (full) path of the directory of the last selection
339 * on @p obj widget, a @b stringshared string
341 * @see elm_fileselector_entry_path_set()
343 * @ingroup File_Selector_Entry
345 EAPI const char *elm_fileselector_entry_selected_get(const Evas_Object *obj);