📄 guiapp_action_mainmenu.c
字号:
/*****************************************************************************
** TEXAS INSTRUMENTS PROPRIETARY INFORMATION
**
** (c) Copyright, Texas Instruments Incorporated, 2006.
** All Rights Reserved.
**
** Property of Texas Instruments Incorporated. Restricted Rights -
** Use, duplication, or disclosure is subject to restrictions set
** forth in TI's program license agreement and associated documentation.
******************************************************************************/
#include "common.h"
#include "guiStyle.h"
#include "guiApp_action.h"
#include "datapath.h"
#include "OSD.h"
#include "guiApp.h"
int08 guiApp_action_MainMenu_OnStart( int16 menuId, GUIMSG *msg )
{
DP_SOURCEDESC *srcDesc;
datapath_UserStopConnectorScan( TRUE );
datapath_GetSourceDesc( &srcDesc );
guiApp_SetMenuPosition( menuId, GUI_TOPLEFT );
/* hide appropriate menus for inactive source */
if( !srcDesc->sourceActive )
{
guiStyle_HideItem( menuId, ITEM_IMAGEITEM, TRUE ); /* hide connector specific image menu items */
guiStyle_HideItem( menuId, ITEM_AUTOLOCKITEM, TRUE ); /* hide all autolock menu items */
}
if( srcDesc->connector != VGA )
{
guiStyle_HideItem( menuId, ITEM_AUTOLOCKITEM, TRUE ); /* hide all autolock menu items */
}
return PASS;
}
int08 guiApp_action_MainMenu_OnClose( int16 menuId )
{
datapath_UserStopConnectorScan( FALSE );
return PASS;
}
/* specify the highlight window as required by the GUI Style code */
int08 guiApp_action_MainMenu_GetHighlightWindow( int16 menuId, uint08 *window )
{
*window = WIND_MAINHIGHLIGHT;
return PASS;
}
/* implement item behavior, system interaction */
int08 guiApp_action_MainMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{
if( msg == NULL )
return FAIL;
if( msg->type == GUIMSG_CHANGEITEMFOCUS )
{
switch( itemId )
{
case ITEM_DISPLAYITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVEMENUINFOITEM, 0 );
break;
case ITEM_IMAGEITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVEMENUINFOITEM, 1 );
break;
case ITEM_AUTOLOCKITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVEMENUINFOITEM, 2 );
break;
case ITEM_LANGUAGEITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVEMENUINFOITEM, 4 );
break;
case ITEM_ADVANCEDITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVEMENUINFOITEM, 5 );
break;
case ITEM_ABOUTITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVEMENUINFOITEM, 6 );
break;
default:
return FAIL;
}
}
return PASS;
}
int08 guiApp_action_MainMenu_Redraw( int16 menuId, GUIMSG *msg )
{
guiApp_SetMenuPosition( menuId, GUI_TOPLEFT );
return PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -