synching down and up events for the synthetic right mouse handling
[wxWidgets.git] / utils / configtool / src / wxconfigtool.cpp
index 17fbe701dbc1648d88d3e3fb0253b74ae16acf72..cd2f5af42fb785dd5748f50a6b180f94b81fb1ab 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "wxconfigtool.h"
 #endif
 
@@ -25,6 +25,7 @@
 #include "wx/menuitem.h"
 #include "wx/tooltip.h"
 #include "wx/cshelp.h"
+#include "wx/helphtml.h"
 #include "wx/html/htmprint.h"
 #include "wx/html/htmlwin.h"
 #include "wx/filesys.h"
@@ -73,7 +74,7 @@ bool ctApp::OnInit(void)
     wxImage::AddHandler( new wxGIFHandler );
 #endif
 
-#ifdef __WXMSW__
+#if wxUSE_MS_HTML_HELP && !defined(__WXUNIVERSAL__)
     m_helpController = new wxCHMHelpController;
     m_helpControllerReference = new wxCHMHelpController;
 #else
@@ -93,12 +94,12 @@ bool ctApp::OnInit(void)
 
 #ifdef __WXMSW__
     // If the development version, go up a directory.
-    if ((m_appDir.Right(5).CmpNoCase("DEBUG") == 0) ||
-        (m_appDir.Right(11).CmpNoCase("DEBUGSTABLE") == 0) ||
-        (m_appDir.Right(7).CmpNoCase("RELEASE") == 0) ||
-        (m_appDir.Right(13).CmpNoCase("RELEASESTABLE") == 0) ||
-        (m_appDir.Right(10).CmpNoCase("RELEASEDEV") == 0) ||
-        (m_appDir.Right(8).CmpNoCase("DEBUGDEV") == 0)
+    if ((m_appDir.Right(5).CmpNoCase(_T("DEBUG")) == 0) ||
+        (m_appDir.Right(11).CmpNoCase(_T("DEBUGSTABLE")) == 0) ||
+        (m_appDir.Right(7).CmpNoCase(_T("RELEASE")) == 0) ||
+        (m_appDir.Right(13).CmpNoCase(_T("RELEASESTABLE")) == 0) ||
+        (m_appDir.Right(10).CmpNoCase(_T("RELEASEDEV")) == 0) ||
+        (m_appDir.Right(8).CmpNoCase(_T("DEBUGDEV")) == 0)
         )
         m_appDir = wxPathOnly(m_appDir);
 #endif
@@ -120,21 +121,21 @@ bool ctApp::OnInit(void)
     wxString helpFilePath(GetFullAppPath(_("configtool")));
     m_helpController->Initialize(helpFilePath);
     
-    ctMainFrame* frame = new ctMainFrame(m_docManager, NULL, -1, wxGetApp().GetSettings().GetAppName(),
+    ctMainFrame* frame = new ctMainFrame(m_docManager, NULL, wxID_ANY, wxGetApp().GetSettings().GetAppName(),
         GetSettings().m_frameSize.GetPosition(), GetSettings().m_frameSize.GetSize(),
-        wxDEFAULT_FRAME_STYLE);
+        wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
     SetTopWindow(frame);
 
     switch (wxGetApp().GetSettings().m_frameStatus)
     {
     case ctSHOW_STATUS_MAXIMIZED:
         {
-            frame->Maximize(TRUE);
+            frame->Maximize(true);
             break;
         }
     case ctSHOW_STATUS_MINIMIZED:
         {
-            frame->Iconize(TRUE);
+            frame->Iconize(true);
             break;
         }
     default:
@@ -171,7 +172,7 @@ bool ctApp::OnInit(void)
         // Load the file
         wxDocument* doc = m_docManager->CreateDocument(arg, wxDOC_SILENT);
         if (doc)
-            doc->SetDocumentSaved(TRUE);
+            doc->SetDocumentSaved(true);
     }
     else
     {
@@ -180,13 +181,13 @@ bool ctApp::OnInit(void)
             // Load the file that was last loaded
             wxDocument* doc = m_docManager->CreateDocument(GetSettings().m_lastFilename, wxDOC_SILENT);
             if (doc)
-                doc->SetDocumentSaved(TRUE);
+                doc->SetDocumentSaved(true);
         }
     }
     
-    GetTopWindow()->Show(TRUE);
+    GetTopWindow()->Show(true);
     
-    return TRUE;
+    return true;
 }
 
 int ctApp::OnExit(void)