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

Macros | Functions
Dayselector

Dayselector widget: More...

## Macros
#define | elm_obj_dayselector_day_selected_set(day, selected) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_SET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool, selected)
#define | elm_obj_dayselector_day_selected_get(day, ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_GET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool *, ret)
#define | elm_obj_dayselector_week_start_set(day) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)
#define | elm_obj_dayselector_week_start_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)
#define | elm_obj_dayselector_weekend_start_set(day) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)
#define | elm_obj_dayselector_weekend_start_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)
#define | elm_obj_dayselector_weekend_length_set(length) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_SET), EO_TYPECHECK(unsigned int, length)
#define | elm_obj_dayselector_weekend_length_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_GET), EO_TYPECHECK(unsigned int *, ret)
#define | elm_obj_dayselector_weekdays_names_set(weekdays) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKDAYS_NAMES_SET), EO_TYPECHECK(const char **, weekdays)
#define | elm_obj_dayselector_weekdays_names_get(ret) ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKDAYS_NAMES_GET), EO_TYPECHECK(Eina_List **, ret)

## Functions
Evas_Object * | elm_dayselector_add (Evas_Object *parent)
| Add the dayselector. More...
void | elm_dayselector_day_selected_set (Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected)
| Set the state of given Dayselector_Day. More...
Eina_Bool | elm_dayselector_day_selected_get (const Evas_Object *obj, Elm_Dayselector_Day day)
| Get the state of given Dayselector_Day. More...
void | elm_dayselector_week_start_set (Evas_Object *obj, Elm_Dayselector_Day day)
| Set the starting day of Dayselector. More...
Elm_Dayselector_Day | elm_dayselector_week_start_get (const Evas_Object *obj)
| Get the starting day of Dayselector. More...
void | elm_dayselector_weekend_start_set (Evas_Object *obj, Elm_Dayselector_Day day)
| Set the weekend starting day of Dayselector. More...
Elm_Dayselector_Day | elm_dayselector_weekend_start_get (const Evas_Object *obj)
| Get the weekend starting day of Dayselector. More...
void | elm_dayselector_weekend_length_set (Evas_Object *obj, unsigned int length)
| Set the weekend length of Dayselector. More...
unsigned int | elm_dayselector_weekend_length_get (const Evas_Object *obj)
| Get the weekend length of Dayselector. More...
void | elm_dayselector_weekdays_names_set (Evas_Object *obj, const char *weekdays[])
| Set weekdays names to be displayed by the Dayselector. More...
Eina_List * | elm_dayselector_weekdays_names_get (const Evas_Object *obj)
| Get weekdays names displayed by the calendar. More...

## Detailed Description

Dayselector widget:

"elm_dayselector" is a day selection widget. It displays all seven days of the week and allows the user to select multiple days.

The selection can be toggle by just clicking on the day.

Dayselector also provides the functionality to check whether a day is selected or not.

First day of the week is taken from config settings by default. It can be altered by using the API elm_dayselector_week_start_set() API.

APIs are provided for setting the duration of weekend elm_dayselector_weekend_start_set() and elm_dayselector_weekend_length_set() does this job.

Two styles of weekdays and weekends are supported in Dayselector. Application can emit signals on individual check objects for setting the weekday, weekend styles.

Once the weekend start day or weekend length changes, all the weekday & weekend styles will be reset to default style. It's the application's responsibility to set the styles again by sending corresponding signals.

Supported elm_object_item 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

- "day0" indicates Sunday, "day1" indicates Monday etc. continues and so, "day6" indicates the Saturday part name.

Application can change individual day display string by using the API elm_object_part_text_set().

elm_object_part_content_set() API sets the individual day object only if the passed one is a Check widget.

Check object representing a day can be set/get by the application by using the elm_object_part_content_set/get APIs thus providing a way to handle the different check styles for individual days.

This widget inherits from the Layout one, so that all the functions acting on it also work for dayselector objects.

This widget emits the following signals, besides the ones sent from Layout:

- `"dayselector,changed"` - when the user changes the state of a day.
- `"language,changed"` - the program's language changed

Available styles for dayselector are:

- default

This example shows the usage of the widget.

- Dayselector widget example

## Macro Definition Documentation

#define elm_obj_dayselector_day_selected_get | ( |  | day,
|  |  | ret
| ) |  | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_GET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool *, ret)

