当前位置: 首页>>代码示例>>C++>>正文


C++ MainMenu::ProcessUpDownKey方法代码示例

本文整理汇总了C++中MainMenu::ProcessUpDownKey方法的典型用法代码示例。如果您正苦于以下问题:C++ MainMenu::ProcessUpDownKey方法的具体用法?C++ MainMenu::ProcessUpDownKey怎么用?C++ MainMenu::ProcessUpDownKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MainMenu的用法示例。


在下文中一共展示了MainMenu::ProcessUpDownKey方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PegAppInitialize

/*--------------------------------------------------------------------------*/
void PegAppInitialize(PegPresentationManager *pPresent)
{
	printf("err0\n");
	pPresent->Screen()->SetPalette(0, 255, PegCustomPalette); /* use custom palette */
	pPresent->SetColor(PCI_NORMAL, NEWMENU_BACKGRANOUD_COLOR);
	printf("error1\n");
	pPresent->Draw();
	printf("error2\n");
	
	/*Set default font size (only English)*/
	PegTextThing::SetDefaultFont(PEG_PROMPT_FONT,&Arial14);
	PegTextThing::SetDefaultFont(PEG_TBUTTON_FONT,&Arial12);

	//gbCurrentLanguage = 1;
	/*
	if(0 == gbCurrentLanguage)
	{
		PegTextThing::SetDefaultFont(PEG_PROMPT_FONT,&Arial14);
		PegTextThing::SetDefaultFont(PEG_TBUTTON_FONT,&Arial12);
	}
	else if(1 == gbCurrentLanguage)
	{
		PegTextThing::SetDefaultFont(PEG_PROMPT_FONT,&heiti14);
		PegTextThing::SetDefaultFont(PEG_TBUTTON_FONT,&heiti12);
	}
	*/

	printf("error3\n");
    MainMenu *pWin = new MainMenu(20, 20);

	printf("error4\n");
	ToolTip * pToolTip = new ToolTip(0, 0, NULL);
	pWin->SetToolTipWnd(pToolTip);

	printf("err111\n");
	TVHelpWnd * pTVHelpWnd = new TVHelpWnd(pWin->mReal.wLeft + 400, pWin->mReal.wTop);
	pWin->SetHelpWnd(pTVHelpWnd);

	/*set translucency*/

	pPresent->Add(pTVHelpWnd);
	pPresent->Add(pToolTip, FALSE);
	pPresent->Add(pWin);
	
	pWin->ProcessUpDownKey();

	PegMessage tmpMsg;
	tmpMsg.pTarget = pToolTip;
	tmpMsg.pSource = pPresent;
	tmpMsg.wType = PM_SHOW;
	pPresent->Message(tmpMsg);
}
开发者ID:garyqinyu,项目名称:abv,代码行数:53,代码来源:mainmenu.cpp

示例2: Message

/*--------------------------------------------------------------------------*/
SIGNED PictureMenu::Message(const PegMessage &Mesg)
{
	TVProgressWindowClass * pTVProgressWindow = NULL;
	PegThing *ptDisplayedWindow[MaxNumberOfWindow];
	PegThing *SomeThing = NULL;
	PegThing *pTest;
	int iIndex;

    switch (Mesg.wType)
    {
    case SIGNAL(ID_PictureMenu_Button_ColorTemp, PSF_CLICKED):
        // Enter your code here:
        break;

    case SIGNAL(ID_PictureMenu_Button_Color, PSF_CLICKED):
        // Enter your code here:
        break;

    case SIGNAL(ID_PictureMenu_Button_Sharp, PSF_CLICKED):
        // Enter your code here:
        break;

    case SIGNAL(ID_PictureMenu_Button_Tint, PSF_CLICKED):
        // Enter your code here:
        break;

    case SIGNAL(ID_PictureMenu_Button_Contrast, PSF_CLICKED):
        // Enter your code here:
        break;

    case SIGNAL(ID_PictureMenu_Button_Brightness, PSF_CLICKED):
        // Enter your code here:
        break;
	case PM_KEYUP:
		{			
			m_nCurrentSubWndID = Mesg.iData;
			if(ID_PictureMenu_Button_Brightness > m_nCurrentSubWndID)
			{
				m_nCurrentSubWndID++;
			}	
			else
			{
				m_nCurrentSubWndID = (int)ID_PictureMenu_Button_ColorTemp;
				Presentation()->MoveFocusTree(m_pPictureMenuButtonColorTemp);
			}
			ProcessUpDownKey();
			break;
		}
	case PM_KEYDOWN:
		{
			m_nCurrentSubWndID = Mesg.iData;
			if(ID_PictureMenu_Button_ColorTemp < m_nCurrentSubWndID)
			{
				m_nCurrentSubWndID--;
			}
			else
			{
				m_nCurrentSubWndID = (int)ID_PictureMenu_Button_Brightness;
				Presentation()->MoveFocusTree(m_pPictuerMenuButtonBright);
			}
			ProcessUpDownKey();
			break;
		}
	case PM_KEYLEFT:
		{
			Destroy(this);
			MainMenu * pMainMenu = (MainMenu *)Presentation()->Find(MAIN_MENU_ID);
			pMainMenu->ProcessUpDownKey();
			break;
		}
	case PM_KEYRIGHT:
		{
			if(ID_PictureMenu_Button_ColorTemp == Mesg.iData || \
			   ID_PictureMenu_Button_Color == Mesg.iData || \
			   ID_PictureMenu_Button_Tint == Mesg.iData || \
			   ID_PictureMenu_Button_Contrast == Mesg.iData || \
			   ID_PictureMenu_Button_Sharp == Mesg.iData || \
			   ID_PictureMenu_Button_Brightness == Mesg.iData)
			{
				/* right key equals OK, so enter next menu level */
				BeginDraw();
				/* Delete all pop up already displayed to clean the screen */
				for(iIndex = FIRST_POPUP_ID; iIndex < LAST_USER_ID; iIndex++)
				{
					SomeThing = PegThing::Presentation()->Find(iIndex);
					if(SomeThing!=NULL)
					{
						PegThing::Presentation()->Destroy(SomeThing);
					}
				}
				/*hide all the menus displayed on screen except the help window*/
				pTest = PegPresentationManager::Presentation()->First();
				iIndex = 0;
				while(pTest) /* construct the current displayed window pointer table */
				{
					if(HELP_ID == pTest->Id())
					{					
						pTest = PegPresentationManager::Presentation()->Next();
						continue;
//.........这里部分代码省略.........
开发者ID:garyqinyu,项目名称:abv,代码行数:101,代码来源:picturemenu.cpp


注:本文中的MainMenu::ProcessUpDownKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。