2 * @defgroup Dayselector Dayselector
4 * @image html img/widget/dayselector/preview-00.png
5 * @image latex img/widget/dayselector/preview-00.eps
7 * @brief <b>Dayselector widet:</b>
9 *"elm_dayselector" is a day selection widget. It displays all seven days of
10 * the week and allows the user to select multiple days.
12 * The selection can be toggle by just clicking on the day.
14 * Dayselector also provides the functionality to check whether a day is
17 * First day of the week is taken from config settings by default. It can be
18 * altered by using the API elm_dayselector_week_start_set() API.
20 * APIs are provided for setting the duration of weekend
21 * elm_dayselector_weekend_start_set() and elm_dayselector_weekend_length_set()
24 * Two styles of weekdays and weekends are supported in Dayselector.
25 * Application can emit signals on individual check objects for setting the
26 * weekday, weekend styles.
28 * Once the weekend start day or weekend length changes, all the weekday &
29 * weekend styles will be reset to default style. It's the application's
30 * responsibility to set the styles again by sending corresponding signals.
32 * Supported elm_object_item common APIs.
34 * @li elm_object_part_text_set,
35 * @li elm_object_part_text_get,
36 * @li elm_object_part_content_set,
37 * @li elm_object_part_content_get,
38 * @li elm_object_part_content_unset
40 * @li "day0" indicates Sunday, "day1" indicates Monday etc. continues and so,
41 * "day6" indicates the Saturday part name.
43 * Application can change individual day display string by using the API
44 * elm_object_part_text_set().
46 * elm_object_part_content_set() API sets the individual day object only if
47 * the passed one is a Check widget.
49 * Check object representing a day can be set/get by the application by using
50 * the elm_object_part_content_set/get APIs thus providing a way to handle
51 * the different check styles for individual days.
53 * The widget emits the following signals:
55 * <b>"dayselector,changed"</b> - This signal is emitted when the user changes
58 * Available styles for dayselector are:
59 * - <b>@c default </b>
61 * This example shows the usage of the widget.
62 * @li @ref dayselector_example
67 * @addtogroup Dayselector
72 * Identifies the day of the week.
73 * API can call the selection/unselection of day with this as a parameter.
75 * @see elm_dayselector_day_selected_set()
76 * @see elm_dayselector_day_selected_get()
80 ELM_DAYSELECTOR_SUN = 0,/**< indicates Sunday */
81 ELM_DAYSELECTOR_MON, /**< indicates Monday */
82 ELM_DAYSELECTOR_TUE, /**< indicates Tuesday */
83 ELM_DAYSELECTOR_WED, /**< indicates Wednesday */
84 ELM_DAYSELECTOR_THU, /**< indicates Thursday */
85 ELM_DAYSELECTOR_FRI, /**< indicates Friday */
86 ELM_DAYSELECTOR_SAT, /**< indicates Saturday */
87 ELM_DAYSELECTOR_MAX /**< Sentinel value, @b don't use */
88 } Elm_Dayselector_Day;
91 * Add the dayselector.
93 * @param parent Parent object
94 * @return New dayselector object or @c NULL, if it cannot be created
96 * @ingroup Dayselector
98 EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
101 * Set the state of given Dayselector_Day.
103 * @param obj Dayselector object
104 * @param day Dayselector_Day that the user want to set state.
105 * @param selected state of the day. @c EINA_TRUE is selected.
107 * @see Elm_Dayselector_Day
108 * @see elm_dayselector_day_selected_get()
111 EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
114 * Get the state of given Dayselector_Day.
116 * @param obj Dayselector object
117 * @param day Dayselector_Day that the user want to know state.
118 * @return @c EINA_TRUE, if the Day is selected
120 * @see Elm_Dayselector_Day
121 * @see elm_dayselector_day_selected_set()
124 EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
127 * Set the starting day of Dayselector.
129 * @param obj Dayselector object
130 * @param day Dayselector_Day the first day that the user wants to display.
132 * @see Elm_Dayselector_Day
133 * @see elm_dayselector_week_start_get()
136 EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
139 * Get the starting day of Dayselector.
141 * @param obj Dayselector object
142 * @return Day from where Dayselector displays all the weekdays in order.
144 * @see Elm_Dayselector_Day
145 * @see elm_dayselector_week_start_set()
148 EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
151 * Set the weekend starting day of Dayselector.
153 * @param obj Dayselector object
154 * @param day Dayselector_Day the first day from where weekend starts.
156 * @see Elm_Dayselector_Day
157 * @see elm_dayselector_weekend_start_get()
160 EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
163 * Get the weekend starting day of Dayselector.
165 * @param obj Dayselector object
166 * @return Elm_Dayselector_Day Day from where weekend starts.
168 * @see Elm_Dayselector_Day
169 * @see elm_dayselector_weekend_start_set()
172 EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
175 * Set the weekend length of Dayselector.
177 * @param obj Dayselector object
178 * @param length Weekend length, number of days as an integer.
180 * @see elm_dayselector_weekend_length_get()
183 EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
186 * Get the weekend length of Dayselector.
188 * @param obj Dayselector object
189 * @return Number of days marked as a weekend.
191 * @see Elm_Dayselector_Day
192 * @see elm_dayselector_weekend_length_set()
195 EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);