]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: data.cpp | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
dbf858b5 RR |
5 | // Id: $Id$ |
6 | // Copyright: (c) 1998 Robert Roebling | |
a3622daa | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifdef __GNUG__ | |
12 | // #pragma implementation | |
13 | #endif | |
14 | ||
bcf1fa6b RR |
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" | |
bf38cbff | 20 | #include "wx/dcps.h" |
c801d85f KB |
21 | |
22 | #define _MAXPATHLEN 500 | |
23 | ||
83624f79 | 24 | /* Used for X resources */ |
c801d85f KB |
25 | #include <X11/Xlib.h> |
26 | #include <X11/Xutil.h> | |
27 | #include <X11/Xresource.h> | |
28 | ||
c67daf87 | 29 | wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL; |
c801d85f KB |
30 | XrmDatabase wxResourceDatabase; |
31 | ||
83624f79 | 32 | /* Useful buffer, initialized in wxCommonInit */ |
c67daf87 | 33 | char *wxBuffer = (char *) NULL; |
c801d85f | 34 | |
83624f79 | 35 | /* Windows List */ |
e146b8c8 | 36 | wxWindowList wxTopLevelWindows; |
c801d85f | 37 | |
83624f79 | 38 | /* List of windows pending deletion */ |
c801d85f KB |
39 | wxList wxPendingDelete; |
40 | ||
7214297d GL |
41 | #if wxUSE_THREADS |
42 | /* List of events pending processing */ | |
43 | wxList wxPendingEvents; | |
44 | wxCriticalSection wxPendingEventsLocker; | |
45 | #endif | |
46 | ||
83624f79 RR |
47 | /* Current cursor, in order to hang on to |
48 | * cursor handle when setting the cursor globally */ | |
c67daf87 | 49 | wxCursor *g_globalCursor = (wxCursor *) NULL; |
c801d85f | 50 | |
83624f79 | 51 | /* Don't allow event propagation during drag */ |
c801d85f KB |
52 | bool g_blockEventsOnDrag = FALSE; |
53 | ||
83624f79 | 54 | /* Don't allow mouse event propagation during scroll */ |
76ed8f8d RR |
55 | bool g_blockEventsOnScroll = FALSE; |
56 | ||
83624f79 | 57 | /* Message Strings for Internationalization */ |
c801d85f KB |
58 | char **wx_msg_str = (char**)NULL; |
59 | ||
83624f79 RR |
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. */ | |
c67daf87 | 64 | char *wxOsVersion = (char *) NULL; |
c801d85f | 65 | |
83624f79 | 66 | /* For printing several pages */ |
c801d85f | 67 | int wxPageNumber; |
2a47d3c1 JS |
68 | |
69 | // Now in prntbase.cpp | |
70 | // wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; | |
c801d85f | 71 | |
83624f79 | 72 | /* GDI Object Lists */ |
c67daf87 UR |
73 | wxBrushList *wxTheBrushList = (wxBrushList *) NULL; |
74 | wxPenList *wxThePenList = (wxPenList *) NULL; | |
75 | wxFontList *wxTheFontList = (wxFontList *) NULL; | |
76 | wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; | |
83624f79 | 77 | wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; |
e146b8c8 | 78 | |
83624f79 | 79 | /* X only font names */ |
36b3b54a | 80 | /* |
a3622daa | 81 | wxFontNameDirectory *wxTheFontNameDirectory; |
36b3b54a | 82 | */ |
c801d85f | 83 | |
83624f79 | 84 | /* Stock objects */ |
c801d85f KB |
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; | |
e146b8c8 | 114 | wxColour *wxGREY; |
c801d85f KB |
115 | wxColour *wxRED; |
116 | wxColour *wxBLUE; | |
117 | wxColour *wxGREEN; | |
118 | wxColour *wxCYAN; | |
119 | wxColour *wxLIGHT_GREY; | |
120 | ||
c67daf87 UR |
121 | wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; |
122 | wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; | |
123 | wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; | |
c801d85f | 124 | |
83624f79 | 125 | /* 'Null' objects */ |
bcf1fa6b RR |
126 | wxAcceleratorTable wxNullAcceleratorTable; |
127 | wxBitmap wxNullBitmap; | |
e146b8c8 | 128 | wxIcon wxNullIcon; |
bcf1fa6b RR |
129 | wxCursor wxNullCursor; |
130 | wxPen wxNullPen; | |
131 | wxBrush wxNullBrush; | |
132 | wxFont wxNullFont; | |
133 | wxColour wxNullColour; | |
e146b8c8 | 134 | wxPalette wxNullPalette; |
c801d85f | 135 | |
83624f79 | 136 | /* Default window names */ |
c801d85f KB |
137 | const char *wxButtonNameStr = "button"; |
138 | const char *wxCanvasNameStr = "canvas"; | |
139 | const char *wxCheckBoxNameStr = "check"; | |
140 | const char *wxChoiceNameStr = "choice"; | |
141 | const char *wxComboBoxNameStr = "comboBox"; | |
142 | const char *wxDialogNameStr = "dialog"; | |
143 | const char *wxFrameNameStr = "frame"; | |
144 | const char *wxGaugeNameStr = "gauge"; | |
145 | const char *wxStaticBoxNameStr = "groupBox"; | |
146 | const char *wxListBoxNameStr = "listBox"; | |
147 | const char *wxStaticTextNameStr = "message"; | |
148 | const char *wxStaticBitmapNameStr = "message"; | |
149 | const char *wxMultiTextNameStr = "multitext"; | |
150 | const char *wxPanelNameStr = "panel"; | |
151 | const char *wxRadioBoxNameStr = "radioBox"; | |
152 | const char *wxRadioButtonNameStr = "radioButton"; | |
153 | const char *wxBitmapRadioButtonNameStr = "radioButton"; | |
154 | const char *wxScrollBarNameStr = "scrollBar"; | |
155 | const char *wxSliderNameStr = "slider"; | |
156 | const char *wxStaticNameStr = "static"; | |
157 | const char *wxTextCtrlWindowNameStr = "textWindow"; | |
158 | const char *wxTextCtrlNameStr = "text"; | |
159 | const char *wxVirtListBoxNameStr = "virtListBox"; | |
160 | const char *wxButtonBarNameStr = "buttonbar"; | |
161 | const char *wxEnhDialogNameStr = "Shell"; | |
162 | const char *wxToolBarNameStr = "toolbar"; | |
163 | const char *wxStatusLineNameStr = "status_line"; | |
164 | const char *wxEmptyString = ""; | |
165 | const char *wxGetTextFromUserPromptStr = "Input Text"; | |
166 | const char *wxMessageBoxCaptionStr = "Message"; | |
167 | const char *wxFileSelectorPromptStr = "Select a file"; | |
168 | const char *wxFileSelectorDefaultWildcardStr = "*.*"; | |
169 | const char *wxInternalErrorStr = "wxWindows Internal Error"; | |
170 | const char *wxFatalErrorStr = "wxWindows Fatal Error"; | |
171 | ||
83624f79 | 172 | /* See wx/utils.h */ |
c801d85f KB |
173 | const char *wxFloatToStringStr = "%.2f"; |
174 | const char *wxDoubleToStringStr = "%.2f"; | |
175 | ||
83624f79 | 176 | /* Dafaults for wxWindow etc. */ |
c801d85f KB |
177 | const wxSize wxDefaultSize(-1, -1); |
178 | const wxPoint wxDefaultPosition(-1, -1); |