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