Macros | Enumerations | Functions
Dayselector

Dayselector widget: More...

Macros

#define ELM_DAYSELECTOR_CLASS   elm_dayselector_class_get()
 Elementary dayselector class.
 

Enumerations

enum  Elm_Dayselector_Day {
  ELM_DAYSELECTOR_SUN = 0 ,
  ELM_DAYSELECTOR_MON ,
  ELM_DAYSELECTOR_TUE ,
  ELM_DAYSELECTOR_WED ,
  ELM_DAYSELECTOR_THU ,
  ELM_DAYSELECTOR_FRI ,
  ELM_DAYSELECTOR_SAT ,
  ELM_DAYSELECTOR_MAX ,
  ELM_DAYSELECTOR_SUN = 0 ,
  ELM_DAYSELECTOR_MON ,
  ELM_DAYSELECTOR_TUE ,
  ELM_DAYSELECTOR_WED ,
  ELM_DAYSELECTOR_THU ,
  ELM_DAYSELECTOR_FRI ,
  ELM_DAYSELECTOR_SAT ,
  ELM_DAYSELECTOR_MAX
}
 Identifies the day of the week. More...
 
enum  Elm_Dayselector_Day {
  ELM_DAYSELECTOR_SUN = 0 ,
  ELM_DAYSELECTOR_MON ,
  ELM_DAYSELECTOR_TUE ,
  ELM_DAYSELECTOR_WED ,
  ELM_DAYSELECTOR_THU ,
  ELM_DAYSELECTOR_FRI ,
  ELM_DAYSELECTOR_SAT ,
  ELM_DAYSELECTOR_MAX ,
  ELM_DAYSELECTOR_SUN = 0 ,
  ELM_DAYSELECTOR_MON ,
  ELM_DAYSELECTOR_TUE ,
  ELM_DAYSELECTOR_WED ,
  ELM_DAYSELECTOR_THU ,
  ELM_DAYSELECTOR_FRI ,
  ELM_DAYSELECTOR_SAT ,
  ELM_DAYSELECTOR_MAX
}
 Identifies the day of the week. More...
 

Functions

EOAPI void elm_obj_dayselector_week_start_set (Eo *obj, Elm_Dayselector_Day day)
 Set the starting day of Dayselector. More...
 
EOAPI Elm_Dayselector_Day elm_obj_dayselector_week_start_get (const Eo *obj)
 Get the starting day of Dayselector. More...
 
EOAPI void elm_obj_dayselector_weekend_length_set (Eo *obj, unsigned int length)
 Set the weekend length of Dayselector. More...
 
EOAPI unsigned int elm_obj_dayselector_weekend_length_get (const Eo *obj)
 Get the weekend length of Dayselector. More...
 
EOAPI void elm_obj_dayselector_weekend_start_set (Eo *obj, Elm_Dayselector_Day day)
 Set the weekend starting day of Dayselector. More...
 
EOAPI Elm_Dayselector_Day elm_obj_dayselector_weekend_start_get (const Eo *obj)
 Get the weekend starting day of Dayselector. More...
 
EOAPI void elm_obj_dayselector_weekdays_names_set (Eo *obj, const char **weekdays)
 Set weekdays names to be displayed by the Dayselector. More...
 
EOAPI Eina_Listelm_obj_dayselector_weekdays_names_get (const Eo *obj)
 Get weekdays names displayed by the calendar. More...
 
EOAPI void elm_obj_dayselector_day_selected_set (Eo *obj, Elm_Dayselector_Day day, Eina_Bool selected)
 Set the state of given Dayselector_Day. More...
 
EOAPI Eina_Bool elm_obj_dayselector_day_selected_get (const Eo *obj, Elm_Dayselector_Day day)
 Get the state of given Dayselector_Day. More...
 
Evas_Objectelm_dayselector_add (Evas_Object *parent)
 Add the dayselector. 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.

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 :

Available styles for dayselector are:

This example shows the usage of the widget.

Enumeration Type Documentation

◆ Elm_Dayselector_Day [1/2]

Identifies the day of the week.

API can call the selection/unselection of day with this as a parameter.

See also elm_obj_dayselector_day_selected_set, elm_obj_dayselector_day_selected_get.

Enumerator
ELM_DAYSELECTOR_SUN 

Indicates Sunday.

ELM_DAYSELECTOR_MON 

Indicates Monday.

ELM_DAYSELECTOR_TUE 

Indicates Tuesday.

ELM_DAYSELECTOR_WED 

Indicates Wednesday.

ELM_DAYSELECTOR_THU 

Indicates Thursday.

ELM_DAYSELECTOR_FRI 

Indicates Friday.

ELM_DAYSELECTOR_SAT 

Indicates Saturday.

ELM_DAYSELECTOR_MAX 

Sentinel value to indicate last enum field during iteration.

ELM_DAYSELECTOR_SUN 

Indicates Sunday.

ELM_DAYSELECTOR_MON 

Indicates Monday.

ELM_DAYSELECTOR_TUE 

Indicates Tuesday.

ELM_DAYSELECTOR_WED 

Indicates Wednesday.

ELM_DAYSELECTOR_THU 

Indicates Thursday.

ELM_DAYSELECTOR_FRI 

Indicates Friday.

ELM_DAYSELECTOR_SAT 

Indicates Saturday.

ELM_DAYSELECTOR_MAX 

Sentinel value to indicate last enum field during iteration.

Examples
dayselector_example.c.

◆ Elm_Dayselector_Day [2/2]

Identifies the day of the week.

API can call the selection/unselection of day with this as a parameter.

