]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/data.cpp
* Fixed a memory leak in wxThread
[wxWidgets.git] / src / gtk1 / data.cpp
index 88bab2cde4aed5ce50fa296c433d5ef384a14536..3d9ae3d037f795d083f4656182c2139c282e8a5b 100644 (file)
@@ -2,10 +2,9 @@
 // Name:        data.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Created:     01/02/97
-// Id:
-// Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
-// Licence:    wxWindows licence
+// Id:          $Id$
+// Copyright:   (c) 1998 Robert Roebling
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 
 // #pragma implementation
 #endif
 
-#include "wx/wx.h"
+#include "wx/defs.h"
+#include "wx/object.h"
+#include "wx/window.h"
+#include "wx/dc.h"
+#include "wx/accel.h"
+#include "wx/postscrp.h"
 
 #define _MAXPATHLEN 500
 
 #include <X11/Xutil.h>
 #include <X11/Xresource.h>
 
-wxList wxResourceCache(wxKEY_STRING);
+wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL;
 XrmDatabase wxResourceDatabase;
 
 // Useful buffer, initialized in wxCommonInit
-char *wxBuffer = NULL;
+char *wxBuffer = (char *) NULL;
 
 // Windows List
 wxList wxTopLevelWindows;
@@ -37,7 +41,7 @@ wxList wxPendingDelete;
 
 // Current cursor, in order to hang on to
 // cursor handle when setting the cursor globally
-wxCursor *g_globalCursor = NULL;
+wxCursor *g_globalCursor = (wxCursor *) NULL;
 
 // Don't allow event propagation during drag
 bool g_blockEventsOnDrag = FALSE;
@@ -49,22 +53,22 @@ char **wx_msg_str = (char**)NULL;
 // Currently this can be Win95, Windows, Win32s, WinNT.
 // For some systems, you can't tell until run-time what services you
 // have. See wxGetOsVersion, which uses this string if present.
-char *wxOsVersion = NULL;
+char *wxOsVersion = (char *) NULL;
 
 // For printing several pages
 int wxPageNumber;
-wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
+wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
 
 // GDI Object Lists
-wxBrushList      *wxTheBrushList = NULL;
-wxPenList        *wxThePenList = NULL;
-wxFontList       *wxTheFontList = NULL;
-wxColourDatabase *wxTheColourDatabase = NULL;
-wxBitmapList   *wxTheBitmapList = NULL;
+wxBrushList      *wxTheBrushList = (wxBrushList *) NULL;
+wxPenList        *wxThePenList = (wxPenList *) NULL;
+wxFontList       *wxTheFontList = (wxFontList *) NULL;
+wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
+wxBitmapList   *wxTheBitmapList = (wxBitmapList *) NULL;
   
 
 // X only font names
-wxFontNameDirectory wxTheFontNameDirectory;
+wxFontNameDirectory *wxTheFontNameDirectory;
 
 // Stock objects
 wxFont *wxNORMAL_FONT;
@@ -103,19 +107,20 @@ wxColour *wxGREEN;
 wxColour *wxCYAN;
 wxColour *wxLIGHT_GREY;
 
-wxCursor *wxSTANDARD_CURSOR = NULL;
-wxCursor *wxHOURGLASS_CURSOR = NULL;
-wxCursor *wxCROSS_CURSOR = NULL;
+wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
+wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
+wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
 
 // 'Null' objects
-wxBitmap wxNullBitmap;
-wxIcon   wxNullIcon;  
-wxCursor wxNullCursor;
-wxPen    wxNullPen;
-wxBrush  wxNullBrush;
-wxFont   wxNullFont;
-wxColour wxNullColour;
-wxPalette wxNullPalette; 
+wxAcceleratorTable   wxNullAcceleratorTable;
+wxBitmap   wxNullBitmap;
+wxIcon     wxNullIcon;  
+wxCursor   wxNullCursor;
+wxPen      wxNullPen;
+wxBrush    wxNullBrush;
+wxFont     wxNullFont;
+wxColour   wxNullColour;
+wxPalette  wxNullPalette; 
 
 // Default window names
 const char *wxButtonNameStr = "button";
@@ -162,7 +167,7 @@ const char *wxUserResourceStr = "TEXT";
 #endif
 
 
-#if USE_SHARED_LIBRARY
+#if wxUSE_SHARED_LIBRARY
 /*
  * For wxWindows to be made into a dynamic library (e.g. Sun),
  * all IMPLEMENT_... macros must be in one place.
@@ -170,8 +175,9 @@ const char *wxUserResourceStr = "TEXT";
  */
 
 // Hand-coded IMPLEMENT... macro for wxObject (define static data)
-wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL);
-wxClassInfo *wxClassInfo::first = NULL;
+wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
+wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL;
+wxHashTable wxClassInfo::classTable(wxKEY_STRING);
 
 #include "wx/button.h"
 #include "wx/bmpbuttn.h"
@@ -185,13 +191,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
 #include "wx/choice.h"
 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
 
-#if USE_CLIPBOARD
+#if wxUSE_CLIPBOARD
 #include "wx/clipbrd.h"
 IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxClipboardClient, wxObject)
 #endif
 
-#if USE_COMBOBOX
+#if wxUSE_COMBOBOX
 #include "wx/combobox.h"
 IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
 #endif
@@ -231,7 +237,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPrintData, wxObject)
 #include "wx/colordlg.h"
 #include "wx/fontdlg.h"
 
-#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
+#if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
 #include "wx/generic/colordlg.h"
 #include "wx/generic/fontdlg.h"
 IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog)
@@ -259,12 +265,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList)
 IMPLEMENT_DYNAMIC_CLASS(wxBrushList, wxList)
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList, wxList)
 
+/*
 #if (!USE_TYPEDEFS)
 IMPLEMENT_DYNAMIC_CLASS(wxPoint, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxIntPoint, wxObject)
 #endif
+*/
 
-#if defined(wx_x) || (defined(wx_msw) && USE_PORTABLE_FONTS_IN_MSW)
+#if defined(wx_x) || (defined(wx_msw) && wxUSE_PORTABLE_FONTS_IN_MSW)
 IMPLEMENT_DYNAMIC_CLASS(wxFontNameDirectory, wxObject)
 #endif
 
@@ -280,7 +288,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNode, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxList)
 
-#if USE_PRINTING_ARCHITECTURE
+#if wxUSE_PRINTING_ARCHITECTURE
 #include "wx/print.h"
 IMPLEMENT_DYNAMIC_CLASS(wxPrintDialog, wxDialog)
 IMPLEMENT_DYNAMIC_CLASS(wxPrinterBase, wxObject)
@@ -297,7 +305,7 @@ IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
 IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
 #endif
 
-#if USE_POSTSCRIPT
+#if wxUSE_POSTSCRIPT
 #include "wx/postscrp.h"
 IMPLEMENT_DYNAMIC_CLASS(wxPostScriptDC, wxDC)
 IMPLEMENT_DYNAMIC_CLASS(wxPrintSetupData, wxObject)
@@ -306,7 +314,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperType, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxPrintPaperDatabase, wxList)
 #endif
 
-#if USE_WX_RESOURCES
+#if wxUSE_WX_RESOURCES
 #include "wx/resource.h"
 IMPLEMENT_DYNAMIC_CLASS(wxItemResource, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable)
@@ -338,17 +346,17 @@ IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)
 #include "wx/utils.h"
 IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxList)
 
-IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
+// IMPLEMENT_DYNAMIC_CLASS(wxRect, wxObject)
 
 #include "wx/process.h"
 IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
 
-#if USE_TIMEDATE
+#if wxUSE_TIMEDATE
 #include "wx/date.h"
 IMPLEMENT_DYNAMIC_CLASS(wxDate, wxObject)
 #endif
 
-#if USE_DOC_VIEW_ARCHITECTURE
+#if wxUSE_DOC_VIEW_ARCHITECTURE
 #include "wx/docview.h"
 //IMPLEMENT_ABSTRACT_CLASS(wxDocItem, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxDocument, wxEvtHandler)
@@ -357,7 +365,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxDocTemplate, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxDocManager, wxEvtHandler)
 IMPLEMENT_CLASS(wxDocChildFrame, wxFrame)
 IMPLEMENT_CLASS(wxDocParentFrame, wxFrame)
-#if USE_PRINTING_ARCHITECTURE
+#if wxUSE_PRINTING_ARCHITECTURE
 IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout)
 #endif
 IMPLEMENT_CLASS(wxCommand, wxObject)
@@ -365,7 +373,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCommandProcessor, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
 #endif
 
-#if USE_CONSTRAINTS
+#if wxUSE_CONSTRAINTS
 #include "wx/layout.h"
 IMPLEMENT_DYNAMIC_CLASS(wxIndividualLayoutConstraint, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxLayoutConstraints, wxObject)
@@ -373,7 +381,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSizer, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxRowColSizer, wxSizer)
 #endif
 
-#if USE_TOOLBAR
+#if wxUSE_TOOLBAR
 #include "wx/tbarbase.h"
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarTool, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarBase, wxControl)
@@ -391,16 +399,60 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar95, wxToolBarBase)
 
 #endif
 
+#include "wx/sckaddr.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxIPV4address, wxSockAddress)
+#ifdef ENABLE_IPV6
+IMPLEMENT_DYNAMIC_CLASS(wxIPV6address, wxSockAddress)
+#endif
+#ifndef __UNIX__
+IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress)
+#endif
+
+#include "wx/socket.h"
+
+IMPLEMENT_CLASS(wxSocketBase, wxEvtHandler)
+IMPLEMENT_CLASS(wxSocketClient, wxSocketBase)
+IMPLEMENT_CLASS(wxSocketServer, wxSocketBase)
+IMPLEMENT_CLASS(wxSocketHandler, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxSocketEvent, wxEvent)
+
+#include "wx/url.h"
+
+IMPLEMENT_CLASS(wxProtoInfo, wxObject)
+IMPLEMENT_CLASS(wxURL, wxObject)
+
+#include "wx/protocol/http.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
+IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE)
+
+#include "wx/protocol/ftp.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol)
+IMPLEMENT_PROTOCOL(wxFTP, "ftp", "21", TRUE)
+
+#include "wx/protocol/sckfile.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
+IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE)
+
+#include "wx/sckipc.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxTCPServer, wxServerBase)
+IMPLEMENT_DYNAMIC_CLASS(wxTCPClient, wxClientBase)
+IMPLEMENT_DYNAMIC_CLASS(wxTCPConnection, wxConnectionBase)
+
 #include "wx/statusbr.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow)
 
 BEGIN_EVENT_TABLE(wxStatusBar, wxWindow)
-       EVT_PAINT(wxStatusBar::OnPaint)
+  EVT_PAINT(wxStatusBar::OnPaint)
     EVT_SYS_COLOUR_CHANGED(wxStatusBar::OnSysColourChanged)
 END_EVENT_TABLE()
 
-#if USE_TIMEDATE
+#if wxUSE_TIMEDATE
 #include "wx/time.h"
 IMPLEMENT_DYNAMIC_CLASS(wxTime, wxObject)
 #endif
@@ -438,7 +490,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxBitmapHandler)
 #include "wx/statbox.h"
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
 
-#if USE_IPC
+#if wxUSE_IPC
 #include "wx/dde.h"
 IMPLEMENT_ABSTRACT_CLASS(wxDDEObject, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxDDEServer, wxDDEObject)
@@ -463,7 +515,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxWindow)
 IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
 
-#if USE_METAFILE
+#if wxUSE_METAFILE
 #include "wx/metafile.h"
 IMPLEMENT_DYNAMIC_CLASS(wxMetaFile, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxMetaFileDC, wxDC)
@@ -515,7 +567,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPanel, wxWindow)
 #include "wx/dirdlg.h"
 #include "wx/choicdlg.h"
 
-#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
+#if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
 #include "wx/generic/msgdlgg.h"
 IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog)
 #endif
@@ -529,7 +581,7 @@ IMPLEMENT_CLASS(wxDirDialog, wxDialog)
 IMPLEMENT_CLASS(wxMessageDialog)
 #endif
 
-#if USE_GAUGE
+#if wxUSE_GAUGE
 #ifdef wx_motif
 #include "../../contrib/xmgauge/gauge.h"
 #endif
