]>
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" | |
20 | #include "wx/postscrp.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; |
c67daf87 | 62 | wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; |
c801d85f | 63 | |
83624f79 | 64 | /* GDI Object Lists */ |
c67daf87 UR |
65 | wxBrushList *wxTheBrushList = (wxBrushList *) NULL; |
66 | wxPenList *wxThePenList = (wxPenList *) NULL; | |
67 | wxFontList *wxTheFontList = (wxFontList *) NULL; | |
68 | wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; | |
83624f79 | 69 | wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; |
c801d85f | 70 | |
83624f79 | 71 | /* X only font names */ |
a3622daa | 72 | wxFontNameDirectory *wxTheFontNameDirectory; |
c801d85f | 73 | |
83624f79 | 74 | /* Stock objects */ |
c801d85f KB |
75 | wxFont *wxNORMAL_FONT; |
76 | wxFont *wxSMALL_FONT; | |
77 | wxFont *wxITALIC_FONT; | |
78 | wxFont *wxSWISS_FONT; | |
79 | ||
80 | wxPen *wxRED_PEN; | |
81 | wxPen *wxCYAN_PEN; | |
82 | wxPen *wxGREEN_PEN; | |
83 | wxPen *wxBLACK_PEN; | |
84 | wxPen *wxWHITE_PEN; | |
85 | wxPen *wxTRANSPARENT_PEN; | |
86 | wxPen *wxBLACK_DASHED_PEN; | |
87 | wxPen *wxGREY_PEN; | |
88 | wxPen *wxMEDIUM_GREY_PEN; | |
89 | wxPen *wxLIGHT_GREY_PEN; | |
90 | ||
91 | wxBrush *wxBLUE_BRUSH; | |
92 | wxBrush *wxGREEN_BRUSH; | |
93 | wxBrush *wxWHITE_BRUSH; | |
94 | wxBrush *wxBLACK_BRUSH; | |
95 | wxBrush *wxTRANSPARENT_BRUSH; | |
96 | wxBrush *wxCYAN_BRUSH; | |
97 | wxBrush *wxRED_BRUSH; | |
98 | wxBrush *wxGREY_BRUSH; | |
99 | wxBrush *wxMEDIUM_GREY_BRUSH; | |
100 | wxBrush *wxLIGHT_GREY_BRUSH; | |
101 | ||
102 | wxColour *wxBLACK; | |
103 | wxColour *wxWHITE; | |
83624f79 | 104 | wxColour *wxGREY; |
c801d85f KB |
105 | wxColour *wxRED; |
106 | wxColour *wxBLUE; | |
107 | wxColour *wxGREEN; | |
108 | wxColour *wxCYAN; | |
109 | wxColour *wxLIGHT_GREY; | |
110 | ||
c67daf87 UR |
111 | wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; |
112 | wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; | |
113 | wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; | |
c801d85f | 114 | |
83624f79 | 115 | /* 'Null' objects */ |
bcf1fa6b RR |
116 | wxAcceleratorTable wxNullAcceleratorTable; |
117 | wxBitmap wxNullBitmap; | |
118 | wxIcon wxNullIcon; | |
119 | wxCursor wxNullCursor; | |
120 | wxPen wxNullPen; | |
121 | wxBrush wxNullBrush; | |
122 | wxFont wxNullFont; | |
123 | wxColour wxNullColour; | |
124 | wxPalette wxNullPalette; | |
76ed8f8d | 125 | wxRegion wxNullRegion; |
c801d85f | 126 | |
83624f79 | 127 | /* Default window names */ |
c801d85f KB |
128 | const char *wxButtonNameStr = "button"; |
129 | const char *wxCanvasNameStr = "canvas"; | |
130 | const char *wxCheckBoxNameStr = "check"; | |
131 | const char *wxChoiceNameStr = "choice"; | |
132 | const char *wxComboBoxNameStr = "comboBox"; | |
133 | const char *wxDialogNameStr = "dialog"; | |
134 | const char *wxFrameNameStr = "frame"; | |
135 | const char *wxGaugeNameStr = "gauge"; | |
136 | const char *wxStaticBoxNameStr = "groupBox"; | |
137 | const char *wxListBoxNameStr = "listBox"; | |
138 | const char *wxStaticTextNameStr = "message"; | |
139 | const char *wxStaticBitmapNameStr = "message"; | |
140 | const char *wxMultiTextNameStr = "multitext"; | |
141 | const char *wxPanelNameStr = "panel"; | |
142 | const char *wxRadioBoxNameStr = "radioBox"; | |
143 | const char *wxRadioButtonNameStr = "radioButton"; | |
144 | const char *wxBitmapRadioButtonNameStr = "radioButton"; | |
145 | const char *wxScrollBarNameStr = "scrollBar"; | |
146 | const char *wxSliderNameStr = "slider"; | |
147 | const char *wxStaticNameStr = "static"; | |
148 | const char *wxTextCtrlWindowNameStr = "textWindow"; | |
149 | const char *wxTextCtrlNameStr = "text"; | |
150 | const char *wxVirtListBoxNameStr = "virtListBox"; | |
151 | const char *wxButtonBarNameStr = "buttonbar"; | |
152 | const char *wxEnhDialogNameStr = "Shell"; | |
153 | const char *wxToolBarNameStr = "toolbar"; | |
154 | const char *wxStatusLineNameStr = "status_line"; | |
155 | const char *wxEmptyString = ""; | |
156 | const char *wxGetTextFromUserPromptStr = "Input Text"; | |
157 | const char *wxMessageBoxCaptionStr = "Message"; | |
158 | const char *wxFileSelectorPromptStr = "Select a file"; | |
159 | const char *wxFileSelectorDefaultWildcardStr = "*.*"; | |
160 | const char *wxInternalErrorStr = "wxWindows Internal Error"; | |
161 | const char *wxFatalErrorStr = "wxWindows Fatal Error"; | |
162 | ||
83624f79 | 163 | /* See wx/utils.h */ |
c801d85f KB |
164 | const char *wxFloatToStringStr = "%.2f"; |
165 | const char *wxDoubleToStringStr = "%.2f"; | |
166 | ||
83624f79 | 167 | /* Dafaults for wxWindow etc. */ |
c801d85f KB |
168 | const wxSize wxDefaultSize(-1, -1); |
169 | const wxPoint wxDefaultPosition(-1, -1); |