1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
12 // #pragma implementation
16 #include "wx/object.h"
17 #include "wx/window.h"
23 #define _MAXPATHLEN 500
25 /* Used for X resources */
27 #include <X11/Xutil.h>
28 #include <X11/Xresource.h>
30 wxResourceCache
*wxTheResourceCache
= (wxResourceCache
*) NULL
;
31 XrmDatabase wxResourceDatabase
;
33 /* Useful buffer, initialized in wxCommonInit */
34 char *wxBuffer
= (char *) NULL
;
37 wxWindowList wxTopLevelWindows
;
39 /* List of windows pending deletion */
40 wxList wxPendingDelete
;
43 /* List of events pending processing */
44 wxList
*wxPendingEvents
= NULL
;
45 wxCriticalSection
*wxPendingEventsLocker
= NULL
;
48 /* Current cursor, in order to hang on to
49 * cursor handle when setting the cursor globally */
50 wxCursor g_globalCursor
;
52 /* Don't allow event propagation during drag */
53 bool g_blockEventsOnDrag
= FALSE
;
55 /* Don't allow mouse event propagation during scroll */
56 bool g_blockEventsOnScroll
= FALSE
;
58 /* TRUE when the message queue is empty. this gets set to
59 FALSE by all event callbacks before anything else is done */
60 bool g_isIdle
= FALSE
;
62 /* Message Strings for Internationalization */
63 char **wx_msg_str
= (char**)NULL
;
65 /* Custom OS version, as optionally placed in wx.ini/.wxrc
66 * Currently this can be Win95, Windows, Win32s, WinNT.
67 * For some systems, you can't tell until run-time what services you
68 * have. See wxGetOsVersion, which uses this string if present. */
69 char *wxOsVersion
= (char *) NULL
;
71 /* For printing several pages */
74 // Now in prntbase.cpp
75 // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
77 /* GDI Object Lists */
78 wxBrushList
*wxTheBrushList
= (wxBrushList
*) NULL
;
79 wxPenList
*wxThePenList
= (wxPenList
*) NULL
;
80 wxFontList
*wxTheFontList
= (wxFontList
*) NULL
;
81 wxColourDatabase
*wxTheColourDatabase
= (wxColourDatabase
*) NULL
;
82 wxBitmapList
*wxTheBitmapList
= (wxBitmapList
*) NULL
;
84 /* X only font names */
86 wxFontNameDirectory *wxTheFontNameDirectory;
90 wxFont
*wxNORMAL_FONT
;
92 wxFont
*wxITALIC_FONT
;
100 wxPen
*wxTRANSPARENT_PEN
;
101 wxPen
*wxBLACK_DASHED_PEN
;
103 wxPen
*wxMEDIUM_GREY_PEN
;
104 wxPen
*wxLIGHT_GREY_PEN
;
106 wxBrush
*wxBLUE_BRUSH
;
107 wxBrush
*wxGREEN_BRUSH
;
108 wxBrush
*wxWHITE_BRUSH
;
109 wxBrush
*wxBLACK_BRUSH
;
110 wxBrush
*wxTRANSPARENT_BRUSH
;
111 wxBrush
*wxCYAN_BRUSH
;
112 wxBrush
*wxRED_BRUSH
;
113 wxBrush
*wxGREY_BRUSH
;
114 wxBrush
*wxMEDIUM_GREY_BRUSH
;
115 wxBrush
*wxLIGHT_GREY_BRUSH
;
124 wxColour
*wxLIGHT_GREY
;
126 wxCursor
*wxSTANDARD_CURSOR
= (wxCursor
*) NULL
;
127 wxCursor
*wxHOURGLASS_CURSOR
= (wxCursor
*) NULL
;
128 wxCursor
*wxCROSS_CURSOR
= (wxCursor
*) NULL
;
132 wxAcceleratorTable wxNullAcceleratorTable
;
133 #endif // wxUSE_ACCEL
135 wxBitmap wxNullBitmap
;
137 wxCursor wxNullCursor
;
141 wxColour wxNullColour
;
142 wxPalette wxNullPalette
;
144 /* Default window names */
145 const wxChar
*wxButtonNameStr
= _T("button");
146 const wxChar
*wxCanvasNameStr
= _T("canvas");
147 const wxChar
*wxCheckBoxNameStr
= _T("check");
148 const wxChar
*wxChoiceNameStr
= _T("choice");
149 const wxChar
*wxComboBoxNameStr
= _T("comboBox");
150 const wxChar
*wxDialogNameStr
= _T("dialog");
151 const wxChar
*wxFrameNameStr
= _T("frame");
152 const wxChar
*wxGaugeNameStr
= _T("gauge");
153 const wxChar
*wxStaticBoxNameStr
= _T("groupBox");
154 const wxChar
*wxListBoxNameStr
= _T("listBox");
155 const wxChar
*wxStaticTextNameStr
= _T("message");
156 const wxChar
*wxStaticBitmapNameStr
= _T("message");
157 const wxChar
*wxMultiTextNameStr
= _T("multitext");
158 const wxChar
*wxPanelNameStr
= _T("panel");
159 const wxChar
*wxRadioBoxNameStr
= _T("radioBox");
160 const wxChar
*wxRadioButtonNameStr
= _T("radioButton");
161 const wxChar
*wxBitmapRadioButtonNameStr
= _T("radioButton");
162 const wxChar
*wxScrollBarNameStr
= _T("scrollBar");
163 const wxChar
*wxSliderNameStr
= _T("slider");
164 const wxChar
*wxStaticNameStr
= _T("static");
165 const wxChar
*wxTextCtrlWindowNameStr
= _T("textWindow");
166 const wxChar
*wxTextCtrlNameStr
= _T("text");
167 const wxChar
*wxVirtListBoxNameStr
= _T("virtListBox");
168 const wxChar
*wxButtonBarNameStr
= _T("buttonbar");
169 const wxChar
*wxEnhDialogNameStr
= _T("Shell");
170 const wxChar
*wxToolBarNameStr
= _T("toolbar");
171 const wxChar
*wxStatusLineNameStr
= _T("status_line");
172 const wxChar
*wxEmptyString
= _T("");
173 const wxChar
*wxGetTextFromUserPromptStr
= _T("Input Text");
174 const wxChar
*wxMessageBoxCaptionStr
= _T("Message");
175 const wxChar
*wxFileSelectorPromptStr
= _T("Select a file");
176 const wxChar
*wxFileSelectorDefaultWildcardStr
= _T("*.*");
177 const wxChar
*wxInternalErrorStr
= _T("wxWindows Internal Error");
178 const wxChar
*wxFatalErrorStr
= _T("wxWindows Fatal Error");
179 const wxChar
*wxDirDialogNameStr
= _T("wxDirCtrl");
180 const wxChar
*wxDirDialogDefaultFolderStr
= _T("/");
183 const wxChar
*wxFloatToStringStr
= _T("%.2f");
184 const wxChar
*wxDoubleToStringStr
= _T("%.2f");
186 /* Dafaults for wxWindow etc. */
187 const wxSize
wxDefaultSize(-1, -1);
188 const wxPoint
wxDefaultPosition(-1, -1);