@@ -546,17 +598,23 @@ IMPLEMENT_DYNAMIC_CLASS(wxGenericGrid, wxPanel)
 const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
 
 const wxEventTable wxEvtHandler::sm_eventTable =
-       { NULL, &wxEvtHandler::sm_eventTableEntries[0] };
+  { NULL, &wxEvtHandler::sm_eventTableEntries[0] };
 
-const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } };
+const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, 
+#ifdef __SGI_CC__
+       0L
+#else
+       NULL 
+#endif
+       } 
+};
 
 BEGIN_EVENT_TABLE(wxFrame, wxWindow)
-       EVT_ACTIVATE(wxFrame::OnActivate)
-       EVT_SIZE(wxFrame::OnSize)
-       EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
-    EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
-    EVT_IDLE(wxFrame::OnIdle)
-    EVT_CLOSE(wxFrame::OnCloseWindow)
+  EVT_SIZE(wxFrame::OnSize)
+  EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
+  EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged)
+  EVT_IDLE(wxFrame::OnIdle)
+  EVT_CLOSE(wxFrame::OnCloseWindow)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxDialog, wxPanel)
@@ -587,9 +645,9 @@ BEGIN_EVENT_TABLE(wxPanel, wxWindow)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
-       EVT_CHAR(wxTextCtrl::OnChar)
-       EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
-       EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
+  EVT_CHAR(wxTextCtrl::OnChar)
+  EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
+  EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
 END_EVENT_TABLE()
 
 #ifdef wx_msw
@@ -611,32 +669,32 @@ BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase)
-       EVT_SIZE(wxToolBarSimple::OnSize)
-       EVT_PAINT(wxToolBarSimple::OnPaint)
-       EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus)
-       EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent)
+  EVT_SIZE(wxToolBarSimple::OnSize)
+  EVT_PAINT(wxToolBarSimple::OnPaint)
+  EVT_KILL_FOCUS(wxToolBarSimple::OnKillFocus)
+  EVT_MOUSE_EVENTS(wxToolBarSimple::OnMouseEvent)
 END_EVENT_TABLE()
 
 #ifdef wx_msw
 BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase)
-       EVT_SIZE(wxToolBarMSW::OnSize)
-       EVT_PAINT(wxToolBarMSW::OnPaint)
-       EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent)
+  EVT_SIZE(wxToolBarMSW::OnSize)
+  EVT_PAINT(wxToolBarMSW::OnPaint)
+  EVT_MOUSE_EVENTS(wxToolBarMSW::OnMouseEvent)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxToolBar95, wxToolBarBase)
-       EVT_SIZE(wxToolBar95::OnSize)
-       EVT_PAINT(wxToolBar95::OnPaint)
-       EVT_KILL_FOCUS(wxToolBar95::OnKillFocus)
-       EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent)
+  EVT_SIZE(wxToolBar95::OnSize)
+  EVT_PAINT(wxToolBar95::OnPaint)
+  EVT_KILL_FOCUS(wxToolBar95::OnKillFocus)
+  EVT_MOUSE_EVENTS(wxToolBar95::OnMouseEvent)
     EVT_SYS_COLOUR_CHANGED(wxToolBar95::OnSysColourChanged)
 END_EVENT_TABLE()
 #endif
 
 BEGIN_EVENT_TABLE(wxGenericGrid, wxPanel)
-       EVT_SIZE(wxGenericGrid::OnSize)
-       EVT_PAINT(wxGenericGrid::OnPaint)
-       EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent)
+  EVT_SIZE(wxGenericGrid::OnSize)
+  EVT_PAINT(wxGenericGrid::OnPaint)
+  EVT_MOUSE_EVENTS(wxGenericGrid::OnMouseEvent)
     EVT_TEXT(wxGRID_TEXT_CTRL, wxGenericGrid::OnText)
     EVT_COMMAND_SCROLL(wxGRID_HSCROLL, wxGenericGrid::OnGridScroll)
     EVT_COMMAND_SCROLL(wxGRID_VSCROLL, wxGenericGrid::OnGridScroll)
