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

C++ wxNotebookEvent类代码示例

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

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



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

示例1: OnPageChanged

void MyFrame::OnPageChanged(wxNotebookEvent& event)
{//=================================================
    int pagenum;
    wxString title;
    SpectDisplay *page;

    pagenum = event.GetSelection();

    if(event.GetId() == ID_SCREENPAGES)
    {
        title = screenpages->GetPageText(pagenum);

        if((title != _T("Prosody")) && (adding_page != 2))
        {
            page = (SpectDisplay *)screenpages->GetPage(pagenum);

            if(page != currentcanvas)
            {
                if(currentcanvas != NULL)
                {
                    currentcanvas->OnActivate(0);
                }
                page->OnActivate(1);
            }
            MakeMenu(2, NULL);
        }
        else
        {
            MakeMenu(3, NULL);
        }
    }
	adding_page = 0;   // work around for wxNotebook bug (version 2.8.7)
}
开发者ID:ashengmz,项目名称:espeak,代码行数:33,代码来源:espeakedit.cpp


示例2: OnNotebookPageChanged

void DIALOG_DESIGN_RULES::OnNotebookPageChanged( wxNotebookEvent& event )
{
    s_LastTabSelection = event.GetSelection();

    // Skip() allows OSX to properly refresh controls.
    event.Skip();
}
开发者ID:JOE-JOE-NGIGI,项目名称:kicad,代码行数:7,代码来源:dialog_design_rules.cpp


示例3: OnPageChanged

	void OnPageChanged(wxNotebookEvent& event)
	{
		if (event.GetSelection() >= 0 && event.GetSelection() < (int)GetPageCount())
		{
			static_cast<TextureNotebookPage*>(GetPage(event.GetSelection()))->OnDisplay();
		}
		event.Skip();
	}
开发者ID:Marlinc,项目名称:0ad,代码行数:8,代码来源:Terrain.cpp


示例4: OnIternalPageChanging

