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