/////////////////////////////////////////////////////////////////////////////
-// Name: univ/notebook.cpp
+// Name: src/univ/notebook.cpp
// Purpose: wxNotebook implementation
// Author: Vadim Zeitlin
// Modified by:
// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "univnotebook.h"
-#endif
-
-#ifdef __VMS
-#pragma message disable unscomzer
-#endif
-
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#if wxUSE_NOTEBOOK
-#include "wx/imaglist.h"
#include "wx/notebook.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/dcmemory.h"
+#endif
+
+#include "wx/imaglist.h"
#include "wx/spinbutt.h"
-#include "wx/dcmemory.h"
#include "wx/univ/renderer.h"
long style,
const wxString& name)
{
+ if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
+ style |= wxBK_TOP;
+
if ( !wxControl::Create(parent, id, pos, size, style,
wxDefaultValidator, name) )
return false;
int wxNotebook::GetPageImage(size_t nPage) const
{
- wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
+ wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, _T("invalid notebook page") );
return m_images[nPage];
}
int wxNotebook::SetSelection(size_t nPage)
{
- wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
+ wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, _T("invalid notebook page") );
if ( (size_t)nPage == m_sel )
{
int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
{
if ( flags )
- *flags = wxNB_HITTEST_NOWHERE;
+ *flags = wxBK_HITTEST_NOWHERE;
// first check that it is in this window at all
if ( !GetClientRect().Inside(pt) )
if ( flags )
{
// TODO: be more precise
- *flags = wxNB_HITTEST_ONITEM;
+ *flags = wxBK_HITTEST_ONITEM;
}
return n;
wxDirection wxNotebook::GetTabOrientation() const
{
long style = GetWindowStyle();
- if ( style & wxNB_BOTTOM )
+ if ( style & wxBK_BOTTOM )
return wxBOTTOM;
- else if ( style & wxNB_RIGHT )
+ else if ( style & wxBK_RIGHT )
return wxRIGHT;
- else if ( style & wxNB_LEFT )
+ else if ( style & wxBK_LEFT )
return wxLEFT;
- // wxNB_TOP == 0 so we don't have to test for it
+ // wxBK_TOP == 0 so we don't have to test for it
return wxTOP;
}
}
#endif // wxUSE_NOTEBOOK
-