MTK列表菜单绘制精_第1页
MTK列表菜单绘制精_第2页
MTK列表菜单绘制精_第3页
MTK列表菜单绘制精_第4页
MTK列表菜单绘制精_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 一、 /画做软键小列表菜单 /所对应的DM Wgui_categories_enum.h (d:whc1068_c015plutommimmiguigui_inc MMI_CATEGORYLSK_ID, (CustCoordinates.c (d:whc1068_c015plutommicustomercustresource) MMI_CATEGORYLSK_ID, (U8 * categoryLSK, (S16 * coordinate_setLSK, NULL, const U8 categoryLSK = 6, DM_BASE_LAYER_START, DM_SCR_BG, DM_R

2、ECTANGLE, DM_CATEGORY_CONTROLLED_AREA, DM_LIST1, DM_BUTTON_BAR1 ; const S16 coordinate_setLSK = 0, 0, MAIN_LCD_DEVICE_WIDTH, MAIN_LCD_DEVICE_HEIGHT, DM_NO_FLAGS, /* Category Screen Coordinates */ 0, 0, MAIN_LCD_DEVICE_WIDTH, MAIN_LCD_DEVICE_HEIGHT, DM_NO_FLAGS, /* greyscale rectangle */ 0, 158,120,1

3、36, DM_NO_FLAGS, /* control area */ 1,160,120,136, DM_CENTRE_ALIGN_X | DM_CENTER_ALIGN_Y, 0, MAIN_LCD_DEVICE_HEIGHT - MMI_BUTTON_BAR_HEIGHT, MAIN_LCD_DEVICE_WIDTH, MMI_BUTTON_BAR_HEIGHT,DM_BUTTON_DISABLE_BACKGROUND, MMI_SOFTKEY_WIDTH /* Button Bar */ ; /* code */ void DrawRectangle( gui_draw_rectang

4、le(0, 158,121,296,UI_COLOR_BLACK; gui_draw_rectangle(0,157,123,298,UI_COLOR_GREEN; gui_BLT_double_buffer(0,0,UI_device_width-1,UI_device_height-1; void ShowCategoryLSKScreen( /左软键进入菜单项模板 dm_data_struct dm_data; S32 i; S32 number_of_items; U8* history_buffer=NULL; color c = UI_COLOR_GREEN; gdi_layer_

5、lock_frame_buffer(; /DrawBackgroundBar(; wgui_fixed_list_create_icontext_menu(8, 0, 0, MMI_CATEGORY10_ID, history_buffer; wgui_fixed_list_begin_add_icontext_one_item(; for(i = 0; i small_list_menu_highlight_without_scrollbar_filler; /MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_SCROLLBAR|UI_LIS

6、T_MENU_DISABLE_BACKGROUND; gdi_layer_unlock_frame_buffer(; dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size; dm_data.s32ScrId = (S32 GetActiveScreenId(; dm_data.s32CatId = MMI_CATEGORYLSK_ID; dm_data.s32flags = 0; dm_add_rectangle(c, DM_REC

7、TANGLE_FILL_GRAYSCALE; dm_setup_data(&dm_data; dm_redraw_category_screen(; gui_BLT_double_buffer(0,0,UI_device_width-1,UI_device_height-1; void mmi_fmreadapp_LSK_entery(void S32 i; U8 *guiBuffer = NULL; U16 Iconlistt5; U16 ItemListt5; EntryNewScreen(SCR_FMREADAPP_MAIN,NULL,NULL,NULL; entry_full_scre

8、en(; ShowCategoryLSKScreen(; DrawTitleButtonBar(; DrawRectangle(; change_left_softkey(STR_GLOBAL_OK,NULL; change_right_softkey(STR_GLOBAL_QUIT,NULL; show_softkey(MMI_LEFT_SOFTKEY; show_softkey(MMI_RIGHT_SOFTKEY; SetLeftSoftkeyFunction(mmi_fmreadapp_FirstPage, KEY_EVENT_UP; /SetRightSoftkeyFunction(G

9、oBackHistory, KEY_EVENT_UP; SetKeyHandler(GoBackHistory,KEY_RSK,KEY_EVENT_UP; gui_BLT_double_buffer(0,0,UI_device_width-1,UI_device_height-1; 二、 /画列表菜单 /所对应的DM Wgui_categories_enum.h (d:whc1068_c015plutommimmiguigui_inc MMI_CATEGORYChapterList_ID, (CustCoordinates.c (d:whc1068_c015plutommicustomercu

10、stresource) MMI_CATEGORYChapterList_ID, (U8 * categoryChapterList, (S16 * coordinate_setChapterList, NULL, const U8 categoryChapterList = 5, DM_BASE_LAYER_START, DM_SCR_BG, /没有这个高亮时会把整个字体盖住 DM_CATEGORY_CONTROLLED_AREA, /DM_BASE_CONTROL_SET_SUBMENU, DM_LIST1, DM_BUTTON_BAR1 ; const S16 coordinate_set

11、ChapterList = DM_FULL_SCREEN_COORDINATE_FLAG, DM_FULL_SCREEN_COORDINATE_FLAG, /MMI_SUBMENU_CONTENT_X, MMI_SUBMENU_CONTENT_Y, MMI_SUBMENU_CONTENT_WIDTH, MMI_SUBMENU_CONTENT_HEIGHT, DM_CENTRE_ALIGN_X | DM_CENTER_ALIGN_Y 0,35,240,260, DM_CENTRE_ALIGN_X | DM_CENTER_ALIGN_Y, 0, MAIN_LCD_DEVICE_HEIGHT - M

12、MI_BUTTON_BAR_HEIGHT, MAIN_LCD_DEVICE_WIDTH, MMI_BUTTON_BAR_HEIGHT,DM_BUTTON_DISABLE_BACKGROUND, MMI_SOFTKEY_WIDTH ; /*code */ void Mybookshelf_draw_text(S32 item_index gui_BLT_double_buffer(0,0,UI_device_width-1,UI_device_height-1; void category668_highlight_handler(S32 item_index Mybookshelf_draw_

13、text(item_index; /* void RedrawCategory668Screen(void gdi_layer_lock_frame_buffer(; show_fixed_list(; show_softkey(MMI_LEFT_SOFTKEY; show_softkey(MMI_RIGHT_SOFTKEY; gdi_layer_unlock_frame_buffer(; gui_BLT_double_buffer(0,0,UI_device_width-1,UI_device_height-1; */ void ExitCategory668Screen(void Clea

14、rHighlightHandler(;/清掉所有高亮响应函数 reset_softkeys(;/重置左右软键 reset_menu_shortcut_handler(;/重置快捷序号框 reset_fixed_list(;/重置列表菜单 void ShowCategoryChapterListScreen( U16 left_softkey,U16 left_softkey_icon, U16 right_softkey,U16 right_softkey_icon, S32 number_of_items, U16 *list_of_items, U16 *list_of_icons, S3

15、2 highlighted_item, U8* history_buffer S8 i; dm_data_struct dm_data; entry_full_screen(; clear_screen(; DrawTitleButtonBar(; MMI_current_menu_type=LIST_MENU; create_fixed_icontext_menuitems(; associate_fixed_icontext_list(; for(i=0;inumber_of_items;i+ add_fixed_icontext_item(L大话西游,(PU8GetImage(IMG_G

16、LOBAL_L1+i; register_fixed_list_shortcut_handler(; register_fixed_list_keys(; register_fixed_list_highlight_handler(category668_highlight_handler; fixed_list_goto_item_no_redraw(0; show_fixed_list(; / RedrawCategoryFunction=RedrawCategory668Screen; dm_setup_category_functions(dm_redraw_category_scre

17、en, dm_get_category_history, dm_get_category_history_size; dm_data.s32ScrId = (S32 GetActiveScreenId(; dm_data.s32CatId = MMI_CATEGORYChapterList_ID; dm_data.s32flags = 0; dm_setup_data(&dm_data; dm_redraw_category_screen(; change_left_softkey(STR_GLOBAL_OK,NULL; change_right_softkey(STR_GLOBAL_BACK

18、,NULL; show_softkey(MMI_LEFT_SOFTKEY; show_softkey(MMI_RIGHT_SOFTKEY; SetLeftSoftkeyFunction(mmi_fmreadapp_LSK_entery, KEY_EVENT_UP; SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP; void mmi_fmreadapp_ChapterList_entery(void S32 i; U16 list_of_items10; U16 list_of_icons10; U8* history_buffer; /

19、for(i=0;i10;i+ / /list_of_itemsi=STR_GLOBAL_FILENAME+i; /list_of_iconsi=IMG_GLOBAL_L1+i; / DrawTitleButtonBar(; EntryNewScreen(SCR_FMREADAPP_MAIN,NULL,mmi_fmreadapp_ChapterList_entery,NULL; ShowCategoryChapterListScreen( (U8*GetString(STR_GLOBAL_OK, 0, (U8*GetString(STR_GLOBAL_BACK, 0, 10, (U8* list

20、_of_items, list_of_icons, 2, (U8* history_buffer; gui_BLT_double_buffer(0,0,UI_device_width-1,UI_device_height-1; 三、/搜索界面(暂时未写出) /* void entry_search_result_screen(void key_word = OslMalloc(FMREAD_SEARCH_LEN*2; memset(key_word,0,FMREAD_SEARCH_LEN*2; mmi_chset_convert(MMI_CHSET_UCS2, MMI_CHSET_GB2312, (char*tmp_key_word, (char*key_word, FMREAD_SEARCH_LEN*2; ui_gid=8; fmread_popup(NULL,NULL,STR_GLOBAL_BACK,IMG_GLOBAL_BACK,(UI_string_typeGetString(STR_GLOBAL_LOADING,IMG_GLOBAL_LOADING,NULL;/加载中 void show_search_content_screen(void U8 *gui_buffer; EntryNewScreen(SCR_

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论