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


C++ UpdateMenu函数代码示例

本文整理汇总了C++中UpdateMenu函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateMenu函数的具体用法?C++ UpdateMenu怎么用?C++ UpdateMenu使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: SetManagedMenu

 // Managed Pane Menu
 //------------------
 wxMenu * SetManagedMenu(wxMenu * menu)
 {
     wxMenu * oldmenu = m_menu;
     m_menu = menu;
     UpdateMenu();
     return oldmenu;
 }
开发者ID:oeuftete,项目名称:wx-xword,代码行数:9,代码来源:MyAuiMgr.hpp

示例2: while

//------------------------------------------------------------------------------
void CToolsHistory::AddScenePath( const std::string& rScene, const std::string& rPath )
{
	bool bChanged = false;

	//for path
	if( std::find( m_pathHistory.begin(), m_pathHistory.end(), rPath ) == m_pathHistory.end())
	{
		m_pathHistory.push_back(rPath);
		while( !m_pathHistory.empty() && m_pathHistory.size() > m_nMaxSize )
		{
			m_pathHistory.erase( m_pathHistory.begin());
		}
		bChanged = true;
	}

	//for Scene
	if( std::find( m_sceneHistory.begin(), m_sceneHistory.end(), std::make_pair(rScene, rPath) ) == m_sceneHistory.end())
	{
		m_sceneHistory.push_back(std::make_pair(rScene, rPath));
		while( !m_sceneHistory.empty() && m_sceneHistory.size() > m_nMaxSize )
		{
			m_sceneHistory.erase( m_sceneHistory.begin());
		}
		bChanged = true;
	}

	if( bChanged )
	{
		SaveFile();
		UpdateMenu();
	}
}
开发者ID:Abyss116,项目名称:libguiex,代码行数:33,代码来源:toolshistory.cpp

示例3: wxSetCursor

void CCamFrame::OnInitMenuPopup( wxMenuEvent& event )
{
	// Before anything else let's set Document::Current and DocView::Current properly...
	// Menus will either work on no document or the selected document. So the most useful
	// thing to do is to set Current to Selected.
	Document::GetSelected()->SetCurrent();
	DocView::GetSelected()->SetCurrent();

	wxSetCursor( *wxSTANDARD_CURSOR );

PORTNOTE( "other", "Removed usage of bSysMent from OnInitMenuPopup" )
#if !defined(EXCLUDE_FROM_XARALX)
	if (bSysMenu)
	{
		CMDIFrameWnd::OnInitMenuPopup(pMenu, n, bSysMenu);
		// bug fix 2996 
		if(FullScreenMode)
		{
			pMenu->EnableMenuItem(SC_MOVE,MF_GRAYED);
			pMenu->EnableMenuItem(SC_SIZE,MF_GRAYED);
			pMenu->EnableMenuItem(SC_MAXIMIZE,MF_GRAYED);
		}
	}
	else
#endif
	if( !UpdateMenu( event.GetMenu() ) )
		event.Skip();
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:28,代码来源:camframe.cpp

示例4: UpdateMenu

/*******************************************************
*   Handle UNDO
*******************************************************/
void CommonPool::SaveUndo()
{
	if (selection==NONE || !Prefs.save_undo)	return;

	Hist.Save(H_REPLACE, pointer, r_sel_pointer);
	UpdateMenu();
}
开发者ID:dakk,项目名称:Faber,代码行数:10,代码来源:CommonPool.cpp

示例5: QObject

LDesktop::LDesktop(int deskNum) : QObject(){
	
  DPREFIX = "desktop-"+QString::number(deskNum)+"/";
  desktopnumber = deskNum;
  desktop = new QDesktopWidget();
  defaultdesktop = (deskNum== desktop->primaryScreen());
  xoffset = 0;
  for(int i=0; i<desktopnumber; i++){
    xoffset += desktop->screenGeometry(i).width();
  }
  deskMenu = new QMenu(0);
  appmenu = new AppMenu(0);
  //Setup the internal variables
  settings = new QSettings(QSettings::UserScope, "LuminaDE","desktopsettings", this);
  bgtimer = new QTimer(this);
    bgtimer->setSingleShot(true);
 
  bgWindow = new QWidget(0);
	bgWindow->setObjectName("bgWindow");
	bgWindow->setContextMenuPolicy(Qt::CustomContextMenu);
	LX11::SetAsDesktop(bgWindow->winId());
	bgWindow->setGeometry(xoffset,0,desktop->screenGeometry().width(), desktop->screenGeometry().height());
	connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) );
  
  //Start the update processes
  QTimer::singleShot(1,this, SLOT(UpdateMenu()) );
  QTimer::singleShot(1,this, SLOT(UpdateBackground()) );
  QTimer::singleShot(1,this, SLOT(UpdateDesktop()) );
  QTimer::singleShot(1,this, SLOT(UpdatePanels()) );

}
开发者ID:TetragrammatonHermit,项目名称:external-projects,代码行数:31,代码来源:LDesktop.cpp

示例6: UpdateMenu

void MenuWindow::Update()
{
	if( m_pMainParts ){
		m_pMainParts->UpdatePartsRecursive();
	}
	UpdateMenu();
}
开发者ID:masarou,项目名称:2DAction,代码行数:7,代码来源:SystemMenuWindow.cpp

示例7: BGroupView

FaberView::FaberView()
	:
	BGroupView(B_VERTICAL, 0)
{
	fToolBar = new ToolBar();

	fTracksContainer = new TracksContainer();

	fInfoToolBar = new InfoToolBar();

	rgb_color backgroundColor = {120,120,120};

	fMenuBar = BuildMainMenuBar();

	BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
		.Add(fMenuBar)
		.Add(fToolBar)
		.AddStrut(0.0f)
			.AddGroup(B_VERTICAL, 0)
				.Add(fTracksContainer)
			.End()
		.AddStrut(10.0f)
		.Add(fInfoToolBar)
		.AddStrut(0.5f)
	.End();

	UpdateMenu();
	fTracksContainer->SetViewColor(backgroundColor);
}
开发者ID:Barrett17,项目名称:Faber,代码行数:29,代码来源:FaberView.cpp

示例8: UpdateMenu

// Oparation
BOOL CRecentDocumentListFixed::Impl::AddToList(
			LPCTSTR									lpstrDocName,
		std::vector<std::pair<CString, CString> >*	parrFore,
		std::vector<std::pair<CString, CString> >*	parrBack,
		const CString								strTitle)
{
	_DocEntry	de;

	if (lstrcpy(de.szDocName, lpstrDocName) == NULL)
		return FALSE;

	for (int i = 0; i < m_arrDocs.GetSize(); i++) {
		if (lstrcmpi(m_arrDocs[i].szDocName, lpstrDocName) == 0) {
			m_arrDocs.RemoveAt(i);
			break;
		}
	}

	if (m_arrDocs.GetSize() == m_nMaxEntries && m_nMaxEntries)	//minit
		m_arrDocs.RemoveAt(0);

	if (parrFore)
		de.arrFore = *parrFore;

	if (parrBack)
		de.arrBack = *parrBack;

	de.strTitle = strTitle;

	BOOL bRet = m_arrDocs.Add(de);
	if (bRet) 
		bRet = UpdateMenu();

	return bRet;
}
开发者ID:Runcy,项目名称:unDonut,代码行数:36,代码来源:RecentDocumentListFixed.cpp

示例9: UpdateMenu

