⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wgui_categories.c

📁 The font library converting tool MCT mainly introduces the process of the font formats to give us a
💻 C
📖 第 1 页 / 共 5 页
字号:
   /*----------------------------------------------------------------*/
   /* Code Body                                                      */
   /*----------------------------------------------------------------*/

	gdi_layer_lock_frame_buffer();

	resize_fixed_list(MMI_content_width,MMI_content_height);//031805 Calvin modified
	create_fixed_text_menuitems();
	associate_fixed_text_list();

	ShowListCategoryScreen( get_string(title),get_image( title_icon), get_string(left_softkey), get_image( left_softkey_icon), get_string(right_softkey), get_image( right_softkey_icon), number_of_items);

	if ( list_of_descriptions==NULL )
	{
		for(i=0;i<number_of_items;i++)
		{	
			add_fixed_text_item((UI_string_type)list_of_items[i]);
			wgui_pop_up_description_strings[i].text_strings[0] = NULL;
		}
	}
	else
	{
		for(i=0;i<number_of_items;i++)
		{	
			add_fixed_text_item((UI_string_type)list_of_items[i]);
			wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type)list_of_descriptions[i];
		}
	}
	
	resize_fixed_text_menuitems_to_list_width();
	resize_fixed_text_menuitems(0, MMI_MENUITEM_HEIGHT);//090605 Shortcut Calvin moved
	
	h_flag=set_list_menu_category_history(MMI_CATEGORY6_ID,history_buffer);
	if(h_flag)
		fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
	else
		fixed_list_goto_item_no_redraw(highlighted_item);
	if ( list_of_descriptions!=NULL )
	set_pop_up_descriptions(1,number_of_items,MMI_fixed_list_menu.highlighted_item);

	gdi_layer_unlock_frame_buffer();

	ExitCategoryFunction=ExitListCategoryScreen;
	RedrawCategoryFunction=dm_redraw_category_screen;
	GetCategoryHistory = dm_get_category_history;
	GetCategoryHistorySize = dm_get_category_history_size;
	dm_data.s32ScrId = (S32)GetActiveScreenId();
	dm_data.s32CatId = MMI_CATEGORY6_ID;
	dm_data.s32flags = 0;
	dm_setup_data(&dm_data);
	dm_redraw_category_screen();	

}/* end of ShowCategory6Screen */

/*****************************************************************************
* FUNCTION			
*  ShowCategory7Screen
*
* DESCRIPTION
*  Displays the category7 screen
*
* PARAMETERS
*  title					IN	Title for the screen
*  title_icon			IN	Icon shown with the title
*  left_softkey		IN	Left softkey label
*  left_softkey_icon	IN	Icon for the left softkey
*  right_softkey		IN	Right softkey label
*  right_softkey_iconIN	Icon for the right softkey
*  message				IN	Notification message (string. Not string ID)
*  history_buffer		IN	history buffer
*
* RETURNS                 
*  void
*
* GLOBALS AFFECTED
*  ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
*  GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory7Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,U8* message,U8* history_buffer)
{
   /*----------------------------------------------------------------*/
   /* Local Variables                                                */
   /*----------------------------------------------------------------*/
	dm_data_struct	dm_data;
	S32 l;

   /*----------------------------------------------------------------*/
   /* Code Body                                                      */
   /*----------------------------------------------------------------*/

	UI_UNUSED_PARAMETER(history_buffer);

	gdi_layer_lock_frame_buffer();

	MMI_menu_shortcut_number=-1;
	change_left_softkey(left_softkey,left_softkey_icon);
	change_right_softkey(right_softkey,right_softkey_icon);
	SetupCategoryKeyHandlers();

	MMI_title_string=(UI_string_type)get_string(title);
	MMI_title_icon=(UI_image_type)get_image(title_icon);
	MMI_message_string=(UI_string_type)(message);
	l=pixtel_UI_strlen(MMI_message_string);
	create_multiline_inputbox_set_buffer(MMI_message_string,l,l,0);
	MMI_multiline_inputbox.flags|=(UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW|UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND|UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);

	gdi_layer_unlock_frame_buffer();

	ExitCategoryFunction=ExitCategory7Screen;
	RedrawCategoryFunction=dm_redraw_category_screen;
	GetCategoryHistory = dm_get_category_history;
	GetCategoryHistorySize = dm_get_category_history_size;
	dm_data.s32ScrId = (S32)GetActiveScreenId();
	dm_data.s32CatId = MMI_CATEGORY7_ID;
	dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
	dm_setup_data(&dm_data);
	dm_redraw_category_screen();	

}/* end of ShowCategory7Screen */

/*****************************************************************************
* FUNCTION
*  ExitCategory7Screen
*
* DESCRIPTION
*   Exits the category7 screen
*
* PARAMETERS
*  void
*
* RETURNS
*  void
*
* GLOBALS AFFECTED
*  
*****************************************************************************/
void ExitCategory7Screen(void)
{
	reset_softkeys();
}/* end of ExitCategory7Screen */

