2 * @defgroup File_Selector_Button File Selector Button
5 * @image html img/widget/fileselector_button/preview-00.png
6 * @image latex img/widget/fileselector_button/preview-00.eps
7 * @image html img/widget/fileselector_button/preview-01.png
8 * @image latex img/widget/fileselector_button/preview-01.eps
9 * @image html img/widget/fileselector_button/preview-02.png
10 * @image latex img/widget/fileselector_button/preview-02.eps
12 * This is a button that, when clicked, creates an Elementary
13 * window (or inner window) <b> with a @ref Fileselector "file
14 * selector widget" within</b>. When a file is chosen, the (inner)
15 * window is closed and the button emits a signal having the
16 * selected file as it's @c event_info.
18 * This widget encapsulates operations on its internal file
19 * selector on its own API. There is less control over its file
20 * selector than that one would have instantiating one directly.
22 * The following styles are available for this button:
25 * @li @c "hoversel_vertical"
26 * @li @c "hoversel_vertical_entry"
28 * Smart callbacks one can register to:
29 * - @c "file,chosen" - the user has selected a path, whose string
30 * pointer comes as the @c event_info data (a stringshared
33 * Default text parts of the fileselector_button widget that you can use for
35 * @li "default" - Label of the fileselector_button
37 * Default content parts of the fileselector_button widget that you can use for
39 * @li "icon" - Icon of the fileselector_button
41 * Supported elm_object common APIs.
42 * @li @ref elm_object_part_text_set
43 * @li @ref elm_object_part_text_get
44 * @li @ref elm_object_part_content_set
45 * @li @ref elm_object_part_content_get
46 * @li @ref elm_object_part_content_unset
47 * @li @ref elm_object_disabled_set
48 * @li @ref elm_object_disabled_get
50 * Here is an example on its usage:
51 * @li @ref fileselector_button_example
53 * @see @ref File_Selector_Entry for a similar widget.
58 * Add a new file selector button widget to the given parent
59 * Elementary (container) object
61 * @param parent The parent object
62 * @return a new file selector button widget handle or @c NULL, on
65 * @ingroup File_Selector_Button
67 EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent);
70 * Set the title for a given file selector button widget's window
72 * @param obj The file selector button widget
73 * @param title The title string
75 * This will change the popup window's title, when the file selector pops
76 * out after a click on the button. Those windows have the default
77 * (unlocalized) value of @c "Select a file" as titles.
79 * @note It will only take effect if the file selector
80 * button widget is @b not under "inwin mode".
82 * @see elm_fileselector_button_window_title_get()
84 * @ingroup File_Selector_Button
86 EAPI void elm_fileselector_button_window_title_set(Evas_Object *obj, const char *title);
89 * Get the title for a given file selector button widget's
92 * @param obj The file selector button widget
93 * @return Title of the file selector button's window
95 * @see elm_fileselector_button_window_title_get() for more details
97 * @ingroup File_Selector_Button
99 EAPI const char *elm_fileselector_button_window_title_get(const Evas_Object *obj);
102 * Set the size of a given file selector button widget's window,
103 * holding the file selector itself.
105 * @param obj The file selector button widget
106 * @param width The window's width
107 * @param height The window's height
109 * @note it will only take any effect if the file selector button
110 * widget is @b not under "inwin mode". The default size for the
111 * window (when applicable) is 400x400 pixels.
113 * @see elm_fileselector_button_window_size_get()
115 * @ingroup File_Selector_Button
117 EAPI void elm_fileselector_button_window_size_set(Evas_Object *obj, Evas_Coord width, Evas_Coord height);
120 * Get the size of a given file selector button widget's window,
121 * holding the file selector itself.
123 * @param obj The file selector button widget
124 * @param width Pointer into which to store the width value
125 * @param height Pointer into which to store the height value
127 * @note Use @c NULL pointers on the size values you're not
128 * interested in: they'll be ignored by the function.
130 * @see elm_fileselector_button_window_size_set(), for more details
132 * @ingroup File_Selector_Button
134 EAPI void elm_fileselector_button_window_size_get(const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height);
137 * Set the initial file system path for a given file selector
140 * @param obj The file selector button widget
141 * @param path The path string
143 * It must be a <b>directory</b> path, which will have the contents
144 * displayed initially in the file selector's view, when invoked
145 * from @p obj. The default initial path is the @c "HOME"
146 * environment variable's value.
148 * @see elm_fileselector_button_path_get()
150 * @ingroup File_Selector_Button
152 EAPI void elm_fileselector_button_path_set(Evas_Object *obj, const char *path);
155 * Get the initial file system path set for a given file selector
158 * @param obj The file selector button widget
159 * @return path The path string
161 * @see elm_fileselector_button_path_set() for more details
163 * @ingroup File_Selector_Button
165 EAPI const char *elm_fileselector_button_path_get(const Evas_Object *obj);
168 * Enable/disable a tree view in the given file selector button
169 * widget's internal file selector
171 * @param obj The file selector button widget
172 * @param value @c EINA_TRUE to enable tree view, @c EINA_FALSE to
175 * This has the same effect as elm_fileselector_expandable_set(),
176 * but now applied to a file selector button's internal file
179 * @note There's no way to put a file selector button's internal
180 * file selector in "grid mode", as one may do with "pure" file
183 * @see elm_fileselector_expandable_get()
185 * @ingroup File_Selector_Button
187 EAPI void elm_fileselector_button_expandable_set(Evas_Object *obj, Eina_Bool value);
190 * Get whether tree view is enabled for the given file selector
191 * button widget's internal file selector
193 * @param obj The file selector button widget
194 * @return @c EINA_TRUE if @p obj widget's internal file selector
195 * is in tree view, @c EINA_FALSE otherwise (and or errors)
197 * @see elm_fileselector_expandable_set() for more details
199 * @ingroup File_Selector_Button
201 EAPI Eina_Bool elm_fileselector_button_expandable_get(const Evas_Object *obj);
204 * Set whether a given file selector button widget's internal file
205 * selector is to display folders only or the directory contents,
208 * @param obj The file selector button widget
209 * @param value @c EINA_TRUE to make @p obj widget's internal file
210 * selector only display directories, @c EINA_FALSE to make files
211 * to be displayed in it too
213 * This has the same effect as elm_fileselector_folder_only_set(),
214 * but now applied to a file selector button's internal file
217 * @see elm_fileselector_folder_only_get()
219 * @ingroup File_Selector_Button
221 EAPI void elm_fileselector_button_folder_only_set(Evas_Object *obj, Eina_Bool value);
224 * Get whether a given file selector button widget's internal file
225 * selector is displaying folders only or the directory contents,
228 * @param obj The file selector button widget
229 * @return @c EINA_TRUE if @p obj widget's internal file
230 * selector is only displaying directories, @c EINA_FALSE if files
231 * are being displayed in it too (and on errors)
233 * @see elm_fileselector_button_folder_only_set() for more details
235 * @ingroup File_Selector_Button
237 EAPI Eina_Bool elm_fileselector_button_folder_only_get(const Evas_Object *obj);
240 * Enable/disable the file name entry box where the user can type
241 * in a name for a file, in a given file selector button widget's
242 * internal file selector.
244 * @param obj The file selector button widget
245 * @param value @c EINA_TRUE to make @p obj widget's internal
246 * file selector a "saving dialog", @c EINA_FALSE otherwise
248 * This has the same effect as elm_fileselector_is_save_set(),
249 * but now applied to a file selector button's internal file
252 * @see elm_fileselector_is_save_get()
254 * @ingroup File_Selector_Button
256 EAPI void elm_fileselector_button_is_save_set(Evas_Object *obj, Eina_Bool value);
259 * Get whether the given file selector button widget's internal
260 * file selector is in "saving dialog" mode
262 * @param obj The file selector button widget
263 * @return @c EINA_TRUE, if @p obj widget's internal file selector
264 * is in "saving dialog" mode, @c EINA_FALSE otherwise (and on
267 * @see elm_fileselector_button_is_save_set() for more details
269 * @ingroup File_Selector_Button
271 EAPI Eina_Bool elm_fileselector_button_is_save_get(const Evas_Object *obj);
274 * Set whether a given file selector button widget's internal file
275 * selector will raise an Elementary "inner window", instead of a
276 * dedicated Elementary window. By default, it won't.
278 * @param obj The file selector button widget
279 * @param value @c EINA_TRUE to make it use an inner window, @c
280 * EINA_TRUE to make it use a dedicated window
282 * @see elm_win_inwin_add() for more information on inner windows
283 * @see elm_fileselector_button_inwin_mode_get()
285 * @ingroup File_Selector_Button
287 EAPI void elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value);
290 * Get whether a given file selector button widget's internal file
291 * selector will raise an Elementary "inner window", instead of a
292 * dedicated Elementary window.
294 * @param obj The file selector button widget
295 * @return @c EINA_TRUE if will use an inner window, @c EINA_TRUE
296 * if it will use a dedicated window
298 * @see elm_fileselector_button_inwin_mode_set() for more details
300 * @ingroup File_Selector_Button
302 EAPI Eina_Bool elm_fileselector_button_inwin_mode_get(const Evas_Object *obj);