-// 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);
-}
-