#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 <Xm/Xm.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
wxBuffer = new char[BUFSIZ + 512];
#endif
-#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
+#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
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
+#if wxUSE_POSTSCRIPT
+/* Done using wxModule now
wxInitializePrintSetupData();
wxThePrintPaperDatabase = new wxPrintPaperDatabase;
wxThePrintPaperDatabase->CreateDatabase();
+*/
#endif
wxBitmap::InitStandardHandlers();
wxModule::CleanUpModules();
-#if USE_WX_RESOURCES
+#if wxUSE_WX_RESOURCES
wxCleanUpResourceSystem();
#endif
delete wxTheColourDatabase;
wxTheColourDatabase = NULL;
-#if USE_POSTSCRIPT
+#if wxUSE_POSTSCRIPT
+/* Done using wxModule now
wxInitializePrintSetupData(FALSE);
delete wxThePrintPaperDatabase;
wxThePrintPaperDatabase = NULL;
+*/
#endif
wxBitmap::CleanUpHandlers();
delete wxTheApp;
wxTheApp = NULL;
-#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT
+#if (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
m_appContext = (WXAppContext) NULL;
m_topLevelWidget = (WXWidget) NULL;
m_maxRequestSize = 0;
+ m_initialDisplay = (WXDisplay*) 0;
}
bool wxApp::Initialized()
report = event;
while( XCheckTypedWindowEvent (disp, win, ResizeRequest, &report));
}
+ // TODO: when implementing refresh optimization, we can use
+ // XtAddExposureToRegion to expand the window's paint region.
XtDispatchEvent(&event);
- DeletePendingObjects();
+ ProcessIdle();
}
}
cerr << "wxWindows could not open display for " << wxTheApp->GetClassName() << ": exiting.\n";
exit(-1);
}
+ m_initialDisplay = (WXDisplay*) dpy;
+
wxTheApp->m_topLevelWidget = (WXWidget) XtAppCreateShell((String)NULL, (const char*) wxTheApp->GetClassName(),
applicationShellWidgetClass,dpy,
NULL,0) ;