]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/notebook.cpp
Replaced SOCKLEN_T by WX_SOCKLEN_T to resolve conflict with AIX system headers.
[wxWidgets.git] / src / generic / notebook.cpp
index e4cbc77c80b8a0ae4cf75f80521657cd53f40a5e..ec05ba70b4f967934ca7f60f86bcf3e5c9657ec2 100644 (file)
@@ -16,6 +16,7 @@
 // ----------------------------------------------------------------------------
 // headers
 // ----------------------------------------------------------------------------
+
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "notebook.h"
 #endif
@@ -31,6 +32,8 @@
 #pragma hdrstop
 #endif
 
+#ifndef __WXPALMOS__
+
 #include  "wx/string.h"
 #include  "wx/log.h"
 #include  "wx/settings.h"
@@ -301,7 +304,7 @@ bool wxNotebook::RemovePage(size_t nPage)
 // remove one page from the notebook
 wxWindow* wxNotebook::DoRemovePage(size_t nPage)
 {
-    wxCHECK( IS_VALID_PAGE(nPage), false );
+    wxCHECK( IS_VALID_PAGE(nPage), NULL );
 
     m_pages[nPage]->Show(false);
     //    m_pages[nPage]->Lower();
@@ -619,6 +622,17 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event) )
         m_tabView->Draw(dc);
 }
 
+wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
+{
+    // MBN: since the total tab height is really a function of the
+    // width, this should really call
+    // GetTotalTabHeightPretendingWidthIs(), but the current
+    // implementation will suffice, provided the wxNotebook has been
+    // created with a sensible initial width.
+    return wxSize( sizePage.x + 12,
+                   sizePage.y + m_tabView->GetTotalTabHeight() + 6 + 4 );
+}
+
 wxRect wxNotebook::GetAvailableClientSize()
 {
     int cw, ch;
@@ -705,3 +719,4 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
   return retval;
 }
 
+#endif // __WXPALMOS__