3 * @defgroup File_Selector_Entry File Selector Entry
4 * @ingroup elm_widget_group
6 * @image html fileselector_entry_inheritance_tree.png
7 * @image latex fileselector_entry_inheritance_tree.eps
9 * @image html img/widget/fileselector_entry/preview-00.png
10 * @image latex img/widget/fileselector_entry/preview-00.eps
12 * This is an entry made to be filled with or display a <b>file
13 * system path string</b>. Besides the entry itself, the widget has
14 * a @ref File_Selector_Button "file selector button" on its side,
15 * which will raise an internal @ref Fileselector "file selector widget",
16 * when clicked, for path selection aided by file system
19 * This file selector may appear in an Elementary window or in an
20 * inner window. When a file is chosen from it, the (inner) window
21 * is closed and the selected file's path string is exposed both as
22 * a smart event and as the new text on the entry.
24 * This widget inherits from the @ref Layout one, so that all the
25 * functions acting on it also work for file selector entry objects
28 * This widget encapsulates operations on its internal file
29 * selector on its own API. There is less control over its file
30 * selector than that one would have instantiating one directly.
32 * Smart callbacks one can register to:
33 * - @c "changed" - The text within the entry was changed
34 * - @c "activated" - The entry has had editing finished and
35 * changes are to be "committed"
36 * - @c "press" - The entry has been clicked
37 * - @c "longpressed" - The entry has been clicked (and held) for a
39 * - @c "clicked" - The entry has been clicked
40 * - @c "clicked,double" - The entry has been double clicked
41 * - @c "focused" - The entry has received focus
42 * - @c "unfocused" - The entry has lost focus
43 * - @c "selection,paste" - A paste action has occurred on the
45 * - @c "selection,copy" - A copy action has occurred on the entry
46 * - @c "selection,cut" - A cut action has occurred on the entry
47 * - @c "unpressed" - The file selector entry's button was released
48 * after being pressed.
49 * - @c "file,chosen" - The user has selected a path via the file
50 * selector entry's internal file selector, whose string pointer
51 * comes as the @c event_info data (a stringshared string)
52 * - @c "language,changed" - the program's language changed
54 * Default text parts of the fileselector_button widget that you can use for
56 * @li "default" - Label of the fileselector_button
58 * Default content parts of the fileselector_entry widget that you can use for
60 * @li "button icon" - Button icon of the fileselector_entry
62 * Supported elm_object common APIs.
63 * @li @ref elm_object_part_text_set
64 * @li @ref elm_object_part_text_get
65 * @li @ref elm_object_part_content_set
66 * @li @ref elm_object_part_content_get
67 * @li @ref elm_object_part_content_unset
68 * @li @ref elm_object_disabled_set
69 * @li @ref elm_object_disabled_get
71 * @see @ref File_Selector_Button for a similar widget.
76 * Add a new file selector entry widget to the given parent
77 * Elementary (container) object
79 * @param[in] parent The parent object
80 * @return a new file selector entry widget handle or @c NULL, on
83 * @ingroup File_Selector_Entry
85 EAPI Evas_Object *elm_fileselector_entry_add(Evas_Object *parent);
88 * @brief Set the title for a given file selector entry widget's window
90 * @param[in] obj The fileselector entry object
91 * @param[in] title The title string
93 * This will change the window's title, when the file selector pops
94 * out after a click on the entry's button. Those windows have the
95 * default (unlocalized) value of @c "Select a file" as titles.
97 * @note It will only take any effect if the file selector
98 * entry widget is @b not under "inwin mode".
100 * @see elm_fileselector_entry_window_title_get()
102 * @ingroup File_Selector_Entry
104 EAPI void elm_fileselector_entry_window_title_set(Evas_Object *obj, const char *title);
107 * Get the title set for a given file selector entry widget's
110 * @param[in] obj The file selector entry widget
111 * @return Title of the file selector entry's window
113 * @see elm_fileselector_entry_window_title_get() for more details
115 * @ingroup File_Selector_Entry
117 EAPI const char *elm_fileselector_entry_window_title_get(const Evas_Object *obj);
120 * Set the size of a given file selector entry widget's window,
121 * holding the file selector itself.
123 * @param[in] obj The file selector entry widget
124 * @param[in] width The window's width
125 * @param[in] height The window's height
127 * @note it will only take any effect if the file selector entry
128 * widget is @b not under "inwin mode". The default size for the
129 * window (when applicable) is 400x400 pixels.
131 * @see elm_fileselector_entry_window_size_get()
133 * @ingroup File_Selector_Entry
135 EAPI void elm_fileselector_entry_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height);
138 * Get the size of a given file selector entry widget's window,
139 * holding the file selector itself.
141 * @param[in] obj The file selector entry widget
142 * @param[out] width Pointer into which to store the width value
143 * @param[out] height Pointer into which to store the height value
145 * @note Use @c NULL pointers on the size values you're not
146 * interested in: they'll be ignored by the function.
148 * @see elm_fileselector_entry_window_size_set(), for more details
150 * @ingroup File_Selector_Entry
152 EAPI void elm_fileselector_entry_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height);
155 * Set the initial file system path and the entry's path string for
156 * a given file selector entry widget
158 * @param[in] obj The file selector entry widget
159 * @param[in] path The path string
161 * It must be a <b>directory</b> path, which will have the contents
162 * displayed initially in the file selector's view, when invoked
163 * from @p obj. The default initial path is the @c "HOME"
164 * environment variable's value.
166 * @see elm_fileselector_entry_path_get()
168 * @ingroup File_Selector_Entry
170 EAPI void elm_fileselector_entry_path_set(Evas_Object *obj, const char *path);
173 * Get the entry's path string for a given file selector entry
176 * @param[in] obj The file selector entry widget
177 * @return path The path string
179 * @see elm_fileselector_entry_path_set() for more details
181 * @ingroup File_Selector_Entry
183 EAPI const char *elm_fileselector_entry_path_get(const Evas_Object *obj);
186 * Enable/disable a tree view in the given file selector entry
187 * widget's internal file selector
189 * @param[in] obj The file selector entry widget
190 * @param[in] value @c EINA_TRUE to enable tree view, @c EINA_FALSE to disable
192 * This has the same effect as elm_fileselector_expandable_set(),
193 * but now applied to a file selector entry's internal file
196 * @note There's no way to put a file selector entry's internal
197 * file selector in "grid mode", as one may do with "pure" file
200 * @see elm_fileselector_expandable_get()
202 * @ingroup File_Selector_Entry
204 EAPI void elm_fileselector_entry_expandable_set(Evas_Object *obj, Eina_Bool value);
207 * Get whether tree view is enabled for the given file selector
208 * entry widget's internal file selector
210 * @param[in] obj The file selector entry widget
211 * @return @c EINA_TRUE if @p obj widget's internal file selector
212 * is in tree view, @c EINA_FALSE otherwise (and or errors)
214 * @see elm_fileselector_expandable_set() for more details
216 * @ingroup File_Selector_Entry
218 EAPI Eina_Bool elm_fileselector_entry_expandable_get(const Evas_Object *obj);
221 * Set whether a given file selector entry widget's internal file
222 * selector is to display folders only or the directory contents,
225 * @param[in] obj The file selector entry widget
226 * @param[in] value @c EINA_TRUE to make @p obj widget's internal file
227 * selector only display directories, @c EINA_FALSE to make files
228 * to be displayed in it too
230 * This has the same effect as elm_fileselector_folder_only_set(),
231 * but now applied to a file selector entry's internal file
234 * @see elm_fileselector_folder_only_get()
236 * @ingroup File_Selector_Entry
238 EAPI void elm_fileselector_entry_folder_only_set(Evas_Object *obj, Eina_Bool value);
241 * Get whether a given file selector entry widget's internal file
242 * selector is displaying folders only or the directory contents,
245 * @param[in] obj The file selector entry widget
246 * @return @c EINA_TRUE if @p obj widget's internal file
247 * selector is only displaying directories, @c EINA_FALSE if files
248 * are being displayed in it too (and on errors)
250 * @see elm_fileselector_entry_folder_only_set() for more details
252 * @ingroup File_Selector_Entry
254 EAPI Eina_Bool elm_fileselector_entry_folder_only_get(const Evas_Object *obj);
257 * Enable/disable the file name entry box where the user can type
258 * in a name for a file, in a given file selector entry widget's
259 * internal file selector.
261 * @param[in] obj The file selector entry widget
262 * @param[in] value @c EINA_TRUE to make @p obj widget's internal
263 * file selector a "saving dialog", @c EINA_FALSE otherwise
265 * This has the same effect as elm_fileselector_is_save_set(),
266 * but now applied to a file selector entry's internal file
269 * @see elm_fileselector_is_save_get()
271 * @ingroup File_Selector_Entry
273 EAPI void elm_fileselector_entry_is_save_set(Evas_Object *obj, Eina_Bool value);
276 * Get whether the given file selector entry widget's internal
277 * file selector is in "saving dialog" mode
279 * @param[in] obj The file selector entry widget
280 * @return @c EINA_TRUE, if @p obj widget's internal file selector
281 * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
284 * @see elm_fileselector_entry_is_save_set() for more details
286 * @ingroup File_Selector_Entry
288 EAPI Eina_Bool elm_fileselector_entry_is_save_get(const Evas_Object *obj);
291 * Set whether a given file selector entry widget's internal file
292 * selector will raise an Elementary "inner window", instead of a
293 * dedicated Elementary window. By default, it won't.
295 * @param[in] obj The file selector entry widget
296 * @param[in] value @c EINA_TRUE to make it use an inner window, @c
297 * EINA_TRUE to make it use a dedicated window
299 * @see elm_win_inwin_add() for more information on inner windows
300 * @see elm_fileselector_entry_inwin_mode_get()
302 * @ingroup File_Selector_Entry
304 EAPI void elm_fileselector_entry_inwin_mode_set(Evas_Object *obj, Eina_Bool value);
307 * Get whether a given file selector entry widget's internal file
308 * selector will raise an Elementary "inner window", instead of a
309 * dedicated Elementary window.
311 * @param[in] obj The file selector entry widget
312 * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
313 * if it will use a dedicated window
315 * @see elm_fileselector_entry_inwin_mode_set() for more details
317 * @ingroup File_Selector_Entry
319 EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj);
322 * Set the initial file system path for a given file selector entry
325 * @param[in] obj The file selector entry widget
326 * @param[in] path The path string
328 * It must be a <b>directory</b> path, which will have the contents
329 * displayed initially in the file selector's view, when invoked
330 * from @p obj. The default initial path is the @c "HOME"
331 * environment variable's value.
333 * @see elm_fileselector_entry_path_get()
335 * @ingroup File_Selector_Entry
337 EAPI void elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path);
340 * Get the parent directory's path to the latest file selection on
341 * a given filer selector entry widget
343 * @param[in] obj The file selector object
344 * @return The (full) path of the directory of the last selection
345 * on @p obj widget, a @b stringshared string
347 * @see elm_fileselector_entry_path_set()
349 * @ingroup File_Selector_Entry
351 EAPI const char *elm_fileselector_entry_selected_get(const Evas_Object *obj);