]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/gtk/data.cpp
Added USE_CONFIG
[wxWidgets.git] / src / gtk / data.cpp
... / ...
CommitLineData
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
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifdef __GNUG__
13// #pragma implementation
14#endif
15
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"
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
31wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
32XrmDatabase wxResourceDatabase;
33
34// Useful buffer, initialized in wxCommonInit
35char *wxBuffer = (char *) NULL;
36
37// Windows List
38wxList wxTopLevelWindows;
39
40// List of windows pending deletion
41wxList wxPendingDelete;
42
43// Current cursor, in order to hang on to
44// cursor handle when setting the cursor globally
45wxCursor *g_globalCursor = (wxCursor *) NULL;
46
47// Don't allow event propagation during drag
48bool g_blockEventsOnDrag = FALSE;
49
50// Message Strings for Internationalization
51char **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.
57char *wxOsVersion = (char *) NULL;
58
59// For printing several pages
60int wxPageNumber;
61wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
62
63// GDI Object Lists
64wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
65wxPenList *wxThePenList = (wxPenList *) NULL;
66wxFontList *wxTheFontList = (wxFontList *) NULL;
67wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
68wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
69
70
71// X only font names
72wxFontNameDirectory *wxTheFontNameDirectory;
73
74// Stock objects
75wxFont *wxNORMAL_FONT;
76wxFont *wxSMALL_FONT;
77wxFont *wxITALIC_FONT;
78wxFont *wxSWISS_FONT;
79
80wxPen *wxRED_PEN;
81wxPen *wxCYAN_PEN;
82wxPen *wxGREEN_PEN;
83wxPen *wxBLACK_PEN;
84wxPen *wxWHITE_PEN;
85wxPen *wxTRANSPARENT_PEN;
86wxPen *wxBLACK_DASHED_PEN;
87wxPen *wxGREY_PEN;
88wxPen *wxMEDIUM_GREY_PEN;
89wxPen *wxLIGHT_GREY_PEN;
90
91wxBrush *wxBLUE_BRUSH;
92wxBrush *wxGREEN_BRUSH;
93wxBrush *wxWHITE_BRUSH;
94wxBrush *wxBLACK_BRUSH;
95wxBrush *wxTRANSPARENT_BRUSH;
96wxBrush *wxCYAN_BRUSH;
97wxBrush *wxRED_BRUSH;
98wxBrush *wxGREY_BRUSH;
99wxBrush *wxMEDIUM_GREY_BRUSH;
100wxBrush *wxLIGHT_GREY_BRUSH;
101
102wxColour *wxBLACK;
103wxColour *wxWHITE;
104wxColour *wxGREY; // Robert Roebling
105wxColour *wxRED;
106wxColour *wxBLUE;
107wxColour *wxGREEN;
108wxColour *wxCYAN;
109wxColour *wxLIGHT_GREY;
110
111wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
112wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
113wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
114
115// 'Null' objects
116wxAcceleratorTable wxNullAcceleratorTable;
117wxBitmap wxNullBitmap;
118wxIcon wxNullIcon;
119wxCursor wxNullCursor;
120wxPen wxNullPen;
121wxBrush wxNullBrush;
122wxFont wxNullFont;
123wxColour wxNullColour;
124wxPalette wxNullPalette;
125
126// Default window names
127const char *wxButtonNameStr = "button";
128const char *wxCanvasNameStr = "canvas";
129const char *wxCheckBoxNameStr = "check";
130const char *wxChoiceNameStr = "choice";
131const char *wxComboBoxNameStr = "comboBox";
132const char *wxDialogNameStr = "dialog";
133const char *wxFrameNameStr = "frame";
134const char *wxGaugeNameStr = "gauge";
135const char *wxStaticBoxNameStr = "groupBox";
136const char *wxListBoxNameStr = "listBox";
137const char *wxStaticTextNameStr = "message";
138const char *wxStaticBitmapNameStr = "message";
139const char *wxMultiTextNameStr = "multitext";
140const char *wxPanelNameStr = "panel";
141const char *wxRadioBoxNameStr = "radioBox";
142const char *wxRadioButtonNameStr = "radioButton";
143const char *wxBitmapRadioButtonNameStr = "radioButton";
144const char *wxScrollBarNameStr = "scrollBar";
145const char *wxSliderNameStr = "slider";
146const char *wxStaticNameStr = "static";
147const char *wxTextCtrlWindowNameStr = "textWindow";
148const char *wxTextCtrlNameStr = "text";
149const char *wxVirtListBoxNameStr = "virtListBox";
150const char *wxButtonBarNameStr = "buttonbar";
151const char *wxEnhDialogNameStr = "Shell";
152const char *wxToolBarNameStr = "toolbar";
153const char *wxStatusLineNameStr = "status_line";
154const char *wxEmptyString = "";
155const char *wxGetTextFromUserPromptStr = "Input Text";
156const char *wxMessageBoxCaptionStr = "Message";
157const char *wxFileSelectorPromptStr = "Select a file";
158const char *wxFileSelectorDefaultWildcardStr = "*.*";
159const char *wxInternalErrorStr = "wxWindows Internal Error";
160const char *wxFatalErrorStr = "wxWindows Fatal Error";
161
162// See wx/utils.h
163const char *wxFloatToStringStr = "%.2f";
164const char *wxDoubleToStringStr = "%.2f";
165
166#ifdef wx_msw
167const 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)
179wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
180wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL;
181wxHashTable wxClassInfo::classTable(wxKEY_STRING);
182
183#include "wx/button.h"
184#include "wx/bmpbuttn.h"
185IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
186IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
187
188#include "wx/checkbox.h"
189IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
190IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
191
192#include "wx/choice.h"
193IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
194
195#if USE_CLIPBOARD
196#include "wx/clipbrd.h"
197IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
198IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject)
199#endif
200
201#if USE_COMBOBOX
202#include "wx/combobox.h"
203IMPLEMENT_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"
210IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
211IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxDC)
212IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
213IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxDC)
214IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
215IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
216
217#if defined(wx_msw)
218#include "wx/dcprint.h"
219IMPLEMENT_CLASS(wxPrinterDC, wxDC)
220#endif
221
222#include "wx/dialog.h"
223IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxWindow)
224
225#include "wx/frame.h"
226IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
227
228#include "wx/mdi.h"
229IMPLEMENT_DYNAMIC_CLASS(wxMDIParentFrame, wxFrame)
230IMPLEMENT_DYNAMIC_CLASS(wxMDIChildFrame, wxFrame)
231IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxWindow)
232
233#include "wx/cmndata.h"
234IMPLEMENT_DYNAMIC_CLASS(wxColourData, wxObject)
235IMPLEMENT_DYNAMIC_CLASS(wxFontData, wxObject)
236IMPLEMENT_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"
244IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog)
245IMPLEMENT_DYNAMIC_CLASS(wxGenericFontDialog, wxDialog)
246#endif
247
248// X defines wxColourDialog to be wxGenericColourDialog
249#ifndef wx_x
250IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)
251IMPLEMENT_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
262IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
263IMPLEMENT_CLASS(wxColourDatabase, wxList)
264IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList)
265IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList)
266IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList)
267IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList)
268
269/*
270#if (!USE_TYPEDEFS)
271IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
272IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject)
273#endif
274*/
275
276#if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW)
277IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
278#endif
279
280#include "wx/hash.h"
281IMPLEMENT_DYNAMIC_CLASS(wxHashTable, wxObject)
282
283#include "wx/help.h"
284IMPLEMENT_DYNAMIC_CLASS(wxHelpInstance, wxClient)
285IMPLEMENT_CLASS(wxHelpConnection, wxConnection)
286
287#include "wx/list.h"
288IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject)
289IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject)
290IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList)
291
292#if USE_PRINTING_ARCHITECTURE
293#include "wx/print.h"
294IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog)
295IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject)
296IMPLEMENT_DYNAMIC_CLASS(wxPostScriptPrinter, wxPrinterBase)
297IMPLEMENT_DYNAMIC_CLASS(wxWindowsPrinter, wxPrinterBase)
298IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject)
299IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
300IMPLEMENT_CLASS(wxPreviewControlBar, wxWindow)
301IMPLEMENT_CLASS(wxPreviewFrame, wxFrame)
302IMPLEMENT_CLASS(wxPrintPreviewBase, wxObject)
303IMPLEMENT_CLASS(wxPostScriptPrintPreview, wxPrintPreviewBase)
304IMPLEMENT_CLASS(wxWindowsPrintPreview, wxPrintPreviewBase)
305IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
306IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
307#endif
308
309#if USE_POSTSCRIPT
310#include "wx/postscrp.h"
311IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC)
312IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject)
313IMPLEMENT_DYNAMIC_CLASS(wxPageSetupData, wxObject)
314IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
315IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
316#endif
317
318#if USE_WX_RESOURCES
319#include "wx/resource.h"
320IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject)
321IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable)
322#endif
323
324#include "wx/event.h"
325IMPLEMENT_DYNAMIC_CLASS(wxEvtHandler, wxObject)
326IMPLEMENT_ABSTRACT_CLASS(wxEvent, wxObject)
327IMPLEMENT_DYNAMIC_CLASS(wxCommandEvent, wxEvent)
328IMPLEMENT_DYNAMIC_CLASS(wxScrollEvent, wxCommandEvent)
329IMPLEMENT_DYNAMIC_CLASS(wxMouseEvent, wxEvent)
330IMPLEMENT_DYNAMIC_CLASS(wxKeyEvent, wxEvent)
331IMPLEMENT_DYNAMIC_CLASS(wxSizeEvent, wxEvent)
332IMPLEMENT_DYNAMIC_CLASS(wxPaintEvent, wxEvent)
333IMPLEMENT_DYNAMIC_CLASS(wxEraseEvent, wxEvent)
334IMPLEMENT_DYNAMIC_CLASS(wxMoveEvent, wxEvent)
335IMPLEMENT_DYNAMIC_CLASS(wxFocusEvent, wxEvent)
336IMPLEMENT_DYNAMIC_CLASS(wxCloseEvent, wxEvent)
337IMPLEMENT_DYNAMIC_CLASS(wxMenuEvent, wxEvent)
338IMPLEMENT_DYNAMIC_CLASS(wxJoystickEvent, wxEvent)
339IMPLEMENT_DYNAMIC_CLASS(wxDropFilesEvent, wxEvent)
340IMPLEMENT_DYNAMIC_CLASS(wxActivateEvent, wxEvent)
341IMPLEMENT_DYNAMIC_CLASS(wxInitDialogEvent, wxEvent)
342IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent)
343IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent)
344IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent)
345IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)
346
347#include "wx/utils.h"
348IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList)
349
350// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
351
352#include "wx/process.h"
353IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
354
355#if USE_TIMEDATE
356#include "wx/date.h"
357IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)
358#endif
359
360#if USE_DOC_VIEW_ARCHITECTURE
361#include "wx/docview.h"
362//IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
363IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler)
364IMPLEMENT_ABSTRACT_CLASS(wxView, wxEvtHandler)
365IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject)
366IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler)
367IMPLEMENT_CLASS(wxDocChildFrame, wxFrame)
368IMPLEMENT_CLASS(wxDocParentFrame, wxFrame)
369#if USE_PRINTING_ARCHITECTURE
370IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout)
371#endif
372IMPLEMENT_CLASS(wxCommand, wxObject)
373IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject)
374IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
375#endif
376
377#if USE_CONSTRAINTS
378#include "wx/layout.h"
379IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject)
380IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject)
381IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject)
382IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer)
383#endif
384
385#if USE_TOOLBAR
386#include "wx/tbarbase.h"
387IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject)
388IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl)
389
390#include "wx/tbarsmpl.h"
391IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase)
392
393#ifdef wx_msw
394#include "wx/tbarmsw.h"
395IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase)
396
397#include "wx/tbar95.h"
398IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase)
399#endif
400
401#endif
402
403#include "wx/sckaddr.h"
404
405IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxSockAddress)
406#ifdef ENABLE_IPV6
407IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxSockAddress)
408#endif
409#ifndef __UNIX__
410IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
411#endif
412
413#include "wx/socket.h"
414
415IMPLEMENT_CLASS(wxSocketBase, wxEvtHandler)
416IMPLEMENT_CLASS(wxSocketClient, wxSocketBase)
417IMPLEMENT_CLASS(wxSocketServer, wxSocketBase)
418IMPLEMENT_CLASS(wxSocketHandler, wxObject)
419IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent)
420
421#include "wx/url.h"
422
423IMPLEMENT_CLASS(wxProtoInfo, wxObject)
424IMPLEMENT_CLASS(wxURL, wxObject)
425
426#include "wx/protocol/http.h"
427
428IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
429IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE)
430
431#include "wx/protocol/ftp.h"
432
433IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol)
434IMPLEMENT_PROTOCOL(wxFTP, "ftp", "ftp", TRUE)
435
436#include "wx/protocol/sckfile.h"
437
438IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
439IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE)
440
441#include "wx/sckipc.h"
442
443IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase)
444IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase)
445IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase)
446
447#include "wx/statusbr.h"
448
449IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow)
450
451BEGIN_EVENT_TABLE(wxStatusBar, wxWindow)
452 EVT_PAINT(wxStatusBar::OnPaint)
453 EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged)
454END_EVENT_TABLE()
455
456#if USE_TIMEDATE
457#include "wx/time.h"
458IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject)
459#endif
460
461#if !USE_GNU_WXSTRING
462#include "wx/string.h"
463IMPLEMENT_DYNAMIC_CLASS(wxString, wxObject)
464#endif
465
466#ifdef wx_motif
467IMPLEMENT_DYNAMIC_CLASS(wxXColormap, wxObject)
468IMPLEMENT_DYNAMIC_CLASS(wxXFont, wxObject)
469IMPLEMENT_DYNAMIC_CLASS(wxXCursor, wxObject)
470#endif
471IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
472IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
473IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
474IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
475IMPLEMENT_DYNAMIC_CLASS(wxIcon, wxBitmap)
476IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxBitmap)
477IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject)
478IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject)
479
480// This will presumably be implemented on other platforms too
481#ifdef wx_msw
482IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
483IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
484IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler)
485IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler)
486IMPLEMENT_DYNAMIC_CLASS(wxXPMDataHandler, wxBitmapHandler)
487IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxBitmapHandler)
488IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler)
489#endif
490
491#include "wx/statbox.h"
492IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
493
494#if USE_IPC
495#include "wx/dde.h"
496IMPLEMENT_ABSTRACT_CLASS(wxDDEObject, wxObject)
497IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxDDEObject)
498IMPLEMENT_DYNAMIC_CLASS(wxDDEClient, wxDDEObject)
499IMPLEMENT_CLASS(wxDDEConnection, wxObject)
500#endif
501
502IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
503
504#include "wx/listbox.h"
505IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
506
507IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
508
509#include "wx/menu.h"
510IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxWindow)
511IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
512IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow)
513
514#include "wx/stattext.h"
515#include "wx/statbmp.h"
516IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
517IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
518
519#if USE_METAFILE
520#include "wx/metafile.h"
521IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject)
522IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC)
523#endif
524
525#include "wx/radiobox.h"
526#include "wx/radiobut.h"
527IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
528
529IMPLEMENT_DYNAMIC_CLASS(wxRadioButton, wxControl)
530// IMPLEMENT_DYNAMIC_CLASS(wxBitmapRadioButton, wxRadioButton)
531
532#include "wx/scrolbar.h"
533IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl)
534
535#if WXWIN_COMPATIBILITY
536BEGIN_EVENT_TABLE(wxScrollBar, wxControl)
537 EVT_SCROLL(wxScrollBar::OnScroll)
538END_EVENT_TABLE()
539#endif
540
541#include "wx/slider.h"
542IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
543
544#if WXWIN_COMPATIBILITY
545BEGIN_EVENT_TABLE(wxSlider, wxControl)
546 EVT_SCROLL(wxSlider::OnScroll)
547END_EVENT_TABLE()
548#endif
549
550#include "wx/timer.h"
551IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject)
552
553#include "wx/textctrl.h"
554IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
555
556#include "wx/window.h"
557IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxEvtHandler)
558
559#include "wx/scrolwin.h"
560IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxWindow)
561
562#include "wx/panel.h"
563IMPLEMENT_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"
573IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog)
574#endif
575
576IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog)
577IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog)
578IMPLEMENT_CLASS(wxFileDialog, wxDialog)
579IMPLEMENT_CLASS(wxDirDialog, wxDialog)
580
581#ifdef wx_msw
582IMPLEMENT_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"
590IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
591#endif
592
593#include "wx/grid.h"
594IMPLEMENT_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
599const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
600
601const wxEventTable wxEvtHandler::sm_eventTable =
602 { NULL, &wxEvtHandler::sm_eventTableEntries[0] };
603
604const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0,
605#ifdef __SGI_CC__
606 0L
607#else
608 NULL
609#endif
610 }
611};
612
613BEGIN_EVENT_TABLE(wxFrame, wxWindow)
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)
619END_EVENT_TABLE()
620
621BEGIN_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)
628END_EVENT_TABLE()
629
630BEGIN_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)
637END_EVENT_TABLE()
638
639BEGIN_EVENT_TABLE(wxScrolledWindow, wxWindow)
640 EVT_SCROLL(wxScrolledWindow::OnScroll)
641 EVT_SIZE(wxScrolledWindow::OnSize)
642END_EVENT_TABLE()
643
644BEGIN_EVENT_TABLE(wxPanel, wxWindow)
645 EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged)
646END_EVENT_TABLE()
647
648BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
649 EVT_CHAR(wxTextCtrl::OnChar)
650 EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
651 EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
652END_EVENT_TABLE()
653
654#ifdef wx_msw
655BEGIN_EVENT_TABLE(wxMDIParentWindow, wxFrame)
656 EVT_SIZE(wxMDIParentWindow::OnSize)
657 EVT_ACTIVATE(wxMDIParentWindow::OnActivate)
658 EVT_SYS_COLOUR_CHANGED(wxMDIParentWindow::OnSysColourChanged)
659END_EVENT_TABLE()
660
661BEGIN_EVENT_TABLE(wxMDIClientWindow, wxWindow)
662 EVT_SCROLL(wxMDIClientWindow::OnScroll)
663END_EVENT_TABLE()
664#endif
665
666BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
667 EVT_SCROLL(wxToolBarBase::OnScroll)
668 EVT_SIZE(wxToolBarBase::OnSize)
669 EVT_IDLE(wxToolBarBase::OnIdle)
670END_EVENT_TABLE()
671
672BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase)
673 EVT_SIZE(wxToolBarSimple::OnSize)
674 EVT_PAINT(wxToolBarSimple::OnPaint)
675 EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus)
676 EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent)
677END_EVENT_TABLE()
678
679#ifdef wx_msw
680BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase)
681 EVT_SIZE(wxToolBarMSW::OnSize)
682 EVT_PAINT(wxToolBarMSW::OnPaint)
683 EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent)
684END_EVENT_TABLE()
685
686BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase)
687 EVT_SIZE(wxToolBar95::OnSize)
688 EVT_PAINT(wxToolBar95::OnPaint)
689 EVT_KILL_FOCUS(wxToolBar95::OnKillFocus)
690 EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent)
691 EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged)
692END_EVENT_TABLE()
693#endif
694
695BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel)
696 EVT_SIZE(wxGenericGrid::OnSize)
697 EVT_PAINT(wxGenericGrid::OnPaint)
698 EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent)
699 EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText)
700 EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll)
701 EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll)
702END_EVENT_TABLE()
703
704BEGIN_EVENT_TABLE(wxControl, wxWindow)
705 EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground)
706END_EVENT_TABLE()
707
708#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
709BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog)
710 EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes)
711 EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo)
712 EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel)
713END_EVENT_TABLE()
714
715BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
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)
722END_EVENT_TABLE()
723
724BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog)
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)
732END_EVENT_TABLE()
733
734BEGIN_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)
738END_EVENT_TABLE()
739
740#endif
741
742BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog)
743 EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK)
744END_EVENT_TABLE()
745
746BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
747 EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
748END_EVENT_TABLE()
749
750#include "wx/prntbase.h"
751
752BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog)
753 EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel)
754END_EVENT_TABLE()
755
756BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow)
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)
762END_EVENT_TABLE()
763
764#endif
765
766
767const wxSize wxDefaultSize(-1, -1);
768const wxPoint wxDefaultPosition(-1, -1);