X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ffecfa5aeb540b54914739dbb8603edbbd4c00a0..18fa735d20b4c66db72b51d60b82a2b3f2cda763:/src/generic/notebook.cpp?ds=inline diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index 19b7b08a51..6e118b09aa 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -17,12 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#ifndef __PALMOS__ - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "notebook.h" -#endif - #ifdef __VMS #pragma message disable unscomzer #endif @@ -34,6 +28,8 @@ #pragma hdrstop #endif +#ifndef __WXPALMOS__ + #include "wx/string.h" #include "wx/log.h" #include "wx/settings.h" @@ -47,7 +43,7 @@ // ---------------------------------------------------------------------------- // check that the page index is valid -#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) +#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) // ---------------------------------------------------------------------------- // event table @@ -304,7 +300,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(); @@ -622,6 +618,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; @@ -708,4 +715,4 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId) return retval; } -#endif // __PALMOS__ +#endif // __WXPALMOS__