//-------- Begin of function VBrowseIF::disp_one ----------// // // <int> recNo = the no. of the record to display // <int> putType = DISP_REC - display record // DISP_HIGH - highlight rect // CLEAR_HIGH- clear highlight rect // void VBrowseIF::disp_one(int recNo, int dispType) { if( none_record ) return; int x,y; y = iy1 + (recNo-top_rec_no)/x_max_rec * (rec_height+rec_y_space); x = ix1 + (recNo-top_rec_no)%x_max_rec * (rec_width+rec_x_space); //---- put a outline rect around the record if it is highlight ---// if( disp_frame && dispType == CLEAR_HIGH && !vga.use_back_buf && !vga_front_only ) { vga.blt_buf( x-2, y-2 , x+rec_width+1, y-2 , 0 ); // top vga.blt_buf( x-2, y+rec_height+1, x+rec_width+1, y+rec_height+1, 0 ); // bottom vga.blt_buf( x-2, y-2 , x-2 , y+rec_height+1, 0 ); // left vga.blt_buf( x+rec_width+1, y-2 , x+rec_width+1, y+rec_height+1, 0 ); // right } if( dispType == DISP_REC ) disp_rec( recNo, x, y, INFO_REPAINT ); // call user defined function if( disp_frame && dispType == DISP_HIGH ) { //-------- draw d3 up border --------// Vga::active_buf->draw_d3_up_border(x-2, y-2, x+rec_width+1, y+rec_height+1); //--------- display the record --------// int scrollRecno = (disp_frame && x_max_rec==1) ? recNo : top_rec_no; scroll_bar.refresh( scrollRecno, 0, disp_max_rec, (disp_frame && x_max_rec==1 ? 1 : disp_max_rec), total_rec_num ); } }
/*----------------------------------------------------------------------------*/ void disp_port(u8 menu) { if (menu < 0x80) //显示场景切换,整个显示均会更新 { clear_led(); cur_menu = menu; main_menu_conter = 0; if (menu != MENU_INPUT_NUMBER) input_number = 0; switch (menu) { case MENU_NULL: break; case MENU_PAUSE: disp_music_pause(); break; case MENU_STOP: disp_music_stop(); break; case MENU_SCAN_DISK: disp_scan_disk(); break; case MENU_MAIN_VOL: disp_main_vol(sys_main_vol); break; case MENU_FILENUM: play_time_filenum_slider=0; disp_input_number(filenum_phy_logic(fs_msg.fileNumber)); break; case MENU_MUSIC_MAIN: disp_music_main(); break; case MENU_INPUT_NUMBER: disp_input_number(input_number); break; case MENU_FM_MAIN: #if FM_MODULE disp_fm_main(); #endif break; case MENU_FM_CHANNEL: #if FM_MODULE disp_fm_channel(); #endif break; case MENU_POWER_UP: disp_power_on(); break; case MENU_FM_DISP_FRE: #if FM_MODULE disp_fm_freq(); #endif break; case MENU_FM_FIND_STATION: #if FM_MODULE disp_fm_find_station(); #endif break; case MENU_AUX: disp_aux(); break; case MENU_REC_ERR: disp_rec_err(); break; case MENU_REC_MAIN: disp_music_main(); break; case MENU_SET_EQ: disp_eq(); break; case MENU_SET_PLAY_MODE: disp_play_mode(); break; case DISP_PWR_TIMER: disp_sleep_timer(); break; case MENU_RECWORKING: disp_rec_working(); break; case MENU_REC: disp_rec(); break; case MENU_REC_PAUSE: disp_rec_pause(); break; case MENU_REC_DEL: disp_del(); break; #if ECHO_ENABLE case MENU_REV_DEEP: disp_rev_deep(); break; case MENU_REV_STRONG: disp_rev_strong(); break; #endif #if USB_DEVICE_ENABLE case MENU_USBDEV_MAIN: disp_usb_device(); break; #endif #if RTC_ENABLE case MENU_RTC: disp_curr_time(); break; case MENU_ALM_SET: disp_alarm(); break; case MENU_ALM_UP: disp_alarm_up(); break; case MENU_RTC_PWD: disp_power_off(); break; #if USB_DEVICE_ENABLE case MENU_ALM_REQUEST: disp_alm_request(); break; #endif #endif } } else //局部显示替换和更新 { switch (menu) { case MENU_HALF_SEC_REFRESH: disp_main_menu_refresh(); break; case MENU_POWER_DOWN: disp_nothing(); break; } } if(alm_on_flag){ led_flash_icon(LED0_ALARM); } if(alarm.sw){ led_disp_icon(LED0_ALARM); } }