3 * @defgroup Dayselector Dayselector
6 * @image html dayselector_inheritance_tree.png
7 * @image latex dayselector_inheritance_tree.eps
9 * @image html img/widget/dayselector/preview-00.png
10 * @image latex img/widget/dayselector/preview-00.eps
12 * @brief <b>Dayselector widget:</b>
14 *"elm_dayselector" is a day selection widget. It displays all seven days of
15 * the week and allows the user to select multiple days.
17 * The selection can be toggled by just clicking on the day.
19 * Dayselector also provides the functionality to check whether a day is
22 * First day of the week is taken from the config settings by default. It can be
23 * altered by using the elm_dayselector_week_start_set() API.
25 * APIs are provided for setting the duration of weekend
26 * elm_dayselector_weekend_start_set() and elm_dayselector_weekend_length_set()
29 * Two styles of weekdays and weekends are supported in Dayselector.
30 * Applications can emit signals on individual check objects for setting the
31 * weekday, weekend styles.
33 * Once the weekend start day or weekend length changes, all the weekday &
34 * weekend styles are reset to the default style. It's the application's
35 * responsibility to set the styles again by the sending corresponding signals.
37 * Supported common elm_object_item APIs.
39 * @li @ref elm_object_part_text_set,
40 * @li @ref elm_object_part_text_get,
41 * @li @ref elm_object_part_content_set,
42 * @li @ref elm_object_part_content_get,
43 * @li @ref elm_object_part_content_unset
45 * @li "day0" indicates Sunday, "day1" indicates Monday etc. continues and so,
46 * "day6" indicates the Saturday part name.
48 * Application can change individual day display string by using the API
49 * elm_object_part_text_set().
51 * elm_object_part_content_set() API sets the individual day object only if
52 * the passed one is a Check widget.
54 * Check object representing a day can be set/get by the application by using
55 * the elm_object_part_content_set/get APIs thus providing a way to handle
56 * the different check styles for individual days.
58 * This widget inherits from the @ref Layout one, so that all the
59 * functions acting on it also work for dayselector objects.
61 * This widget emits the following signals, besides the ones sent from
63 * @li @c "dayselector,changed" - When the user changes the state of a day.
64 * @li @c "language,changed" - The program's language is changed.
66 * Available styles for dayselector are:
73 * @brief Enumeration that identifies the day of the week.
74 * @remarks This API can call the selection/unselection of a day with this as a parameter.
76 * @see elm_dayselector_day_selected_set()
77 * @see elm_dayselector_day_selected_get()
81 ELM_DAYSELECTOR_SUN = 0,/**< Indicates Sunday */
82 ELM_DAYSELECTOR_MON, /**< Indicates Monday */
83 ELM_DAYSELECTOR_TUE, /**< Indicates Tuesday */
84 ELM_DAYSELECTOR_WED, /**< Indicates Wednesday */
85 ELM_DAYSELECTOR_THU, /**< Indicates Thursday */
86 ELM_DAYSELECTOR_FRI, /**< Indicates Friday */
87 ELM_DAYSELECTOR_SAT, /**< Indicates Saturday */
88 ELM_DAYSELECTOR_MAX /**< Sentinel value, @b don't use */
89 } Elm_Dayselector_Day;
92 * @brief Adds the dayselector.
94 * @param[in] parent The parent object
95 * @return A new dayselector object, otherwise @c NULL if it cannot be created
97 EAPI Evas_Object *elm_dayselector_add(Evas_Object *parent);
100 * @brief Sets the state of a given Dayselector_Day.
102 * @param[in] obj The Dayselector object
103 * @param[in] day The Dayselector_Day that the user want to set state of
104 * @param[in] selected The state of the day, @c EINA_TRUE is selected
106 * @see Elm_Dayselector_Day
107 * @see elm_dayselector_day_selected_get()
109 EAPI void elm_dayselector_day_selected_set(Evas_Object *obj, Elm_Dayselector_Day day, Eina_Bool selected);
112 * @brief Gets the state of a given Dayselector_Day.
114 * @param[in] obj The Dayselector object
115 * @param[in] day The Dayselector_Day that the user want to know state of
116 * @return @c EINA_TRUE if the day is selected,
117 * otherwise @c EINA_FALSE
119 * @see Elm_Dayselector_Day
120 * @see elm_dayselector_day_selected_set()
122 EAPI Eina_Bool elm_dayselector_day_selected_get(const Evas_Object *obj, Elm_Dayselector_Day day);
125 * @brief Sets the starting day of Dayselector.
127 * @param[in] obj The Dayselector object
128 * @param[in] day The Dayselector_Day whose first day the user wants to display
130 * @see Elm_Dayselector_Day
131 * @see elm_dayselector_week_start_get()
133 EAPI void elm_dayselector_week_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
136 * @brief Gets the starting day of Dayselector.
138 * @param[in] obj The Dayselector object
139 * @return The day from where the Dayselector displays all the weekdays in order
141 * @see Elm_Dayselector_Day
142 * @see elm_dayselector_week_start_set()
144 EAPI Elm_Dayselector_Day elm_dayselector_week_start_get(const Evas_Object *obj);
147 * @brief Sets the weekend starting day of Dayselector.
149 * @param[in] obj The Dayselector object
150 * @param[in] day The Dayselector_Day which is the first day from where weekend starts
152 * @see Elm_Dayselector_Day
153 * @see elm_dayselector_weekend_start_get()
155 EAPI void elm_dayselector_weekend_start_set(Evas_Object *obj, Elm_Dayselector_Day day);
158 * @brief Gets the weekend starting day of Dayselector.
160 * @param[in] obj The Dayselector object
161 * @return The Elm_Dayselector_Day Day from where the weekend starts
163 * @see Elm_Dayselector_Day
164 * @see elm_dayselector_weekend_start_set()
166 EAPI Elm_Dayselector_Day elm_dayselector_weekend_start_get(const Evas_Object *obj);
169 * @brief Sets the weekend length of Dayselector.
171 * @param[in] obj The Dayselector object
172 * @param[in] length The weekend length, number of days as an integer
174 * @see elm_dayselector_weekend_length_get()
176 EAPI void elm_dayselector_weekend_length_set(Evas_Object *obj, unsigned int length);
179 * @brief Gets the weekend length of Dayselector.
181 * @param[in] obj The Dayselector object
182 * @return The number of days marked as a weekend
184 * @see Elm_Dayselector_Day
185 * @see elm_dayselector_weekend_length_set()
187 EAPI unsigned int elm_dayselector_weekend_length_get(const Evas_Object *obj);