]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
removed wxFunction
[wxWidgets.git] / src / common / appbase.cpp
index 1d63e99672175f5755b08306a6d29c448ea47380..f3a5e7460b01f95b87dd74784b34eb739581f4c9 100644 (file)
@@ -25,6 +25,9 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/intl.h"
+    #include "wx/list.h"
     #if wxUSE_LOG
         #include "wx/log.h"
     #endif // wxUSE_LOG
@@ -33,6 +36,9 @@
 #include "wx/apptrait.h"
 #include "wx/cmdline.h"
 #include "wx/confbase.h"
+#if wxUSE_FILENAME
+    #include "wx/filename.h"
+#endif // wxUSE_FILENAME
 #if wxUSE_FONTMAP
     #include "wx/fontmap.h"
 #endif // wxUSE_FONTMAP
 #endif
 
 #if defined(__WXMAC__)
-  #include  "wx/mac/private.h"  // includes mac headers
-#endif
+    // VZ: MacTypes.h is enough under Mac OS X (where I could test it) but
+    //     I don't know which headers are needed under earlier systems so
+    //     include everything when in doubt
+    #ifdef __DARWIN__
+        #include  "MacTypes.h"
+    #else
+        #include  "wx/mac/private.h"  // includes mac headers
+    #endif
+#endif // __WXMAC__
 
 // ----------------------------------------------------------------------------
 // private functions prototypes
@@ -104,6 +117,33 @@ wxAppConsole::~wxAppConsole()
     delete m_traits;
 }
 
+// ----------------------------------------------------------------------------
+// initilization/cleanup
+// ----------------------------------------------------------------------------
+
+bool wxAppConsole::Initialize(int& argc, wxChar **argv)
+{
+    // remember the command line arguments
+    this->argc = argc;
+    this->argv = argv;
+
+    if ( m_appName.empty() )
+    {
+        // the application name is, by default, the name of its executable file
+#if wxUSE_FILENAME
+        wxFileName::SplitPath(argv[0], NULL, &m_appName, NULL);
+#else // !wxUSE_FILENAME
+        m_appName = argv[0];
+#endif // wxUSE_FILENAME/!wxUSE_FILENAME
+    }
+
+    return true;
+}
+
+void wxAppConsole::CleanUp()
+{
+}
+
 // ----------------------------------------------------------------------------
 // OnXXX() callbacks
 // ----------------------------------------------------------------------------
@@ -470,10 +510,12 @@ wxFontMapper *wxConsoleAppTraitsBase::CreateFontMapper()
 
 #endif // wxUSE_FONTMAP
 
+#ifdef __WXDEBUG__
 bool wxConsoleAppTraitsBase::ShowAssertDialog(const wxString& msg)
 {
     return wxAppTraitsBase::ShowAssertDialog(msg);
 }
+#endif
 
 bool wxConsoleAppTraitsBase::HasStderr()
 {