#endif
#ifndef NO_GUI
-#include "wx/help.h"
-#include "wx/timer.h"
-#endif
+ #include "wx/timer.h"
+ #include "wx/help.h"
+ #include "wx/cshelp.h"
+ #include "wx/helphtml.h"
+ #ifdef __WXMSW__
+ #include "wx/msw/helpchm.h"
+ #else
+ #include "wx/html/helpctrl.h"
+ #endif
+#endif // !NO_GUI
#if wxUSE_IOSTREAMH
#include <iostream.h>
extern wxList ColourTable;
extern TexChunk *TopLevel;
-
-
#if wxUSE_HELP
-wxHelpController *HelpInstance = NULL;
+wxHelpControllerBase *HelpInstance = NULL;
#endif // wxUSE_HELP
#ifdef __WXMSW__
static wxChar *ipc_buffer = NULL;
static wxChar Tex2RTFLastStatus[100];
Tex2RTFServer *TheTex2RTFServer = NULL;
-#endif
-#endif
+#endif // __WXMSW__
+
+#endif // !NO_GUI
wxChar *bulletFile = NULL;
TheTex2RTFServer->Create(_T("TEX2RTF"));
#endif
-#if defined(__WXMSW__) && defined(__WIN16__)
- // Limit to max Windows array size
- if (BufSize > 64) BufSize = 64;
-#endif
-
TexInitialize(BufSize);
ResetContentsLevels(0);
wxMenu *options_menu = new wxMenu;
- options_menu->Append(TEX_OPTIONS_CURELY_BRACE, _T("Curley brace matching"), _T("Checks for mismatched curley braces"),true);
+ options_menu->Append(TEX_OPTIONS_CURLEY_BRACE, _T("Curley brace matching"), _T("Checks for mismatched curley braces"),true);
options_menu->Append(TEX_OPTIONS_SYNTAX_CHECKING, _T("Syntax checking"), _T("Syntax checking for common errors"),true);
- options_menu->Check(TEX_OPTIONS_CURELY_BRACE, checkCurleyBraces);
+ options_menu->Check(TEX_OPTIONS_CURLEY_BRACE, checkCurleyBraces);
options_menu->Check(TEX_OPTIONS_SYNTAX_CHECKING, checkSyntax);
wxMenu *help_menu = new wxMenu;
// ShowOptions();
#if wxUSE_HELP
- HelpInstance = new wxHelpController();
+#if wxUSE_MS_HTML_HELP && !defined(__WXUNIVERSAL__)
+ HelpInstance = new wxCHMHelpController;
+#else
+ HelpInstance = new wxHtmlHelpController;
+#endif
HelpInstance->Initialize(_T("tex2rtf"));
#endif // wxUSE_HELP
node = CustomMacroList.GetFirst();
}
MacroDefs.BeginFind();
- node = MacroDefs.Next();
- while (node)
+ wxHashTable::Node* mNode = MacroDefs.Next();
+ while (mNode)
{
- TexMacroDef* def = (TexMacroDef*) node->GetData();
+ TexMacroDef* def = (TexMacroDef*) mNode->GetData();
delete def;
- node = MacroDefs.Next();
+ mNode = MacroDefs.Next();
}
MacroDefs.Clear();
#ifdef __WXMSW__
EVT_MENU(TEX_MODE_WINHELP, MyFrame::OnModeWinHelp)
EVT_MENU(TEX_MODE_HTML, MyFrame::OnModeHTML)
EVT_MENU(TEX_MODE_XLP, MyFrame::OnModeXLP)
- EVT_MENU(TEX_OPTIONS_CURELY_BRACE, MyFrame::OnOptionsCurleyBrace)
+ EVT_MENU(TEX_OPTIONS_CURLEY_BRACE, MyFrame::OnOptionsCurleyBrace)
EVT_MENU(TEX_OPTIONS_SYNTAX_CHECKING, MyFrame::OnOptionsSyntaxChecking)
EVT_MENU(TEX_HELP, MyFrame::OnHelp)
EVT_MENU(TEX_ABOUT, MyFrame::OnAbout)
}
case TEX_HTML:
{
-#if defined(__WXMSW__) && defined(__WIN16__)
- wxStrcpy(extensionBuf, _T("htm"));
- wxStrcat(wildBuf, _T("htm"));
-#else
wxStrcpy(extensionBuf, _T("html"));
wxStrcat(wildBuf, _T("html"));
-#endif
break;
}
}
(*frame->textWindow) << msg << _T("\n");
/* This whole block of code is just wrong I think. It would behave
completely wrong under anything other than MSW due to the ELSE
- with no statement, and the cout calls would fail under MSW, as
- the code in this block is compiled if !NO_GUI This code has been
- here since v1.1 of this file too. - gt
+ with no statement, and the cout calls would fail under MSW, as
+ the code in this block is compiled if !NO_GUI This code has been
+ here since v1.1 of this file too. - gt
else
#ifdef __WXMSW__
{