]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/tabmdi.cpp
missing reversed orientation assignments
[wxWidgets.git] / src / aui / tabmdi.cpp
index 8680825a531298b1ed578c320b29f86e7a524436..df5d01c82bf6284f2db5afd3a142e0327408b404 100644 (file)
@@ -354,6 +354,26 @@ void wxAuiMDIParentFrame::DoGetClientSize(int* width, int* height) const
     wxFrame::DoGetClientSize(width, height);
 }
 
+void wxAuiMDIParentFrame::Tile(wxOrientation orient)
+{
+    wxAuiMDIClientWindow* client_window = GetClientWindow();
+    wxASSERT_MSG(client_window, wxT("Missing MDI Client Window"));
+    
+    int cur_idx = client_window->GetSelection();
+    if (cur_idx == -1)
+        return;
+        
+    if (orient == wxVERTICAL)
+    {
+        client_window->Split(cur_idx, wxLEFT);
+    }
+     else if (orient == wxHORIZONTAL)
+    {
+        client_window->Split(cur_idx, wxTOP);
+    }
+}
+
+
 //-----------------------------------------------------------------------------
 // wxAuiMDIChildFrame
 //-----------------------------------------------------------------------------
@@ -545,7 +565,7 @@ void wxAuiMDIChildFrame::SetIcon(const wxIcon& icon)
     
     wxBitmap bmp;
     bmp.CopyFromIcon(m_icon);
-    
+        
     wxAuiMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
     if (pClientWindow != NULL)
     {
@@ -697,6 +717,11 @@ bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style)
 {
     SetWindowStyleFlag(style);
 
+    wxSize caption_icon_size = 
+            wxSize(wxSystemSettings::GetMetric(wxSYS_SMALLICON_X),
+                   wxSystemSettings::GetMetric(wxSYS_SMALLICON_Y));
+    SetUniformBitmapSize(caption_icon_size);
+    
     if (!wxAuiNotebook::Create(parent,
                                wxID_ANY,
                                wxPoint(0,0),
@@ -709,7 +734,7 @@ bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style)
     wxColour bkcolour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
     SetOwnBackgroundColour(bkcolour);
 
-    m_mgr.GetArtProvider()->SetColour(wxAUI_ART_BACKGROUND_COLOUR, bkcolour);
+    m_mgr.GetArtProvider()->SetColour(wxAUI_DOCKART_BACKGROUND_COLOUR, bkcolour);
 
     return true;
 }