X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98b9b5eaf3371f8b4f27166f0a0232d4c9d806c7..129b8b1a215fc1fcc1b9f06daa0aeaf22bbce614:/src/generic/notebook.cpp diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index c3e7cb4821..fd5c9f05ea 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -35,7 +35,7 @@ #include "wx/settings.h" #endif -#include "wx/generic/imaglist.h" +#include "wx/imaglist.h" #include "wx/generic/tabg.h" // ---------------------------------------------------------------------------- @@ -84,7 +84,7 @@ class WXDLLEXPORT wxNotebookTabView: public wxTabView DECLARE_DYNAMIC_CLASS(wxNotebookTabView) public: wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); - ~wxNotebookTabView(void); + virtual ~wxNotebookTabView(void); // Called when a tab is activated virtual void OnTabActivate(int activateId, int deactivateId); @@ -150,13 +150,14 @@ bool wxNotebook::Create(wxWindow *parent, // base init SetName(name); + if ( (style & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + style |= wxBK_TOP; + m_windowId = id == wxID_ANY ? NewControlId() : id; if (!wxControl::Create(parent, id, pos, size, style|wxNO_BORDER, wxDefaultValidator, name)) return false; - SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); - SetTabView(new wxNotebookTabView(this)); return true; @@ -189,6 +190,12 @@ int wxNotebook::SetSelection(size_t nPage) return 0; } +int wxNotebook::ChangeSelection(size_t nPage) +{ + // FIXME: currently it does generate events too + return SetSelection(nPage); +} + #if 0 void wxNotebook::AdvanceSelection(bool bForward) {