本文整理汇总了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;
}
示例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();
}
}
示例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();
}
示例4: UpdateMenu
/*******************************************************
* Handle UNDO
*******************************************************/
void CommonPool::SaveUndo()
{
if (selection==NONE || !Prefs.save_undo) return;
Hist.Save(H_REPLACE, pointer, r_sel_pointer);
UpdateMenu();
}
示例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()) );
}
示例6: UpdateMenu
void MenuWindow::Update()
{
if( m_pMainParts ){
m_pMainParts->UpdatePartsRecursive();
}
UpdateMenu();
}
示例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);
}
示例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;
}
示例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 &&
示例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 ();
}
示例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()) );
}
示例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);
}
示例13: SaveFile
//------------------------------------------------------------------------------
void CToolsHistory::SetDefaultEditor(const std::string& rEditor)
{
m_strDefaultEditor = rEditor;
SaveFile();
UpdateMenu();
}
示例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 );
}
示例15: UpdateMenu
void CommandMenu::SetVisible(bool state)
{
if ( state && !IsVisible() )
{
UpdateMenu();
}
BaseClass::SetVisible( state );
}