@@ -646,30 +704,30 @@ BEGIN_EVENT_TABLE(wxControl, wxWindow)
   EVT_ERASE_BACKGROUND(wxControl::OnEraseBackground)
 END_EVENT_TABLE()
 
-#if !defined(wx_msw) || USE_GENERIC_DIALOGS_IN_MSW
+#if !defined(wx_msw) || wxUSE_GENERIC_DIALOGS_IN_MSW
 BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog)
-       EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes)
-       EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo)
-       EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel)
+  EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes)
+  EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo)
+  EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
-       EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom)
-       EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider)
-       EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider)
-       EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider)
-       EVT_PAINT(wxGenericColourDialog::OnPaint)
-       EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent)
+  EVT_BUTTON(wxID_ADD_CUSTOM, wxGenericColourDialog::OnAddCustom)
+  EVT_SLIDER(wxID_RED_SLIDER, wxGenericColourDialog::OnRedSlider)
+  EVT_SLIDER(wxID_GREEN_SLIDER, wxGenericColourDialog::OnGreenSlider)
+  EVT_SLIDER(wxID_BLUE_SLIDER, wxGenericColourDialog::OnBlueSlider)
+  EVT_PAINT(wxGenericColourDialog::OnPaint)
+  EVT_MOUSE_EVENTS(wxGenericColourDialog::OnMouseEvent)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxGenericFontDialog, wxDialog)
-       EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont)
-       EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont)
-       EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont)
-       EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont)
-       EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont)
-       EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont)
-       EVT_PAINT(wxGenericFontDialog::OnPaint)
+  EVT_CHECKBOX(wxID_FONT_UNDERLINE, wxGenericFontDialog::OnChangeFont)
+  EVT_CHOICE(wxID_FONT_STYLE, wxGenericFontDialog::OnChangeFont)
+  EVT_CHOICE(wxID_FONT_WEIGHT, wxGenericFontDialog::OnChangeFont)
+  EVT_CHOICE(wxID_FONT_FAMILY, wxGenericFontDialog::OnChangeFont)
+  EVT_CHOICE(wxID_FONT_COLOUR, wxGenericFontDialog::OnChangeFont)
+  EVT_CHOICE(wxID_FONT_SIZE, wxGenericFontDialog::OnChangeFont)
+  EVT_PAINT(wxGenericFontDialog::OnPaint)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog)
@@ -681,25 +739,25 @@ END_EVENT_TABLE()
 #endif
 
 BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog)
-       EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK)
+  EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
-       EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
+  EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
 END_EVENT_TABLE()
 
 #include "wx/prntbase.h"
 
 BEGIN_EVENT_TABLE(wxPrintAbortDialog, wxDialog)
-       EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel)
+  EVT_BUTTON(wxID_CANCEL, wxPrintAbortDialog::OnCancel)
 END_EVENT_TABLE()
 
 BEGIN_EVENT_TABLE(wxPreviewControlBar, wxWindow)
-       EVT_BUTTON(wxID_PREVIEW_CLOSE,          wxPreviewControlBar::OnClose)
-       EVT_BUTTON(wxID_PREVIEW_PRINT,          wxPreviewControlBar::OnPrint)
-       EVT_BUTTON(wxID_PREVIEW_PREVIOUS,       wxPreviewControlBar::OnPrevious)
-       EVT_BUTTON(wxID_PREVIEW_NEXT,           wxPreviewControlBar::OnNext)
-       EVT_CHOICE(wxID_PREVIEW_ZOOM,           wxPreviewControlBar::OnZoom)
+  EVT_BUTTON(wxID_PREVIEW_CLOSE,     wxPreviewControlBar::OnClose)
+  EVT_BUTTON(wxID_PREVIEW_PRINT,     wxPreviewControlBar::OnPrint)
+  EVT_BUTTON(wxID_PREVIEW_PREVIOUS,   wxPreviewControlBar::OnPrevious)
+  EVT_BUTTON(wxID_PREVIEW_NEXT,     wxPreviewControlBar::OnNext)
+  EVT_CHOICE(wxID_PREVIEW_ZOOM,     wxPreviewControlBar::OnZoom)
 END_EVENT_TABLE()
 
 #endif