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