From: Julian Smart Date: Thu, 8 Aug 2002 08:54:49 +0000 (+0000) Subject: Applied patch [ 592063 ] generic notebook does not OnSelChanging X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1c507b171af7fb2e0ed36fca546b7951c8ab5dd2?ds=inline Applied patch [ 592063 ] generic notebook does not OnSelChanging Misc other mods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/tech/tn0003.txt b/docs/tech/tn0003.txt index 7a79f3859b..a1fa46e997 100644 --- a/docs/tech/tn0003.txt +++ b/docs/tech/tn0003.txt @@ -9,6 +9,8 @@ wxWindows uses Tex2RTF to process Latex-like input files (.tex) and output in HTML, WinHelp RTF and Word RTF. Tex2RTF is provided in the wxWindows distribution and in the CVS archive, under utils/tex2rtf. Please start by perusing the Tex2RTF manual. +See http://www.wxwindows.org/tex2rtf/index.htm for a browseable +manual and binaries for specific platforms. If adding to the existing manual in docs/latex/wx, you need to create a new .tex file, e.g. myclass.tex, and add it to the diff --git a/include/wx/generic/notebook.h b/include/wx/generic/notebook.h index 53582ba352..b1d9660346 100644 --- a/include/wx/generic/notebook.h +++ b/include/wx/generic/notebook.h @@ -54,6 +54,8 @@ public: // Called when a tab is activated virtual void OnTabActivate(int activateId, int deactivateId); + // Allows vetoing + virtual bool OnTabPreActivate(int activateId, int deactivateId); protected: wxNotebook* m_notebook; diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index 5cb54f9c67..118b9dd1f7 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -679,4 +679,36 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId) m_notebook->GetEventHandler()->ProcessEvent(event); } +// Allows Vetoing +bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId) +{ + bool retval = TRUE; + + if (m_notebook) + { + wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId()); + +#if defined (__WIN16__) + int activatePos = activateId; + int deactivatePos = deactivateId; +#else + // Translate from wxTabView's ids (which aren't position-dependent) + // to wxNotebook's (which are). + wxNotebookPage* pActive = (wxNotebookPage*) activateId; + wxNotebookPage* pDeactive = (wxNotebookPage*) deactivateId; + + int activatePos = m_notebook->FindPagePosition(pActive); + int deactivatePos = m_notebook->FindPagePosition(pDeactive); + +#endif + event.SetEventObject(m_notebook); + event.SetSelection(activatePos); + event.SetOldSelection(deactivatePos); + if (m_notebook->GetEventHandler()->ProcessEvent(event)) + { + retval = event.IsAllowed(); + } + } + return retval; +} diff --git a/utils/tex2rtf/distrib/zipdistinno.bat b/utils/tex2rtf/distrib/zipdistinno.bat index 1643306ce7..17989a4b63 100755 --- a/utils/tex2rtf/distrib/zipdistinno.bat +++ b/utils/tex2rtf/distrib/zipdistinno.bat @@ -105,6 +105,9 @@ start "Inno Setup" /w %innocmd% Rem Rename to give it a version move setup.exe tex2rtf_%ver_filename%_setup.exe +Rem Copy the source +move %src%\tex2rtf_src.zip %dest%\tex2rtf-source-%tex2rtfver%.zip + Rem clean up files cd %src% erase /EFY *.bmp *.htm *.exe *.hlp *.cnt *.txt *.rtf *.doc *.gif *.jpg *.manifest *.chm