]>
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 | ||
24 | // Used for X resources | |
25 | ||
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 | ||
33 | // Useful buffer, initialized in wxCommonInit | |
c67daf87 | 34 | char *wxBuffer = (char *) NULL; |
c801d85f KB |
35 | |
36 | // Windows List | |
37 | wxList wxTopLevelWindows; | |
38 | ||
39 | // List of windows pending deletion | |
40 | wxList wxPendingDelete; | |
41 | ||
42 | // Current cursor, in order to hang on to | |
43 | // cursor handle when setting the cursor globally | |
c67daf87 | 44 | wxCursor *g_globalCursor = (wxCursor *) NULL; |
c801d85f KB |
45 | |
46 | // Don't allow event propagation during drag | |
47 | bool g_blockEventsOnDrag = FALSE; | |
48 | ||
76ed8f8d RR |
49 | // Don't allow mouse event propagation during scroll |
50 | bool g_blockEventsOnScroll = FALSE; | |
51 | ||
c801d85f KB |
52 | // Message Strings for Internationalization |
53 | char **wx_msg_str = (char**)NULL; | |
54 | ||
55 | // Custom OS version, as optionally placed in wx.ini/.wxrc | |
56 | // Currently this can be Win95, Windows, Win32s, WinNT. | |
57 | // For some systems, you can't tell until run-time what services you | |
58 | // have. See wxGetOsVersion, which uses this string if present. | |
c67daf87 | 59 | char *wxOsVersion = (char *) NULL; |
c801d85f KB |
60 | |
61 | // For printing several pages | |
62 | int wxPageNumber; | |
c67daf87 | 63 | wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; |
c801d85f KB |
64 | |
65 | // GDI Object Lists | |
c67daf87 UR |
66 | wxBrushList *wxTheBrushList = (wxBrushList *) NULL; |
67 | wxPenList *wxThePenList = (wxPenList *) NULL; | |
68 | wxFontList *wxTheFontList = (wxFontList *) NULL; | |
69 | wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; | |
70 | wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; | |
c801d85f KB |
71 | |
72 | ||
73 | // X only font names | |
a3622daa | 74 | wxFontNameDirectory *wxTheFontNameDirectory; |
c801d85f KB |
75 | |
76 | // Stock objects | |
77 | wxFont *wxNORMAL_FONT; | |
78 | wxFont *wxSMALL_FONT; | |
79 | wxFont *wxITALIC_FONT; | |
80 | wxFont *wxSWISS_FONT; | |
81 | ||
82 | wxPen *wxRED_PEN; | |
83 | wxPen *wxCYAN_PEN; | |
84 | wxPen *wxGREEN_PEN; | |
85 | wxPen *wxBLACK_PEN; | |
86 | wxPen *wxWHITE_PEN; | |
87 | wxPen *wxTRANSPARENT_PEN; | |
88 | wxPen *wxBLACK_DASHED_PEN; | |
89 | wxPen *wxGREY_PEN; | |
90 | wxPen *wxMEDIUM_GREY_PEN; | |
91 | wxPen *wxLIGHT_GREY_PEN; | |
92 | ||
93 | wxBrush *wxBLUE_BRUSH; | |
94 | wxBrush *wxGREEN_BRUSH; | |
95 | wxBrush *wxWHITE_BRUSH; | |
96 | wxBrush *wxBLACK_BRUSH; | |
97 | wxBrush *wxTRANSPARENT_BRUSH; | |
98 | wxBrush *wxCYAN_BRUSH; | |
99 | wxBrush *wxRED_BRUSH; | |
100 | wxBrush *wxGREY_BRUSH; | |
101 | wxBrush *wxMEDIUM_GREY_BRUSH; | |
102 | wxBrush *wxLIGHT_GREY_BRUSH; | |
103 | ||
104 | wxColour *wxBLACK; | |
105 | wxColour *wxWHITE; | |
106 | wxColour *wxGREY; // Robert Roebling | |
107 | wxColour *wxRED; | |
108 | wxColour *wxBLUE; | |
109 | wxColour *wxGREEN; | |
110 | wxColour *wxCYAN; | |
111 | wxColour *wxLIGHT_GREY; | |
112 | ||
c67daf87 UR |
113 | wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; |
114 | wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; | |
115 | wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; | |
c801d85f KB |
116 | |
117 | // 'Null' objects | |
bcf1fa6b RR |
118 | wxAcceleratorTable wxNullAcceleratorTable; |
119 | wxBitmap wxNullBitmap; | |
120 | wxIcon wxNullIcon; | |
121 | wxCursor wxNullCursor; | |
122 | wxPen wxNullPen; | |
123 | wxBrush wxNullBrush; | |
124 | wxFont wxNullFont; | |
125 | wxColour wxNullColour; | |
126 | wxPalette wxNullPalette; | |
76ed8f8d | 127 | wxRegion wxNullRegion; |
c801d85f KB |
128 | |
129 | // Default window names | |
130 | const char *wxButtonNameStr = "button"; | |
131 | const char *wxCanvasNameStr = "canvas"; | |
132 | const char *wxCheckBoxNameStr = "check"; | |
133 | const char *wxChoiceNameStr = "choice"; | |
134 | const char *wxComboBoxNameStr = "comboBox"; | |
135 | const char *wxDialogNameStr = "dialog"; | |
136 | const char *wxFrameNameStr = "frame"; | |
137 | const char *wxGaugeNameStr = "gauge"; | |
138 | const char *wxStaticBoxNameStr = "groupBox"; | |
139 | const char *wxListBoxNameStr = "listBox"; | |
140 | const char *wxStaticTextNameStr = "message"; | |
141 | const char *wxStaticBitmapNameStr = "message"; | |
142 | const char *wxMultiTextNameStr = "multitext"; | |
143 | const char *wxPanelNameStr = "panel"; | |
144 | const char *wxRadioBoxNameStr = "radioBox"; | |
145 | const char *wxRadioButtonNameStr = "radioButton"; | |
146 | const char *wxBitmapRadioButtonNameStr = "radioButton"; | |
147 | const char *wxScrollBarNameStr = "scrollBar"; | |
148 | const char *wxSliderNameStr = "slider"; | |
149 | const char *wxStaticNameStr = "static"; | |
150 | const char *wxTextCtrlWindowNameStr = "textWindow"; | |
151 | const char *wxTextCtrlNameStr = "text"; | |
152 | const char *wxVirtListBoxNameStr = "virtListBox"; | |
153 | const char *wxButtonBarNameStr = "buttonbar"; | |
154 | const char *wxEnhDialogNameStr = "Shell"; | |
155 | const char *wxToolBarNameStr = "toolbar"; | |
156 | const char *wxStatusLineNameStr = "status_line"; | |
157 | const char *wxEmptyString = ""; | |
158 | const char *wxGetTextFromUserPromptStr = "Input Text"; | |
159 | const char *wxMessageBoxCaptionStr = "Message"; | |
160 | const char *wxFileSelectorPromptStr = "Select a file"; | |
161 | const char *wxFileSelectorDefaultWildcardStr = "*.*"; | |
162 | const char *wxInternalErrorStr = "wxWindows Internal Error"; | |
163 | const char *wxFatalErrorStr = "wxWindows Fatal Error"; | |
164 | ||
165 | // See wx/utils.h | |
166 | const char *wxFloatToStringStr = "%.2f"; | |
167 | const char *wxDoubleToStringStr = "%.2f"; | |
168 | ||
169 | #ifdef wx_msw | |
170 | const char *wxUserResourceStr = "TEXT"; | |
171 | #endif | |
172 | ||
173 | ||
47d67540 | 174 | #if wxUSE_SHARED_LIBRARY |
c801d85f KB |
175 | /* |
176 | * For wxWindows to be made into a dynamic library (e.g. Sun), | |
177 | * all IMPLEMENT_... macros must be in one place. | |
178 | * But normally, the definitions are in the appropriate places. | |
179 | */ | |
180 | ||
181 | // Hand-coded IMPLEMENT... macro for wxObject (define static data) | |
c67daf87 UR |
182 | wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); |
183 | wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; | |
f4a8c29f | 184 | wxHashTable wxClassInfo::classTable(wxKEY_STRING); |
c801d85f KB |
185 | |
186 | #include "wx/button.h" | |
187 | #include "wx/bmpbuttn.h" | |
188 | IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) | |
189 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) | |
190 | ||
191 | #include "wx/checkbox.h" | |
192 | IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) | |
193 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) | |
194 | ||
195 | #include "wx/choice.h" | |
196 | IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) | |
197 | ||
47d67540 | 198 | #if wxUSE_CLIPBOARD |
c801d85f KB |
199 | #include "wx/clipbrd.h" |
200 | IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) | |
201 | IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject) | |
202 | #endif | |
203 | ||
47d67540 | 204 | #if wxUSE_COMBOBOX |
c801d85f KB |
205 | #include "wx/combobox.h" |
206 | IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) | |
207 | #endif | |
208 | ||
209 | #include "wx/dc.h" | |
210 | #include "wx/dcmemory.h" | |
211 | #include "wx/dcclient.h" | |
212 | #include "wx/dcscreen.h" | |
213 | IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) | |
214 | IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC) | |
215 | IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) | |
216 | IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC) | |
217 | IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) | |
218 | IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) | |
219 | ||
220 | #if defined(wx_msw) | |
221 | #include "wx/dcprint.h" | |
222 | IMPLEMENT_CLASS(wxPrinterDC, wxDC) | |
223 | #endif | |
224 | ||
225 | #include "wx/dialog.h" | |
226 | IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow) | |
227 | ||
228 | #include "wx/frame.h" | |
229 | IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow) | |
230 | ||
231 | #include "wx/mdi.h" | |
232 | IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame) | |
233 | IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame) | |
234 | IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow) | |
235 | ||
236 | #include "wx/cmndata.h" | |
237 | IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject) | |
238 | IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject) | |
239 | IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject) | |
240 | ||
241 | #include "wx/colordlg.h" | |
242 | #include "wx/fontdlg.h" | |
243 | ||
47d67540 | 244 | #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW |
c801d85f KB |
245 | #include "wx/generic/colordlg.h" |
246 | #include "wx/generic/fontdlg.h" | |
247 | IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog) | |
248 | IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog) | |
249 | #endif | |
250 | ||
251 | // X defines wxColourDialog to be wxGenericColourDialog | |
252 | #ifndef wx_x | |
253 | IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) | |
254 | IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) | |
255 | #endif | |
256 | ||
257 | #include "wx/gdicmn.h" | |
258 | #include "wx/pen.h" | |
259 | #include "wx/brush.h" | |
260 | #include "wx/font.h" | |
261 | #include "wx/palette.h" | |
262 | #include "wx/icon.h" | |
263 | #include "wx/cursor.h" | |
264 | ||
265 | IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) | |
266 | IMPLEMENT_CLASS(wxColourDatabase, wxList) | |
267 | IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) | |
268 | IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) | |
269 | IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList) | |
270 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList) | |
271 | ||
6a6c0a8b | 272 | /* |
c801d85f KB |
273 | #if (!USE_TYPEDEFS) |
274 | IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject) | |
275 | IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject) | |
276 | #endif | |
6a6c0a8b | 277 | */ |
c801d85f | 278 | |
47d67540 | 279 | #if defined(wx_x) || (defined(wx_msw) && wxUSE_PORTABLE_FONTS_IN_MSW) |
c801d85f KB |
280 | IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject) |
281 | #endif | |
282 | ||
283 | #include "wx/hash.h" | |
284 | IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject) | |
285 | ||
286 | #include "wx/help.h" | |
287 | IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance, wxClient) | |
288 | IMPLEMENT_CLASS(wxHelpConnection, wxConnection) | |
289 | ||
290 | #include "wx/list.h" | |
291 | IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject) | |
292 | IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) | |
293 | IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList) | |
294 | ||
47d67540 | 295 | #if wxUSE_PRINTING_ARCHITECTURE |
c801d85f KB |
296 | #include "wx/print.h" |
297 | IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog) | |
298 | IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject) | |
299 | IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase) | |
300 | IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase) | |
301 | IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject) | |
302 | IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow) | |
303 | IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow) | |
304 | IMPLEMENT_CLASS(wxPreviewFrame, wxFrame) | |
305 | IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject) | |
306 | IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase) | |
307 | IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase) | |
308 | IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) | |
309 | IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) | |
310 | #endif | |
311 | ||
47d67540 | 312 | #if wxUSE_POSTSCRIPT |
c801d85f KB |
313 | #include "wx/postscrp.h" |
314 | IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC) | |
315 | IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject) | |
316 | IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject) | |
317 | IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject) | |
318 | IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList) | |
319 | #endif | |
320 | ||
47d67540 | 321 | #if wxUSE_WX_RESOURCES |
c801d85f KB |
322 | #include "wx/resource.h" |
323 | IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject) | |
324 | IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) | |
325 | #endif | |
326 | ||
327 | #include "wx/event.h" | |
328 | IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject) | |
329 | IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject) | |
330 | IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent) | |
331 | IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent) | |
332 | IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent) | |
333 | IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent) | |
334 | IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent) | |
335 | IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent) | |
336 | IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent) | |
337 | IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent) | |
338 | IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent) | |
339 | IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent) | |
340 | IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent) | |
341 | IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent) | |
342 | IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent) | |
343 | IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent) | |
344 | IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent) | |
345 | IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent) | |
346 | IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent) | |
347 | IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent) | |
cf447356 | 348 | IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) |
c801d85f KB |
349 | |
350 | #include "wx/utils.h" | |
351 | IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList) | |
352 | ||
6a6c0a8b | 353 | // IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject) |
c801d85f | 354 | |
cf447356 GL |
355 | #include "wx/process.h" |
356 | IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) | |
357 | ||
47d67540 | 358 | #if wxUSE_TIMEDATE |
c801d85f KB |
359 | #include "wx/date.h" |
360 | IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject) | |
361 | #endif | |
362 | ||
47d67540 | 363 | #if wxUSE_DOC_VIEW_ARCHITECTURE |
c801d85f KB |
364 | #include "wx/docview.h" |
365 | //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject) | |
366 | IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler) | |
367 | IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler) | |
368 | IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject) | |
369 | IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler) | |
370 | IMPLEMENT_CLASS(wxDocChildFrame, wxFrame) | |
371 | IMPLEMENT_CLASS(wxDocParentFrame, wxFrame) | |
47d67540 | 372 | #if wxUSE_PRINTING_ARCHITECTURE |
c801d85f KB |
373 | IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout) |
374 | #endif | |
375 | IMPLEMENT_CLASS(wxCommand, wxObject) | |
376 | IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject) | |
377 | IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject) | |
378 | #endif | |
379 | ||
47d67540 | 380 | #if wxUSE_CONSTRAINTS |
c801d85f KB |
381 | #include "wx/layout.h" |
382 | IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject) | |
383 | IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject) | |
384 | IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject) | |
385 | IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer) | |
386 | #endif | |
387 | ||
47d67540 | 388 | #if wxUSE_TOOLBAR |
c801d85f KB |
389 | #include "wx/tbarbase.h" |
390 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject) | |
391 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl) | |
392 | ||
393 | #include "wx/tbarsmpl.h" | |
394 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase) | |
395 | ||
396 | #ifdef wx_msw | |
397 | #include "wx/tbarmsw.h" | |
398 | IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase) | |
399 | ||
400 | #include "wx/tbar95.h" | |
401 | IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase) | |
402 | #endif | |
403 | ||
404 | #endif | |
405 | ||
f4ada568 GL |
406 | #include "wx/sckaddr.h" |
407 | ||
408 | IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxSockAddress) | |
409 | #ifdef ENABLE_IPV6 | |
410 | IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxSockAddress) | |
411 | #endif | |
412 | #ifndef __UNIX__ | |
413 | IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) | |
414 | #endif | |
415 | ||
416 | #include "wx/socket.h" | |
417 | ||
418 | IMPLEMENT_CLASS(wxSocketBase, wxEvtHandler) | |
419 | IMPLEMENT_CLASS(wxSocketClient, wxSocketBase) | |
420 | IMPLEMENT_CLASS(wxSocketServer, wxSocketBase) | |
421 | IMPLEMENT_CLASS(wxSocketHandler, wxObject) | |
422 | IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent) | |
423 | ||
424 | #include "wx/url.h" | |
425 | ||
426 | IMPLEMENT_CLASS(wxProtoInfo, wxObject) | |
427 | IMPLEMENT_CLASS(wxURL, wxObject) | |
428 | ||
429 | #include "wx/protocol/http.h" | |
430 | ||
431 | IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol) | |
432 | IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE) | |
433 | ||
434 | #include "wx/protocol/ftp.h" | |
435 | ||
436 | IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol) | |
856d2e52 | 437 | IMPLEMENT_PROTOCOL(wxFTP, "ftp", "21", TRUE) |
f4ada568 GL |
438 | |
439 | #include "wx/protocol/sckfile.h" | |
440 | ||
441 | IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol) | |
442 | IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE) | |
443 | ||
444 | #include "wx/sckipc.h" | |
445 | ||
446 | IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase) | |
447 | IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase) | |
448 | IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase) | |
449 | ||
c801d85f KB |
450 | #include "wx/statusbr.h" |
451 | ||
452 | IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) | |
453 | ||
454 | BEGIN_EVENT_TABLE(wxStatusBar, wxWindow) | |
a3622daa | 455 | EVT_PAINT(wxStatusBar::OnPaint) |
c801d85f KB |
456 | EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged) |
457 | END_EVENT_TABLE() | |
458 | ||
47d67540 | 459 | #if wxUSE_TIMEDATE |
c801d85f KB |
460 | #include "wx/time.h" |
461 | IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject) | |
462 | #endif | |
463 | ||
464 | #if !USE_GNU_WXSTRING | |
465 | #include "wx/string.h" | |
466 | IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject) | |
467 | #endif | |
468 | ||
469 | #ifdef wx_motif | |
470 | IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject) | |
471 | IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject) | |
472 | IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject) | |
473 | #endif | |
474 | IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) | |
475 | IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject) | |
476 | IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject) | |
477 | IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject) | |
478 | IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap) | |
479 | IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap) | |
480 | IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) | |
481 | IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) | |
482 | ||
483 | // This will presumably be implemented on other platforms too | |
484 | #ifdef wx_msw | |
485 | IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject) | |
486 | IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler) | |
487 | IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler) | |
488 | IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) | |
489 | IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler) | |
490 | IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler) | |
491 | IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler) | |
492 | #endif | |
493 | ||
494 | #include "wx/statbox.h" | |
495 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl) | |
496 | ||
47d67540 | 497 | #if wxUSE_IPC |
c801d85f KB |
498 | #include "wx/dde.h" |
499 | IMPLEMENT_ABSTRACT_CLASS(wxDDEObject, wxObject) | |
500 | IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxDDEObject) | |
501 | IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxDDEObject) | |
502 | IMPLEMENT_CLASS(wxDDEConnection, wxObject) | |
503 | #endif | |
504 | ||
505 | IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow) | |
506 | ||
507 | #include "wx/listbox.h" | |
508 | IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) | |
509 | ||
510 | IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) | |
511 | ||
512 | #include "wx/menu.h" | |
513 | IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxWindow) | |
514 | IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject) | |
515 | IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow) | |
516 | ||
517 | #include "wx/stattext.h" | |
518 | #include "wx/statbmp.h" | |
519 | IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) | |
520 | IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) | |
521 | ||
47d67540 | 522 | #if wxUSE_METAFILE |
c801d85f KB |
523 | #include "wx/metafile.h" |
524 | IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject) | |
525 | IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC) | |
526 | #endif | |
527 | ||
528 | #include "wx/radiobox.h" | |
529 | #include "wx/radiobut.h" | |
530 | IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) | |
531 | ||
532 | IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl) | |
533 | // IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton) | |
534 | ||
535 | #include "wx/scrolbar.h" | |
536 | IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) | |
537 | ||
538 | #if WXWIN_COMPATIBILITY | |
539 | BEGIN_EVENT_TABLE(wxScrollBar, wxControl) | |
540 | EVT_SCROLL(wxScrollBar::OnScroll) | |
541 | END_EVENT_TABLE() | |
542 | #endif | |
543 | ||
544 | #include "wx/slider.h" | |
545 | IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) | |
546 | ||
547 | #if WXWIN_COMPATIBILITY | |
548 | BEGIN_EVENT_TABLE(wxSlider, wxControl) | |
549 | EVT_SCROLL(wxSlider::OnScroll) | |
550 | END_EVENT_TABLE() | |
551 | #endif | |
552 | ||
553 | #include "wx/timer.h" | |
554 | IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) | |
555 | ||
556 | #include "wx/textctrl.h" | |
557 | IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) | |
558 | ||
559 | #include "wx/window.h" | |
560 | IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler) | |
561 | ||
562 | #include "wx/scrolwin.h" | |
563 | IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow) | |
564 | ||
565 | #include "wx/panel.h" | |
566 | IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow) | |
567 | ||
568 | #include "wx/msgbxdlg.h" | |
569 | #include "wx/textdlg.h" | |
570 | #include "wx/filedlg.h" | |
571 | #include "wx/dirdlg.h" | |
572 | #include "wx/choicdlg.h" | |
573 | ||
47d67540 | 574 | #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW |
c801d85f KB |
575 | #include "wx/generic/msgdlgg.h" |
576 | IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) | |
577 | #endif | |
578 | ||
579 | IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) | |
580 | IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) | |
581 | IMPLEMENT_CLASS(wxFileDialog, wxDialog) | |
582 | IMPLEMENT_CLASS(wxDirDialog, wxDialog) | |
583 | ||
584 | #ifdef wx_msw | |
585 | IMPLEMENT_CLASS(wxMessageDialog) | |
586 | #endif | |
587 | ||
47d67540 | 588 | #if wxUSE_GAUGE |
c801d85f KB |
589 | #ifdef wx_motif |
590 | #include "../../contrib/xmgauge/gauge.h" | |
591 | #endif | |
592 | #include "wx_gauge.h" | |
593 | IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) | |
594 | #endif | |
595 | ||
596 | #include "wx/grid.h" | |
597 | IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel) | |
598 | ||
599 | ///// Event tables (also must be in one, statically-linked file for shared libraries) | |
600 | ||
601 | // This is the base, wxEvtHandler 'bootstrap' code which is expanded manually here | |
602 | const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } | |
603 | ||
604 | const wxEventTable wxEvtHandler::sm_eventTable = | |
a3622daa | 605 | { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; |
c801d85f | 606 | |
c67daf87 UR |
607 | const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, |
608 | #ifdef __SGI_CC__ | |
609 | 0L | |
610 | #else | |
611 | NULL | |
612 | #endif | |
613 | } | |
614 | }; | |
c801d85f KB |
615 | |
616 | BEGIN_EVENT_TABLE(wxFrame, wxWindow) | |
a3622daa VZ |
617 | EVT_SIZE(wxFrame::OnSize) |
618 | EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight) | |
619 | EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) | |
620 | EVT_IDLE(wxFrame::OnIdle) | |
621 | EVT_CLOSE(wxFrame::OnCloseWindow) | |
c801d85f KB |
622 | END_EVENT_TABLE() |
623 | ||
624 | BEGIN_EVENT_TABLE(wxDialog, wxPanel) | |
625 | EVT_BUTTON(wxID_OK, wxDialog::OnOK) | |
626 | EVT_BUTTON(wxID_APPLY, wxDialog::OnApply) | |
627 | EVT_BUTTON(wxID_CANCEL, wxDialog::OnCancel) | |
628 | EVT_CHAR_HOOK(wxDialog::OnCharHook) | |
629 | EVT_SYS_COLOUR_CHANGED(wxDialog::OnSysColourChanged) | |
630 | EVT_CLOSE(wxDialog::OnCloseWindow) | |
631 | END_EVENT_TABLE() | |
632 | ||
633 | BEGIN_EVENT_TABLE(wxWindow, wxEvtHandler) | |
634 | EVT_CHAR(wxWindow::OnChar) | |
635 | EVT_SIZE(wxWindow::Size) | |
636 | EVT_ERASE_BACKGROUND(wxWindow::OnEraseBackground) | |
637 | EVT_SYS_COLOUR_CHANGED(wxWindow::OnSysColourChanged) | |
638 | EVT_INIT_DIALOG(wxWindow::OnInitDialog) | |
639 | EVT_IDLE(wxWindow::OnIdle) | |
640 | END_EVENT_TABLE() | |
641 | ||
642 | BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow) | |
643 | EVT_SCROLL(wxScrolledWindow::OnScroll) | |
644 | EVT_SIZE(wxScrolledWindow::OnSize) | |
645 | END_EVENT_TABLE() | |
646 | ||
647 | BEGIN_EVENT_TABLE(wxPanel, wxWindow) | |
648 | EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged) | |
649 | END_EVENT_TABLE() | |
650 | ||
651 | BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) | |
a3622daa VZ |
652 | EVT_CHAR(wxTextCtrl::OnChar) |
653 | EVT_DROP_FILES(wxTextCtrl::OnDropFiles) | |
654 | EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) | |
c801d85f KB |
655 | END_EVENT_TABLE() |
656 | ||
657 | #ifdef wx_msw | |
658 | BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame) | |
659 | EVT_SIZE(wxMDIParentWindow::OnSize) | |
660 | EVT_ACTIVATE(wxMDIParentWindow::OnActivate) | |
661 | EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged) | |
662 | END_EVENT_TABLE() | |
663 | ||
664 | BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow) | |
665 | EVT_SCROLL(wxMDIClientWindow::OnScroll) | |
666 | END_EVENT_TABLE() | |
667 | #endif | |
668 | ||
669 | BEGIN_EVENT_TABLE(wxToolBarBase, wxControl) | |
670 | EVT_SCROLL(wxToolBarBase::OnScroll) | |
671 | EVT_SIZE(wxToolBarBase::OnSize) | |
672 | EVT_IDLE(wxToolBarBase::OnIdle) | |
673 | END_EVENT_TABLE() | |
674 | ||
675 | BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase) | |
a3622daa VZ |
676 | EVT_SIZE(wxToolBarSimple::OnSize) |
677 | EVT_PAINT(wxToolBarSimple::OnPaint) | |
678 | EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus) | |
679 | EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent) | |
c801d85f KB |
680 | END_EVENT_TABLE() |
681 | ||
682 | #ifdef wx_msw | |
683 | BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase) | |
a3622daa VZ |
684 | EVT_SIZE(wxToolBarMSW::OnSize) |
685 | EVT_PAINT(wxToolBarMSW::OnPaint) | |
686 | EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent) | |
c801d85f KB |
687 | END_EVENT_TABLE() |
688 | ||
689 | BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase) | |
a3622daa VZ |
690 | EVT_SIZE(wxToolBar95::OnSize) |
691 | EVT_PAINT(wxToolBar95::OnPaint) | |
692 | EVT_KILL_FOCUS(wxToolBar95::OnKillFocus) | |
693 | EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent) | |
c801d85f KB |
694 | EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged) |
695 | END_EVENT_TABLE() | |
696 | #endif | |
697 | ||
698 | BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel) | |
a3622daa VZ |
699 | EVT_SIZE(wxGenericGrid::OnSize) |
700 | EVT_PAINT(wxGenericGrid::OnPaint) | |
701 | EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent) | |
c801d85f KB |
702 | EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText) |
703 | EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll) | |
704 | EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll) | |
705 | END_EVENT_TABLE() | |
706 | ||
707 | BEGIN_EVENT_TABLE(wxControl, wxWindow) | |
708 | EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground) | |
709 | END_EVENT_TABLE() | |
710 | ||
47d67540 | 711 | #if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW |
c801d85f | 712 | BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) |
a3622daa VZ |
713 | EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) |
714 | EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) | |
715 | EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) | |
c801d85f KB |
716 | END_EVENT_TABLE() |
717 | ||
718 | BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog) | |
a3622daa VZ |
719 | EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom) |
720 | EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider) | |
721 | EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider) | |
722 | EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider) | |
723 | EVT_PAINT(wxGenericColourDialog::OnPaint) | |
724 | EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent) | |
c801d85f KB |
725 | END_EVENT_TABLE() |
726 | ||
727 | BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog) | |
a3622daa VZ |
728 | EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont) |
729 | EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont) | |
730 | EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont) | |
731 | EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont) | |
732 | EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont) | |
733 | EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont) | |
734 | EVT_PAINT(wxGenericFontDialog::OnPaint) | |
c801d85f KB |
735 | END_EVENT_TABLE() |
736 | ||
737 | BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) | |
738 | EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) | |
739 | EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) | |
740 | EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) | |
741 | END_EVENT_TABLE() | |
742 | ||
743 | #endif | |
744 | ||
745 | BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) | |
a3622daa | 746 | EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) |
c801d85f KB |
747 | END_EVENT_TABLE() |
748 | ||
749 | BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) | |
a3622daa | 750 | EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) |
c801d85f KB |
751 | END_EVENT_TABLE() |
752 | ||
753 | #include "wx/prntbase.h" | |
754 | ||
755 | BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog) | |
a3622daa | 756 | EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel) |
c801d85f KB |
757 | END_EVENT_TABLE() |
758 | ||
759 | BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow) | |
a3622daa VZ |
760 | EVT_BUTTON(wxID_PREVIEW_CLOSE, wxPreviewControlBar::OnClose) |
761 | EVT_BUTTON(wxID_PREVIEW_PRINT, wxPreviewControlBar::OnPrint) | |
762 | EVT_BUTTON(wxID_PREVIEW_PREVIOUS, wxPreviewControlBar::OnPrevious) | |
763 | EVT_BUTTON(wxID_PREVIEW_NEXT, wxPreviewControlBar::OnNext) | |
764 | EVT_CHOICE(wxID_PREVIEW_ZOOM, wxPreviewControlBar::OnZoom) | |
c801d85f KB |
765 | END_EVENT_TABLE() |
766 | ||
767 | #endif | |
768 | ||
769 | ||
770 | const wxSize wxDefaultSize(-1, -1); | |
771 | const wxPoint wxDefaultPosition(-1, -1); |