• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxMenuEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OnInitMenuPopup

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


示例2: OnMenuHighlight

void wxFrameBase::OnMenuHighlight(wxMenuEvent& event)
{
    event.Skip();

#if wxUSE_STATUSBAR
    (void)ShowMenuHelp(event.GetMenuId());
#endif // wxUSE_STATUSBAR
}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:8,代码来源:framecmn.cpp


示例3: OnMenuHighlight

void wxStfChildFrame::OnMenuHighlight(wxMenuEvent& event) {
    if (this->GetMenuBar()) {
        wxMenuItem *item = this->GetMenuBar()->FindItem(event.GetId());
        if(item) {
            wxLogStatus(item->GetHelp());
        }
    }
    event.Skip();

}
开发者ID:SergiiRv,项目名称:stimfit,代码行数:10,代码来源:childframe.cpp


示例4: OnMenuOpen

void wxFrameBase::OnMenuOpen(wxMenuEvent& event)
{
    event.Skip();

    if ( !ShouldUpdateMenuFromIdle() )
    {
        // as we didn't update the menus from idle time, do it now
        DoMenuUpdates(event.GetMenu());
    }
}
开发者ID:EEmmanuel7,项目名称:wxWidgets,代码行数:10,代码来源:framecmn.cpp


示例5: OnMenuOpen

void Frame::OnMenuOpen( wxMenuEvent& evt )
{
    wxMenu* menu = evt.GetMenu();
    wxMenuItemList list = menu->GetMenuItems();
    wxMenuItemList::iterator i;
    for ( i = list.begin(); i != list.end(); ++i )
    {
        if ( (*i)->GetId() == toggleRunwayID )
        {
            (*i)->Check( grav->usingRunway() );
        }
        else if ( (*i)->GetId() == toggleVCCID )
        {
            bool showable = grav->isVenueClientControllerShowable();
            (*i)->Enable( showable );
            if ( showable )
            {
                (*i)->Check( grav->isVenueClientControllerShown() );
            }
        }
        else if ( (*i)->GetId() == toggleSideFrameID )
        {
            SideFrame* sf = findChildSideFrame();
            if ( sf != NULL )
            {
                (*i)->Check( sf->IsShown() );
            }
        }
        else if ( (*i)->GetId() == toggleAutomaticID )
        {
            (*i)->Check( grav->usingAutoFocusRotate() );
        }
    }
}
开发者ID:icompuiz,项目名称:grav,代码行数:34,代码来源:Frame.cpp


示例6: eventHandler

    OPT_TOOL_EVENT eventHandler( const wxMenuEvent& aEvent ) override
    {
        BOARD_DESIGN_SETTINGS &bds = m_frame.GetBoard()->GetDesignSettings();
        int id = aEvent.GetId();

        // On Windows, this handler can be called with an event ID not existing in any
        // menuitem, so only set flags when we have an ID match.

        if( id == ID_POPUP_PCB_SELECT_CUSTOM_DIFFPAIR )
        {
            bds.UseCustomDiffPairDimensions( true );
            TOOL_MANAGER* toolManager = m_frame.GetToolManager();
            toolManager->RunAction( PCB_ACTIONS::routerActivateDpDimensionsDialog, true );
        }
        else if( id == ID_POPUP_PCB_SELECT_USE_NETCLASS_DIFFPAIR )
        {
            bds.UseCustomDiffPairDimensions( false );
            bds.SetDiffPairIndex( 0 );
        }
        else if( id >= ID_POPUP_PCB_SELECT_DIFFPAIR1 && id <= ID_POPUP_PCB_SELECT_DIFFPAIR16 )
        {
            bds.UseCustomDiffPairDimensions( false );
            // remember that the menu doesn't contain index 0 (which is the netclass values)
            bds.SetDiffPairIndex( id - ID_POPUP_PCB_SELECT_DIFFPAIR1 + 1 );
        }

        return OPT_TOOL_EVENT( PCB_ACTIONS::trackViaSizeChanged.MakeEvent() );
    }
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:28,代码来源:router_tool.cpp


示例7: OnMenuOpen

