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