- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
File Selector Button

## Macros
#define | elm_obj_fileselector_button_window_title_set(title) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_TITLE_SET), EO_TYPECHECK(const char *, title)
#define | elm_obj_fileselector_button_window_title_get(ret) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_TITLE_GET), EO_TYPECHECK(const char **, ret)
#define | elm_obj_fileselector_button_window_size_set(width, height) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_SIZE_SET), EO_TYPECHECK(Evas_Coord, width), EO_TYPECHECK(Evas_Coord, height)
#define | elm_obj_fileselector_button_window_size_get(width, height) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_SIZE_GET), EO_TYPECHECK(Evas_Coord *, width), EO_TYPECHECK(Evas_Coord *, height)
#define | elm_obj_fileselector_button_path_set(path) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_PATH_SET), EO_TYPECHECK(const char *, path)
#define | elm_obj_fileselector_button_path_get(ret) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_PATH_GET), EO_TYPECHECK(const char **, ret)
#define | elm_obj_fileselector_button_expandable_set(value) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_EXPANDABLE_SET), EO_TYPECHECK(Eina_Bool, value)
#define | elm_obj_fileselector_button_expandable_get(ret) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_EXPANDABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_button_folder_only_set(value) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_FOLDER_ONLY_SET), EO_TYPECHECK(Eina_Bool, value)
#define | elm_obj_fileselector_button_folder_only_get(ret) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_FOLDER_ONLY_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_button_is_save_set(value) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_IS_SAVE_SET), EO_TYPECHECK(Eina_Bool, value)
#define | elm_obj_fileselector_button_is_save_get(ret) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_IS_SAVE_GET), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_fileselector_button_inwin_mode_set(value) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_INWIN_MODE_SET), EO_TYPECHECK(Eina_Bool, value)
#define | elm_obj_fileselector_button_inwin_mode_get(ret) ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_INWIN_MODE_GET), EO_TYPECHECK(Eina_Bool *, ret)

## Functions
Evas_Object * | elm_fileselector_button_add (Evas_Object *parent)
| Add a new file selector button widget to the given parent Elementary (container) object. More...
void | elm_fileselector_button_window_title_set (Evas_Object *obj, const char *title)
| Set the title for a given file selector button widget's window. More...
const char * | elm_fileselector_button_window_title_get (const Evas_Object *obj)
| Get the title for a given file selector button widget's window. More...
void | elm_fileselector_button_window_size_set (Evas_Object *obj, Evas_Coord width, Evas_Coord height)
| Set the size of a given file selector button widget's window, holding the file selector itself. More...
void | elm_fileselector_button_window_size_get (const Evas_Object *obj, Evas_Coord *width, Evas_Coord *height)
| Get the size of a given file selector button widget's window, holding the file selector itself. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
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. More...
void | elm_fileselector_button_inwin_mode_set (Evas_Object *obj, Eina_Bool value)
| Set whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window. More...
Eina_Bool | elm_fileselector_button_inwin_mode_get (const Evas_Object *obj)
| Get whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window. More...

## Detailed Description

This is a button that, when clicked, creates an Elementary window (or inner window) with a fileselector widget" within. When a file is chosen, the (inner) window is closed and the button emits a signal having the selected file as it's `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:

- `"default"`
- `"anchor"`
- `"hoversel_vertical"`
- `"hoversel_vertical_entry"`

This widget inherits from the 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 Button:

- `"file,chosen"` - the user has selected a path, whose string pointer comes as the `event_info` data (a stringshared string)
- `"language,changed"` - the program's language changed

Default text parts of the fileselector_button widget that you can use for are:

- "default" - Label of the fileselector_button

Default content parts of the fileselector_button widget that you can use for are:

- "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.

## Macro Definition Documentation

#define elm_obj_fileselector_button_expandable_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_EXPANDABLE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether tree view is enabled for the given file selector

Parameters

  [out] | ret |

See Also
  elm_fileselector_button_expandable_get

Referenced by elm_fileselector_button_expandable_get().