/*****************************************************************************
* FUNCTION			
*  ShowCategory8Screen
*
* DESCRIPTION
*  Displays the category8 screen
*
* PARAMETERS
*  title					IN	Title for the screen
*  title_icon			IN	Icon shown with the title
*  left_softkey		IN	Left softkey label
*  left_softkey_icon	IN	Icon for the left softkey
*  right_softkey		IN	Right softkey label
*  right_softkey_iconIN	Icon for the right softkey
*  message				IN	Notification message
*  image					IN	Notification image
*  history_buffer		IN	history buffer
*
* RETURNS                 
*  void
*
* GLOBALS AFFECTED
*  ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
*  GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory8Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,U16 message,U16 message_icon,U8* history_buffer)
{
	ShowCategory66Screen(title,title_icon,left_softkey,left_softkey_icon,right_softkey,right_softkey_icon,(U8*)get_string(message),message_icon,history_buffer);
}/* end of ShowCategory8Screen */

void ShowCategory208Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,S8 *message,U16 message_icon,U8* history_buffer)
{
	ShowCategory66Screen(title,title_icon,left_softkey,left_softkey_icon,right_softkey,right_softkey_icon,(U8*) message,message_icon,history_buffer);
}


/*****************************************************************************
* FUNCTION			
*  ShowCategory9Screen
*
* DESCRIPTION
*  Displays the category9 screen
*
* PARAMETERS
*  message				IN	Message string
*  icon					IN	Message icon
*  history_buffer		IN	history buffer
*
* RETURNS                 
*  void
*
* GLOBALS AFFECTED
*  ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
*  GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/

void ShowCategory9Screen(U16 message,U16 message_icon,U8* history_buffer)
{
   /*----------------------------------------------------------------*/
   /* Local Variables                                                */
   /*----------------------------------------------------------------*/
	dm_data_struct	dm_data;
	S32 l;

   /*----------------------------------------------------------------*/
   /* Code Body                                                      */
   /*----------------------------------------------------------------*/
	dm_reset_context();
	UI_UNUSED_PARAMETER(history_buffer);
	gdi_layer_lock_frame_buffer();
	entry_full_screen();
	MMI_menu_shortcut_number=-1;
	clear_category_screen_key_handlers();
	clear_left_softkey();
	clear_right_softkey();
	
	if ( message!=0 )
	{
		MMI_message_string=(UI_string_type)get_string(message);
		l=pixtel_UI_strlen(MMI_message_string);
		create_multiline_inputbox_set_buffer(MMI_message_string,l,l,0);
		MMI_multiline_inputbox.flags|=(UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW|UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY|UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND|UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
	}
	else
	{
			MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
	}
	dm_add_image(get_image(message_icon), NULL, NULL);

	gdi_layer_unlock_frame_buffer();

	ExitCategoryFunction=UI_dummy_function;
	RedrawCategoryFunction=dm_redraw_category_screen;
	GetCategoryHistory = dm_get_category_history;
	GetCategoryHistorySize = dm_get_category_history_size;
	dm_data.s32ScrId = (S32)GetActiveScreenId();
	dm_data.s32CatId = MMI_CATEGORY9_ID;
	dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
	dm_setup_data(&dm_data);
	dm_redraw_category_screen();	

}/* end of ShowCategory9Screen */

/*****************************************************************************
* FUNCTION
*  ExitCategory9Screen
*
* DESCRIPTION
*   Exits the category9 screen
*
* PARAMETERS
*  void
*
* RETURNS
*  void
*
* GLOBALS AFFECTED
*  
*****************************************************************************/
void ExitCategory9Screen(void)
{	
   /*----------------------------------------------------------------*/
   /* Code Body                                                      */
   /*----------------------------------------------------------------*/
	pixtel_UI_hide_animations();
}/* end of ExitCategory9Screen */

/*****************************************************************************
* FUNCTION			
*  ShowCategory11Screen
*
* DESCRIPTION
*  Displays the category11 screen
*
* PARAMETERS
*   title 			IN	Title for the screen
*   title_icon			IN	Icon shown with the title
*   left_softkey 		IN	Left softkey label
*   left_softkey_icon		IN	Icon for the left softkey
*   right_softkey 		IN	Right softkey label
*   right_softkey_icon		IN	Icon for the right softkey
*   number_of_items		IN	Number of items
*   list_of_items		IN	List of text items
*   highlighted_item		IN	Zero based index of the highlighed item (used if there is no history)
*   history_buffer		IN	history buffer
*
* RETURNS                 
*  void
*
* GLOBALS AFFECTED
*  ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
*  GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory11Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,S32 number_of_items,U16* list_of_items,U16 highlighted_item,U8* history_buffer)
{
   /*----------------------------------------------------------------*/
   /* Local Variables                                                */
   /*----------------------------------------------------------------*/
	U8 i =0;

   /*----------------------------------------------------------------*/
   /* Code Body			                                             */
   /*----------------------------------------------------------------*/
	for (i=0;i<number_of_items;i++)
	{
		subMenuDataPtrs[i]=(PU8)get_string(list_of_items[i]);
	}
	ShowCategory36Screen(title,title_icon,left_softkey,left_softkey_icon,right_softkey,right_softkey_icon,number_of_items,subMenuDataPtrs,highlighted_item,history_buffer);

}/* end of ShowCategory11Screen */