Since
  1.8

Get the state of given Dayselector_Day.

Parameters

  [in] | day |
  [out] | ret |

See Also
  elm_dayselector_day_selected_get

Referenced by elm_dayselector_day_selected_get().

#define elm_obj_dayselector_day_selected_set | ( |  | day,
|  |  | selected
| ) |  | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_DAY_SELECTED_SET), EO_TYPECHECK(Elm_Dayselector_Day, day), EO_TYPECHECK(Eina_Bool, selected)

Since
  1.8

Set the state of given Dayselector_Day.

Parameters

  [in] | day |
  [in] | selected |

See Also
  elm_dayselector_day_selected_set

Referenced by elm_dayselector_day_selected_set().

#define elm_obj_dayselector_week_start_get | ( |  | ret | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)

Since
  1.8

Get the starting day of Dayselector.

Parameters

  [out] | ret |

See Also
  elm_dayselector_week_start_get

Referenced by elm_dayselector_week_start_get().

#define elm_obj_dayselector_week_start_set | ( |  | day | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEK_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)

Since
  1.8

Set the starting day of Dayselector.

Parameters

  [in] | day |

See Also
  elm_dayselector_week_start_set

Referenced by elm_dayselector_week_start_set().

#define elm_obj_dayselector_weekdays_names_get | ( |  | ret | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKDAYS_NAMES_GET), EO_TYPECHECK(Eina_List **, ret)

Since
  1.8

Get the weekdays' names

Parameters

  [out] | ret |

See Also
  elm_dayselector_weekdays_names_get

Referenced by elm_dayselector_weekdays_names_get().

#define elm_obj_dayselector_weekdays_names_set | ( |  | weekdays | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKDAYS_NAMES_SET), EO_TYPECHECK(const char **, weekdays)

Since
  1.8

Set the weekdays's names

Parameters

  [in] | weekdays |

See Also
  elm_dayselector_weekdays_names_set

Referenced by elm_dayselector_weekdays_names_set().

#define elm_obj_dayselector_weekend_length_get | ( |  | ret | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_GET), EO_TYPECHECK(unsigned int *, ret)

Since
  1.8

Get the weekend length of Dayselector.

Parameters

  [out] | ret |

See Also
  elm_dayselector_weekend_length_get

Referenced by elm_dayselector_weekend_length_get().

#define elm_obj_dayselector_weekend_length_set | ( |  | length | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_LENGTH_SET), EO_TYPECHECK(unsigned int, length)

Since
  1.8

Set the weekend length of Dayselector.

Parameters

  [in] | length |

See Also
  elm_dayselector_weekend_length_set

Referenced by elm_dayselector_weekend_length_set().

#define elm_obj_dayselector_weekend_start_get | ( |  | ret | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_GET), EO_TYPECHECK(Elm_Dayselector_Day *, ret)

Since
  1.8

Get the weekend starting day of Dayselector.

Parameters

  [out] | ret |

See Also
  elm_dayselector_weekend_start_get

Referenced by elm_dayselector_weekend_start_get().

#define elm_obj_dayselector_weekend_start_set | ( |  | day | ) | ELM_OBJ_DAYSELECTOR_ID(ELM_OBJ_DAYSELECTOR_SUB_ID_WEEKEND_START_SET), EO_TYPECHECK(Elm_Dayselector_Day, day)

Since
  1.8

Set the weekend starting day of Dayselector.

Parameters

  [in] | day |

See Also
  elm_dayselector_weekend_start_set

Referenced by elm_dayselector_weekend_start_set().

## Function Documentation

Evas_Object* elm_dayselector_add | ( | Evas_Object * | parent | ) |

Add the dayselector.

Parameters

  parent | Parent object

Returns
  New dayselector object or `NULL`, if it cannot be created

Eina_Bool elm_dayselector_day_selected_get | ( | const Evas_Object * | obj,
|  | Elm_Dayselector_Day | day
| ) |  |

Get the state of given Dayselector_Day.

Parameters

  obj | Dayselector object
  day | Dayselector_Day that the user want to know state.

Returns
  `EINA_TRUE`, if the Day is selected

See Also
  Elm_Dayselector_Day
  elm_dayselector_day_selected_set()

References elm_obj_dayselector_day_selected_get.

