// 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();
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,
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()
{
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);