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:
54 * @li "dayselector,changed" - when the user changes the state of a day.
55 * @li "language,changed" - the program's launguage changed
57 * Available styles for dayselector are:
60 * This example shows the usage of the widget.
61 * @li @ref dayselector_example
66 * @addtogroup Dayselector
71 * Identifies the day of the week.
72 * API can call the selection/unselection of day with this as a parameter.
74 * @see elm_dayselector_day_selected_set()
75 * @see elm_dayselector_day_selected_get()
79 ELM_DAYSELECTOR_SUN = 0,/**< indicates Sunday */
80 ELM_DAYSELECTOR_MON, /**< indicates Monday */
81 ELM_DAYSELECTOR_TUE, /**< indicates Tuesday */
82 ELM_DAYSELECTOR_WED, /**< indicates Wednesday */
83 ELM_DAYSELECTOR_THU, /**< indicates Thursday */
84 ELM_DAYSELECTOR_FRI, /**< indicates Friday */
85 ELM_DAYSELECTOR_SAT, /**< indicates Saturday */
86 ELM_DAYSELECTOR_MAX /**< Sentinel value, @b don't use */
87 } Elm_Dayselector_Day;
90 * Add the dayselector.
92 * @param parent Parent object
93 * @return New dayselector object or @c NULL, if it cannot be created
95 * @ingroup Dayselector
97 EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
100 * Set the state of given Dayselector_Day.
102 * @param obj Dayselector object
103 * @param day Dayselector_Day that the user want to set state.
104 * @param selected state of the day. @c EINA_TRUE is selected.
106 * @see Elm_Dayselector_Day
107 * @see elm_dayselector_day_selected_get()
110 EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
113 * Get the state of given Dayselector_Day.
115 * @param obj Dayselector object
116 * @param day Dayselector_Day that the user want to know state.
117 * @return @c EINA_TRUE, if the Day is selected
119 * @see Elm_Dayselector_Day
120 * @see elm_dayselector_day_selected_set()
123 EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
126 * Set the starting day of Dayselector.
128 * @param obj Dayselector object
129 * @param day Dayselector_Day the first day that the user wants to display.
131 * @see Elm_Dayselector_Day
132 * @see elm_dayselector_week_start_get()
135 EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
138 * Get the starting day of Dayselector.
140 * @param obj Dayselector object
141 * @return Day from where Dayselector displays all the weekdays in order.
143 * @see Elm_Dayselector_Day
144 * @see elm_dayselector_week_start_set()
147 EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
150 * Set the weekend starting day of Dayselector.
152 * @param obj Dayselector object
153 * @param day Dayselector_Day the first day from where weekend starts.
155 * @see Elm_Dayselector_Day
156 * @see elm_dayselector_weekend_start_get()
159 EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
162 * Get the weekend starting day of Dayselector.
164 * @param obj Dayselector object
165 * @return Elm_Dayselector_Day Day from where weekend starts.
167 * @see Elm_Dayselector_Day
168 * @see elm_dayselector_weekend_start_set()
171 EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
174 * Set the weekend length of Dayselector.
176 * @param obj Dayselector object
177 * @param length Weekend length, number of days as an integer.
179 * @see elm_dayselector_weekend_length_get()
182 EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
185 * Get the weekend length of Dayselector.
187 * @param obj Dayselector object
188 * @return Number of days marked as a weekend.
190 * @see Elm_Dayselector_Day
191 * @see elm_dayselector_weekend_length_set()
194 EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);