#endif // wxUSE_LOG
#endif //WX_PRECOMP
+#include "wx/utils.h"
#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
+#include "wx/filename.h"
#include "wx/msgout.h"
#include "wx/tokenzr.h"
#include "wx/msw/private.h" // includes windows.h for MessageBox()
#endif
+#if wxUSE_FONTMAP
+ #include "wx/fontmap.h"
+#endif // wxUSE_FONTMAP
+
#if defined(__WXMAC__)
// 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
// global vars
// ----------------------------------------------------------------------------
-wxApp *wxTheApp = NULL;
+wxAppConsole *wxAppConsole::ms_appInstance = NULL;
wxAppInitializerFunction wxAppConsole::ms_appInitFn = NULL;
{
m_traits = NULL;
- wxTheApp = (wxApp *)this;
+ ms_appInstance = this;
#ifdef __WXDEBUG__
SetTraceMasks();
if ( m_appName.empty() && argv )
{
// 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;
}
// iterate until the list becomes empty
- wxNode *node = wxPendingEvents->GetFirst();
+ wxList::compatibility_iterator node = wxPendingEvents->GetFirst();
while (node)
{
wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
- delete node;
+ wxPendingEvents->Erase(node);
// In ProcessPendingEvents(), new handlers might be add
// and we can safely leave the critical section here.
#endif // wxUSE_FONTMAP
+wxRendererNative *wxConsoleAppTraitsBase::CreateRenderer()
+{
+ // console applications don't use renderers
+ return NULL;
+}
+
#ifdef __WXDEBUG__
bool wxConsoleAppTraitsBase::ShowAssertDialog(const wxString& msg)
{
if ( !s_bNoAsserts )
{
// send it to the normal log destination
- wxLogDebug(_T("%s"), msg);
+ wxLogDebug(_T("%s"), msg.c_str());
if ( traits )
{