See also elm_dayselector_day_selected_set, elm_dayselector_day_selected_get.

Enumerator
ELM_DAYSELECTOR_SUN 

Indicates Sunday.

ELM_DAYSELECTOR_MON 

Indicates Monday.

ELM_DAYSELECTOR_TUE 

Indicates Tuesday.

ELM_DAYSELECTOR_WED 

Indicates Wednesday.

ELM_DAYSELECTOR_THU 

Indicates Thursday.

ELM_DAYSELECTOR_FRI 

Indicates Friday.

ELM_DAYSELECTOR_SAT 

Indicates Saturday.

ELM_DAYSELECTOR_MAX 

Sentinel value to indicate last enum field during iteration.

ELM_DAYSELECTOR_SUN 

Indicates Sunday.

ELM_DAYSELECTOR_MON 

Indicates Monday.

ELM_DAYSELECTOR_TUE 

Indicates Tuesday.

ELM_DAYSELECTOR_WED 

Indicates Wednesday.

ELM_DAYSELECTOR_THU 

Indicates Thursday.

ELM_DAYSELECTOR_FRI 

Indicates Friday.

ELM_DAYSELECTOR_SAT 

Indicates Saturday.

ELM_DAYSELECTOR_MAX 

Sentinel value to indicate last enum field during iteration.

Function Documentation

◆ elm_obj_dayselector_week_start_set()

EOAPI void elm_obj_dayselector_week_start_set ( Eo *  obj,
Elm_Dayselector_Day  day 
)

Set the starting day of Dayselector.

See also Elm_Dayselector_Day, elm_obj_dayselector_week_start_get.

Parameters
[in]objThe object.
[in]dayDayselector_Day the first day that the user wants to display.

◆ elm_obj_dayselector_week_start_get()

EOAPI Elm_Dayselector_Day elm_obj_dayselector_week_start_get ( const Eo *  obj)

Get the starting day of Dayselector.

See also Elm_Dayselector_Day, elm_obj_dayselector_week_start_set.

Parameters
[in]objThe object.
Returns
Dayselector_Day the first day that the user wants to display.

◆ elm_obj_dayselector_weekend_length_set()

EOAPI void elm_obj_dayselector_weekend_length_set ( Eo *  obj,
unsigned int  length 
)

Set the weekend length of Dayselector.

See also elm_obj_dayselector_weekend_length_get.

Parameters
[in]objThe object.
[in]lengthWeekend length, number of days as an integer.

◆ elm_obj_dayselector_weekend_length_get()

EOAPI unsigned int elm_obj_dayselector_weekend_length_get ( const Eo *  obj)

Get the weekend length of Dayselector.

See also Elm_Dayselector_Day, elm_obj_dayselector_weekend_length_set.

Parameters
[in]objThe object.
Returns
Weekend length, number of days as an integer.

◆ elm_obj_dayselector_weekend_start_set()

EOAPI void elm_obj_dayselector_weekend_start_set ( Eo *  obj,
Elm_Dayselector_Day  day 
)

Set the weekend starting day of Dayselector.

See also Elm_Dayselector_Day, elm_obj_dayselector_weekend_start_get.

Parameters
[in]objThe object.
[in]dayDayselector_Day the first day from where weekend starts.

◆ elm_obj_dayselector_weekend_start_get()

EOAPI Elm_Dayselector_Day elm_obj_dayselector_weekend_start_get ( const Eo *  obj)

Get the weekend starting day of Dayselector.

See also Elm_Dayselector_Day, elm_obj_dayselector_weekend_start_set.

Parameters
[in]objThe object.
Returns
Dayselector_Day the first day from where weekend starts.

◆ elm_obj_dayselector_weekdays_names_set()

EOAPI void elm_obj_dayselector_weekdays_names_set ( Eo *  obj,
const char **  weekdays 
)

Set weekdays names to be displayed by the Dayselector.

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

See also elm_obj_dayselector_weekdays_names_get, elm_obj_dayselector_weekend_start_set.

Parameters
[in]objThe object.
[in]weekdaysArray of seven strings to be used as weekday names. Warning: It must have 7 elements, or it will access invalid memory. Warning: The strings must be NULL terminated ('\0').
Since
1.8

◆ elm_obj_dayselector_weekdays_names_get()

EOAPI Eina_List * elm_obj_dayselector_weekdays_names_get ( const Eo *  obj)

Get weekdays names displayed by the calendar.

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

Parameters
[in]objThe object.
Returns
A list of seven strings to be used as weekday names.
Since
1.8

◆ elm_obj_dayselector_day_selected_set()

EOAPI void elm_obj_dayselector_day_selected_set ( Eo *  obj,
Elm_Dayselector_Day  day,
Eina_Bool  selected 
)

Set the state of given Dayselector_Day.

See also Elm_Dayselector_Day, elm_obj_dayselector_day_selected_get.

Parameters
[in]objThe object.
[in]dayDayselector_Day that the user want to set state.
[in]selectedState of the day. true is selected.

◆ elm_obj_dayselector_day_selected_get()

EOAPI Eina_Bool elm_obj_dayselector_day_selected_get ( const Eo *  obj,
Elm_Dayselector_Day  day 
)

Get the state of given Dayselector_Day.

See also Elm_Dayselector_Day, elm_obj_dayselector_day_selected_set.

Parameters
[in]objThe object.
[in]dayDayselector_Day that the user want to know state.
Returns
true on success, false on failure

◆ elm_dayselector_add()

Evas_Object * elm_dayselector_add ( Evas_Object parent)

Add the dayselector.

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

References EINA_SAFETY_ON_NULL_RETURN_VAL.