]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove redundant wxAuiNotebook methods already present in wxBookCtrlBase.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 25 May 2012 09:48:26 +0000 (09:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 25 May 2012 09:48:26 +0000 (09:48 +0000)
wxAuiNotebook already inherits perfectly workable AdvanceSelection() and
GetCurrentPage() methods from wxBookCtrlBase, no need to reimplement them in
it.

See #14309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/aui/auibook.h
src/aui/auibook.cpp

index 36536e0b87447210487f96c6031c6b8e446bd890..9d488b04a8473e1879f7ef41cb140d2f9b1791ab 100644 (file)
@@ -327,9 +327,6 @@ public:
     // Gets the height of the notebook for a given page height
     int GetHeightForPageHeight(int pageHeight);
 
-    // Advances the selection, generation page selection events
-    void AdvanceSelection(bool forward = true);
-
     // Shows the window menu
     bool ShowWindowMenu();
 
@@ -347,8 +344,6 @@ public:
     virtual int GetPageImage(size_t n) const;
     virtual bool SetPageImage(size_t n, int imageId);
 
-    wxWindow* GetCurrentPage () const;
-
     virtual int ChangeSelection(size_t n);
 
     virtual bool AddPage(wxWindow *page, const wxString &text, bool select, 
index 9fc2e90add282e4fb163876c8a10308f06e2f3bf..181defdb765dd68d43889ff11c5734c17d5fd6f0 100644 (file)
@@ -3235,34 +3235,6 @@ int wxAuiNotebook::GetHeightForPageHeight(int pageHeight)
     return tabCtrlHeight + pageHeight + decorHeight;
 }
 
-// Advances the selection, generation page selection events
-void wxAuiNotebook::AdvanceSelection(bool forward)
-{
-    if (GetPageCount() <= 1)
-        return;
-
-    int currentSelection = GetSelection();
-
-    if (forward)
-    {
-        if (currentSelection == (int) (GetPageCount() - 1))
-            return;
-        else if (currentSelection == -1)
-            currentSelection = 0;
-        else
-            currentSelection ++;
-    }
-    else
-    {
-        if (currentSelection <= 0)
-            return;
-        else
-            currentSelection --;
-    }
-
-    SetSelection(currentSelection);
-}
-
 // Shows the window menu
 bool wxAuiNotebook::ShowWindowMenu()
 {
@@ -3313,13 +3285,6 @@ bool wxAuiNotebook::SetPageImage(size_t n, int imageId)
     return SetPageBitmap(n, GetImageList()->GetBitmap(imageId));
 }
 
-wxWindow* wxAuiNotebook::GetCurrentPage () const
-{
-    const int sel = GetSelection();
-
-    return sel == wxNOT_FOUND ? NULL : GetPage(sel);
-}
-
 int wxAuiNotebook::ChangeSelection(size_t n)
 {
     return DoModifySelection(n, false);