#define elm_obj_fileselector_button_expandable_set | ( |  | value | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_EXPANDABLE_SET), EO_TYPECHECK(Eina_Bool, value)

Since
  1.8

Enable/disable a tree view in the given file selector button

Parameters

  [in] | value |

See Also
  elm_fileselector_button_expandable_set

Referenced by elm_fileselector_button_expandable_set().

#define elm_obj_fileselector_button_folder_only_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_FOLDER_ONLY_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

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

Parameters

  [out] | ret |

See Also
  elm_fileselector_button_folder_only_get

Referenced by elm_fileselector_button_folder_only_get().

#define elm_obj_fileselector_button_folder_only_set | ( |  | value | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_FOLDER_ONLY_SET), EO_TYPECHECK(Eina_Bool, value)

Since
  1.8

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

Parameters

  [in] | value |

See Also
  elm_fileselector_button_folder_only_set

Referenced by elm_fileselector_button_folder_only_set().

#define elm_obj_fileselector_button_inwin_mode_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_INWIN_MODE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.

Parameters

  [out] | ret |

See Also
  elm_fileselector_button_inwin_mode_get

Referenced by elm_fileselector_button_inwin_mode_get().

#define elm_obj_fileselector_button_inwin_mode_set | ( |  | value | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_INWIN_MODE_SET), EO_TYPECHECK(Eina_Bool, value)

Since
  1.8

Set whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window. By default, it won't.

Parameters

  [in] | value |

See Also
  elm_fileselector_button_inwin_mode_set

Referenced by elm_fileselector_button_inwin_mode_set().

#define elm_obj_fileselector_button_is_save_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_IS_SAVE_GET), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

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

Parameters

  [out] | ret |

See Also
  elm_fileselector_button_is_save_get

Referenced by elm_fileselector_button_is_save_get().

#define elm_obj_fileselector_button_is_save_set | ( |  | value | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_IS_SAVE_SET), EO_TYPECHECK(Eina_Bool, value)

Since
  1.8

Enable/disable the file name entry box where the user can type

Parameters

  [in] | value |

See Also
  elm_fileselector_button_is_save_set

Referenced by elm_fileselector_button_is_save_set().

#define elm_obj_fileselector_button_path_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_PATH_GET), EO_TYPECHECK(const char **, ret)

Since
  1.8

Get the initial file system path set for a given file selector

Parameters

  [out] | ret |

See Also
  elm_fileselector_button_path_get

Referenced by elm_fileselector_button_path_get().

#define elm_obj_fileselector_button_path_set | ( |  | path | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_PATH_SET), EO_TYPECHECK(const char *, path)

Since
  1.8

Set the initial file system path for a given file selector

Parameters

  [in] | path |

See Also
  elm_fileselector_button_path_set

Referenced by elm_fileselector_button_path_set().

#define elm_obj_fileselector_button_window_size_get | ( |  | width,
|  |  | height
| ) |  | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_SIZE_GET), EO_TYPECHECK(Evas_Coord *, width), EO_TYPECHECK(Evas_Coord *, height)

Since
  1.8

Get the size of a given file selector button widget's window, holding the file selector itself.

Parameters

  [out] | width |
  [out] | height |

See Also
  elm_fileselector_button_window_size_get

Referenced by elm_fileselector_button_window_size_get().

#define elm_obj_fileselector_button_window_size_set | ( |  | width,
|  |  | height
| ) |  | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_SIZE_SET), EO_TYPECHECK(Evas_Coord, width), EO_TYPECHECK(Evas_Coord, height)

Since
  1.8

Set the size of a given file selector button widget's window, holding the file selector itself.

Parameters

  [in] | width |
  [in] | height |

See Also
  elm_fileselector_button_window_size_set

Referenced by elm_fileselector_button_window_size_set().

#define elm_obj_fileselector_button_window_title_get | ( |  | ret | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_TITLE_GET), EO_TYPECHECK(const char **, ret)

Since
  1.8

Get the title for a given file selector button widget's

Parameters

  [out] | ret |

See Also
  elm_fileselector_button_window_title_get

Referenced by elm_fileselector_button_window_title_get().

