// headers
// ----------------------------------------------------------------------------
#ifdef __GNUG__
-#pragma implementation "notebook.h"
+ #pragma implementation "notebook.h"
#endif
#include <wx/string.h>
// check that the page index is valid
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
-#ifdef __WXMAC_X__
+#ifdef __DARWIN__
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
const short kwxMacTabLeftMargin = 20 ;
const short kwxMacTabTopMargin = 38 ;
// common part of all ctors
void wxNotebook::Init()
{
-#ifdef __WXMAC_X__
+#ifdef __DARWIN__
m_macHorizontalBorder = 7;
m_macVerticalBorder = 8;
#endif
int wxNotebook::SetSelection(int nPage)
{
- wxASSERT( IS_VALID_PAGE(nPage) );
+ if( !IS_VALID_PAGE(nPage) )
+ return m_nSelection ;
ChangePage(m_nSelection, nPage);
SetControlValue( m_macControl , m_nSelection + 1 ) ;
{
wxCHECK( IS_VALID_PAGE(nPage), NULL );
wxNotebookPage* page = m_pages[nPage] ;
- m_pages.Remove(nPage);
+ m_pages.RemoveAt(nPage);
MacSetupTabs();