Dayselector

Dayselector widget: More...

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
}
 Identifies the day of the week. More...

Functions

Evas_Object * elm_dayselector_add (Evas_Object *parent)
 Add the dayselector.
void elm_dayselector_day_selected_set (Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected)
 Set the state of given Dayselector_Day.
Eina_Bool elm_dayselector_day_selected_get (const Evas_Object *obj, Elm_Dayselector_Day day)
 Get the state of given Dayselector_Day.
void elm_dayselector_week_start_set (Evas_Object *obj, Elm_Dayselector_Day day)
 Set the starting day of Dayselector.
Elm_Dayselector_Day elm_dayselector_week_start_get (const Evas_Object *obj)
 Get the starting day of Dayselector.
void elm_dayselector_weekend_start_set (Evas_Object *obj, Elm_Dayselector_Day day)
 Set the weekend starting day of Dayselector.
Elm_Dayselector_Day elm_dayselector_weekend_start_get (const Evas_Object *obj)
 Get the weekend starting day of Dayselector.
void elm_dayselector_weekend_length_set (Evas_Object *obj, unsigned int length)
 Set the weekend length of Dayselector.
unsigned int elm_dayselector_weekend_length_get (const Evas_Object *obj)
 Get the weekend length of Dayselector.

Detailed Description

Dayselector widget:

dayselector_inheritance_tree.png
preview-00.png

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

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


Enumeration Type Documentation

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, don't use.

Examples:
dayselector_example.c.

Function Documentation

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
Eina_Bool elm_dayselector_day_selected_get ( const Evas_Object *  obj,
Elm_Dayselector_Day  day 
)

Get the state of given Dayselector_Day.

Parameters:
objDayselector object
dayDayselector_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_check_state_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:
objDayselector object
dayDayselector_Day that the user want to set state.
selectedstate of the day. EINA_TRUE is selected.
See also:
Elm_Dayselector_Day
elm_dayselector_day_selected_get()

References elm_check_state_set().

Elm_Dayselector_Day elm_dayselector_week_start_get ( const Evas_Object *  obj)

Get the starting day of Dayselector.

Parameters:
objDayselector object
Returns:
Day from where Dayselector displays all the weekdays in order.
See also:
Elm_Dayselector_Day
elm_dayselector_week_start_set()

References ELM_DAYSELECTOR_MAX.

void elm_dayselector_week_start_set ( Evas_Object *  obj,
Elm_Dayselector_Day  day 
)

Set the starting day of Dayselector.

Parameters:
objDayselector object
dayDayselector_Day the first day that the user wants to display.
See also:
Elm_Dayselector_Day
elm_dayselector_week_start_get()

References ELM_WIDGET_DATA.

unsigned int elm_dayselector_weekend_length_get ( const Evas_Object *  obj)

Get the weekend length of Dayselector.

Parameters:
objDayselector object
Returns:
Number of days marked as a weekend.
See also:
Elm_Dayselector_Day
elm_dayselector_weekend_length_set()
void elm_dayselector_weekend_length_set ( Evas_Object *  obj,
unsigned int  length 
)

Set the weekend length of Dayselector.

Parameters:
objDayselector object
lengthWeekend length, number of days as an integer.
See also:
elm_dayselector_weekend_length_get()
Elm_Dayselector_Day elm_dayselector_weekend_start_get ( const Evas_Object *  obj)

Get the weekend starting day of Dayselector.

Parameters:
objDayselector object
Returns:
Elm_Dayselector_Day Day from where weekend starts.
See also:
Elm_Dayselector_Day
elm_dayselector_weekend_start_set()

References ELM_DAYSELECTOR_MAX.

void elm_dayselector_weekend_start_set ( Evas_Object *  obj,
Elm_Dayselector_Day  day 
)

Set the weekend starting day of Dayselector.

Parameters:
objDayselector object
dayDayselector_Day the first day from where weekend starts.
See also:
Elm_Dayselector_Day
elm_dayselector_weekend_start_get()