]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/nbkbase.cpp
Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash.
[wxWidgets.git] / src / common / nbkbase.cpp
index f191f9adfdb2753828594759b9740295226361e5..3ee7af5f603b945edd0651f24979e79f2a72fbc7 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     02.07.01
-// RCS-ID:      $Id$
 // Copyright:   (c) 2001 Vadim Zeitlin
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 extern WXDLLEXPORT_DATA(const char) wxNotebookNameStr[] = "notebook";
 
-wxDEFINE_EVENT( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent );
-wxDEFINE_EVENT( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent );
-
-#if wxUSE_EXTENDED_RTTI    
+wxDEFINE_EVENT( wxEVT_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent );
+wxDEFINE_EVENT( wxEVT_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent );
 
 // ----------------------------------------------------------------------------
 // XTI
 // ----------------------------------------------------------------------------
 
 #include "wx/listimpl.cpp"
-WX_DEFINE_LIST( wxNotebookPageInfoList )
-
 wxDEFINE_FLAGS( wxNotebookStyle )
 wxBEGIN_FLAGS( wxNotebookStyle )
 // new style border flags, we put them first to
@@ -88,7 +83,10 @@ wxFLAGS_MEMBER(wxNB_NOPAGETHEME)
 wxFLAGS_MEMBER(wxNB_FLAT)
 wxEND_FLAGS( wxNotebookStyle )
 
-wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxControl, "wx/notebook.h")
+#if wxUSE_EXTENDED_RTTI
+
+WX_DEFINE_LIST( wxNotebookPageInfoList )
+
 wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebookPageInfo, wxObject, "wx/notebook.h" )
 
 wxCOLLECTION_TYPE_INFO( wxNotebookPageInfo *, wxNotebookPageInfoList );
@@ -99,23 +97,6 @@ template<> void wxCollectionToVariantArray( wxNotebookPageInfoList const &theLis
     wxListCollectionToAnyList<wxNotebookPageInfoList::compatibility_iterator>( theList, value );
 }
 
-wxBEGIN_PROPERTIES_TABLE(wxNotebook)
-wxEVENT_PROPERTY( PageChanging, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxNotebookEvent )
-wxEVENT_PROPERTY( PageChanged, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEvent )
-
-wxPROPERTY_COLLECTION( PageInfos, wxNotebookPageInfoList, wxNotebookPageInfo*, \
-                      AddPageInfo, GetPageInfos, 0 /*flags*/, wxT("Helpstring"), \
-                      wxT("group"))
-wxPROPERTY_FLAGS( WindowStyle, wxNotebookStyle, long, SetWindowStyleFlag, \
-                 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
-                 wxT("Helpstring"), wxT("group")) // style
-wxEND_PROPERTIES_TABLE()
-
-wxEMPTY_HANDLERS_TABLE(wxNotebook)
-
-wxCONSTRUCTOR_5( wxNotebook, wxWindow*, Parent, wxWindowID, Id, \
-                wxPoint, Position, wxSize, Size, long, WindowStyle)
-
 wxBEGIN_PROPERTIES_TABLE(wxNotebookPageInfo)
 wxREADONLY_PROPERTY( Page, wxNotebookPage*, GetPage, wxEMPTY_PARAMETER_VALUE, \
                     0 /*flags*/, wxT("Helpstring"), wxT("group"))
@@ -132,12 +113,12 @@ wxEMPTY_HANDLERS_TABLE(wxNotebookPageInfo)
 wxCONSTRUCTOR_4( wxNotebookPageInfo, wxNotebookPage*, Page, \
                 wxString, Text, bool, Selected, int, ImageId )
 
-WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl<wxNotebookPageInfo**>)
+// WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl<wxNotebookPageInfo**>)
 // XTI accessors:
 
 void wxNotebookBase::AddPageInfo( wxNotebookPageInfo* info )
 {
-    AddPage( info->GetPage(), info->GetText(), info->GetSelected(), info->GetImageId() ); 
+    AddPage( info->GetPage(), info->GetText(), info->GetSelected(), info->GetImageId() );
 }
 
 const wxNotebookPageInfoList& wxNotebookBase::GetPageInfos() const
@@ -156,6 +137,24 @@ const wxNotebookPageInfoList& wxNotebookBase::GetPageInfos() const
 
 #endif
 
+wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxNotebook, wxBookCtrlBase, "wx/notebook.h")
+wxBEGIN_PROPERTIES_TABLE(wxNotebook)
+wxEVENT_PROPERTY( PageChanging, wxEVT_NOTEBOOK_PAGE_CHANGING, wxNotebookEvent )
+wxEVENT_PROPERTY( PageChanged, wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEvent )
+
+wxPROPERTY_COLLECTION( PageInfos, wxNotebookPageInfoList, wxNotebookPageInfo*, \
+                      AddPageInfo, GetPageInfos, 0 /*flags*/, wxT("Helpstring"), \
+                      wxT("group"))
+wxPROPERTY_FLAGS( WindowStyle, wxNotebookStyle, long, SetWindowStyleFlag, \
+                 GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, 0 /*flags*/, \
+                 wxT("Helpstring"), wxT("group")) // style
+wxEND_PROPERTIES_TABLE()
+
+wxEMPTY_HANDLERS_TABLE(wxNotebook)
+
+wxCONSTRUCTOR_5( wxNotebook, wxWindow*, Parent, wxWindowID, Id, \
+                wxPoint, Position, wxSize, Size, long, WindowStyle)
+
 // ----------------------------------------------------------------------------
 // geometry
 // ----------------------------------------------------------------------------
@@ -186,7 +185,7 @@ wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage) const
 
 bool wxNotebookBase::SendPageChangingEvent(int nPage)
 {
-    wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, GetId());
+    wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGING, GetId());
     event.SetSelection(nPage);
     event.SetOldSelection(GetSelection());
     event.SetEventObject(this);
@@ -195,7 +194,7 @@ bool wxNotebookBase::SendPageChangingEvent(int nPage)
 
 void wxNotebookBase::SendPageChangedEvent(int nPageOld, int nPageNew)
 {
-    wxBookCtrlEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, GetId());
+    wxBookCtrlEvent event(wxEVT_NOTEBOOK_PAGE_CHANGED, GetId());
     event.SetSelection(nPageNew == -1 ? GetSelection() : nPageNew);
     event.SetOldSelection(nPageOld);
     event.SetEventObject(this);