Light and versatile text reader (lv_100ask_text_reader)

lv_100ask_text_reader

2022年12月6日-text_reader-v1.0

features

  • Low resource consumption, light and compact
  • Support opening text files of any size
  • Support jump to any page
  • Support changing the reading font
  • Supports obtaining reading data, so that reading can be resumed next time it is opened
  • More todo…

Source code

lv_100ask_text_reader interface:


/**********************
 * GLOBAL PROTOTYPES
 **********************/
lv_obj_t * lv_100ask_text_reader_create(lv_obj_t * parent);

/*=====================
 * Setter functions
 *====================*/
void lv_100ask_text_reader_set_file(lv_obj_t * obj, const char * file_name);

/*=====================
 * Getter functions
 *====================*/
lv_obj_t * lv_100ask_text_reader_get_label(lv_obj_t * obj);

uint32_t lv_100ask_text_reader_get_total_pages(lv_obj_t * obj);

uint32_t lv_100ask_text_reader_get_current_page(lv_obj_t * obj);

/*=====================
 * Other functions
 *====================*/
bool lv_100ask_text_reader_open_next_page(lv_obj_t * obj);

bool lv_100ask_text_reader_open_previous_page(lv_obj_t * obj);

bool lv_100ask_text_reader_goto_page(lv_obj_t * obj, uint32_t page);

I am using lv_100ask_text_reader for my small project. When I finish, I will share my code with lv_lib_100ask (it is expected to be completed within the next two weeks):

I hope you enjoy this project!:slight_smile:

@kisvegabor

4 Likes

Nice!

I was thinking a lot about a Markdown renderer. What do you think about it?

1 Like

Great!
I have new ideas. Reading plain text is only the first step. I will try to upgrade text reader to have more features (including markdown renderer)!

Sounds amazing! :heart_eyes:

1 Like