From 9d11268884fd82cfe72673566e403a40105ce703 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 2 Jul 2006 07:41:02 +0000 Subject: [PATCH] Added wxTextCtrlBase to type info, useful if different text control implementations are available git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/textctrl.h | 1 + src/cocoa/textctrl.mm | 4 ++-- src/common/textcmn.cpp | 2 ++ src/gtk/textctrl.cpp | 4 ++-- src/gtk1/textctrl.cpp | 4 ++-- src/mac/carbon/textctrl.cpp | 4 ++-- src/mac/classic/textctrl.cpp | 4 ++-- src/motif/textctrl.cpp | 4 ++-- src/msw/textctrl.cpp | 4 ++-- src/os2/textctrl.cpp | 4 ++-- src/palmos/textctrl.cpp | 4 ++-- src/univ/textctrl.cpp | 4 ++-- src/x11/textctrl.cpp | 4 ++-- 13 files changed, 25 insertions(+), 22 deletions(-) diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index 4afe415c68..65e6b90d54 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -431,6 +431,7 @@ protected: wxTextAttr m_defaultStyle; DECLARE_NO_COPY_CLASS(wxTextCtrlBase) + DECLARE_ABSTRACT_CLASS(wxTextCtrlBase) }; // ---------------------------------------------------------------------------- diff --git a/src/cocoa/textctrl.mm b/src/cocoa/textctrl.mm index 1551fdb4de..ba2bc6060d 100644 --- a/src/cocoa/textctrl.mm +++ b/src/cocoa/textctrl.mm @@ -28,8 +28,8 @@ #include -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) END_EVENT_TABLE() WX_IMPLEMENT_COCOA_OWNER(wxTextCtrl,NSTextField,NSControl,NSView) diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index f6d3bcb676..9da659d9fb 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -54,6 +54,8 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER) DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_URL) DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_MAXLEN) +IMPLEMENT_ABSTRACT_CLASS(wxTextCtrlBase, wxControl) + // ---------------------------------------------------------------------------- // style functions - not implemented here // ---------------------------------------------------------------------------- diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 5acaf96daf..f84409ea46 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -521,9 +521,9 @@ gtk_text_exposed_callback( GtkWidget *widget, GdkEventExpose *event, wxTextCtrl // wxTextCtrl //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index d09ad26829..ca95f24fff 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -187,9 +187,9 @@ static void wxgtk_text_draw( GtkWidget *widget, GdkRectangle *rect) // wxTextCtrl //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index 7e06fb7eda..24f9fdf83e 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -414,9 +414,9 @@ private : }; -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_ERASE_BACKGROUND( wxTextCtrl::OnEraseBackground ) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) EVT_CHAR(wxTextCtrl::OnChar) diff --git a/src/mac/classic/textctrl.cpp b/src/mac/classic/textctrl.cpp index b43752efb9..cae116ab43 100644 --- a/src/mac/classic/textctrl.cpp +++ b/src/mac/classic/textctrl.cpp @@ -640,9 +640,9 @@ OSStatus mUPOpenControl(ControlHandle theControl, long wxStyle ) -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) EVT_CHAR(wxTextCtrl::OnChar) EVT_MENU(wxID_CUT, wxTextCtrl::OnCut) diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 0abcaf8a70..a74fc61d97 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -63,9 +63,9 @@ static void wxTextWindowGainFocusProc(Widget w, XtPointer clientData, XmAnyCallb static void wxTextWindowLoseFocusProc(Widget w, XtPointer clientData, XmAnyCallbackStruct *cbs); static void wxTextWindowActivateProc(Widget w, XtPointer clientData, XmAnyCallbackStruct *ptr); - IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) + IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) - BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) + BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) EVT_CHAR(wxTextCtrl::OnChar) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index d893afe8d5..1b08d80b6d 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -227,11 +227,11 @@ wxEND_HANDLERS_TABLE() wxCONSTRUCTOR_6( wxTextCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size , long , WindowStyle) #else -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) #endif -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index c98efebc7d..0645fb3ed2 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -55,9 +55,9 @@ // event tables and other macros // ---------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) diff --git a/src/palmos/textctrl.cpp b/src/palmos/textctrl.cpp index 980b03f8c2..2710ee6fb4 100644 --- a/src/palmos/textctrl.cpp +++ b/src/palmos/textctrl.cpp @@ -156,11 +156,11 @@ wxEND_HANDLERS_TABLE() wxCONSTRUCTOR_6( wxTextCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , Value , wxPoint , Position , wxSize , Size , long , WindowStyle) #else -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) #endif -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_DROP_FILES(wxTextCtrl::OnDropFiles) diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index c3fabe9a5a..8de05acfcd 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -606,13 +606,13 @@ private: // implementation // ============================================================================ -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_CHAR(wxTextCtrl::OnChar) EVT_SIZE(wxTextCtrl::OnSize) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) // ---------------------------------------------------------------------------- // creation diff --git a/src/x11/textctrl.cpp b/src/x11/textctrl.cpp index dcce680aa2..fdb7008a89 100644 --- a/src/x11/textctrl.cpp +++ b/src/x11/textctrl.cpp @@ -131,9 +131,9 @@ WX_DEFINE_OBJARRAY(wxSourceLineArray); // wxTextCtrl //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl,wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxTextCtrlBase) -BEGIN_EVENT_TABLE(wxTextCtrl, wxControl) +BEGIN_EVENT_TABLE(wxTextCtrl, wxTextCtrlBase) EVT_PAINT(wxTextCtrl::OnPaint) EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground) EVT_CHAR(wxTextCtrl::OnChar) -- 2.45.2