From 8dba4c72300eafb6b35eaf754c379a72416bfbdd Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 20 Dec 2007 10:52:05 +0000 Subject: [PATCH] Corrected wxRTTI for wxNotebook so dynamic casting to wxBookCtrlBase works git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/notebook.mm | 2 +- src/generic/notebook.cpp | 4 ++-- src/gtk/notebook.cpp | 4 ++-- src/gtk1/notebook.cpp | 4 ++-- src/mac/carbon/notebmac.cpp | 4 ++-- src/msw/notebook.cpp | 8 ++++---- src/os2/notebook.cpp | 4 ++-- src/palmos/notebook.cpp | 6 +++--- src/univ/notebook.cpp | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/cocoa/notebook.mm b/src/cocoa/notebook.mm index 10e04d98e7..86bf26460a 100644 --- a/src/cocoa/notebook.mm +++ b/src/cocoa/notebook.mm @@ -134,7 +134,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) // ======================================================================== // wxNotebook // ======================================================================== -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) BEGIN_EVENT_TABLE(wxNotebook, wxNotebookBase) END_EVENT_TABLE() WX_IMPLEMENT_COCOA_OWNER(wxNotebook,NSTabView,NSView,NSView) diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index fd5c9f05ea..3b0b6d2382 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -52,7 +52,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) EVT_PAINT(wxNotebook::OnPaint) @@ -61,7 +61,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) // ============================================================================ diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 2c8241b149..c063436f1f 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -169,9 +169,9 @@ static void wxInsertChildInNotebook(wxWindow* parent, wxWindow* child) // wxNotebook //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxBookCtrlBase) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index b5d0a93d56..37fa1fd8e5 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -287,9 +287,9 @@ static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child ) // wxNotebook //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxBookCtrlBase) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 015d069aa5..301c141a6e 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -34,7 +34,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) @@ -42,7 +42,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 93b01f37f6..d1d01fb962 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -122,7 +122,7 @@ WX_DEFINE_LIST( wxNotebookPageInfoList ) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) @@ -175,7 +175,7 @@ wxBEGIN_FLAGS( wxNotebookStyle ) wxEND_FLAGS( wxNotebookStyle ) -IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxControl,"wx/notebook.h") +IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxBookCtrlBase,"wx/notebook.h") IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject , "wx/notebook.h" ) wxCOLLECTION_TYPE_INFO( wxNotebookPageInfo * , wxNotebookPageInfoList ) ; @@ -212,7 +212,7 @@ wxEND_HANDLERS_TABLE() wxCONSTRUCTOR_4( wxNotebookPageInfo , wxNotebookPage* , Page , wxString , Text , bool , Selected , int , ImageId ) #else -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxNotebookPageInfo, wxObject ) #endif IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) @@ -383,7 +383,7 @@ bool wxNotebook::Create(wxWindow *parent, wxUxThemeEngine::GetIfActive()->SetWindowTheme(GetHwnd(), L"", L""); // correct the background color for the new non-themed control - SetBackgroundColour(GetThemeBackgroundColour()); + SetBackgroundColour(GetThemeBackgroundColour()); } } #endif // wxUSE_UXTHEME diff --git a/src/os2/notebook.cpp b/src/os2/notebook.cpp index eaf16c77fa..b68b16028e 100644 --- a/src/os2/notebook.cpp +++ b/src/os2/notebook.cpp @@ -56,14 +56,14 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) EVT_SET_FOCUS(wxNotebook::OnSetFocus) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) // ============================================================================ diff --git a/src/palmos/notebook.cpp b/src/palmos/notebook.cpp index 2f73ee9e9d..bca31c6f86 100644 --- a/src/palmos/notebook.cpp +++ b/src/palmos/notebook.cpp @@ -41,7 +41,7 @@ WX_DEFINE_LIST( wxNotebookPageInfoList ) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) @@ -87,7 +87,7 @@ wxBEGIN_FLAGS( wxNotebookStyle ) wxEND_FLAGS( wxNotebookStyle ) -IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxControl,"wx/notebook.h") +IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxBookCtrlBase,"wx/notebook.h") IMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject , "wx/notebook.h" ) wxCOLLECTION_TYPE_INFO( wxNotebookPageInfo * , wxNotebookPageInfoList ) ; @@ -124,7 +124,7 @@ wxEND_HANDLERS_TABLE() wxCONSTRUCTOR_4( wxNotebookPageInfo , wxNotebookPage* , Page , wxString , Text , bool , Selected , int , ImageId ) #else -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxNotebookPageInfo, wxObject ) #endif IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 392f13c4aa..a1c7d867f2 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -114,7 +114,7 @@ END_EVENT_TABLE() // implementation // ============================================================================ -IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) // ---------------------------------------------------------------------------- -- 2.45.2