2 * @defgroup Dayselector Dayselector
5 * @image html dayselector_inheritance_tree.png
6 * @image latex dayselector_inheritance_tree.eps
8 * @image html img/widget/dayselector/preview-00.png
9 * @image latex img/widget/dayselector/preview-00.eps
11 * @brief <b>Dayselector widget:</b>
13 *"elm_dayselector" is a day selection widget. It displays all seven days of
14 * the week and allows the user to select multiple days.
16 * The selection can be toggle by just clicking on the day.
18 * Dayselector also provides the functionality to check whether a day is
21 * First day of the week is taken from config settings by default. It can be
22 * altered by using the API elm_dayselector_week_start_set() API.
24 * APIs are provided for setting the duration of weekend
25 * elm_dayselector_weekend_start_set() and elm_dayselector_weekend_length_set()
28 * Two styles of weekdays and weekends are supported in Dayselector.
29 * Application can emit signals on individual check objects for setting the
30 * weekday, weekend styles.
32 * Once the weekend start day or weekend length changes, all the weekday &
33 * weekend styles will be reset to default style. It's the application's
34 * responsibility to set the styles again by sending corresponding signals.
36 * Supported elm_object_item common APIs.
38 * @li @ref elm_object_part_text_set,
39 * @li @ref elm_object_part_text_get,
40 * @li @ref elm_object_part_content_set,
41 * @li @ref elm_object_part_content_get,
42 * @li @ref elm_object_part_content_unset
44 * @li "day0" indicates Sunday, "day1" indicates Monday etc. continues and so,
45 * "day6" indicates the Saturday part name.
47 * Application can change individual day display string by using the API
48 * elm_object_part_text_set().
50 * elm_object_part_content_set() API sets the individual day object only if
51 * the passed one is a Check widget.
53 * Check object representing a day can be set/get by the application by using
54 * the elm_object_part_content_set/get APIs thus providing a way to handle
55 * the different check styles for individual days.
57 * This widget inherits from the @ref Layout one, so that all the
58 * functions acting on it also work for dayselector objects.
60 * This widget emits the following signals, besides the ones sent from
62 * @li @c "dayselector,changed" - when the user changes the state of a day.
63 * @li @c "language,changed" - the program's language changed
65 * Available styles for dayselector are:
68 * This example shows the usage of the widget.
69 * @li @ref dayselector_example
74 * @addtogroup Dayselector
79 * Identifies the day of the week.
80 * API can call the selection/unselection of day with this as a parameter.
82 * @see elm_dayselector_day_selected_set()
83 * @see elm_dayselector_day_selected_get()
87 ELM_DAYSELECTOR_SUN = 0,/**< indicates Sunday */
88 ELM_DAYSELECTOR_MON, /**< indicates Monday */
89 ELM_DAYSELECTOR_TUE, /**< indicates Tuesday */
90 ELM_DAYSELECTOR_WED, /**< indicates Wednesday */
91 ELM_DAYSELECTOR_THU, /**< indicates Thursday */
92 ELM_DAYSELECTOR_FRI, /**< indicates Friday */
93 ELM_DAYSELECTOR_SAT, /**< indicates Saturday */
94 ELM_DAYSELECTOR_MAX /**< Sentinel value, @b don't use */
95 } Elm_Dayselector_Day;
98 * Add the dayselector.
100 * @param parent Parent object
101 * @return New dayselector object or @c NULL, if it cannot be created
103 * @ingroup Dayselector
105 EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
108 * Set the state of given Dayselector_Day.
110 * @param obj Dayselector object
111 * @param day Dayselector_Day that the user want to set state.
112 * @param selected state of the day. @c EINA_TRUE is selected.
114 * @see Elm_Dayselector_Day
115 * @see elm_dayselector_day_selected_get()
117 * @ingroup Dayselector
119 EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
122 * Get the state of given Dayselector_Day.
124 * @param obj Dayselector object
125 * @param day Dayselector_Day that the user want to know state.
126 * @return @c EINA_TRUE, if the Day is selected
128 * @see Elm_Dayselector_Day
129 * @see elm_dayselector_day_selected_set()
131 * @ingroup Dayselector
133 EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
136 * Set the starting day of Dayselector.
138 * @param obj Dayselector object
139 * @param day Dayselector_Day the first day that the user wants to display.
141 * @see Elm_Dayselector_Day
142 * @see elm_dayselector_week_start_get()
144 * @ingroup Dayselector
146 EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
149 * Get the starting day of Dayselector.
151 * @param obj Dayselector object
152 * @return Day from where Dayselector displays all the weekdays in order.
154 * @see Elm_Dayselector_Day
155 * @see elm_dayselector_week_start_set()
157 * @ingroup Dayselector
159 EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
162 * Set the weekend starting day of Dayselector.
164 * @param obj Dayselector object
165 * @param day Dayselector_Day the first day from where weekend starts.
167 * @see Elm_Dayselector_Day
168 * @see elm_dayselector_weekend_start_get()
170 * @ingroup Dayselector
172 EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
175 * Get the weekend starting day of Dayselector.
177 * @param obj Dayselector object
178 * @return Elm_Dayselector_Day Day from where weekend starts.
180 * @see Elm_Dayselector_Day
181 * @see elm_dayselector_weekend_start_set()
183 * @ingroup Dayselector
185 EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
188 * Set the weekend length of Dayselector.
190 * @param obj Dayselector object
191 * @param length Weekend length, number of days as an integer.
193 * @see elm_dayselector_weekend_length_get()
195 * @ingroup Dayselector
197 EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
200 * Get the weekend length of Dayselector.
202 * @param obj Dayselector object
203 * @return Number of days marked as a weekend.
205 * @see Elm_Dayselector_Day
206 * @see elm_dayselector_weekend_length_set()
208 * @ingroup Dayselector
210 EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);