Documentation request, adding a simple condensed list of API functions


I do not know if this has been dealt with elsewhere, but IMO it would be useful to have a condensed form of the API function prototypes in the API section for each widget.
For example for labels,

Function List,

lv_obj_t * lv_label_create(lv_obj_t * parent);
void lv_label_set_text(lv_obj_t * obj, const char * text);
void lv_label_set_text_fmt(lv_obj_t * obj, const char * fmt, ...) LV_FORMAT_ATTRIBUTE(2, 3);
void lv_label_set_text_static(lv_obj_t * obj, const char * text);
void lv_label_set_long_mode(lv_obj_t * obj, lv_label_long_mode_t long_mode);
void lv_label_set_recolor(lv_obj_t * obj, bool en);
void lv_label_set_text_sel_start(lv_obj_t * obj, uint32_t index);
void lv_label_set_text_sel_end(lv_obj_t * obj, uint32_t index);
char * lv_label_get_text(const lv_obj_t * obj);
lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * obj);
bool lv_label_get_recolor(const lv_obj_t * obj);
void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t * pos);
uint32_t lv_label_get_letter_on(const lv_obj_t * obj, lv_point_t * pos_in);
bool lv_label_is_char_under_pos(const lv_obj_t * obj, lv_point_t * pos);
uint32_t lv_label_get_text_selection_start(const lv_obj_t * obj);
uint32_t lv_label_get_text_selection_end(const lv_obj_t * obj);
void lv_label_ins_text(lv_obj_t * obj, uint32_t pos, const char * txt);
void lv_label_cut_text(lv_obj_t * obj, uint32_t pos, uint32_t cnt);

Obviously the function names and parameters could eventually link to appropriate detail about them if clicked on.

1 Like

Good idea! Let me see what I can do with it.

1 Like

This is implemented, the APIs are now condensed by default and will only expand if you click on their arrow. Linking to an API directly will expand it but not the others.


Very nice! :+1: