#include "wx/module.h"
#include "wx/memory.h"
-#if USE_WX_RESOURCES
+#if wxUSE_WX_RESOURCES
#include "wx/resource.h"
#endif
-#if USE_POSTSCRIPT
-#include "wx/postscrp.h"
-#endif
-
#include <string.h>
extern char *wxBuffer;
wxBuffer = new char[BUFSIZ + 512];
#endif
-#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
+/* No longer used
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
wxDebugContext::SetStream(oStr, sBuf);
-
#endif
+*/
wxClassInfo::InitializeClasses();
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
wxTheColourDatabase->Initialize();
+
+ wxInitializeStockLists();
wxInitializeStockObjects();
-#if USE_WX_RESOURCES
+#if wxUSE_WX_RESOURCES
wxInitializeResourceSystem();
#endif
- // For PostScript printing
-#if USE_POSTSCRIPT
- wxInitializePrintSetupData();
- wxThePrintPaperDatabase = new wxPrintPaperDatabase;
- wxThePrintPaperDatabase->CreateDatabase();
-#endif
-
wxBitmap::InitStandardHandlers();
wxModule::RegisterModules();
{
wxModule::CleanUpModules();
-#if USE_WX_RESOURCES
+#if wxUSE_WX_RESOURCES
wxCleanUpResourceSystem();
#endif
delete wxTheColourDatabase;
wxTheColourDatabase = NULL;
-#if USE_POSTSCRIPT
- wxInitializePrintSetupData(FALSE);
- delete wxThePrintPaperDatabase;
- wxThePrintPaperDatabase = NULL;
-#endif
-
wxBitmap::CleanUpHandlers();
delete[] wxBuffer;
wxClassInfo::CleanUpClasses();
+ delete wxTheApp;
+ wxTheApp = NULL;
+
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+ // At this point we want to check if there are any memory
+ // blocks that aren't part of the wxDebugContext itself,
+ // as a special case. Then when dumping we need to ignore
+ // wxDebugContext, too.
+ if (wxDebugContext::CountObjectsLeft() > 0)
+ {
+ wxTrace("There were memory leaks.\n");
+ wxDebugContext::Dump();
+ wxDebugContext::PrintStatistics();
+ }
+// wxDebugContext::SetStream(NULL, NULL);
+#endif
+
// do it as the very last thing because everything else can log messages
wxLog::DontCreateOnDemand();
// do it as the very last thing because everything else can log messages
wxApp::CleanUp();
- delete wxTheApp;
- wxTheApp = NULL;
-
-#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
- // At this point we want to check if there are any memory
- // blocks that aren't part of the wxDebugContext itself,
- // as a special case. Then when dumping we need to ignore
- // wxDebugContext, too.
- if (wxDebugContext::CountObjectsLeft() > 0)
- {
- wxTrace("There were memory leaks.\n");
- wxDebugContext::Dump();
- wxDebugContext::PrintStatistics();
- }
- wxDebugContext::SetStream(NULL, NULL);
-#endif
-
return retValue;
};
if (event.MoreRequested())
needMore = TRUE;
- wxNode* node = win->GetChildren()->First();
+ wxNode* node = win->GetChildren().First();
while (node)
{
wxWindow* win = (wxWindow*) node->Data();