1 /**
2  * @file lv_label_private.h
3  *
4  */
5 
6 #ifndef LV_LABEL_PRIVATE_H
7 #define LV_LABEL_PRIVATE_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "../../draw/lv_draw_label_private.h"
18 #include "../../core/lv_obj_private.h"
19 #include "lv_label.h"
20 
21 #if LV_USE_LABEL != 0
22 
23 /*********************
24  *      DEFINES
25  *********************/
26 
27 /**********************
28  *      TYPEDEFS
29  **********************/
30 
31 struct _lv_label_t {
32     lv_obj_t obj;
33     char * text;
34     char dot[LV_LABEL_DOT_NUM + 1]; /**< Bytes that have been replaced with dots */
35     uint32_t dot_begin;  /**< Offset where bytes have been replaced with dots */
36 
37 #if LV_LABEL_LONG_TXT_HINT
38     lv_draw_label_hint_t hint;
39 #endif
40 
41 #if LV_LABEL_TEXT_SELECTION
42     uint32_t sel_start;
43     uint32_t sel_end;
44 #endif
45 
46     lv_point_t size_cache;              /**< Text size cache */
47     lv_point_t offset;                  /**< Text draw position offset */
48     lv_label_long_mode_t long_mode : 4; /**< Determine what to do with the long texts */
49     uint8_t static_txt : 1;             /**< Flag to indicate the text is static */
50     uint8_t recolor : 1;                /**< Enable in-line letter re-coloring*/
51     uint8_t expand : 1;                 /**< Ignore real width (used by the library with LV_LABEL_LONG_MODE_SCROLL) */
52     uint8_t invalid_size_cache : 1;     /**< 1: Recalculate size and update cache */
53 };
54 
55 
56 /**********************
57  * GLOBAL PROTOTYPES
58  **********************/
59 
60 /**********************
61  *      MACROS
62  **********************/
63 
64 #endif /* LV_USE_LABEL != 0 */
65 
66 #ifdef __cplusplus
67 } /*extern "C"*/
68 #endif
69 
70 #endif /*LV_LABEL_PRIVATE_H*/
71