X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90b959aee428b26304ee0056864af48775051496..491b5be8305968871bc289453ed088a70c3de044:/src/mac/notebmac.cpp?ds=sidebyside diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index 6e94d28049..496c75fe5b 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- #ifdef __GNUG__ -#pragma implementation "notebook.h" + #pragma implementation "notebook.h" #endif #include @@ -134,19 +134,23 @@ wxNotebook::~wxNotebook() void wxNotebook::SetPadding(const wxSize& padding) { + wxFAIL_MSG( wxT("wxNotebook::SetPadding not implemented") ); } void wxNotebook::SetTabSize(const wxSize& sz) { + wxFAIL_MSG( wxT("wxNotebook::SetTabSize not implemented") ); } void wxNotebook::SetPageSize(const wxSize& size) { + wxFAIL_MSG( wxT("wxNotebook::SetPageSize not implemented") ); } int wxNotebook::SetSelection(int nPage) { - wxASSERT( IS_VALID_PAGE(nPage) ); + if( !IS_VALID_PAGE(nPage) ) + return m_nSelection ; ChangePage(m_nSelection, nPage); SetControlValue( m_macControl , m_nSelection + 1 ) ; @@ -175,17 +179,18 @@ wxString wxNotebook::GetPageText(int nPage) const int wxNotebook::GetPageImage(int nPage) const { - wxASSERT( IS_VALID_PAGE(nPage) ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") ); - // TODO - return 0; + return 0 ; } bool wxNotebook::SetPageImage(int nPage, int nImage) { - wxASSERT( IS_VALID_PAGE(nPage) ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") ); + + wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), FALSE, + _T("invalid image index in SetPageImage()") ); - // TODO return FALSE; } @@ -198,7 +203,7 @@ wxNotebookPage* wxNotebook::DoRemovePage(int nPage) { wxCHECK( IS_VALID_PAGE(nPage), NULL ); wxNotebookPage* page = m_pages[nPage] ; - m_pages.Remove(nPage); + m_pages.RemoveAt(nPage); MacSetupTabs(); @@ -305,14 +310,6 @@ void wxNotebook::MacSetupTabs() // time because doing it in ::Create() doesn't work (for unknown reasons) void wxNotebook::OnSize(wxSizeEvent& event) { - static bool s_bFirstTime = TRUE; - if ( s_bFirstTime ) { - // TODO: any first-time-size processing. - s_bFirstTime = FALSE; - } - - // TODO: all this may or may not be necessary for your platform - // emulate page change (it's esp. important to do it first time because // otherwise our page would stay invisible) int nSel = m_nSelection;