]> git.saurik.com Git - wxWidgets.git/blob - src/gtk1/data.cpp
Compilation problem in non-Unicode mode. (Will fix in a more beautiful way later)
[wxWidgets.git] / src / gtk1 / data.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: data.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifdef __GNUG__
12 // #pragma implementation
13 #endif
14
15 #include "wx/defs.h"
16 #include "wx/object.h"
17 #include "wx/window.h"
18 #include "wx/dc.h"
19 #include "wx/accel.h"
20 #include "wx/dcps.h"
21
22 #define _MAXPATHLEN 500
23
24 /* Used for X resources */
25 #include <X11/Xlib.h>
26 #include <X11/Xutil.h>
27 #include <X11/Xresource.h>
28
29 wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
30 XrmDatabase wxResourceDatabase;
31
32 /* Useful buffer, initialized in wxCommonInit */
33 char *wxBuffer = (char *) NULL;
34
35 /* Windows List */
36 wxWindowList wxTopLevelWindows;
37
38 /* List of windows pending deletion */
39 wxList wxPendingDelete;
40
41 #if wxUSE_THREADS
42 /* List of events pending processing */
43 wxList *wxPendingEvents = NULL;
44 wxCriticalSection *wxPendingEventsLocker = NULL;
45 #endif
46
47 /* Current cursor, in order to hang on to
48 * cursor handle when setting the cursor globally */
49 wxCursor *g_globalCursor = (wxCursor *) NULL;
50
51 /* Don't allow event propagation during drag */
52 bool g_blockEventsOnDrag = FALSE;
53
54 /* Don't allow mouse event propagation during scroll */
55 bool g_blockEventsOnScroll = FALSE;
56
57 /* Message Strings for Internationalization */
58 char **wx_msg_str = (char**)NULL;
59
60 /* Custom OS version, as optionally placed in wx.ini/.wxrc
61 * Currently this can be Win95, Windows, Win32s, WinNT.
62 * For some systems, you can't tell until run-time what services you
63 * have. See wxGetOsVersion, which uses this string if present. */
64 char *wxOsVersion = (char *) NULL;
65
66 /* For printing several pages */
67 int wxPageNumber;
68
69 // Now in prntbase.cpp
70 // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
71
72 /* GDI Object Lists */
73 wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
74 wxPenList *wxThePenList = (wxPenList *) NULL;
75 wxFontList *wxTheFontList = (wxFontList *) NULL;
76 wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
77 wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
78
79 /* X only font names */
80 /*
81 wxFontNameDirectory *wxTheFontNameDirectory;
82 */
83
84 /* Stock objects */
85 wxFont *wxNORMAL_FONT;
86 wxFont *wxSMALL_FONT;
87 wxFont *wxITALIC_FONT;
88 wxFont *wxSWISS_FONT;
89
90 wxPen *wxRED_PEN;
91 wxPen *wxCYAN_PEN;
92 wxPen *wxGREEN_PEN;
93 wxPen *wxBLACK_PEN;
94 wxPen *wxWHITE_PEN;
95 wxPen *wxTRANSPARENT_PEN;
96 wxPen *wxBLACK_DASHED_PEN;
97 wxPen *wxGREY_PEN;
98 wxPen *wxMEDIUM_GREY_PEN;
99 wxPen *wxLIGHT_GREY_PEN;
100
101 wxBrush *wxBLUE_BRUSH;
102 wxBrush *wxGREEN_BRUSH;
103 wxBrush *wxWHITE_BRUSH;
104 wxBrush *wxBLACK_BRUSH;
105 wxBrush *wxTRANSPARENT_BRUSH;
106 wxBrush *wxCYAN_BRUSH;
107 wxBrush *wxRED_BRUSH;
108 wxBrush *wxGREY_BRUSH;
109 wxBrush *wxMEDIUM_GREY_BRUSH;
110 wxBrush *wxLIGHT_GREY_BRUSH;
111
112 wxColour *wxBLACK;
113 wxColour *wxWHITE;
114 wxColour *wxGREY;
115 wxColour *wxRED;
116 wxColour *wxBLUE;
117 wxColour *wxGREEN;
118 wxColour *wxCYAN;
119 wxColour *wxLIGHT_GREY;
120
121 wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
122 wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
123 wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
124
125 /* 'Null' objects */
126 wxAcceleratorTable wxNullAcceleratorTable;
127 wxBitmap wxNullBitmap;
128 wxIcon wxNullIcon;
129 wxCursor wxNullCursor;
130 wxPen wxNullPen;
131 wxBrush wxNullBrush;
132 wxFont wxNullFont;
133 wxColour wxNullColour;
134 wxPalette wxNullPalette;
135
136 /* Default window names */
137 const wxChar *wxButtonNameStr = _T("button");
138 const wxChar *wxCanvasNameStr = _T("canvas");
139 const wxChar *wxCheckBoxNameStr = _T("check");
140 const wxChar *wxChoiceNameStr = _T("choice");
141 const wxChar *wxComboBoxNameStr = _T("comboBox");
142 const wxChar *wxDialogNameStr = _T("dialog");
143 const wxChar *wxFrameNameStr = _T("frame");
144 const wxChar *wxGaugeNameStr = _T("gauge");
145 const wxChar *wxStaticBoxNameStr = _T("groupBox");
146 const wxChar *wxListBoxNameStr = _T("listBox");
147 const wxChar *wxStaticTextNameStr = _T("message");
148 const wxChar *wxStaticBitmapNameStr = _T("message");
149 const wxChar *wxMultiTextNameStr = _T("multitext");
150 const wxChar *wxPanelNameStr = _T("panel");
151 const wxChar *wxRadioBoxNameStr = _T("radioBox");
152 const wxChar *wxRadioButtonNameStr = _T("radioButton");
153 const wxChar *wxBitmapRadioButtonNameStr = _T("radioButton");
154 const wxChar *wxScrollBarNameStr = _T("scrollBar");
155 const wxChar *wxSliderNameStr = _T("slider");
156 const wxChar *wxStaticNameStr = _T("static");
157 const wxChar *wxTextCtrlWindowNameStr = _T("textWindow");
158 const wxChar *wxTextCtrlNameStr = _T("text");
159 const wxChar *wxVirtListBoxNameStr = _T("virtListBox");
160 const wxChar *wxButtonBarNameStr = _T("buttonbar");
161 const wxChar *wxEnhDialogNameStr = _T("Shell");
162 const wxChar *wxToolBarNameStr = _T("toolbar");
163 const wxChar *wxStatusLineNameStr = _T("status_line");
164 const wxChar *wxEmptyString = _T("");
165 const wxChar *wxGetTextFromUserPromptStr = _T("Input Text");
166 const wxChar *wxMessageBoxCaptionStr = _T("Message");
167 const wxChar *wxFileSelectorPromptStr = _T("Select a file");
168 const wxChar *wxFileSelectorDefaultWildcardStr = _T("*.*");
169 const wxChar *wxInternalErrorStr = _T("wxWindows Internal Error");
170 const wxChar *wxFatalErrorStr = _T("wxWindows Fatal Error");
171
172 /* See wx/utils.h */
173 const wxChar *wxFloatToStringStr = _T("%.2f");
174 const wxChar *wxDoubleToStringStr = _T("%.2f");
175
176 /* Dafaults for wxWindow etc. */
177 const wxSize wxDefaultSize(-1, -1);
178 const wxPoint wxDefaultPosition(-1, -1);