/*****************************************************************************
* FUNCTION			
*  ShowCategory12Screen (two state menuitem)
*
* DESCRIPTION
*  Displays the Category12 screen
*
* PARAMETERS
*   title 			IN	Title for the screen
*   title_icon			IN	Icon shown with the title
*   left_softkey 		IN	Left softkey label
*   left_softkey_icon		IN	Icon for the left softkey
*   right_softkey 		IN	Right softkey label
*   right_softkey_icon		IN	Icon for the right softkey
*   number_of_items		IN	Number of items
*   list_of_items		IN	List of text items
*   list_of_states,		IN	Array containing the states of the items
*   highlighted_item		IN	Zero based index of the highlighed item (used if there is no history)
*   history_buffer		IN	history buffer
*
* RETURNS                 
*  void
*
* GLOBALS AFFECTED
*  ExitCategoryFunction, RedrawCategoryFunction, GetCategoryHistory
*  GetCategoryHistorySize, g_dm_data_struct
* *****************************************************************************/
void ShowCategory12Screen(U16 title,U16 title_icon,U16 left_softkey,U16 left_softkey_icon,U16 right_softkey,U16 right_softkey_icon,S32 number_of_items,U8** list_of_items,U8* list_of_states,S32 highlighted_item,U8* history_buffer)
{
   /*----------------------------------------------------------------*/
   /* Local Variables                                                */
   /*----------------------------------------------------------------*/
	dm_data_struct	dm_data;
	S32 i;
	byte h_flag;

   /*----------------------------------------------------------------*/
   /* Code Body                                                      */
   /*----------------------------------------------------------------*/
	gdi_layer_lock_frame_buffer();
/* Setup menuitem */
	create_fixed_twostate_menuitems(get_image(CHECKBOX_ON_IMAGE_ID),get_image(CHECKBOX_OFF_IMAGE_ID));
	associate_fixed_twostate_list();

	ShowListCategoryScreen( get_string(title),get_image( title_icon), get_string(left_softkey), get_image( left_softkey_icon), get_string(right_softkey), get_image( right_softkey_icon), number_of_items);

	resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT);//092005 twostate Calvin added
	set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT,0,1,0);//092005 twostate Calvin added

	set_left_softkey_function(standard_check_list_handle_left_softkey_up,KEY_EVENT_UP);
	checklist_category_menu_item_states=list_of_states;
	for(i=0;i<number_of_items;i++)
	{
		add_fixed_twostate_item((UI_string_type)list_of_items[i]);
		if(list_of_states[i]) select_fixed_twostate_item(i);
	}

/* Read History*/
	h_flag=set_list_menu_category_history(MMI_CATEGORY12_ID,history_buffer);
	if(h_flag) fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
	else fixed_list_goto_item_no_redraw(highlighted_item);

	/* Leo remove for test */
	//register_menu_shortcut_selected(standard_check_list_handle_item_select);
	resize_fixed_twostate_menuitems_to_list_width();

	gdi_layer_unlock_frame_buffer();

	ExitCategoryFunction=ExitListCategoryScreen;
	RedrawCategoryFunction=dm_redraw_category_screen;
	GetCategoryHistory = dm_get_category_history;
	GetCategoryHistorySize = dm_get_category_history_size;
	dm_data.s32ScrId = (S32)GetActiveScreenId();
	dm_data.s32CatId = MMI_CATEGORY12_ID;
	dm_data.s32flags = 0;
	dm_setup_data(&dm_data);
	dm_redraw_category_screen();	

}/* end of ShowCategory12Screen */

/*****************************************************************************
* FUNCTION			
*  ShowCategory13Screen
*
* DESCRIPTION
*  Displays the Category13 screen
*
* PARAMETERS
*   title 			IN	Title for the screen
*   title_icon			IN	Icon shown with the title
*   left_softkey 		IN	Left softkey label
*   left_softkey_icon		IN	Icon for the left softkey
*   right_softkey 		IN	Right softkey label
*   right_softkey_icon		IN	Icon for the right softkey
*   number_of_items		IN	Number of items
*   list_of_items		IN	List of text items
*   list_of_states,		IN	Array containing the states of the items
*   highlighted_item		IN	Zero based index of the highlighed item (used if there is no history)
*   history_buffer		IN	history buffer
*
* RETURNS                 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -