📄 guiapp_action_imagesizemenu.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 "osd.h"
#include "eeprom.h"
#include "dispfmt.h"
#include "datapath.h"
#include "guiApp.h"
int16 tempSteps; // save Manual Steps value during user adjustment
/* Initialize the items */
int08 guiApp_action_ImageSizeMenu_OnStart( int16 menuId, GUIMSG *msg )
{
int16 min, max;
DP_SOURCEDESC *srcDesc;
guiApp_SetMenuPosition( menuId, GUI_BOTTOMCENTER );
datapath_GetSourceDesc( &srcDesc );
EE_GETVAR( UserMachine.Projector.ImageSizeManualSteps, tempSteps );
dispfmt_GetImageSizeLimits( &min, &max );
tempSteps = LMT( min, tempSteps, max );
guiStyle_item_SetSingleValue( ITEM_IMAGESIZEADJUSTMENTITEM, tempSteps, min, max );
return PASS;
}
int08 guiApp_action_ImageSizeMenu_OnClose( int16 menuId )
{
DP_SOURCEDESC *srcDesc;
datapath_GetSourceDesc( &srcDesc );
EE_PUTVAR( UserMachine.Projector.ImageSizeManualSteps, tempSteps );
return PASS;
}
/* implement item behavior, system interaction */
/* guiStyle_item_Generic_GuiMsg converts LEFT, RIGHT, UP, DOWN into DEC, INC, DEC_Y, and INC_Y */
int08 guiApp_action_ImageSizeMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{
int16 min, max;
if( msg == NULL )
return FAIL;
dispfmt_GetImageSizeLimits( &min, &max );
switch( msg->type )
{
case GUIMSG_DEC:
if( datapath_UserSetImageSize( 2, tempSteps - 1 ) == PASS )
{
tempSteps--;
guiStyle_item_SetSingleValue( ITEM_IMAGESIZEADJUSTMENTITEM, tempSteps, min, max );
}
break;
case GUIMSG_INC:
if( datapath_UserSetImageSize( 2, tempSteps + 1 ) == PASS )
{
tempSteps++;
guiStyle_item_SetSingleValue( ITEM_IMAGESIZEADJUSTMENTITEM, tempSteps, min, max );
}
break;
default:
break;
}
return PASS;
}
int08 guiApp_action_ImageSizeMenu_Redraw( int16 menuId, GUIMSG *msg )
{
guiApp_SetMenuPosition( menuId, GUI_BOTTOMCENTER );
return PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -