]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/auibook.cpp
recreate the window if FSAA is requested (changeset_r54022_Fix.patch from #9145)
[wxWidgets.git] / src / aui / auibook.cpp
index 048229f35fb6d3400a0c5f7f005b552e85316527..30409be22fa7e485d1c3dafa36420d6d792e0a9a 100644 (file)
@@ -34,7 +34,7 @@
 #include "wx/renderer.h"
 
 #ifdef __WXMAC__
-#include "wx/mac/carbon/private.h"
+#include "wx/osx/carbon/private.h"
 #endif
 
 #include "wx/arrimpl.cpp"
@@ -1611,6 +1611,11 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd)
         return;
 
     wxMemoryDC dc;
+
+    // use the same layout direction as the window DC uses to ensure that the
+    // text is rendered correctly
+    dc.SetLayoutDirection(raw_dc->GetLayoutDirection());
+
     wxBitmap bmp;
     size_t i;
     size_t page_count = m_pages.GetCount();
@@ -2576,7 +2581,19 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event)
 
     int newPage = -1;
 
-    if (key == WXK_RIGHT)
+    int forwardKey, backwardKey;
+    if (GetLayoutDirection() == wxLayout_RightToLeft)
+    {
+        forwardKey = WXK_LEFT;
+        backwardKey = WXK_RIGHT;
+    }
+    else
+     {
+        forwardKey = WXK_RIGHT;
+        backwardKey = WXK_LEFT;
+    }
+
+    if (key == forwardKey)
     {
         if (m_pages.GetCount() > 1)
         {
@@ -2586,7 +2603,7 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event)
                 newPage = GetActivePage() + 1;
         }
     }
-    else if (key == WXK_LEFT)
+    else if (key == backwardKey)
     {
         if (m_pages.GetCount() > 1)
         {
@@ -3065,7 +3082,7 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
     wxASSERT_MSG(page, wxT("page pointer must be non-NULL"));
     if (!page)
         return false;
-    
+
     page->Reparent(this);
 
     wxAuiNotebookPage info;