📄 guiapp_action_hsgmenu.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 "pictcont.h"
#include "guiApp.h"
uint16 activeHSGColor = HSG_RED;
int08 guiApp_action_HSGMenu_OnStart( int16 menuId, GUIMSG *msg )
{
DP_SOURCEDESC *srcDesc;
datapath_GetSourceDesc( &srcDesc );
guiApp_SetMenuPosition( menuId, GUI_TOPLEFT );
return PASS;
}
int08 guiApp_action_HSGMenu_OnClose( int16 menuId )
{
return PASS;
}
/* specify the highlight window as required by the GUI Style code */
int08 guiApp_action_HSGMenu_GetHighlightWindow( int16 menuId, uint08 *window )
{
*window = WIND_HSGHIGHLIGHT;
return PASS;
}
/* implement item behavior, system interaction */
int08 guiApp_action_HSGMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{
if( msg == NULL )
return FAIL;
if( msg->type == GUIMSG_CHANGEITEMFOCUS )
{
switch( itemId )
{
case ITEM_REDITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_RED );
activeHSGColor = HSG_RED;
break;
case ITEM_GREENITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_GREEN );
activeHSGColor = HSG_GREEN;
break;
case ITEM_BLUEITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_BLUE );
activeHSGColor = HSG_BLUE;
break;
case ITEM_CYANITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_CYAN );
activeHSGColor = HSG_CYAN;
break;
case ITEM_MAGENTAITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_MAGENTA );
activeHSGColor = HSG_MAGENTA;
break;
case ITEM_YELLOWITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_YELLOW );
activeHSGColor = HSG_YELLOW;
break;
case ITEM_WHITEITEM:
guiStyle_item_SetListIndex( ITEM_ACTIVECOLORINFOITEM, HSG_WHITE );
activeHSGColor = HSG_WHITE;
break;
default:
return FAIL;
}
}
return PASS;
}
int08 guiApp_action_HSGMenu_Redraw( int16 menuId, GUIMSG *msg )
{
guiApp_SetMenuPosition( menuId, GUI_TOPLEFT );
return PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -