]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
More RTL fixes.
[wxWidgets.git] / src / univ / notebook.cpp
index 1d8c16355cd5dd4f2cc67df8ddbfd19b3f4c302c..4fe59855e84baf2c955379e05b470ad49bff901d 100644 (file)
 
 #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"
 
@@ -117,6 +121,9 @@ bool wxNotebook::Create(wxWindow *parent,
                         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;
@@ -578,7 +585,7 @@ void wxNotebook::DoDraw(wxControlRenderer *renderer)
 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) )
@@ -624,7 +631,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
             if ( flags )
             {
                 // TODO: be more precise
-                *flags = wxNB_HITTEST_ONITEM;
+                *flags = wxBK_HITTEST_ONITEM;
             }
 
             return n;