#define elm_obj_fileselector_button_window_title_set | ( |  | title | ) | ELM_OBJ_FILESELECTOR_BUTTON_ID(ELM_OBJ_FILESELECTOR_BUTTON_SUB_ID_WINDOW_TITLE_SET), EO_TYPECHECK(const char *, title)

Since
  1.8

Set the title for a given file selector button widget's window

Parameters

  [in] | title |

See Also
  elm_fileselector_button_window_title_set

Referenced by elm_fileselector_button_window_title_set().

## Function Documentation

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

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

References elm_obj_fileselector_button_expandable_get.

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()

References elm_obj_fileselector_button_expandable_set.

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_button_folder_only_set() for more details

References elm_obj_fileselector_button_folder_only_get.

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()

References elm_obj_fileselector_button_folder_only_set.

Eina_Bool elm_fileselector_button_inwin_mode_get | ( | const Evas_Object * | obj | ) |

Get whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.

Parameters

  obj | The file selector button widget

Returns
  `EINA_TRUE` if will use an inner window, `EINA_TRUE` if it will use a dedicated window

See Also
  elm_fileselector_button_inwin_mode_set() for more details

References elm_obj_fileselector_button_inwin_mode_get.

void elm_fileselector_button_inwin_mode_set | ( | Evas_Object * | obj,
|  | Eina_Bool | value
| ) |  |

Set whether a given file selector button widget's internal file selector will raise an Elementary "inner window", instead of a dedicated Elementary window.

By default, it won't.

Parameters

  obj | The file selector button widget
  value | `EINA_TRUE` to make it use an inner window, `EINA_FALSE` to make it use a dedicated window

See Also
  elm_win_inwin_add() for more information on inner windows
  elm_fileselector_button_inwin_mode_get()

References elm_obj_fileselector_button_inwin_mode_set.

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_button_is_save_set() for more details

References elm_obj_fileselector_button_is_save_get.

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()

References elm_obj_fileselector_button_is_save_set.

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_button_path_set() for more details

References elm_obj_fileselector_button_path_get.

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_button_path_get()

References elm_obj_fileselector_button_path_set.

void elm_fileselector_button_window_size_get | ( | const Evas_Object * | obj,
|  | Evas_Coord * | width,
|  | Evas_Coord * | height
| ) |  |

Get the size of a given file selector button widget's window, holding the file selector itself.

Parameters

  obj | The file selector button widget
  width | Pointer into which to store the width value
  height | Pointer into which to store the height value

Note
  Use `NULL` pointers on the size values you're not interested in: they'll be ignored by the function.

See Also
  elm_fileselector_button_window_size_set(), for more details

References elm_obj_fileselector_button_window_size_get.

void elm_fileselector_button_window_size_set | ( | Evas_Object * | obj,
|  | Evas_Coord | width,
|  | Evas_Coord | height
| ) |  |

Set the size of a given file selector button widget's window, holding the file selector itself.

Parameters

  obj | The file selector button widget
  width | The window's width
  height | The window's height

Note
  it will only take any effect if the file selector button widget is not under "inwin mode". The default size for the window (when applicable) is 400x400 pixels.

See Also
  elm_fileselector_button_window_size_get()

References elm_obj_fileselector_button_window_size_set.

const char* elm_fileselector_button_window_title_get | ( | const Evas_Object * | obj | ) |

Get the title for a given file selector button widget's window.

Parameters

  obj | The file selector button widget

Returns
  Title of the file selector button's window

See Also
  elm_fileselector_button_window_title_get() for more details

References elm_obj_fileselector_button_window_title_get.

void elm_fileselector_button_window_title_set | ( | Evas_Object * | obj,
|  | const char * | title
| ) |  |

Set the title for a given file selector button widget's window.

Parameters

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

This will change the popup window's title, when the file selector pops out after a click on the button. Those windows have the default (unlocalized) value of `"Select a file"` as titles.

Note
  It will only take effect if the file selector button widget is not under "inwin mode".

See Also
  elm_fileselector_button_window_title_get()

References elm_obj_fileselector_button_window_title_set.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:12