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