2 * @defgroup Dayselector Dayselector
5 * @image html img/widget/dayselector/preview-00.png
6 * @image latex img/widget/dayselector/preview-00.eps
8 * @brief <b>Dayselector widget:</b>
10 *"elm_dayselector" is a day selection widget. It displays all seven days of
11 * the week and allows the user to select multiple days.
13 * The selection can be toggle by just clicking on the day.
15 * Dayselector also provides the functionality to check whether a day is
18 * First day of the week is taken from config settings by default. It can be
19 * altered by using the API elm_dayselector_week_start_set() API.
21 * APIs are provided for setting the duration of weekend
22 * elm_dayselector_weekend_start_set() and elm_dayselector_weekend_length_set()
25 * Two styles of weekdays and weekends are supported in Dayselector.
26 * Application can emit signals on individual check objects for setting the
27 * weekday, weekend styles.
29 * Once the weekend start day or weekend length changes, all the weekday &
30 * weekend styles will be reset to default style. It's the application's
31 * responsibility to set the styles again by sending corresponding signals.
33 * Supported elm_object_item common APIs.
35 * @li @ref elm_object_part_text_set,
36 * @li @ref elm_object_part_text_get,
37 * @li @ref elm_object_part_content_set,
38 * @li @ref elm_object_part_content_get,
39 * @li @ref elm_object_part_content_unset
41 * @li "day0" indicates Sunday, "day1" indicates Monday etc. continues and so,
42 * "day6" indicates the Saturday part name.
44 * Application can change individual day display string by using the API
45 * elm_object_part_text_set().
47 * elm_object_part_content_set() API sets the individual day object only if
48 * the passed one is a Check widget.
50 * Check object representing a day can be set/get by the application by using
51 * the elm_object_part_content_set/get APIs thus providing a way to handle
52 * the different check styles for individual days.
54 * The widget emits the following signals:
55 * @li "dayselector,changed" - when the user changes the state of a day.
56 * @li "language,changed" - the program's language changed
58 * Available styles for dayselector are:
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()
110 * @ingroup Dayselector
112 EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
115 * Get the state of given Dayselector_Day.
117 * @param obj Dayselector object
118 * @param day Dayselector_Day that the user want to know state.
119 * @return @c EINA_TRUE, if the Day is selected
121 * @see Elm_Dayselector_Day
122 * @see elm_dayselector_day_selected_set()
124 * @ingroup Dayselector
126 EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
129 * Set the starting day of Dayselector.
131 * @param obj Dayselector object
132 * @param day Dayselector_Day the first day that the user wants to display.
134 * @see Elm_Dayselector_Day
135 * @see elm_dayselector_week_start_get()
137 * @ingroup Dayselector
139 EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
142 * Get the starting day of Dayselector.
144 * @param obj Dayselector object
145 * @return Day from where Dayselector displays all the weekdays in order.
147 * @see Elm_Dayselector_Day
148 * @see elm_dayselector_week_start_set()
150 * @ingroup Dayselector
152 EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
155 * Set the weekend starting day of Dayselector.
157 * @param obj Dayselector object
158 * @param day Dayselector_Day the first day from where weekend starts.
160 * @see Elm_Dayselector_Day
161 * @see elm_dayselector_weekend_start_get()
163 * @ingroup Dayselector
165 EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
168 * Get the weekend starting day of Dayselector.
170 * @param obj Dayselector object
171 * @return Elm_Dayselector_Day Day from where weekend starts.
173 * @see Elm_Dayselector_Day
174 * @see elm_dayselector_weekend_start_set()
176 * @ingroup Dayselector
178 EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
181 * Set the weekend length of Dayselector.
183 * @param obj Dayselector object
184 * @param length Weekend length, number of days as an integer.
186 * @see elm_dayselector_weekend_length_get()
188 * @ingroup Dayselector
190 EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
193 * Get the weekend length of Dayselector.
195 * @param obj Dayselector object
196 * @return Number of days marked as a weekend.
198 * @see Elm_Dayselector_Day
199 * @see elm_dayselector_weekend_length_set()
201 * @ingroup Dayselector
203 EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);