1 /**
2  * @file lv_calendar_header_dropdown.h
3  *
4  */
5 
6 #ifndef LV_CALENDAR_HEADER_DROPDOWN_H
7 #define LV_CALENDAR_HEADER_DROPDOWN_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../../core/lv_obj.h"
17 #if LV_USE_CALENDAR && LV_USE_CALENDAR_HEADER_DROPDOWN
18 
19 #if LV_USE_DROPDOWN == 0
20 #error "LV_USE_DROPDOWN needs to be enabled"
21 #endif
22 
23 /*********************
24  *      DEFINES
25  *********************/
26 
27 /**********************
28  *      TYPEDEFS
29  **********************/
30 LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_calendar_header_dropdown_class;
31 
32 /**********************
33  * GLOBAL PROTOTYPES
34  **********************/
35 
36 /**
37  * Create a calendar header with drop-drowns to select the year and month
38  * @param parent    pointer to a calendar object.
39  * @return          the created header
40  */
41 lv_obj_t * lv_calendar_header_dropdown_create(lv_obj_t * parent);
42 
43 /**
44  * Sets a custom calendar year list
45  * @param parent        pointer to a calendar object
46  * @param years_list    pointer to an const char array with the years list, see lv_dropdown set_options for more information.
47  *                      E.g. `const char * years = "2023\n2022\n2021\n2020\n2019"
48  *                      Only the pointer will be saved so this variable can't be local which will be destroyed later.
49  */
50 void lv_calendar_header_dropdown_set_year_list(lv_obj_t * parent, const char * years_list);
51 
52 /**********************
53  *      MACROS
54  **********************/
55 
56 #endif /*LV_USE_CALENDAR_HEADER_ARROW*/
57 
58 #ifdef __cplusplus
59 } /*extern "C"*/
60 #endif
61 
62 #endif /*LV_CALENDAR_HEADER_DROPDOWN_H*/
63