void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event )
{
    if( m_canvas )
        m_canvas->SetCanStartBlock( -1 );

    event.Skip();
}
开发者ID:LDavis4559,项目名称:kicad-source-mirror,代码行数:7,代码来源:draw_frame.cpp


示例8: eventHandler

OPT_TOOL_EVENT GRID_MENU::eventHandler( const wxMenuEvent& aEvent )
{
    OPT_TOOL_EVENT event( ACTIONS::gridPreset.MakeEvent() );
    intptr_t idx = aEvent.GetId() - ID_POPUP_GRID_SELECT - 1;
    event->SetParameter( idx );

    return event;
}
开发者ID:zhihuitech,项目名称:kicad-source-mirror,代码行数:8,代码来源:grid_menu.cpp


示例9: onToolRClick

void MyFrame::onToolRClick(wxMenuEvent& evt){
	wxPoint point = m_toolBar1->ScreenToClient(wxGetMousePosition());
	wxMenu menu;
	menu.Append(ID_EDIT_TOOL, wxT("Edit Tool"));
	menu.Append(ID_REMOVE_TOOL, wxT("Remove Tool"));
	idCTool = evt.GetId();
	PopupMenu(&menu, point.x, point.y);
}
开发者ID:SiTLar,项目名称:tireless-worker,代码行数:8,代码来源:main.cpp


示例10: OnOptionsMenuOpen

void ProjectPanel::OnOptionsMenuOpen( wxMenuEvent& event )
{
    event.Skip();
    //if ( event.GetMenu() == m_OptionsMenu )
    //{
    //    // refresh menu's view toggles
    //}
}
开发者ID:pmatyja,项目名称:Helium,代码行数:8,代码来源:ProjectPanel.cpp


示例11: eventHandler

OPT_TOOL_EVENT ZOOM_MENU::eventHandler( const wxMenuEvent& aEvent )
{
    OPT_TOOL_EVENT event( ACTIONS::zoomPreset.MakeEvent() );
    intptr_t idx = aEvent.GetId() - ID_POPUP_ZOOM_LEVEL_START;
    event->SetParameter( idx );

    return event;
}
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:8,代码来源:zoom_menu.cpp


示例12: OnMenuOpen

void wxFrameBase::OnMenuOpen(wxMenuEvent& event)
{
#if wxUSE_IDLEMENUUPDATES
    wxUnusedVar(event);
#else // !wxUSE_IDLEMENUUPDATES
    // as we didn't update the menus from idle time, do it now
    DoMenuUpdates(event.GetMenu());
#endif // wxUSE_IDLEMENUUPDATES/!wxUSE_IDLEMENUUPDATES
}
开发者ID:Anonymous2,项目名称:project64,代码行数:9,代码来源:framecmn.cpp


示例13: onMenuOpenClose

void TopLevelFrame::onMenuOpenClose(wxMenuEvent& ev)
{
	if (GetMenuBar() != nullptr)
	{
		if (!GetMenuBar()->HandleWindowEvent(ev))
		{
			ev.Skip();
		}
	}
}
开发者ID:codereader,项目名称:DarkRadiant,代码行数:10,代码来源:TopLevelFrame.cpp


示例14: onDynTask

void MyFrame::onDynTask(wxMenuEvent& evt){
	wxMenuItem *cTask = aiDynTasks[evt.GetId() - mID_USEDTASKS];
	unsigned long TID;
	if (!startTask(cTask->GetHelp(), TID)) return;
	wxMenuItem *victim = 0;
	m_menu11->Remove(cTask);
	m_menu11->Prepend(cTask); 

	return;
}
开发者ID:SiTLar,项目名称:tireless-worker,代码行数:10,代码来源:main.cpp


示例15: OnMenuHighlight

