]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/notebook.cpp
Implement left indentation and tab stops support in wxTextCtrl, patch #1518114 -...
[wxWidgets.git] / src / os2 / notebook.cpp
index b0765dd8e85890aa6312e800de396f18d4f594bd..e0051d4fd4b0b4eccbeac8626e36a78b8fe77c4b 100644 (file)
     #include "wx/dcclient.h"
     #include "wx/string.h"
     #include "wx/settings.h"
-    #include  "wx/log.h"
+    #include "wx/log.h"
+    #include "wx/event.h"
+    #include  "wx/control.h"
 #endif  // WX_PRECOMP
 
 #include  "wx/imaglist.h"
-#include  "wx/event.h"
-#include  "wx/control.h"
 
 #include  "wx/os2/private.h"
 
@@ -124,6 +124,8 @@ bool wxNotebook::Create( wxWindow*       pParent,
                          long            lStyle,
                          const wxString& rsName )
 {
+    if ( (lStyle & wxBK_ALIGN_MASK) == wxBK_DEFAULT )
+        lStyle |= wxBK_TOP;
     //
     // Base init
     //
@@ -241,6 +243,22 @@ int wxNotebook::SetSelection( size_t nPage )
     return nPage;
 } // end of wxNotebook::SetSelection
 
+int wxNotebook::ChangeSelection( size_t nPage )
+{
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
+
+    if (nPage != (size_t)m_nSelection)
+    {
+        ::WinSendMsg( GetHWND()
+                ,BKM_TURNTOPAGE
+                ,MPFROMLONG((ULONG)m_alPageId[nPage])
+                        ,(MPARAM)0
+                    );
+    }
+    m_nSelection = nPage;
+    return nPage;
+}
+
 bool wxNotebook::SetPageText( size_t nPage,
                               const wxString& rsStrText )
 {