]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/framemanager.cpp
fixed messed up indentation
[wxWidgets.git] / src / aui / framemanager.cpp
index cca1063c40be20c39ee285af5a638cc81084e8e9..3c0b35a969c6f6d0f2f199ad12433a5815409ae5 100644 (file)
@@ -64,7 +64,13 @@ DEFINE_EVENT_TYPE(wxEVT_AUI_FIND_MANAGER)
     // a few defines to avoid nameclashes
     #define __MAC_OS_X_MEMORY_MANAGER_CLEAN__ 1
     #define __AIFF__
     // a few defines to avoid nameclashes
     #define __MAC_OS_X_MEMORY_MANAGER_CLEAN__ 1
     #define __AIFF__
-    #include "wx/mac/private.h"
+    #include "wx/osx/private.h"
+#endif
+
+#ifdef __WXMSW__
+    #include "wx/msw/wrapwin.h"
+    #include "wx/msw/private.h"
+    #include "wx/msw/dc.h"
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxAuiManagerEvent, wxEvent)
@@ -214,7 +220,7 @@ END_EVENT_TABLE()
 #else
   // __WXGTK20__
 
 #else
   // __WXGTK20__
 
-#include "wx/gtk/private.h"
+#include <gtk/gtk.h>
 
 static void
 gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) )
 
 static void
 gtk_pseudo_window_realized_callback( GtkWidget *m_widget, void *WXUNUSED(win) )
@@ -248,12 +254,12 @@ public:
             return;
 
         m_title = title;
             return;
 
         m_title = title;
-        
+
         m_widget = gtk_window_new( GTK_WINDOW_POPUP );
 
         g_signal_connect( m_widget, "realize",
                       G_CALLBACK (gtk_pseudo_window_realized_callback), this );
         m_widget = gtk_window_new( GTK_WINDOW_POPUP );
 
         g_signal_connect( m_widget, "realize",
                       G_CALLBACK (gtk_pseudo_window_realized_callback), this );
-        
+
         GdkColor col;
         col.red = 128 * 256;
         col.green = 192 * 256;
         GdkColor col;
         col.red = 128 * 256;
         col.green = 192 * 256;
@@ -265,7 +271,7 @@ public:
     {
         return true;
     }
     {
         return true;
     }
-    
+
 private:
     DECLARE_DYNAMIC_CLASS(wxPseudoTransparentFrame)
 };
 private:
     DECLARE_DYNAMIC_CLASS(wxPseudoTransparentFrame)
 };
@@ -291,10 +297,15 @@ static void DrawResizeHint(wxDC& dc, const wxRect& rect)
     wxBitmap stipple = wxPaneCreateStippleBitmap();
     wxBrush brush(stipple);
     dc.SetBrush(brush);
     wxBitmap stipple = wxPaneCreateStippleBitmap();
     wxBrush brush(stipple);
     dc.SetBrush(brush);
+#ifdef __WXMSW__
+    wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
+    PatBlt(GetHdcOf(*impl), rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight(), PATINVERT);
+#else
     dc.SetPen(*wxTRANSPARENT_PEN);
 
     dc.SetLogicalFunction(wxXOR);
     dc.DrawRectangle(rect);
     dc.SetPen(*wxTRANSPARENT_PEN);
 
     dc.SetLogicalFunction(wxXOR);
     dc.DrawRectangle(rect);
+#endif
 }
 
 
 }
 
 
@@ -511,7 +522,7 @@ static void RenumberDockRows(wxAuiDockInfoPtrArray& docks)
     {
         wxAuiDockInfo& dock = *docks.Item(i);
         dock.dock_row = i;
     {
         wxAuiDockInfo& dock = *docks.Item(i);
         dock.dock_row = i;
-        
+
         int j, pane_count;
         for (j = 0, pane_count = dock.panes.GetCount(); j < pane_count; ++j)
             dock.panes.Item(j)->dock_row = i;
         int j, pane_count;
         for (j = 0, pane_count = dock.panes.GetCount(); j < pane_count; ++j)
             dock.panes.Item(j)->dock_row = i;
@@ -762,6 +773,7 @@ void wxAuiManager::UpdateHintWindowConfig()
         {
             wxFrame* f = static_cast<wxFrame*>(w);
             can_do_transparent = f->CanSetTransparent();
         {
             wxFrame* f = static_cast<wxFrame*>(w);
             can_do_transparent = f->CanSetTransparent();
+            
             break;
         }
 
             break;
         }
 
@@ -958,7 +970,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
     if (pinfo.name.empty() || already_exists)
     {
         pinfo.name.Printf(wxT("%08lx%08x%08x%08lx"),
     if (pinfo.name.empty() || already_exists)
     {
         pinfo.name.Printf(wxT("%08lx%08x%08x%08lx"),
-             ((unsigned long)pinfo.window) & 0xffffffff,
+             wxPtrToUInt(pinfo.window) & 0xffffffff,
              (unsigned int)time(NULL),
 #ifdef __WXWINCE__
              (unsigned int)GetTickCount(),
              (unsigned int)time(NULL),
 #ifdef __WXWINCE__
              (unsigned int)GetTickCount(),
@@ -2307,8 +2319,11 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
                 LayoutAddDock(middle, *arr.Item(row), uiparts, spacer_only);
         }
 
                 LayoutAddDock(middle, *arr.Item(row), uiparts, spacer_only);
         }
 
-        cont->Add(middle, 1, wxEXPAND);
-
+        if (middle->GetChildren().GetCount() > 0)
+            cont->Add(middle, 1, wxEXPAND);
+             else
+            delete middle;
+            
 
 
         // find any bottom docks in this layer
 
 
         // find any bottom docks in this layer
@@ -3216,7 +3231,7 @@ void wxAuiManager::ShowHint(const wxRect& rect)
         // nasty redrawn problems.
         clip.Intersect(m_frame->GetRect());
 
         // nasty redrawn problems.
         clip.Intersect(m_frame->GetRect());
 
-        screendc.SetClippingRegion(clip);
+        screendc.SetDeviceClippingRegion(clip);
 
         wxBitmap stipple = wxPaneCreateStippleBitmap();
         wxBrush brush(stipple);
 
         wxBitmap stipple = wxPaneCreateStippleBitmap();
         wxBrush brush(stipple);
@@ -4435,7 +4450,7 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt)
             {
                 ClosePane(pane);
             }
             {
                 ClosePane(pane);
             }
-            
+
             Update();
         }
     }
             Update();
         }
     }