X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b5f3fe655deeb91d5d3abe8fad30c4a1cae63dc..16e93305f2bae16652b6750dffe3bcf05c20d839:/include/wx/motif/notebook.h diff --git a/include/wx/motif/notebook.h b/include/wx/motif/notebook.h index d21311e216..37d6439d27 100644 --- a/include/wx/motif/notebook.h +++ b/include/wx/motif/notebook.h @@ -49,6 +49,9 @@ public: int GetSelection() const { return m_nSel; } int GetOldSelection() const { return m_nOldSel; } + void SetSelection(int sel) { m_nSel = sel; } + void SetOldSelection(int oldSel) { m_nOldSel = oldSel; } + private: int m_nSel, // currently selected page m_nOldSel; // previously selected page @@ -73,22 +76,7 @@ public: // Called when a tab is activated virtual void OnTabActivate(int activateId, int deactivateId); -/* - // Specific to this class - void AddTabWindow(int id, wxWindow *window); - wxWindow *GetTabWindow(int id) const ; - void ClearWindows(bool deleteWindows = TRUE); - inline wxWindow *GetCurrentWindow() const { return m_currentWindow; } - void ShowWindowForTab(int id); -*/ - protected: -/* - // List of panels, one for each tab. Indexed - // by tab ID. - wxList m_tabWindows; - wxWindow* m_currentWindow; -*/ wxNotebook* m_notebook; }; @@ -121,6 +109,9 @@ public: // get number of pages in the dialog int GetPageCount() const; + // Find the position of the wxNotebookPage, -1 if not found. + int FindPagePosition(wxNotebookPage* page) const; + // set the currently selected page, return the index of the previously // selected one (or -1 on error) // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events @@ -160,8 +151,12 @@ public: // operations // ---------- - // remove one page from the notebook + // remove one page from the notebook, and delete the page. bool DeletePage(int nPage); + bool DeletePage(wxNotebookPage* page); + // remove one page from the notebook, without deleting the page. + bool RemovePage(int nPage); + bool RemovePage(wxNotebookPage* page); // remove all pages bool DeleteAllPages(); // adds a new page to the notebook (it will be deleted ny the notebook, @@ -204,6 +199,11 @@ public: virtual void ChangeFont(bool keepOriginalSize = TRUE); virtual void ChangeBackgroundColour(); virtual void ChangeForegroundColour(); + virtual wxRect GetAvailableClientSize(); + + // Implementation: calculate the layout of the view rect + // and resize the children if required + bool RefreshLayout(bool force = TRUE); protected: // common part of all ctors