void elm_dayselector_day_selected_set | ( | Evas_Object * | obj,
|  | Elm_Dayselector_Day | day,
|  | Eina_Bool | selected
| ) |  |

Set the state of given Dayselector_Day.

Parameters

  obj | Dayselector object
  day | Dayselector_Day that the user want to set state.
  selected | state of the day. `EINA_TRUE` is selected.

See Also
  Elm_Dayselector_Day
  elm_dayselector_day_selected_get()

References elm_obj_dayselector_day_selected_set.

Elm_Dayselector_Day elm_dayselector_week_start_get | ( | const Evas_Object * | obj | ) |

Get the starting day of Dayselector.

Parameters

  obj | Dayselector object

Returns
  Day from where Dayselector displays all the weekdays in order.

See Also
  Elm_Dayselector_Day
  elm_dayselector_week_start_set()

References elm_obj_dayselector_week_start_get.

void elm_dayselector_week_start_set | ( | Evas_Object * | obj,
|  | Elm_Dayselector_Day | day
| ) |  |

Set the starting day of Dayselector.

Parameters

  obj | Dayselector object
  day | Dayselector_Day the first day that the user wants to display.

See Also
  Elm_Dayselector_Day
  elm_dayselector_week_start_get()

References elm_obj_dayselector_week_start_set.

Eina_List* elm_dayselector_weekdays_names_get | ( | const Evas_Object * | obj | ) |

Get weekdays names displayed by the calendar.

Parameters

  obj | The Dayselector object.

Returns
  A list of seven strings to be used as weekday names.

By default, weekdays abbreviations get from system are displayed: E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat" The first string is related to Sunday, the second to Monday...

See Also
  elm_dayselector_weekdays_name_set()

Since
  1.8

References elm_obj_dayselector_weekdays_names_get.

void elm_dayselector_weekdays_names_set | ( | Evas_Object * | obj,
|  | const char * | weekdays[]
| ) |  |

Set weekdays names to be displayed by the Dayselector.

Parameters

  obj | The Dayselector object.
  weekdays | Array of seven strings to be used as weekday names.

Warning
  It must have 7 elements, or it will access invalid memory.
  The strings must be NULL terminated ('\0').

By default or if weekdays is `NULL`, weekdays abbreviations get from system are displayed: E.g. for an en_US locale: "Sun, Mon, Tue, Wed, Thu, Fri, Sat"

The first string should be related to Sunday, the second to Monday...

The usage should be like this:

const char *weekdays[] =
{
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"
};
elm_dayselector_wekdays_names_set(calendar, weekdays);

See Also
  elm_dayselector_weekdays_name_get()
  elm_dayselector_weekend_start_set()

Since
  1.8

References elm_obj_dayselector_weekdays_names_set.

unsigned int elm_dayselector_weekend_length_get | ( | const Evas_Object * | obj | ) |

Get the weekend length of Dayselector.

Parameters

  obj | Dayselector object

Returns
  Number of days marked as a weekend.

See Also
  Elm_Dayselector_Day
  elm_dayselector_weekend_length_set()

References elm_obj_dayselector_weekend_length_get.

void elm_dayselector_weekend_length_set | ( | Evas_Object * | obj,
|  | unsigned int | length
| ) |  |

Set the weekend length of Dayselector.

Parameters

  obj | Dayselector object
  length | Weekend length, number of days as an integer.

See Also
  elm_dayselector_weekend_length_get()

References elm_obj_dayselector_weekend_length_set.

Elm_Dayselector_Day elm_dayselector_weekend_start_get | ( | const Evas_Object * | obj | ) |

Get the weekend starting day of Dayselector.

Parameters

  obj | Dayselector object

Returns
  Elm_Dayselector_Day Day from where weekend starts.

See Also
  Elm_Dayselector_Day
  elm_dayselector_weekend_start_set()

References elm_obj_dayselector_weekend_start_get.

void elm_dayselector_weekend_start_set | ( | Evas_Object * | obj,
|  | Elm_Dayselector_Day | day
| ) |  |

Set the weekend starting day of Dayselector.

Parameters

  obj | Dayselector object
  day | Dayselector_Day the first day from where weekend starts.

See Also
  Elm_Dayselector_Day
  elm_dayselector_weekend_start_get()

References elm_obj_dayselector_weekend_start_set.

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