X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93cf77c076b699e8e0b3b0049bd4f80de15997dd..ec5d77998a16fbdf328ec689a48449c84f0d4336:/src/stubs/notebook.cpp?ds=sidebyside diff --git a/src/stubs/notebook.cpp b/src/stubs/notebook.cpp index aecb879f4b..9ac9c0bf4a 100644 --- a/src/stubs/notebook.cpp +++ b/src/stubs/notebook.cpp @@ -36,7 +36,6 @@ // event table // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARIES BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) @@ -47,7 +46,6 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) -#endif // ============================================================================ // implementation @@ -97,10 +95,6 @@ bool wxNotebook::Create(wxWindow *parent, m_windowId = id == -1 ? NewControlId() : id; - // colors and font - m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE)); - m_foregroundColour = *wxBLACK ; - // style m_windowStyle = style; @@ -206,6 +200,16 @@ bool wxNotebook::DeletePage(int nPage) return TRUE; } +// remove one page from the notebook, without deleting the window +bool wxNotebook::RemovePage(int nPage) +{ + wxCHECK( IS_VALID_PAGE(nPage), FALSE ); + + m_aPages.Remove(nPage); + + return TRUE; +} + // remove all pages bool wxNotebook::DeleteAllPages() { @@ -278,11 +282,11 @@ void wxNotebook::OnSize(wxSizeEvent& event) SetSelection(nSel); // fit the notebook page to the tab control's display area - int w, hl + int w, h; GetSize(&w, &h); - uint nCount = m_aPages.Count(); - for ( uint nPage = 0; nPage < nCount; nPage++ ) { + unsigned int nCount = m_aPages.Count(); + for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) { wxNotebookPage *pPage = m_aPages[nPage]; pPage->SetSize(0, 0, w, h); if ( pPage->GetAutoLayout() ) @@ -369,3 +373,8 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) m_nSelection = nSel; } +void wxNotebook::SetTabSize(const wxSize& sz) +{ + // TODO +} +