]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/wxpoem/wxpoem.cpp
Added the forgotten file txtstrm.tex
[wxWidgets.git] / samples / wxpoem / wxpoem.cpp
index 49833dd30d968587f3138cf93e76118e1ee4295c..4890c8f92aa5a213f61189e0ff6aaadb03723fe4 100644 (file)
@@ -26,9 +26,7 @@
 #endif
 
 #ifndef WX_PRECOMP
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/defs.h"
-#include "wx/list.h"
-#include "wx/utils.h"
+#include "wx/wx.h"
 #endif
 
 #include "wx/help.h"
 #endif
 
 #include "wx/help.h"
@@ -135,7 +133,9 @@ void            CopyToClipboard(HWND, char *);
 wxMenu    *popupMenu = NULL;
 void PopupFunction(wxMenu& menu, wxCommandEvent& event);
 
 wxMenu    *popupMenu = NULL;
 void PopupFunction(wxMenu& menu, wxCommandEvent& event);
 
-wxHelpController *HelpController = NULL;
+#if wxUSE_HELP
+    wxHelpController *HelpController = NULL;
+#endif // wxUSE_HELP
 
 IMPLEMENT_APP(MyApp)
 
 
 IMPLEMENT_APP(MyApp)
 
@@ -590,8 +590,10 @@ bool MyApp::OnInit()
   DarkGreyPen = new wxPen("GREY", THICK_LINE_WIDTH, wxSOLID);
   WhitePen = new wxPen("WHITE", THICK_LINE_WIDTH, wxSOLID);
 
   DarkGreyPen = new wxPen("GREY", THICK_LINE_WIDTH, wxSOLID);
   WhitePen = new wxPen("WHITE", THICK_LINE_WIDTH, wxSOLID);
 
+#if wxUSE_HELP
   HelpController = new wxHelpController();
   HelpController->Initialize("wxpoem");
   HelpController = new wxHelpController();
   HelpController->Initialize("wxpoem");
+#endif // wxUSE_HELP
 
   CreateFonts();
 
 
   CreateFonts();
 
@@ -666,7 +668,9 @@ int MyApp::OnExit()
 {
   if (backingBitmap)
     delete backingBitmap;
 {
   if (backingBitmap)
     delete backingBitmap;
+#if wxUSE_HELP
   delete HelpController;
   delete HelpController;
+#endif // wxUSE_HELP
   delete GreyPen;
   delete DarkGreyPen;
   delete WhitePen;
   delete GreyPen;
   delete DarkGreyPen;
   delete WhitePen;
@@ -1122,8 +1126,10 @@ void PopupFunction(wxMenu& /*menu*/, wxCommandEvent& event)
      }
      case POEM_HELP_CONTENTS:
      {
      }
      case POEM_HELP_CONTENTS:
      {
+#if wxUSE_HELP
        HelpController->LoadFile("wxpoem");
        HelpController->DisplayContents();
        HelpController->LoadFile("wxpoem");
        HelpController->DisplayContents();
+#endif // wxUSE_HELP
        break;
      }
      case POEM_ABOUT:
        break;
      }
      case POEM_ABOUT: