1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00
lvgl/lv_objx/lv_list.h

67 lines
1.4 KiB
C
Raw Normal View History

2016-06-22 17:24:02 +02:00
/**
* @file lv_list.h
*
*/
#ifndef LV_LIST_H
#define LV_LIST_H
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if USE_LV_LIST != 0
#include "../lv_obj/lv_obj.h"
#include "lv_page.h"
#include "lv_btn.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/*Style of LIST*/
typedef struct
{
2016-06-22 21:52:39 +02:00
lv_pages_t pages; /*Ancestor page style*/
2016-06-22 17:24:02 +02:00
lv_btns_t liste_btns;
2016-06-22 21:52:39 +02:00
lv_rect_layout_t liste_layout;
2016-06-22 17:24:02 +02:00
}lv_lists_t;
/*Built-in styles of LISTATE*/
typedef enum
{
LV_LISTS_DEF,
}lv_lists_builtin_t;
/*Data of LIST*/
typedef struct
{
lv_page_ext_t page_ext;
2016-07-11 16:16:53 +02:00
uint8_t fit_size :1; /*Automatically set the adjust size of list elements to longest element */
2016-06-22 20:39:07 +02:00
uint8_t sel_en :1; /*Enable selecting list elements by toggling them */
uint8_t sel_one :1; /*Enable to select only one list element*/
2016-06-22 17:24:02 +02:00
}lv_list_ext_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
lv_obj_t* lv_list_create(lv_obj_t* par_dp, lv_obj_t * copy_dp);
bool lv_list_signal(lv_obj_t* obj_dp, lv_signal_t sign, void * param);
2016-06-22 20:39:07 +02:00
void lv_list_add(lv_obj_t * obj_dp, const char * img_fn, const char * txt, void (*release) (lv_obj_t *));
2016-06-22 17:24:02 +02:00
lv_lists_t * lv_lists_get(lv_lists_builtin_t style, lv_lists_t * copy_p);
/**********************
* MACROS
**********************/
#endif
#endif