void Notebook::OnIternalPageChanging(wxNotebookEvent &e)
{
    if(e.GetEventObject() == this) {
        DoPageChangingEvent(e);
    } else {
        e.Skip();
    }
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:8,代码来源:gtk_notebook_ex.cpp


示例5: OnChanging

void sipXTabbedDlg::OnChanging( wxNotebookEvent &event )
{
    int page = event.GetSelection();

    if (mpPage[page]->validateData() == false)
    {
        event.Veto();
    }
}
开发者ID:sipXtapi,项目名称:sipXtapi-svn-mirror,代码行数:9,代码来源:sipXTabbedDlg.cpp


示例6: OnSelChange

void wxNotebook::OnSelChange(wxNotebookEvent& event)
{
    // is it our tab control?
    if ( event.GetEventObject() == this )
        ChangePage(event.GetOldSelection(), event.GetSelection());

    // we want to give others a chance to process this message as well
    event.Skip();
}
开发者ID:stefanhusmann,项目名称:Amaya,代码行数:9,代码来源:notebmac.cpp


示例7: OnNotebookPageChanged

void VObjEvtHandler::OnNotebookPageChanged(wxNotebookEvent &event)
{
	shared_ptr<ObjectBase> obj = m_data->GetSelectedObject();
	if (obj->GetObjectTypeName() == wxT("notebook") )
	{
		OnBookPageChanged( obj, event.GetSelection() );
	}
	event.Skip();
}
开发者ID:idrassi,项目名称:wxFormBuilder,代码行数:9,代码来源:visualobj.cpp


示例8: OnChangingMarkerList

/* called when switching from Error list to Unconnected list
 * To avoid mistakes, the current marker is selection is cleared
 */
void DIALOG_DRC_CONTROL::OnChangingMarkerList( wxNotebookEvent& event )
{
    // Shouldn't be necessary, but is on at least OSX
    if( event.GetSelection() >= 0 )
        m_Notebook->ChangeSelection( (unsigned) event.GetSelection() );

    m_DeleteCurrentMarkerButton->Enable( false );
    m_ClearanceListBox->SetSelection( -1 );
    m_UnconnectedListBox->SetSelection( -1 );
}
开发者ID:johnbeard,项目名称:kicad,代码行数:13,代码来源:dialog_drc.cpp


示例9: OnSelChange

void wxNotebook::OnSelChange (
  wxNotebookEvent&                  rEvent
)
{
    //
    // Is it our tab control?
    //
    if (rEvent.GetEventObject() == this)
    {
        int   nPageCount = GetPageCount();
        int   nSel;
        ULONG ulOS2Sel = (ULONG)rEvent.GetOldSelection();
        bool  bFound = false;

        for (nSel = 0; nSel < nPageCount; nSel++)
        {
            if (ulOS2Sel == (ULONG)m_alPageId[nSel])
            {
                bFound = true;
                break;
            }
        }

        if (!bFound)
            return;

        m_pages[nSel]->Show(false);

        ulOS2Sel = (ULONG)rEvent.GetSelection();

        bFound = false;

        for (nSel = 0; nSel < nPageCount; nSel++)
        {
            if (ulOS2Sel == (ULONG)m_alPageId[nSel])
            {
                bFound = true;
                break;
            }
        }

        if (!bFound)
            return;

        wxNotebookPage*         pPage = m_pages[nSel];

        pPage->Show(true);
        m_nSelection = nSel;
    }

    //
    // We want to give others a chance to process this message as well
    //
    rEvent.Skip();
} // end of wxNotebook::OnSelChange
开发者ID:hgwells,项目名称:tive,代码行数:55,代码来源:notebook.cpp


示例10: OnBookPageChanging

/*---------------------------------------------------------------------------*/
void wxCreateTableDialog::OnBookPageChanging(wxNotebookEvent& event)
{
   if (event.GetOldSelection() == 0)
   {
      wxString ddl = GetCreateTableDDL();

      if (ddl.IsEmpty())
         event.Veto();
      else
         m_TextDdl->SetValue(ddl);
   }
}
开发者ID:sunjianghua,项目名称:wxSqlitePlus1,代码行数:13,代码来源:createtable.cpp


示例11: OnTabSelect

/// Regenerate if selected a tab
void ctConfigToolView::OnTabSelect(wxNotebookEvent& event)
{
    if (wxGetApp().GetMainFrame()->GetMainNotebook() != event.GetEventObject())
    {
        event.Skip();
        return;
    }

    if (event.GetSelection() > 0)
    {
        RegenerateSetup();
    }
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:14,代码来源:configtoolview.cpp


示例12: on_notebook_changing

// Loads the html source of edit textctrl into preview htmlwindow, so can render a preview.
void editor_dialog::on_notebook_changing( wxNotebookEvent &event )
{ 
    // There is a on_notebook_changing event sent when loading dialog, and this causes a 
    // crash. Therefore we prevent it executing until our notebook is displayed.
    if ( this->wxWindow::IsShown() ) 
    {
        wxLogDebug( wxT( "Entering on_notebook_changing_function") );
        wxLogDebug( wxT( "Notebook event.GetOldSelection=%d"), event.GetOldSelection() ); 
        if ( event.GetOldSelection() == EDITOR_NOTEBOOK_PAGE_INDEX_EDIT ) {   
            wxLogDebug( wxT( "Switching from edit tab, so sending text to preview tab") );
            stc_or_textctrl_send_text_to_preview();
        }        
    }   
}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:15,代码来源:editor_dialog.cpp


示例13: OnPageChange

void GLIBitmapNotebook::OnPageChange(wxNotebookEvent &event)
{
  // Ensure our window ID and a valid page was selected previously
  if(event.GetId() == GetId())
  {
    int newPage = event.GetSelection();
    int oldPage = event.GetOldSelection();

    // Get if the selected pages are valid
    if(newPage >= 0 && newPage < bitmapViews.size() &&
       oldPage >= 0 && oldPage < bitmapViews.size())
    {
      int scrollStartX = 0;
      int scrollStartY = 0;
      int oldScrollPPUX = 1;
      int oldScrollPPUY = 1;
      int newScrollPPUX = 1;
      int newScrollPPUY = 1;

      // Get the old scroll position
      bitmapViews[oldPage]->GetViewStart(&scrollStartX, &scrollStartY);
      bitmapViews[oldPage]->GetScrollPixelsPerUnit(&oldScrollPPUX, &oldScrollPPUY);

      // Get the new scroll pixels per unit (probably the same as the old one)
      bitmapViews[newPage]->GetScrollPixelsPerUnit(&newScrollPPUX, &newScrollPPUY);

      // Ensure a valid setting of the scroll area
      if(newScrollPPUX != 0 && newScrollPPUY != 0)
      {
        // Set the new scroll position
        bitmapViews[newPage]->Scroll(scrollStartX*oldScrollPPUX/newScrollPPUX,
                                     scrollStartY*oldScrollPPUY/newScrollPPUY);
      }
      else
      {
        bitmapViews[newPage]->Scroll(0, 0);
      }

      // Get the current GL buffer type displayed
      bitmapViews[newPage]->GetGLBufferType(preferedBufferTypeID, preferedDrawBufferID);

      // Update the window title the new image
      parentControl->UpdateWindowTitle();
    }
  }

  // Allow others to process
  event.Skip();
}
开发者ID:Aetherdyne,项目名称:glintercept,代码行数:49,代码来源:GLIBitmapNotebook.cpp


示例14: OnPageChange

// This sets the text for the selected page, but doesn't help
// when trying to click on a tab: we would expect the appropriate help
// for that tab. We would need to look at the tabs to do this, from within OnContextHelp -
// probably not worth it.
void ecRunTestsDialog::OnPageChange(wxNotebookEvent& event)
{
    event.Skip();
#if 0
    int sel = m_notebook->GetSelection();
    if (sel < 0)
        return;

    wxWindow* page = m_notebook->GetPage(sel);
    if (page)
    {
        wxString helpText;

        if (page == m_displayOptions)
            helpText = _("The display options dialog allows you to change display-related options.");
        else if (page == m_viewerOptions)
            helpText = _("The viewer options dialog allows you to configure viewers.");
        else if (page == m_pathOptions)
            helpText = _("The path options dialog allows you to change tool paths.");
        else if (page == m_conflictResolutionOptions)
            helpText = _("The conflict resolution options dialog allows you to change options related to conflict resolution.");
        m_notebook->SetHelpText(helpText);
    }
#endif
}
开发者ID:perryhg,项目名称:terkos,代码行数:29,代码来源:runtestsdlg.cpp


示例15: OnPageChange

void DIALOG_TEMPLATE_SELECTOR::OnPageChange( wxNotebookEvent& event )
{
    int page = event.GetSelection();

    if( page != wxNOT_FOUND && (unsigned)page < m_panels.size() )
        m_tcTemplatePath->SetValue( m_panels[page]->GetPath() );
}
开发者ID:pointhi,项目名称:kicad-source-mirror,代码行数:7,代码来源:dialog_template_selector.cpp


示例16: OnPageChange

void about::OnPageChange( wxNotebookEvent& event )
{
    int i = event.GetSelection();

    if( 3 == i )                        // 3 is the index of "Help" page
            {
        wxString def_lang_canonical = wxLocale::GetLanguageInfo( wxLANGUAGE_DEFAULT )->CanonicalName;

        wxString help_locn = _T("doc/help_");
        help_locn.Prepend( *m_pDataLocn );

        wxString help_try = help_locn;
        help_try += def_lang_canonical;
        help_try += _T(".html");

        if( ::wxFileExists( help_try ) ) wxLaunchDefaultBrowser(
                wxString( _T("file:///") ) + help_try );

        else {
            help_try = help_locn;
            help_try += _T("en_US");
            help_try += _T(".html");

            if( ::wxFileExists( help_try ) ) wxLaunchDefaultBrowser(
                    wxString( _T("file:///") ) + help_try );
            else {
                help_try = _T("doc/help_web.html");
                help_try.Prepend( *m_pDataLocn );
                if( ::wxFileExists( help_try ) ) wxLaunchDefaultBrowser(
                        wxString( _T("file:///") ) + help_try );
            }
        }
    }
}
开发者ID:JesperWe,项目名称:OpenCPN,代码行数:34,代码来源:about.cpp


示例17: OnNotebookLinkPageChanged

void BlockGroupingDialog::OnNotebookLinkPageChanged( wxNotebookEvent& event )
{
////@begin wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_NOTEBOOK_CO in BlockGroupingDialog.
    // Before editing this code, remove the block markers.
    event.Skip();
////@end wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED event handler for ID_NOTEBOOK_CO in BlockGroupingDialog.
}
开发者ID:TheMRod,项目名称:Rocrail,代码行数:7,代码来源:blockgroupingdlg.cpp


示例18:

void WXMEditAboutDialog::OnNotebook1PageChanged(wxNotebookEvent& event)
{
	if (event.GetSelection() == 0/* AboutTab */)
	{
		wxm::g_wxMEdit_About_URL = wxm::g_wxMEdit_Homepage_URL;
		return;
	}

	if (event.GetSelection() == 1/* LicenseTab */)
	{
		wxm::g_wxMEdit_About_URL = wxm::g_wxMEdit_License_URL;
		return;
	}

	wxm::g_wxMEdit_About_URL.clear();
}
开发者ID:JamesWCCheng,项目名称:wxMEdit,代码行数:16,代码来源:wxmedit_about_dialog.cpp


示例19: OnNotebookChange

void CSplitterCellHistory::OnNotebookChange(wxNotebookEvent &e)
{
    wxNotebook *p = (wxNotebook *)e.GetEventObject();
    if(m_syncNotebook.Find(p))
    {
        m_syncNotebook.Sync(p);
    }
}
开发者ID:Klortho,项目名称:osiris,代码行数:8,代码来源:CSplitterCellHistory.cpp


示例20: OnPageChanged

void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
{
    // Notify child that it has been activated
    if (event.GetOldSelection() != -1)
    {
        wxMDIChildFrame* oldChild = (wxMDIChildFrame*) GetPage(event.GetOldSelection());
        if (oldChild)
        {
            wxActivateEvent event(wxEVT_ACTIVATE, false, oldChild->GetId());
            event.SetEventObject( oldChild );
            oldChild->GetEventHandler()->ProcessEvent(event);
        }
    }
    if (event.GetSelection() != -1)
    {
        wxMDIChildFrame* activeChild = (wxMDIChildFrame*) GetPage(event.GetSelection());
        if (activeChild)
        {
            wxActivateEvent event(wxEVT_ACTIVATE, true, activeChild->GetId());
            event.SetEventObject( activeChild );
            activeChild->GetEventHandler()->ProcessEvent(event);

            if (activeChild->GetMDIParentFrame())
            {
                activeChild->GetMDIParentFrame()->SetActiveChild(activeChild);
                activeChild->GetMDIParentFrame()->SetChildMenuBar(activeChild);
            }
        }
    }
    event.Skip();
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:31,代码来源:mdi.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ wxObjectDataPtr类代码示例发布时间:2022-05-31
下一篇:
C++ wxNavigationKeyEvent类代码示例发布时间: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