void
JXStyleMenu::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	if (sender == this && message.Is(JXMenu::kNeedsUpdate))
		{
		UpdateMenu();
		}
	else if (sender == this && message.Is(JXMenu::kItemSelected))
		{
		const JXMenu::ItemSelected* selection =
			dynamic_cast(const JXMenu::ItemSelected*, &message);
		assert( selection != NULL );

		const JIndex i = selection->GetIndex();
		if (i == kCustomColorCmd)
			{
			assert( itsChooseCustomColorFlag );
			ChooseColor();
			}
		else
			{
			if (i >= kFirstColorCmd)
				{
				itsColorIndex = IndexToColor(i);
				}
			HandleMenuItem(i);
			}
		}

	else if (sender == itsChooseColorDialog &&
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:34,代码来源:JXStyleMenu.cpp

示例10: ApplyLanguageToMenu

void CFVDownloads_Tasks::OnRClick()
{
	CMenu menu;
	menu.LoadMenu (IDM_FVDOWNLOADS);
	ApplyLanguageToMenu (&menu);
	CMenu *pPopup = menu.GetSubMenu (0);

	
	UpdateActiveDownload (0);

	
	UpdateMenu (pPopup);

	ClientToScreen (&m_rbPt);

	m_odmenu.Attach (&menu, FALSE);
	
	m_odmenu.SetImageList (&((CMainFrame*)AfxGetApp ()->m_pMainWnd)->m_imgsMenu, &((CMainFrame*)AfxGetApp ()->m_pMainWnd)->m_dimgsMenu);
	fsSetImage *pImages;
	int cImages;
	CFlashVideoDownloadsWnd::Plugin_GetMenuImages (&pImages, &cImages);
	m_odmenu.SetImages (pImages, cImages);

	fsSetImage img (11, 0, 0);
	m_odmenu.SetImages (&img, 3, NULL, TRUE);

	
	pPopup->TrackPopupMenu (TPM_RIGHTBUTTON | TPM_TOPALIGN | TPM_LEFTALIGN,	
		m_rbPt.x, m_rbPt.y, this);
	m_odmenu.Detach ();

	menu.DestroyMenu ();
}
开发者ID:naroya,项目名称:freedownload,代码行数:33,代码来源:FVDownloads_Tasks.cpp

示例11: SLOT

// =====================
//     PRIVATE SLOTS 
// =====================
void LDesktop::SettingsChanged(){
  settings->sync(); //make sure to catch external settings changes
  QTimer::singleShot(1,this, SLOT(UpdateMenu()) );
  QTimer::singleShot(1,this, SLOT(UpdateBackground()) );
  QTimer::singleShot(1,this, SLOT(UpdateDesktop()) );
  QTimer::singleShot(1,this, SLOT(UpdatePanels()) );
}
开发者ID:prodigeni,项目名称:pcbsd,代码行数:10,代码来源:LDesktop.cpp

示例12: __VDProjectUI_MainWndProc

LRESULT CALLBACK __VDProjectUI_MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
	switch (msg) {
	case WM_NULL:
		{
			g_bInitWindow = true;
		}
		break;
	case WM_MENUSELECT:
		{
			UpdateMenu();
		}
		break;
	case WM_COMMAND:
		{
			int pos = LOWORD(wParam) - ID_AUO_BASE - 1;
			if ((0 <= pos) && (pos < g_menuList.size())) {
				g_menu = g_menuList.at(pos);
				g_bOutput = true;
				g_bInitOutput = false;
				g_bStartServer = false;
				PostMessage(hwnd, WM_COMMAND, ID_FILE_STARTSERVER, 0);
				break;
			}
		}
		break;
	}
	return CallWindowProc(__VDProjectUI_MainWndProcOrig, hwnd, msg, wParam, lParam);
}
开发者ID:KGE-INC,项目名称:vdubauo,代码行数:28,代码来源:main.cpp

示例13: SaveFile

//------------------------------------------------------------------------------
void CToolsHistory::SetDefaultEditor(const std::string& rEditor)
{
	m_strDefaultEditor = rEditor;

	SaveFile();
	UpdateMenu();
}
开发者ID:Abyss116,项目名称:libguiex,代码行数:8,代码来源:toolshistory.cpp

示例14: V_strncpy

void CommandMenu::OnMessage(const KeyValues *params, VPANEL fromPanel)
{
	char text[255];
	bool bHandled = false;

	KeyValues *param1 = const_cast<KeyValues *>(params);

	// toggle attached cvar, if any
	V_strncpy( text, param1->GetString("toggle"), sizeof( text ) );

	if ( text[0] )
	{
		ConVarRef convar( text );
		if ( convar.IsValid() )
		{
			// toggle cvar 

			if ( convar.GetInt() )	
			{
				convar.SetValue( 0 );
			}
			else
			{
				convar.SetValue( 1 );
			}

			UpdateMenu();
		}
		else
		{
			Msg("CommandComboBox::OnMessage: cvar %s not found.\n", param1->GetString("typedata") );
		}

		bHandled = true;
	}

	// execute attached command, if any
	V_strncpy( text, param1->GetString("command"), sizeof( text ) );
	if ( text[0] )
	{
		engine->ClientCmd( text );
		bHandled = true;
	}

	// fire custom message, if any
	V_strncpy( text, param1->GetString("custom"), sizeof( text ) );
	if ( text[0] )
	{
		OnCustomItem( param1 ); // let derived class decide what to do
		bHandled = true;
	}

	if ( bHandled )
	{
		PostMessage( GetParent(), new KeyValues("CommandMenuClosed") );
	}
		
	BaseClass::OnMessage( params, fromPanel );
}
开发者ID:TalonBraveInfo,项目名称:InvasionASSource,代码行数:59,代码来源:commandmenu.cpp

示例15: UpdateMenu

void CommandMenu::SetVisible(bool state)
{
	if ( state && !IsVisible() )
	{
		UpdateMenu();
	}

	BaseClass::SetVisible( state );
}
开发者ID:TalonBraveInfo,项目名称:InvasionASSource,代码行数:9,代码来源:commandmenu.cpp


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