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