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