void wxMDIChildFrame::OnMenuHighlight( wxMenuEvent& event )
{
#if wxUSE_STATUSBAR
    wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->GetParent();
    if ( !ShowMenuHelp(mdi_frame->GetStatusBar(), event.GetMenuId()) )
    {
        // we don't have any help text for this item, but may be the MDI frame
        // does?
        mdi_frame->OnMenuHighlight(event);
    }
#endif // wxUSE_STATUSBAR
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:12,代码来源:mdi.cpp


示例16: OnMenuHighlight

// Default menu selection behaviour - display a help string
void wxMDIParentFrame::OnMenuHighlight(wxMenuEvent& event)
{
    if (GetStatusBar())
    {
        if (event.GetMenuId() == -1)
            SetStatusText("");
        else
        {
            wxMenuBar *menuBar = (wxMenuBar*) NULL;
            if (GetActiveChild())
                menuBar = GetActiveChild()->GetMenuBar();
            else
                menuBar = GetMenuBar();
            if (menuBar)
            {
                wxString helpString(menuBar->GetHelpString(event.GetMenuId()));
                if (helpString != "")
                    SetStatusText(helpString);
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:23,代码来源:mdi.cpp


示例17: DoCommonMenuCallbackCode

static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event)
{
    event.SetEventObject( menu );

    wxEvtHandler* handler = menu->GetEventHandler();
    if (handler && handler->SafelyProcessEvent(event))
        return;

    wxWindow *win = menu->GetWindow();
    wxCHECK_RET( win, "event for a menu without associated window?" );

    win->HandleWindowEvent( event );
}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:13,代码来源:menu.cpp


示例18: HandleMenuClose

void CommandManager::HandleMenuClose(wxMenuEvent &evt)
{
#if defined(__WXMAC__)
   mOpenMenu = evt.GetMenu();
#endif

   // This can happen when if the Windows system menu is used   
   if (mOpenMenu == NULL)
      return;

   // GetMenu() under Windows will always return NULL.  And on other
   // platforms we must ensure we are a top-level menu.
   wxMenu *m = evt.GetMenu();
   if (m && m->GetParent())
      return;

   // Turn off the accelerators
   ToggleAccels(mOpenMenu, false);

   // Forget about it
   mOpenMenu = NULL;

   return;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:24,代码来源:CommandManager.cpp


示例19: DoCommonMenuCallbackCode

static void DoCommonMenuCallbackCode(wxMenu *menu, wxMenuEvent& event)
{
    if (g_isIdle)
        wxapp_install_idle_handler();

    event.SetEventObject( menu );

    wxEvtHandler* handler = menu->GetEventHandler();
    if (handler && handler->ProcessEvent(event))
        return;

    wxWindow *win = menu->GetWindow();
    if (win)
        win->HandleWindowEvent( event );
}
开发者ID:beanhome,项目名称:dev,代码行数:15,代码来源:menu.cpp


示例20: OnMenuOpen

void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event )
{
    // On wxWidgets 3.0.x Windows, EVT_MENU_OPEN ( and other EVT_MENU_xx) events are not
    // captured by the ACTON_MENU menus.  While it is fixed in wxWidgets 3.1.x, we still
    // need a solution for the earlier verions.
    //
    // This could be made conditional, but for now I'm going to use the same strategy
    // everywhere so it gets wider testing.
    // Note that if the conditional compilation is reactivated, the Connect() lines in
    // ACTION_MENU::setupEvents() will need to be re-enabled.
//#if defined( __WINDOWS__ ) && wxCHECK_VERSION( 3, 0, 0 ) && !wxCHECK_VERSION( 3, 1, 0 )

    // As if things weren't bad enough, wxWidgets doesn't pass the menu pointer when the
    // event is a wxEVT_MENU_HIGHLIGHT, so we store the menu from the EVT_MENU_OPEN call.
    static ACTION_MENU* currentMenu;

    if( event.GetEventType() == wxEVT_MENU_OPEN )
    {
        currentMenu = dynamic_cast<ACTION_MENU*>( event.GetMenu() );

        if( currentMenu )
            currentMenu->OnMenuEvent( event );
    }
    else if( event.GetEventType() == wxEVT_MENU_HIGHLIGHT )
    {
        if( currentMenu )
            currentMenu->OnMenuEvent( event );
    }
    else    // if( event.GetEventType() == wxEVT_MENU_CLOSE )
    {
        currentMenu = nullptr;
    }
//#endif

    event.Skip();
}
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:36,代码来源:eda_draw_frame.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxMouseEvent类代码示例发布时间:2022-05-31
下一篇:
C++ wxMenu类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap