File Selector Button

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Functions
File Selector Button
Elementary

## Functions
Evas_Object * | elm_fileselector_button_add (Evas_Object *parent)
| Add a new file selector button widget to the given parent Elementary (container) object.
EINA_DEPRECATED void | elm_fileselector_button_path_set (Evas_Object *obj, const char *path)
| Set the initial file system path for a given file selector button widget.
EINA_DEPRECATED const char * | elm_fileselector_button_path_get (const Evas_Object *obj)
| Get the initial file system path set for a given file selector button widget.
EINA_DEPRECATED void | elm_fileselector_button_expandable_set (Evas_Object *obj, Eina_Bool value)
| Enable/disable a tree view in the given file selector button widget's internal file selector.
EINA_DEPRECATED Eina_Bool | elm_fileselector_button_expandable_get (const Evas_Object *obj)
| Get whether tree view is enabled for the given file selector button widget's internal file selector.
EINA_DEPRECATED void | elm_fileselector_button_folder_only_set (Evas_Object *obj, Eina_Bool value)
| Set whether a given file selector button widget's internal file selector is to display folders only or the directory contents, as well.
EINA_DEPRECATED Eina_Bool | elm_fileselector_button_folder_only_get (const Evas_Object *obj)
| Get whether a given file selector button widget's internal file selector is displaying folders only or the directory contents, as well.
EINA_DEPRECATED void | elm_fileselector_button_is_save_set (Evas_Object *obj, Eina_Bool value)
| Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget's internal file selector.
EINA_DEPRECATED Eina_Bool | elm_fileselector_button_is_save_get (const Evas_Object *obj)
| Get whether the given file selector button widget's internal file selector is in "saving dialog" mode.

## Detailed Description

This is a button that, when clicked, creates an Elementary window (or inner window) with a fileselector widget" within</b>. When a file is chosen, the (inner) window is closed and the button emits a signal having the selected file as it's @p event_info. This widget encapsulates operations on its internal file selector on its own API. There is less control over its file selector than that one would have instantiating one directly. The following styles are available for this button: @li @c "default" @li @c "anchor" @li @c "hoversel_vertical" @li @c "hoversel_vertical_entry" This widget inherits from the @ref Button one, so that all the functions acting on it also work for file selector button objects. This widget emits the following signals, besides the ones sent from @ref Button: - @c "file,chosen" - the user has selected a path, whose string pointer comes as the @p event_info data (a stringshared string) - @c "language,changed" - the program's language changed - @c "focused" - When the fileselector button has received focus. (since 1.8) - @c "unfocused" - When the fileselector button has lost focus. (since 1.8) Default text parts of the fileselector_button widget that you can use for are: @li "default" - A label of the fileselector_button Default content parts of the fileselector_button widget that you can use for are: @li "icon" - Icon of the fileselector_button

Supported elm_object common APIs.

- elm_object_part_text_set
- elm_object_part_text_get
- elm_object_part_content_set
- elm_object_part_content_get
- elm_object_part_content_unset
- elm_object_disabled_set
- elm_object_disabled_get

Here is an example on its usage:

- File selector button widget example

See also
  File_Selector_Entry for a similar widget.

## Function Documentation

## ◆ elm_fileselector_button_add()

Evas_Object * elm_fileselector_button_add | ( | Evas_Object * | parent | ) |

Add a new file selector button widget to the given parent Elementary (container) object.

Parameters

  parent | The parent object

Returns
  a new file selector button widget handle or `NULL`, on errors

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ◆ elm_fileselector_button_path_set()

EINA_DEPRECATED void elm_fileselector_button_path_set | ( | Evas_Object * | obj,
|  | const char * | path
| ) |  |

Set the initial file system path for a given file selector button widget.

Parameters

  obj | The file selector button widget
  path | The path string

It must be a directory path, which will have the contents displayed initially in the file selector's view, when invoked from `obj`. The default initial path is the `"HOME"` environment variable's value.

See also
  elm_fileselector_path_get()

Deprecated:
  Use elm_fileselector_path_set() instead.

References elm_fileselector_path_set().

## ◆ elm_fileselector_button_path_get()

EINA_DEPRECATED const char * elm_fileselector_button_path_get | ( | const Evas_Object * | obj | ) |

Get the initial file system path set for a given file selector button widget.

Parameters

  obj | The file selector button widget

Returns
  path The path string

See also
  elm_fileselector_path_set() for more details

Deprecated:
  Use elm_fileselector_path_get() instead.

References elm_fileselector_path_get().

## ◆ elm_fileselector_button_expandable_set()

EINA_DEPRECATED void elm_fileselector_button_expandable_set | ( | Evas_Object * | obj,
|  | Eina_Bool | value
| ) |  |

Enable/disable a tree view in the given file selector button widget's internal file selector.

Parameters

  obj | The file selector button widget
  value | `EINA_TRUE` to enable tree view, `EINA_FALSE` to disable

This has the same effect as elm_fileselector_expandable_set(), but now applied to a file selector button's internal file selector.

Note
  There's no way to put a file selector button's internal file selector in "grid mode", as one may do with "pure" file selectors.

See also
  elm_fileselector_expandable_get()

Deprecated:
  Use elm_fileselector_expandable_set() instead.

## ◆ elm_fileselector_button_expandable_get()

EINA_DEPRECATED Eina_Bool elm_fileselector_button_expandable_get | ( | const Evas_Object * | obj | ) |

Get whether tree view is enabled for the given file selector button widget's internal file selector.

Parameters

  obj | The file selector button widget

Returns
  `EINA_TRUE` if `obj` widget's internal file selector is in tree view, `EINA_FALSE` otherwise (and or errors)

See also
  elm_fileselector_expandable_set() for more details

Deprecated:
  Use elm_fileselector_expandable_get() instead.

References EINA_FALSE.

## ◆ elm_fileselector_button_folder_only_set()

EINA_DEPRECATED void elm_fileselector_button_folder_only_set | ( | Evas_Object * | obj,
|  | Eina_Bool | value
| ) |  |

Set whether a given file selector button widget's internal file selector is to display folders only or the directory contents, as well.

Parameters

  obj | The file selector button widget
  value | `EINA_TRUE` to make `obj` widget's internal file selector only display directories, `EINA_FALSE` to make files to be displayed in it too

This has the same effect as elm_fileselector_folder_only_set(), but now applied to a file selector button's internal file selector.

See also
  elm_fileselector_folder_only_get()

Deprecated:
  Use elm_fileselector_folder_only_set() instead.

## ◆ elm_fileselector_button_folder_only_get()

EINA_DEPRECATED Eina_Bool elm_fileselector_button_folder_only_get | ( | const Evas_Object * | obj | ) |

Get whether a given file selector button widget's internal file selector is displaying folders only or the directory contents, as well.

Parameters

  obj | The file selector button widget

Returns
  `EINA_TRUE` if `obj` widget's internal file selector is only displaying directories, `EINA_FALSE` if files are being displayed in it too (and on errors)

See also
  elm_fileselector_folder_only_set() for more details

Deprecated:
  Use elm_fileselector_folder_only_get() instead.

References EINA_FALSE.

## ◆ elm_fileselector_button_is_save_set()

EINA_DEPRECATED void elm_fileselector_button_is_save_set | ( | Evas_Object * | obj,
|  | Eina_Bool | value
| ) |  |

Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget's internal file selector.

Parameters

  obj | The file selector button widget
  value | `EINA_TRUE` to make `obj` widget's internal file selector a "saving dialog", `EINA_FALSE` otherwise

This has the same effect as elm_fileselector_is_save_set(), but now applied to a file selector button's internal file selector.

See also
  elm_fileselector_is_save_get()

Deprecated:
  Use elm_fileselector_is_save_set() instead.

## ◆ elm_fileselector_button_is_save_get()

EINA_DEPRECATED Eina_Bool elm_fileselector_button_is_save_get | ( | const Evas_Object * | obj | ) |

Get whether the given file selector button widget's internal file selector is in "saving dialog" mode.

Parameters

  obj | The file selector button widget

Returns
  `EINA_TRUE`, if `obj` widget's internal file selector is in "saving dialog" mode, `EINA_FALSE` otherwise (and on errors)

See also
  elm_fileselector_is_save_set() for more details

Deprecated:
  Use elm_fileselector_is_save_get() instead.

References EINA_FALSE.