// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-
#ifdef __GNUG__
// #pragma implementation
#endif
#include "wx/object.h"
#include "wx/window.h"
#include "wx/dc.h"
-#include "wx/accel.h"
-#include "wx/postscrp.h"
-#define _MAXPATHLEN 500
+#if wxUSE_ACCEL
+#include "wx/accel.h"
+#endif
-/* Used for X resources */
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xresource.h>
+#include "wx/dcps.h"
+#include "wx/icon.h"
-wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
-XrmDatabase wxResourceDatabase;
+#define _MAXPATHLEN 500
/* Useful buffer, initialized in wxCommonInit */
-char *wxBuffer = (char *) NULL;
+wxChar *wxBuffer = (wxChar *) NULL;
/* Windows List */
-wxList wxTopLevelWindows;
+wxWindowList wxTopLevelWindows;
/* List of windows pending deletion */
wxList wxPendingDelete;
/* Current cursor, in order to hang on to
* cursor handle when setting the cursor globally */
-wxCursor *g_globalCursor = (wxCursor *) NULL;
+wxCursor g_globalCursor;
/* Don't allow event propagation during drag */
bool g_blockEventsOnDrag = FALSE;
/* Don't allow mouse event propagation during scroll */
bool g_blockEventsOnScroll = FALSE;
+/* Don't allow window closing if there are open dialogs */
+int g_openDialogs = 0;
+
+/* TRUE when the message queue is empty. this gets set to
+ FALSE by all event callbacks before anything else is done */
+bool g_isIdle = FALSE;
+
/* Message Strings for Internationalization */
char **wx_msg_str = (char**)NULL;
-/* Custom OS version, as optionally placed in wx.ini/.wxrc
- * Currently this can be Win95, Windows, Win32s, WinNT.
- * For some systems, you can't tell until run-time what services you
- * have. See wxGetOsVersion, which uses this string if present. */
-char *wxOsVersion = (char *) NULL;
-
/* For printing several pages */
int wxPageNumber;
-wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
+
+// Now in prntbase.cpp
+// wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
/* GDI Object Lists */
wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
wxFontList *wxTheFontList = (wxFontList *) NULL;
wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
-
+
/* X only font names */
+/*
wxFontNameDirectory *wxTheFontNameDirectory;
+*/
/* Stock objects */
wxFont *wxNORMAL_FONT;
wxColour *wxBLACK;
wxColour *wxWHITE;
-wxColour *wxGREY;
+wxColour *wxGREY;
wxColour *wxRED;
wxColour *wxBLUE;
wxColour *wxGREEN;
wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
/* 'Null' objects */
-wxAcceleratorTable wxNullAcceleratorTable;
+#if wxUSE_ACCEL
+ wxAcceleratorTable wxNullAcceleratorTable;
+#endif // wxUSE_ACCEL
+
wxBitmap wxNullBitmap;
-wxIcon wxNullIcon;
+wxIcon wxNullIcon;
wxCursor wxNullCursor;
wxPen wxNullPen;
wxBrush wxNullBrush;
wxFont wxNullFont;
wxColour wxNullColour;
-wxPalette wxNullPalette;
-wxRegion wxNullRegion;
+wxPalette wxNullPalette;
/* Default window names */
-const char *wxButtonNameStr = "button";
-const char *wxCanvasNameStr = "canvas";
-const char *wxCheckBoxNameStr = "check";
-const char *wxChoiceNameStr = "choice";
-const char *wxComboBoxNameStr = "comboBox";
-const char *wxDialogNameStr = "dialog";
-const char *wxFrameNameStr = "frame";
-const char *wxGaugeNameStr = "gauge";
-const char *wxStaticBoxNameStr = "groupBox";
-const char *wxListBoxNameStr = "listBox";
-const char *wxStaticTextNameStr = "message";
-const char *wxStaticBitmapNameStr = "message";
-const char *wxMultiTextNameStr = "multitext";
-const char *wxPanelNameStr = "panel";
-const char *wxRadioBoxNameStr = "radioBox";
-const char *wxRadioButtonNameStr = "radioButton";
-const char *wxBitmapRadioButtonNameStr = "radioButton";
-const char *wxScrollBarNameStr = "scrollBar";
-const char *wxSliderNameStr = "slider";
-const char *wxStaticNameStr = "static";
-const char *wxTextCtrlWindowNameStr = "textWindow";
-const char *wxTextCtrlNameStr = "text";
-const char *wxVirtListBoxNameStr = "virtListBox";
-const char *wxButtonBarNameStr = "buttonbar";
-const char *wxEnhDialogNameStr = "Shell";
-const char *wxToolBarNameStr = "toolbar";
-const char *wxStatusLineNameStr = "status_line";
-const char *wxEmptyString = "";
-const char *wxGetTextFromUserPromptStr = "Input Text";
-const char *wxMessageBoxCaptionStr = "Message";
-const char *wxFileSelectorPromptStr = "Select a file";
-const char *wxFileSelectorDefaultWildcardStr = "*.*";
-const char *wxInternalErrorStr = "wxWindows Internal Error";
-const char *wxFatalErrorStr = "wxWindows Fatal Error";
+const wxChar *wxControlNameStr = wxT("control");
+const wxChar *wxButtonNameStr = wxT("button");
+const wxChar *wxCanvasNameStr = wxT("canvas");
+const wxChar *wxCheckBoxNameStr = wxT("check");
+const wxChar *wxChoiceNameStr = wxT("choice");
+const wxChar *wxComboBoxNameStr = wxT("comboBox");
+const wxChar *wxDialogNameStr = wxT("dialog");
+const wxChar *wxFrameNameStr = wxT("frame");
+const wxChar *wxGaugeNameStr = wxT("gauge");
+const wxChar *wxStaticBoxNameStr = wxT("groupBox");
+const wxChar *wxListBoxNameStr = wxT("listBox");
+const wxChar *wxStaticTextNameStr = wxT("message");
+const wxChar *wxStaticBitmapNameStr = wxT("message");
+const wxChar *wxMultiTextNameStr = wxT("multitext");
+const wxChar *wxPanelNameStr = wxT("panel");
+const wxChar *wxRadioBoxNameStr = wxT("radioBox");
+const wxChar *wxRadioButtonNameStr = wxT("radioButton");
+const wxChar *wxBitmapRadioButtonNameStr = wxT("radioButton");
+const wxChar *wxScrollBarNameStr = wxT("scrollBar");
+const wxChar *wxSliderNameStr = wxT("slider");
+const wxChar *wxStaticNameStr = wxT("static");
+const wxChar *wxTextCtrlWindowNameStr = wxT("textWindow");
+const wxChar *wxTextCtrlNameStr = wxT("text");
+const wxChar *wxVirtListBoxNameStr = wxT("virtListBox");
+const wxChar *wxButtonBarNameStr = wxT("buttonbar");
+const wxChar *wxEnhDialogNameStr = wxT("Shell");
+const wxChar *wxToolBarNameStr = wxT("toolbar");
+const wxChar *wxStatusLineNameStr = wxT("status_line");
+const wxChar *wxGetTextFromUserPromptStr = wxT("Input Text");
+const wxChar *wxMessageBoxCaptionStr = wxT("Message");
+const wxChar *wxFileSelectorPromptStr = wxT("Select a file");
+const wxChar *wxFileSelectorDefaultWildcardStr = wxT("*");
+const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
+const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
+const wxChar *wxDirDialogNameStr = wxT("wxDirCtrl");
+const wxChar *wxDirDialogDefaultFolderStr = wxT("/");
+const wxChar *wxTreeCtrlNameStr = wxT("wxTreeCtrl");
/* See wx/utils.h */
-const char *wxFloatToStringStr = "%.2f";
-const char *wxDoubleToStringStr = "%.2f";
+const wxChar *wxFloatToStringStr = wxT("%.2f");
+const wxChar *wxDoubleToStringStr = wxT("%.2f");
/* Dafaults for wxWindow etc. */
const wxSize wxDefaultSize(-1, -1);