Lines Matching refs:tabview
70 lv_tabview_t * tabview = (lv_tabview_t *)obj; in lv_tabview_add_tab() local
80 const char ** old_map = (const char **)tabview->map; in lv_tabview_add_tab()
84 if(tabview->tab_pos & LV_DIR_VER) { in lv_tabview_add_tab()
95 if(tabview->tab_cnt == 0) { in lv_tabview_add_tab()
107 tabview->map = new_map; in lv_tabview_add_tab()
114 tabview->tab_cnt++; in lv_tabview_add_tab()
115 if(tabview->tab_cnt == 1) { in lv_tabview_add_tab()
119 lv_btnmatrix_set_btn_ctrl(btns, tabview->tab_cur, LV_BTNMATRIX_CTRL_CHECKED); in lv_tabview_add_tab()
127 lv_tabview_t * tabview = (lv_tabview_t *)obj; in lv_tabview_rename_tab() local
129 if(id >= tabview->tab_cnt) return; in lv_tabview_rename_tab()
130 if(tabview->tab_pos & LV_DIR_HOR) id *= 2; in lv_tabview_rename_tab()
132 lv_mem_free((void *)tabview->map[id]); in lv_tabview_rename_tab()
133 tabview->map[id] = lv_mem_alloc(strlen(new_name) + 1); in lv_tabview_rename_tab()
134 strcpy((void *)tabview->map[id], new_name); in lv_tabview_rename_tab()
143 lv_tabview_t * tabview = (lv_tabview_t *)obj; in lv_tabview_set_act() local
145 if(id >= tabview->tab_cnt) { in lv_tabview_set_act()
146 id = tabview->tab_cnt - 1; in lv_tabview_set_act()
155 if((tabview->tab_pos & LV_DIR_VER) != 0) { in lv_tabview_set_act()
174 tabview->tab_cur = id; in lv_tabview_set_act()
180 lv_tabview_t * tabview = (lv_tabview_t *)obj; in lv_tabview_get_tab_act() local
181 return tabview->tab_cur; in lv_tabview_get_tab_act()
201 lv_tabview_t * tabview = (lv_tabview_t *)obj; in lv_tabview_constructor() local
203 tabview->tab_pos = tabpos_create; in lv_tabview_constructor()
205 switch(tabview->tab_pos) { in lv_tabview_constructor()
229 tabview->map = lv_mem_alloc(sizeof(const char *)); in lv_tabview_constructor()
230 tabview->map[0] = ""; in lv_tabview_constructor()
231 lv_btnmatrix_set_map(btnm, (const char **)tabview->map); in lv_tabview_constructor()
238 switch(tabview->tab_pos) { in lv_tabview_constructor()
256 if((tabview->tab_pos & LV_DIR_VER) != 0) { in lv_tabview_constructor()
271 lv_tabview_t * tabview = (lv_tabview_t *)obj; in lv_tabview_destructor() local
274 if(tabview->tab_pos & LV_DIR_VER) { in lv_tabview_destructor()
275 for(i = 0; i < tabview->tab_cnt; i++) { in lv_tabview_destructor()
276 lv_mem_free((void *)tabview->map[i]); in lv_tabview_destructor()
277 tabview->map[i] = NULL; in lv_tabview_destructor()
280 if(tabview->tab_pos & LV_DIR_HOR) { in lv_tabview_destructor()
281 for(i = 0; i < tabview->tab_cnt; i++) { in lv_tabview_destructor()
282 lv_mem_free((void *)tabview->map[i * 2]); in lv_tabview_destructor()
283 tabview->map[i * 2] = NULL; in lv_tabview_destructor()
287 lv_mem_free(tabview->map); in lv_tabview_destructor()
288 tabview->map = NULL; in lv_tabview_destructor()