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) }
void DIALOG_DESIGN_RULES::OnNotebookPageChanged( wxNotebookEvent& event ) { s_LastTabSelection = event.GetSelection(); // Skip() allows OSX to properly refresh controls. event.Skip(); }
//--------------------------------------------------------- void CWKSP::On_Page_Changed(wxNotebookEvent &event) { event.Skip(); if( event.GetSelection() >= 0 && g_pACTIVE ) { CWKSP_Base_Item *pItem = NULL; if( GetPage(event.GetSelection()) == m_pTools ) { pItem = m_pTools->Get_Item_Selected(); } else if( GetPage(event.GetSelection()) == m_pData->GetParent() ) { pItem = m_pData->Get_Item_Selected(); } else if( GetPage(event.GetSelection()) == m_pMaps->GetParent() ) { pItem = m_pMaps->Get_Item_Selected(); } if( pItem ) { g_pACTIVE->Set_Active(pItem); } } }
void ClimatologyConfigDialog::OnPageChanged( wxNotebookEvent& event ) { /* delay loading html until last moment because it can take a few seconds */ if(event.GetSelection() == 3) m_htmlInformation->LoadFile(ClimatologyDataDirectory() + _("ClimatologyInformation.html")); event.Skip(); }
void OnPageChanged(wxNotebookEvent& event) { if (event.GetSelection() >= 0 && event.GetSelection() < (int)GetPageCount()) { static_cast<TextureNotebookPage*>(GetPage(event.GetSelection()))->OnDisplay(); } event.Skip(); }
void Notebook::OnIternalPageChanging(wxNotebookEvent &e) { if(e.GetEventObject() == this) { DoPageChangingEvent(e); } else { e.Skip(); } }
void sipXTabbedDlg::OnChanging( wxNotebookEvent &event ) { int page = event.GetSelection(); if (mpPage[page]->validateData() == false) { event.Veto(); } }
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(); }
void VObjEvtHandler::OnNotebookPageChanged(wxNotebookEvent &event) { shared_ptr<ObjectBase> obj = m_data->GetSelectedObject(); if (obj->GetObjectTypeName() == wxT("notebook") ) { OnBookPageChanged( obj, event.GetSelection() ); } event.Skip(); }
/* 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 ); }
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
/*---------------------------------------------------------------------------*/ void wxCreateTableDialog::OnBookPageChanging(wxNotebookEvent& event) { if (event.GetOldSelection() == 0) { wxString ddl = GetCreateTableDDL(); if (ddl.IsEmpty()) event.Veto(); else m_TextDdl->SetValue(ddl); } }
/// Regenerate if selected a tab void ctConfigToolView::OnTabSelect(wxNotebookEvent& event) { if (wxGetApp().GetMainFrame()->GetMainNotebook() != event.GetEventObject()) { event.Skip(); return; } if (event.GetSelection() > 0) { RegenerateSetup(); } }
// 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(); } } }
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(); }
// 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 }
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() ); }
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 ); } } } }
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. }
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(); }
void CSplitterCellHistory::OnNotebookChange(wxNotebookEvent &e) { wxNotebook *p = (wxNotebook *)e.GetEventObject(); if(m_syncNotebook.Find(p)) { m_syncNotebook.Sync(p); } }
void Project::OnPageChanged(wxNotebookEvent& evt) { if (evt.GetEventObject() == this) { int old = evt.GetOldSelection(); int current = evt.GetSelection(); if (old != -1 && current != -1) { Panel *panel = (Panel *)GetPage(old); panel->GetMenu(); panel = (Panel *)GetPage(current); panel->SetMenu(); } } evt.Skip(); }
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(); }
void frmGrantWizard::OnPageSelect(wxNotebookEvent &event) { if (nbNotebook && sqlPane && event.GetSelection() == (int)nbNotebook->GetPageCount() - 2) { sqlPane->SetReadOnly(false); sqlPane->SetText(GetSql()); sqlPane->SetReadOnly(true); } }
void about::OnPageChange( wxNotebookEvent& event ) { int i = event.GetSelection(); if( 3 == i ) { // 3 is the index of "Help" page gFrame->LaunchLocalHelp(); pNotebook->ChangeSelection(0); } }
void MainFrame::pageChanged(wxNotebookEvent& event) { int page = event.GetSelection(); if (page != -1) { DebugPanel *panel = (DebugPanel *) m_notebook->GetPage(page); currentActiveDebugThread = findDebugThreadFromPanel(panel); } }
void CreateDatabaseDialogue::OnTabChanged(wxNotebookEvent& event) { if (tabsNotebook == NULL) return; unsigned page = event.GetSelection(); if (page == tabsNotebook->GetPageCount() - 1) { wxString sql; GenerateScript(WxStringConcatenator(sql, _T("\n\n"))); scriptInput->SetValue(sql); } }
void uwNotebook::OnPageChanged( wxNotebookEvent& event ) { if( !bClosing ) { //wxLogMessage( "OnPageChanged %d", event.GetSelection() ); //uwNotebookPage::PageChanged( GetPage(event.GetSelection()) ); } event.Skip(); }
void RelationshipWindow::OnBookCtrl(wxNotebookEvent& event) #endif // USES_TOOLBOOK { const wxEventType eventType = event.GetEventType(); #if USES_TOOLBOOK if ( eventType == wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED ) #else if ( eventType == wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED ) #endif // USES_TOOLBOOK { RelationshipPanel * currentPage = wx_static_cast(RelationshipPanel*, m_bookCtrl->GetCurrentPage()); gMsgHandler = currentPage; }
void wxSTEditorTreeCtrl::OnNotebookPageChanged(wxNotebookEvent &event) { event.Skip(); if (m_notePageId) SetItemBold(m_notePageId, false); wxNotebook* notebook = wxDynamicCast(event.GetEventObject(), wxNotebook); int selection = event.GetSelection(); wxWindow* page = NULL; if (notebook && (selection >= 0) && (selection < (int)notebook->GetPageCount())) page = notebook->GetPage(selection); wxLongToLongHashMap::iterator it = m_windowToSTETreeItemDataMap.find((long)page); if (it != m_windowToSTETreeItemDataMap.end()) { wxSTETreeItemData* treeData = (wxSTETreeItemData*)it->second; m_notePageId = treeData->m_id; if (m_notePageId) SetItemBold(m_notePageId, true); } else UpdateFromNotebook(); }