#pragma implementation "notebook.h"
#endif
+#ifdef __VMS
+#pragma message disable unscomzer
+#endif
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
m_windowId = id == -1 ? NewControlId() : id;
- // It's like a normal window...
- if (!wxWindow::Create(parent, id, pos, size, style|wxNO_BORDER, name))
+ if (!wxControl::Create(parent, id, pos, size, style|wxNO_BORDER, wxDefaultValidator, name))
return FALSE;
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
{
wxASSERT( IS_VALID_PAGE(nPage) );
-#if defined (__WIN16__)
- m_tabView->SetTabSelection(nPage);
-#else
wxNotebookPage* pPage = GetPage(nPage);
m_tabView->SetTabSelection((int) (long) pPage);
-#endif
+
// TODO
return 0;
}
bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
{
wxASSERT( IS_VALID_PAGE(nPage) );
-#if defined (__WIN16__)
- m_tabView->SetTabText(nPage, strText);
- Refresh();
- return TRUE;
-#else
+
wxNotebookPage* page = GetPage(nPage);
if (page)
{
Refresh();
return TRUE;
}
-#endif
+
return FALSE;
}
{
wxASSERT( IS_VALID_PAGE(nPage) );
-#if defined (__WIN16__)
- return m_tabView->GetTabText(nPage);
-#else
wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage);
if (page)
return m_tabView->GetTabText((int) (long) page);
else
return wxEmptyString;
-#endif
}
int wxNotebook::GetPageImage(size_t nPage) const
}
wxNotebookPage* pPage = GetPage(nPage);
-#if defined (__WIN16__)
- m_tabView->RemoveTab(nPage);
-#else
+
m_tabView->RemoveTab((int) (long) pPage);
-#endif
m_pages.Remove(pPage);
delete pPage;
else if (m_nSelection > -1)
{
m_nSelection = -1;
-#if defined (__WIN16__)
- m_tabView->SetTabSelection(0, FALSE);
-#else
+
m_tabView->SetTabSelection((int) (long) GetPage(0), FALSE);
-#endif
+
if (m_nSelection != 0)
ChangePage(-1, 0);
}
// m_pages[nPage]->Lower();
wxNotebookPage* pPage = GetPage(nPage);
-#if defined (__WIN16__)
- m_tabView->RemoveTab(nPage);
-#else
+
m_tabView->RemoveTab((int) (long) pPage);
-#endif
m_pages.Remove(pPage);
wxASSERT( pPage != NULL );
wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
-// For 16 bit integers (tabs limited to 32768)
-#if defined (__WIN16__)
- m_tabView->AddTab(nPage, strText);
-#else
m_tabView->AddTab((int) (long) pPage, strText);
-#endif
+
if (!bSelect)
pPage->Show(FALSE);
if (bSelect)
{
// This will cause ChangePage to be called, via OnSelPage
-#if defined (__WIN16__)
- m_tabView->SetTabSelection(nPage, TRUE);
-#else
+
m_tabView->SetTabSelection((int) (long) pPage, TRUE);
-#endif
}
// some page must be selected: either this one or the first one if there is
void wxNotebook::Command(wxCommandEvent& WXUNUSED(event))
{
- wxFAIL_MSG("wxNotebook::Command not implemented");
+ wxFAIL_MSG(wxT("wxNotebook::Command not implemented"));
}
// ----------------------------------------------------------------------------
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
-#if defined (__WIN16__)
- int activatePos = activateId;
- int deactivatePos = deactivateId;
-#else
// Translate from wxTabView's ids (which aren't position-dependent)
// to wxNotebook's (which are).
wxNotebookPage* pActive = (wxNotebookPage*) activateId;
int activatePos = m_notebook->FindPagePosition(pActive);
int deactivatePos = m_notebook->FindPagePosition(pDeactive);
-#endif
event.SetEventObject(m_notebook);
event.SetSelection(activatePos);
event.SetOldSelection(deactivatePos);
{
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId());
-#if defined (__WIN16__)
- int activatePos = activateId;
- int deactivatePos = deactivateId;
-#else
// Translate from wxTabView's ids (which aren't position-dependent)
// to wxNotebook's (which are).
wxNotebookPage* pActive = (wxNotebookPage*) activateId;
int activatePos = m_notebook->FindPagePosition(pActive);
int deactivatePos = m_notebook->FindPagePosition(pDeactive);
-#endif
event.SetEventObject(m_notebook);
event.SetSelection(activatePos);
event.SetOldSelection(deactivatePos);