[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1523
Date       : Tue Jul 25 13:10:40 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camframe.cpp
   M /Trunk/XaraLX/wxXtra/dockart.h
   M /Trunk/XaraLX/wxXtra/floatpane.cpp
   M /Trunk/XaraLX/wxXtra/floatpane.h
   M /Trunk/XaraLX/wxXtra/framemanager.cpp
   M /Trunk/XaraLX/wxXtra/framemanager.h

Update wxAUI version


Diff:
Index: Trunk/XaraLX/wxXtra/floatpane.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/floatpane.cpp	(revision 1522)
+++ Trunk/XaraLX/wxXtra/floatpane.cpp	(revision 1523)
@@ -32,7 +32,8 @@
                 : wxFloatingPaneBaseClass(parent, id, wxEmptyString,
                         pane.floating_pos, pane.floating_size,
                         wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
-                        wxCLOSE_BOX | wxFRAME_NO_TASKBAR |
+                        (pane.HasCloseButton()?wxCLOSE_BOX:0) |
+                        wxFRAME_NO_TASKBAR |
                         wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN |
                         (pane.IsFixed()?0:wxRESIZE_BORDER)
                         )
@@ -40,7 +41,7 @@
     m_owner_mgr = owner_mgr;
     m_moving = false;
     m_last_rect = wxRect();
-    m_mgr.SetFrame(this);
+    m_mgr.SetManagedWindow(this);
     SetExtraStyle(wxWS_EX_PROCESS_IDLE);
 }
 
@@ -206,5 +207,4 @@
     EVT_ACTIVATE(wxFloatingPane::OnActivate)
 END_EVENT_TABLE()
 
-
 #endif // wxUSE_AUI
Index: Trunk/XaraLX/wxXtra/framemanager.h
===================================================================
--- Trunk/XaraLX/wxXtra/framemanager.h	(revision 1522)
+++ Trunk/XaraLX/wxXtra/framemanager.h	(revision 1523)
@@ -50,10 +50,16 @@
     wxAUI_MGR_TRANSPARENT_DRAG      = 1 << 2,
     wxAUI_MGR_TRANSPARENT_HINT      = 1 << 3,
     wxAUI_MGR_TRANSPARENT_HINT_FADE = 1 << 4,
+    // The venetian blind effect is ONLY used when the wxAUI_MGR_TRANSPARENT_HINT has been used, but
+    // at runtime we determine we cannot use transparency (because, for instance, the OS does not support it).
+    // setting this flag drops back in such circumstances (only) to the behaviour without wxAUI_MGR_TRANSPARENT_HINT
+    wxAUI_MGR_DISABLE_VENETIAN_BLINDS = 1 << 5,
+    wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE = 1 << 6,
 
     wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
                         wxAUI_MGR_TRANSPARENT_HINT |
-                        wxAUI_MGR_TRANSPARENT_HINT_FADE
+                        wxAUI_MGR_TRANSPARENT_HINT_FADE |
+                        wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE
 };
 
 enum wxPaneDockArtSetting
@@ -108,19 +114,20 @@
 class wxDockArt;
 class wxFrameManagerEvent;
 
+#ifndef SWIG
 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDockInfo, wxDockInfoArray, WXDLLIMPEXP_AUI);
 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDockUIPart, wxDockUIPartArray, WXDLLIMPEXP_AUI);
 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPaneButton, wxPaneButtonArray, WXDLLIMPEXP_AUI);
 WX_DECLARE_USER_EXPORTED_OBJARRAY(wxPaneInfo, wxPaneInfoArray, WXDLLIMPEXP_AUI);
 WX_DEFINE_ARRAY_PTR(wxPaneInfo*, wxPaneInfoPtrArray);
 WX_DEFINE_ARRAY_PTR(wxDockInfo*, wxDockInfoPtrArray);
+#endif // SWIG
 
-extern wxDockInfo wxNullDockInfo;
-extern wxPaneInfo wxNullPaneInfo;
+extern WXDLLIMPEXP_AUI wxDockInfo wxNullDockInfo;
+extern WXDLLIMPEXP_AUI wxPaneInfo wxNullPaneInfo;
 
 
 
-
 class WXDLLIMPEXP_AUI wxPaneInfo
 {
 public:
@@ -144,6 +151,9 @@
         DefaultPane();
     }
 
+    ~wxPaneInfo() {}
+    
+#ifndef SWIG
     wxPaneInfo(const wxPaneInfo& c)
     {
         name = c.name;
@@ -186,7 +196,21 @@
         rect = c.rect;
         return *this;
     }
+#endif // SWIG
 
+    // Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
+    // used on loading perspectives etc.
+    void SafeSet(wxPaneInfo source)
+    {
+        // note source is not passed by reference so we can overwrite, to keep the
+        // unsafe bits of "dest"
+        source.window = window;
+        source.frame = frame;
+        source.buttons = buttons;
+        // now assign
+        *this = source;
+    }
+
     bool IsOk() const { return (window != NULL) ? true : false; }
     bool IsFixed() const { return !HasFlag(optionResizable); }
     bool IsResizable() const { return HasFlag(optionResizable); }
@@ -209,6 +233,9 @@
     bool HasPinButton() const { return HasFlag(buttonPin); }
     bool HasGripperTop() const { return HasFlag(optionGripperTop); }
 
+#ifdef SWIG
+    %typemap(out) wxPaneInfo& { $result = $self; Py_INCREF($result); }
+#endif
     wxPaneInfo& Window(wxWindow* w) { window = w; return *this; }
     wxPaneInfo& Name(const wxString& n) { name = n; return *this; }
     wxPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
@@ -298,6 +325,10 @@
         return (state & flag) ? true:false;
     }
 
+#ifdef SWIG
+    %typemap(out) wxPaneInfo& ;
+#endif
+    
 public:
 
     enum wxPaneState
@@ -334,7 +365,7 @@
     wxString caption;     // caption displayed on the window
 
     wxWindow* window;     // window that is in this pane
-    wxWindow* frame;      // floating frame window that holds the pane
+    wxFrame* frame;       // floating frame window that holds the pane
     unsigned int state;   // a combination of wxPaneState values
 
     int dock_direction;   // dock direction (top, bottom, left, right, center)
@@ -365,7 +396,7 @@
 
 public:
 
-    wxFrameManager(wxFrame* frame = NULL,
+    wxFrameManager(wxWindow* managed_wnd = NULL,
                    unsigned int flags = wxAUI_MGR_DEFAULT);
     virtual ~wxFrameManager();
     void UnInit();
@@ -373,9 +404,12 @@
     void SetFlags(unsigned int flags);
     unsigned int GetFlags() const;
 
-    void SetFrame(wxFrame* frame);
-    wxFrame* GetFrame() const;
+    void SetManagedWindow(wxWindow* managed_wnd);
+    wxWindow* GetManagedWindow() const;
 
+#ifdef SWIG
+    %disownarg( wxDockArt* art_provider );
+#endif
     void SetArtProvider(wxDockArt* art_provider);
     wxDockArt* GetArtProvider() const;
 
@@ -385,17 +419,24 @@
 
     bool AddPane(wxWindow* window,
                  const wxPaneInfo& pane_info);
+                 
+    bool AddPane(wxWindow* window,
+                 const wxPaneInfo& pane_info,
+                 const wxPoint& drop_pos);
 
     bool AddPane(wxWindow* window,
                  int direction = wxLEFT,
                  const wxString& caption = wxEmptyString);
 
     bool InsertPane(wxWindow* window,
-                 const wxPaneInfo& pane_info,
+                 const wxPaneInfo& insert_location,
                  int insert_level = wxAUI_INSERT_PANE);
 
     bool DetachPane(wxWindow* window);
 
+    wxString SavePaneInfo(wxPaneInfo& pane);
+    wxString LoadPaneInfo(wxString pane_part, wxPaneInfo &pane);
+
     wxString SavePerspective();
 
     bool LoadPerspective(const wxString& perspective,
@@ -403,12 +444,27 @@
 
     void Update();
 
-protected:
 
+public:
+
     void DrawHintRect(wxWindow* pane_window,
                        const wxPoint& pt,
                        const wxPoint& offset);
+    virtual void ShowHint(const wxRect& rect);
+    virtual void HideHint();
 
+public:
+
+    // deprecated -- please use SetManagedWindow() and
+    // and GetManagedWindow() instead
+    
+    wxDEPRECATED( void SetFrame(wxFrame* frame) );
+    wxDEPRECATED( wxFrame* GetFrame() const );
+    
+protected:
+
+
+    
     void DoFrameLayout();
 
     void LayoutAddPane(wxSizer* container,
@@ -427,6 +483,9 @@
                        wxDockUIPartArray& uiparts,
                        bool spacer_only = false);
 
+    virtual bool ProcessDockResult(wxPaneInfo& target,
+                                   const wxPaneInfo& new_pos);
+
     bool DoDrop(wxDockInfoArray& docks,
                 wxPaneInfoArray& panes,
                 wxPaneInfo& drop,
@@ -452,23 +511,27 @@
     void GetPanePositionsAndSizes(wxDockInfo& dock,
                               wxArrayInt& positions,
                               wxArrayInt& sizes);
-    virtual void ShowHint(const wxRect& rect);
-    virtual void HideHint();
 
+
+public:
+
+    // public events (which can be invoked externally)
+    void OnRender(wxFrameManagerEvent& evt);
+    void OnPaneButton(wxFrameManagerEvent& evt);
+
 protected:
 
-    // events
-    void OnPaint(wxPaintEvent& event);
-    void OnEraseBackground(wxEraseEvent& event);
-    void OnSize(wxSizeEvent& event);
-    void OnSetCursor(wxSetCursorEvent& event);
-    void OnLeftDown(wxMouseEvent& event);
-    void OnLeftUp(wxMouseEvent& event);
-    void OnMotion(wxMouseEvent& event);
-    void OnLeaveWindow(wxMouseEvent& event);
-    void OnPaneButton(wxFrameManagerEvent& event);
-    void OnChildFocus(wxChildFocusEvent& event);
-    void OnHintFadeTimer(wxTimerEvent& event);
+    // protected events
+    void OnPaint(wxPaintEvent& evt);
+    void OnEraseBackground(wxEraseEvent& evt);
+    void OnSize(wxSizeEvent& evt);
+    void OnSetCursor(wxSetCursorEvent& evt);
+    void OnLeftDown(wxMouseEvent& evt);
+    void OnLeftUp(wxMouseEvent& evt);
+    void OnMotion(wxMouseEvent& evt);
+    void OnLeaveWindow(wxMouseEvent& evt);
+    void OnChildFocus(wxChildFocusEvent& evt);
+    void OnHintFadeTimer(wxTimerEvent& evt);
 
 protected:
 
@@ -484,7 +547,7 @@
 
 protected:
 
-    wxFrame* m_frame;            // the frame being managed
+    wxWindow* m_frame;           // the window being managed
     wxDockArt* m_art;            // dock art object which does all drawing
     unsigned int m_flags;        // manager flags wxAUI_MGR_*
 
@@ -502,11 +565,14 @@
     wxRect m_last_hint;          // last hint rectangle
     wxPoint m_last_mouse_move;   // last mouse move position (see OnMotion)
 
-    wxWindow* m_hint_wnd;        // transparent hint window (for now, only msw)
-    wxTimer m_hint_fadetimer;    // transparent fade timer (for now, only msw)
-    int m_hint_fadeamt;          // transparent fade amount (for now, only msw)
+    wxFrame* m_hint_wnd;         // transparent hint window, if supported by platform
+    wxTimer m_hint_fadetimer;    // transparent fade timer
+    wxByte m_hint_fadeamt;       // transparent fade amount
+    wxByte m_hint_fademax;       // maximum value of hint fade
 
+#ifndef SWIG
     DECLARE_EVENT_TABLE()
+#endif // SWIG
 };
 
 
@@ -516,28 +582,33 @@
 class WXDLLIMPEXP_AUI wxFrameManagerEvent : public wxEvent
 {
 public:
-    wxFrameManagerEvent(wxEventType type) : wxEvent(0, type)
+    wxFrameManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type)
     {
         pane = NULL;
         button = 0;
         veto_flag = false;
         canveto_flag = true;
+        dc = NULL;
     }
-
+#ifndef SWIG
     wxFrameManagerEvent(const wxFrameManagerEvent& c) : wxEvent(c)
     {
         pane = c.pane;
         button = c.button;
         veto_flag = c.veto_flag;
         canveto_flag = c.canveto_flag;
+        dc = c.dc;
     }
-
+#endif
     wxEvent *Clone() const { return new wxFrameManagerEvent(*this); }
 
     void SetPane(wxPaneInfo* p) { pane = p; }
     void SetButton(int b) { button = b; }
+    void SetDC(wxDC* pdc) { dc = pdc; }
+ 
     wxPaneInfo* GetPane() { return pane; }
     int GetButton() { return button; }
+    wxDC* GetDC() { return dc; }
     
     void Veto(bool veto = true) { veto_flag = veto; }
     bool GetVeto() const { return veto_flag; }
@@ -549,6 +620,12 @@
     int button;
     bool veto_flag;
     bool canveto_flag;
+    wxDC* dc;
+
+#ifndef SWIG
+private:
+    DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFrameManagerEvent)
+#endif
 };
 
 
@@ -567,6 +644,7 @@
         toolbar = false;
     }
 
+#ifndef SWIG
     wxDockInfo(const wxDockInfo& c)
     {
         dock_direction = c.dock_direction;
@@ -595,6 +673,7 @@
         rect = c.rect;
         return *this;
     }
+#endif // SWIG
 
     bool IsOk() const { return (dock_direction != 0) ? true : false; }
     bool IsHorizontal() const { return (dock_direction == wxAUI_DOCK_TOP ||
@@ -652,12 +731,13 @@
 
 
 
-
+#ifndef SWIG
 // wx event machinery
 
 BEGIN_DECLARE_EVENT_TYPES()
-    DECLARE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON, 0)
-    DECLARE_EVENT_TYPE(wxEVT_AUI_PANECLOSE, 0)
+    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANEBUTTON, 0)
+    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANECLOSE, 0)
+    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
 END_DECLARE_EVENT_TYPES()
 
 typedef void (wxEvtHandler::*wxFrameManagerEventFunction)(wxFrameManagerEvent&);
@@ -669,8 +749,23 @@
    wx__DECLARE_EVT0(wxEVT_AUI_PANEBUTTON, wxFrameManagerEventHandler(func))
 #define EVT_AUI_PANECLOSE(func) \
    wx__DECLARE_EVT0(wxEVT_AUI_PANECLOSE, wxFrameManagerEventHandler(func))
+#define EVT_AUI_RENDER(func) \
+   wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxFrameManagerEventHandler(func))
 
+#else
 
+%constant wxEventType wxEVT_AUI_PANEBUTTON;
+%constant wxEventType wxEVT_AUI_PANECLOSE;
+%constant wxEventType wxEVT_AUI_RENDER;
+
+%pythoncode {
+    EVT_AUI_PANEBUTTON = wx.PyEventBinder( wxEVT_AUI_PANEBUTTON )
+    EVT_AUI_PANECLOSE = wx.PyEventBinder( wxEVT_AUI_PANECLOSE )
+    EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
+}
+#endif // SWIG
+
+
 #endif // wxUSE_AUI
 #endif //_WX_FRAMEMANAGER_H_
 
Index: Trunk/XaraLX/wxXtra/floatpane.h
===================================================================
--- Trunk/XaraLX/wxXtra/floatpane.h	(revision 1522)
+++ Trunk/XaraLX/wxXtra/floatpane.h	(revision 1523)
@@ -62,9 +62,10 @@
     wxFrameManager* m_owner_mgr;
     wxFrameManager m_mgr;
 
+#ifndef SWIG
     DECLARE_EVENT_TABLE()
-
     DECLARE_CLASS(wxFloatingPaneBaseClass)
+#endif // SWIG
 };
 
 #endif // wxUSE_AUI
Index: Trunk/XaraLX/wxXtra/framemanager.cpp
===================================================================
--- Trunk/XaraLX/wxXtra/framemanager.cpp	(revision 1522)
+++ Trunk/XaraLX/wxXtra/framemanager.cpp	(revision 1523)
@@ -43,6 +43,7 @@
 wxDockInfo wxNullDockInfo;
 DEFINE_EVENT_TYPE(wxEVT_AUI_PANEBUTTON)
 DEFINE_EVENT_TYPE(wxEVT_AUI_PANECLOSE)
+DEFINE_EVENT_TYPE(wxEVT_AUI_RENDER)
 
 #ifdef __WXMAC__
     // a few defines to avoid nameclashes
@@ -51,13 +52,14 @@
     #include "wx/mac/private.h"
 #endif
 
+IMPLEMENT_DYNAMIC_CLASS(wxFrameManagerEvent, wxEvent)
 
 class wxPseudoTransparentFrame : public wxFrame
 {
 public:
     wxPseudoTransparentFrame(wxWindow* parent = NULL,
-                wxWindowID id = -1,
-                const wxString& title = wxT(""),
+                wxWindowID id = wxID_ANY,
+                const wxString& title = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxDEFAULT_FRAME_STYLE,
@@ -73,25 +75,25 @@
 #else
         m_CanSetShape = true;
 #endif
-        SetTransparency(0);
+        SetTransparent(0);
     }
 
-    void SetTransparency(int amount)
+    virtual bool SetTransparent(wxByte alpha)
     {
         if (m_CanSetShape)
         {
             int w=100; // some defaults
             int h=100;
             GetClientSize(&w, &h);
-            if ((amount != m_Amount) || (m_MaxWidth<w) | (m_MaxHeight<h))
+            if ((alpha != m_Amount) || (m_MaxWidth<w) | (m_MaxHeight<h))
             {
                 // Make the region at least double the height and width so we don't have
                 // to rebuild if the size changes.
                 m_MaxWidth=w*2;
                 m_MaxHeight=h*2;
-                m_Amount = amount;
+                m_Amount = alpha;
                 m_Region.Clear();
-//				m_Region.Union(0, 0, 1, m_MaxWidth);
+//                m_Region.Union(0, 0, 1, m_MaxWidth);
                 if (m_Amount)
                 {
                     for (int y=0; y<m_MaxHeight; y++)
@@ -106,17 +108,18 @@
                 Refresh();
             }
         }
+        return true;
     }
 
-    void OnPaint(wxPaintEvent & event)
+    void OnPaint(wxPaintEvent& WXUNUSED(event))
     {
         wxPaintDC dc(this);
-        
+
         dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
         dc.SetPen(*wxTRANSPARENT_PEN);
-        
+
         wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
-        
+
         while (upd)
         {
             wxRect rect(upd.GetRect());
@@ -127,7 +130,7 @@
     }
 
 #ifdef __WXGTK__
-    void OnWindowCreate(wxWindowCreateEvent& WXUNUSED(event)) {m_CanSetShape=true; SetTransparency(0);}
+    void OnWindowCreate(wxWindowCreateEvent& WXUNUSED(event)) {m_CanSetShape=true; SetTransparent(0);}
 #endif
 
 private:
@@ -138,8 +141,8 @@
 
     wxRegion m_Region;
 
-    DECLARE_DYNAMIC_CLASS(wxPseudoTransparentFrame);
-    DECLARE_EVENT_TABLE();
+    DECLARE_DYNAMIC_CLASS(wxPseudoTransparentFrame)
+    DECLARE_EVENT_TABLE()
 };
 
 
@@ -152,6 +155,7 @@
 #endif
 END_EVENT_TABLE()
 
+
 // -- static utility functions --
 
 static wxBitmap wxPaneCreateStippleBitmap()
@@ -172,59 +176,8 @@
     dc.DrawRectangle(rect);
 }
 
-// on supported windows systems (Win2000 and greater), this function
-// will make a frame window transparent by a certain amount
-static void MakeWindowTransparent(wxWindow* wnd, int amount)
-{
-    bool realtransparency = !(wnd && wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)));
-    if (realtransparency)
-    {
-#ifdef __WXMSW__
-        // this API call is not in all SDKs, only the newer ones, so
-        // we will runtime bind this
-    
-        typedef DWORD (WINAPI *PSETLAYEREDWINDOWATTR)(HWND, DWORD, BYTE, DWORD);
-        static PSETLAYEREDWINDOWATTR pSetLayeredWindowAttributes = NULL;
-        static HMODULE h = NULL;
-        HWND hwnd = (HWND)wnd->GetHWND();
-    
-        if (!h)
-            h = LoadLibrary(_T("user32"));
-    
-        if (!pSetLayeredWindowAttributes)
-        {
-            pSetLayeredWindowAttributes =
-            (PSETLAYEREDWINDOWATTR)GetProcAddress(h,
-#ifdef __WXWINCE__
-                                                    wxT("SetLayeredWindowAttributes")
-#else
-                                                    "SetLayeredWindowAttributes"
-#endif
-                                                );
-        }
-    
-        if (pSetLayeredWindowAttributes == NULL)
-            return;
-    
-        LONG exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
-        if (0 == (exstyle & 0x80000) /*WS_EX_LAYERED*/)
-            SetWindowLong(hwnd, GWL_EXSTYLE, exstyle | 0x80000 /*WS_EX_LAYERED*/);
-    
-        pSetLayeredWindowAttributes(hwnd, 0, (BYTE)amount, 2 /*LWA_ALPHA*/);
-#endif
-    }
-    else
-    {
-        if (wnd)
-        {
-            ((wxPseudoTransparentFrame *)wnd)->SetTransparency(amount);
-            wnd->Refresh();
-        }
-    }
-}
 
 
-
 // CopyDocksAndPanes() - this utility function creates copies of
 // the dock and pane info.  wxDockInfo's usually contain pointers
 // to wxPaneInfo classes, thus this function is necessary to reliably
@@ -467,6 +420,7 @@
 
 BEGIN_EVENT_TABLE(wxFrameManager, wxEvtHandler)
     EVT_AUI_PANEBUTTON(wxFrameManager::OnPaneButton)
+    EVT_AUI_RENDER(wxFrameManager::OnRender)
     EVT_PAINT(wxFrameManager::OnPaint)
     EVT_ERASE_BACKGROUND(wxFrameManager::OnEraseBackground)
     EVT_SIZE(wxFrameManager::OnSize)
@@ -480,7 +434,7 @@
 END_EVENT_TABLE()
 
 
-wxFrameManager::wxFrameManager(wxFrame* frame, unsigned int flags)
+wxFrameManager::wxFrameManager(wxWindow* managed_wnd, unsigned int flags)
 {
     m_action = actionNone;
     m_last_mouse_move = wxPoint();
@@ -489,9 +443,9 @@
     m_hint_wnd = NULL;
     m_flags = flags;
 
-    if (frame)
+    if (managed_wnd)
     {
-        SetFrame(frame);
+        SetManagedWindow(managed_wnd);
     }
 }
 
@@ -589,10 +543,25 @@
 }
 
 
-// SetFrame() is usually called once when the frame
+// don't use these anymore as they are deprecated
+// use Set/GetManagedFrame() instead
+void wxFrameManager::SetFrame(wxFrame* frame)
+{
+    SetManagedWindow((wxWindow*)frame);
+}
+
+wxFrame* wxFrameManager::GetFrame() const
+{
+    return (wxFrame*)m_frame;
+}
+
+
+
+
+// SetManagedWindow() is usually called once when the frame
 // manager class is being initialized.  "frame" specifies
 // the frame which should be managed by the frame mananger
-void wxFrameManager::SetFrame(wxFrame* frame)
+void wxFrameManager::SetManagedWindow(wxWindow* frame)
 {
     wxASSERT_MSG(frame, wxT("specified frame must be non-NULL"));
 
@@ -616,6 +585,59 @@
                 CenterPane().PaneBorder(false));
     }
 #endif
+
+    // Make a window to use for a transparent hint
+#if defined(__WXMSW__) || defined(__WXGTK__)
+    m_hint_wnd = new wxFrame(m_frame, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(1,1),
+                             wxFRAME_TOOL_WINDOW |
+                             wxFRAME_FLOAT_ON_PARENT |
+                             wxFRAME_NO_TASKBAR |
+                             wxNO_BORDER);
+
+    m_hint_wnd->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
+
+#elif defined(__WXMAC__)
+    // Using a miniframe with float and tool styles keeps the parent
+    // frame activated and highlighted as such...
+    m_hint_wnd = new wxMiniFrame(m_frame, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(1,1),
+                                 wxFRAME_FLOAT_ON_PARENT
+                                 | wxFRAME_TOOL_WINDOW
+                                 | wxCAPTION );
+
+    // Can't set the bg colour of a Frame in wxMac
+    wxPanel* p = new wxPanel(m_hint_wnd);
+
+    // The default wxSYS_COLOUR_ACTIVECAPTION colour is a light silver
+    // color that is really hard to see, especially transparent.
+    // Until a better system color is decided upon we'll just use
+    // blue.
+    p->SetBackgroundColour(*wxBLUE);
+#endif
+
+    m_hint_fademax=50;
+
+    if (m_hint_wnd
+        // CanSetTransparent is only present in the 2.7.0 ABI. To allow this file to be easily used
+        // in a backported environment, conditionally compile this in.
+#if wxCHECK_VERSION(2,7,0)
+       && !m_hint_wnd->CanSetTransparent()
+#endif
+        )
+    {
+
+        m_hint_wnd->Close();
+        m_hint_wnd->Destroy();
+        m_hint_wnd = NULL;
+
+        // If we can convert it to a PseudoTransparent window, do so
+        m_hint_wnd = new wxPseudoTransparentFrame (m_frame, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(1,1),
+                                                wxFRAME_TOOL_WINDOW |
+                                                wxFRAME_FLOAT_ON_PARENT |
+                                                wxFRAME_NO_TASKBAR |
+                                                wxNO_BORDER);
+
+        m_hint_fademax = 128;
+    }
 }
 
 
@@ -627,8 +649,8 @@
     m_frame->RemoveEventHandler(this);
 }
 
-// GetFrame() returns the frame pointer being managed by wxFrameManager
-wxFrame* wxFrameManager::GetFrame() const
+// GetManagedWindow() returns the window pointer being managed
+wxWindow* wxFrameManager::GetManagedWindow() const
 {
     return m_frame;
 }
@@ -757,6 +779,20 @@
     return AddPane(window, pinfo);
 }
 
+bool wxFrameManager::AddPane(wxWindow* window,
+                             const wxPaneInfo& pane_info,
+                             const wxPoint& drop_pos)
+{
+    if (!AddPane(window, pane_info))
+        return false;
+
+    wxPaneInfo& pane = GetPane(window);
+
+    DoDrop(m_docks, m_panes, pane, drop_pos, wxPoint(0,0));
+
+    return true;
+}
+
 bool wxFrameManager::InsertPane(wxWindow* window, const wxPaneInfo& pane_info,
                                 int insert_level)
 {
@@ -838,6 +874,24 @@
                 p.frame->Destroy();
                 p.frame = NULL;
             }
+
+            // make sure there are no references to this pane in our uiparts,
+            // just in case the caller doesn't call Update() immediately after
+            // the DetachPane() call.  This prevets obscure crashes which would
+            // happen at window repaint if the caller forgets to call Update()
+            int pi, part_count;
+            for (pi = 0, part_count = (int)m_uiparts.GetCount(); pi < part_count; ++pi)
+            {
+                wxDockUIPart& part = m_uiparts.Item(pi);
+                if (part.pane == &p)
+                {
+                    m_uiparts.RemoveAt(pi);
+                    part_count--;
+                    pi--;
+                    continue;
+                }
+            }
+
             m_panes.RemoveAt(i);
             return true;
         }
@@ -864,7 +918,111 @@
     return result;
 }
 
+wxString wxFrameManager::SavePaneInfo(wxPaneInfo& pane)
+{
+    wxString result = wxT("name=");
+    result += EscapeDelimiters(pane.name);
+    result += wxT(";");
 
+    result += wxT("caption=");
+    result += EscapeDelimiters(pane.caption);
+    result += wxT(";");
+
+    result += wxString::Format(wxT("state=%u;"), pane.state);
+    result += wxString::Format(wxT("dir=%d;"), pane.dock_direction);
+    result += wxString::Format(wxT("layer=%d;"), pane.dock_layer);
+    result += wxString::Format(wxT("row=%d;"), pane.dock_row);
+    result += wxString::Format(wxT("pos=%d;"), pane.dock_pos);
+    result += wxString::Format(wxT("prop=%d;"), pane.dock_proportion);
+    result += wxString::Format(wxT("bestw=%d;"), pane.best_size.x);
+    result += wxString::Format(wxT("besth=%d;"), pane.best_size.y);
+    result += wxString::Format(wxT("minw=%d;"), pane.min_size.x);
+    result += wxString::Format(wxT("minh=%d;"), pane.min_size.y);
+    result += wxString::Format(wxT("maxw=%d;"), pane.max_size.x);
+    result += wxString::Format(wxT("maxh=%d;"), pane.max_size.y);
+    result += wxString::Format(wxT("floatx=%d;"), pane.floating_pos.x);
+    result += wxString::Format(wxT("floaty=%d;"), pane.floating_pos.y);
+    result += wxString::Format(wxT("floatw=%d;"), pane.floating_size.x);
+    result += wxString::Format(wxT("floath=%d"), pane.floating_size.y);
+
+    return result;
+}
+
+// Load a "pane" with the pane infor settings in pane_part; return the remainder of the
+// string
+wxString wxFrameManager::LoadPaneInfo(wxString pane_part, wxPaneInfo &pane)
+{
+    // replace escaped characters so we can
+    // split up the string easily
+    pane_part.Replace(wxT("\|"), wxT(""));
+    pane_part.Replace(wxT("\;"), wxT(""));
+
+    wxString val_part = pane_part.BeforeFirst(wxT(';'));
+    pane_part = pane_part.AfterFirst(wxT(';'));
+    wxString val_name = val_part.BeforeFirst(wxT('='));
+    wxString value = val_part.AfterFirst(wxT('='));
+    val_name.MakeLower();
+    val_name.Trim(true);
+    val_name.Trim(false);
+    value.Trim(true);
+    value.Trim(false);
+
+    if (val_name.empty())
+        return wxEmptyString;
+
+    if (val_name == wxT("name"))
+        pane.name = value;
+    else if (val_name == wxT("caption"))
+        pane.caption = value;
+    else if (val_name == wxT("state"))
+        pane.state = (unsigned int)wxAtoi(value.c_str());
+    else if (val_name == wxT("dir"))
+        pane.dock_direction = wxAtoi(value.c_str());
+    else if (val_name == wxT("layer"))
+        pane.dock_layer = wxAtoi(value.c_str());
+    else if (val_name == wxT("row"))
+        pane.dock_row = wxAtoi(value.c_str());
+    else if (val_name == wxT("pos"))
+        pane.dock_pos = wxAtoi(value.c_str());
+    else if (val_name == wxT("prop"))
+        pane.dock_proportion = wxAtoi(value.c_str());
+    else if (val_name == wxT("bestw"))
+        pane.best_size.x = wxAtoi(value.c_str());
+    else if (val_name == wxT("besth"))
+        pane.best_size.y = wxAtoi(value.c_str());
+    else if (val_name == wxT("minw"))
+        pane.min_size.x = wxAtoi(value.c_str());
+    else if (val_name == wxT("minh"))
+        pane.min_size.y = wxAtoi(value.c_str());
+    else if (val_name == wxT("maxw"))
+        pane.max_size.x = wxAtoi(value.c_str());
+    else if (val_name == wxT("maxh"))
+        pane.max_size.y = wxAtoi(value.c_str());
+    else if (val_name == wxT("floatx"))
+        pane.floating_pos.x = wxAtoi(value.c_str());
+    else if (val_name == wxT("floaty"))
+        pane.floating_pos.y = wxAtoi(value.c_str());
+    else if (val_name == wxT("floatw"))
+        pane.floating_size.x = wxAtoi(value.c_str());
+    else if (val_name == wxT("floath"))
+        pane.floating_size.y = wxAtoi(value.c_str());
+    else {
+        wxFAIL_MSG(wxT("Bad Perspective String"));
+    }
+
+    // replace escaped characters so we can
+    // split up the string easily
+    pane.name.Replace(wxT(""), wxT("|"));
+    pane.name.Replace(wxT(""), wxT(";"));
+    pane.caption.Replace(wxT(""), wxT("|"));
+    pane.caption.Replace(wxT(""), wxT(";"));
+    pane_part.Replace(wxT(""), wxT("|"));
+    pane_part.Replace(wxT(""), wxT(";"));
+
+    return pane_part;
+}
+
+
 // SavePerspective() saves all pane information as a single string.
 // This string may later be fed into LoadPerspective() to restore
 // all pane settings.  This save and load mechanism allows an
@@ -880,32 +1038,7 @@
     for (pane_i = 0; pane_i < pane_count; ++pane_i)
     {
         wxPaneInfo& pane = m_panes.Item(pane_i);
-
-        result += wxT("name=");
-        result += EscapeDelimiters(pane.name);
-        result += wxT(";");
-
-        result += wxT("caption=");
-        result += EscapeDelimiters(pane.caption);
-        result += wxT(";");
-
-        result += wxString::Format(wxT("state=%u;"), pane.state);
-        result += wxString::Format(wxT("dir=%d;"), pane.dock_direction);
-        result += wxString::Format(wxT("layer=%d;"), pane.dock_layer);
-        result += wxString::Format(wxT("row=%d;"), pane.dock_row);
-        result += wxString::Format(wxT("pos=%d;"), pane.dock_pos);
-        result += wxString::Format(wxT("prop=%d;"), pane.dock_proportion);
-        result += wxString::Format(wxT("bestw=%d;"), pane.best_size.x);
-        result += wxString::Format(wxT("besth=%d;"), pane.best_size.y);
-        result += wxString::Format(wxT("minw=%d;"), pane.min_size.x);
-        result += wxString::Format(wxT("minh=%d;"), pane.min_size.y);
-        result += wxString::Format(wxT("maxw=%d;"), pane.max_size.x);
-        result += wxString::Format(wxT("maxh=%d;"), pane.max_size.y);
-        result += wxString::Format(wxT("floatx=%d;"), pane.floating_pos.x);
-        result += wxString::Format(wxT("floaty=%d;"), pane.floating_pos.y);
-        result += wxString::Format(wxT("floatw=%d;"), pane.floating_size.x);
-        result += wxString::Format(wxT("floath=%d"), pane.floating_size.y);
-        result += wxT("|");
+        result += SavePaneInfo(pane)+wxT("|");
     }
 
     int dock_i, dock_count = m_docks.GetCount();
@@ -937,7 +1070,6 @@
     if (part != wxT("layout1"))
         return false;
 
-
     // mark all panes currently managed as docked and hidden
     int pane_i, pane_count = m_panes.GetCount();
     for (pane_i = 0; pane_i < pane_count; ++pane_i)
@@ -963,7 +1095,6 @@
         if (pane_part.empty())
             break;
 
-
         if (pane_part.Left(9) == wxT("dock_size"))
         {
             wxString val_name = pane_part.BeforeFirst(wxT('='));
@@ -987,69 +1118,16 @@
             continue;
         }
 
-        while (1)
+        // Undo our escaping as LoadPaneInfo needs to take an unescaped
+        // name so it can be called by external callers
+        pane_part.Replace(wxT(""), wxT("|"));
+        pane_part.Replace(wxT(""), wxT(";"));
+
+        while (!pane_part.empty())
         {
-            wxString val_part = pane_part.BeforeFirst(wxT(';'));
-            pane_part = pane_part.AfterFirst(wxT(';'));
-            wxString val_name = val_part.BeforeFirst(wxT('='));
-            wxString value = val_part.AfterFirst(wxT('='));
-            val_name.MakeLower();
-            val_name.Trim(true);
-            val_name.Trim(false);
-            value.Trim(true);
-            value.Trim(false);
-
-            if (val_name.empty())
-                break;
-
-            if (val_name == wxT("name"))
-                pane.name = value;
-            else if (val_name == wxT("caption"))
-                pane.caption = value;
-            else if (val_name == wxT("state"))
-                pane.state = (unsigned int)wxAtoi(value.c_str());
-            else if (val_name == wxT("dir"))
-                pane.dock_direction = wxAtoi(value.c_str());
-            else if (val_name == wxT("layer"))
-                pane.dock_layer = wxAtoi(value.c_str());
-            else if (val_name == wxT("row"))
-                pane.dock_row = wxAtoi(value.c_str());
-            else if (val_name == wxT("pos"))
-                pane.dock_pos = wxAtoi(value.c_str());
-            else if (val_name == wxT("prop"))
-                pane.dock_proportion = wxAtoi(value.c_str());
-            else if (val_name == wxT("bestw"))
-                pane.best_size.x = wxAtoi(value.c_str());
-            else if (val_name == wxT("besth"))
-                pane.best_size.y = wxAtoi(value.c_str());
-            else if (val_name == wxT("minw"))
-                pane.min_size.x = wxAtoi(value.c_str());
-            else if (val_name == wxT("minh"))
-                pane.min_size.y = wxAtoi(value.c_str());
-            else if (val_name == wxT("maxw"))
-                pane.max_size.x = wxAtoi(value.c_str());
-            else if (val_name == wxT("maxh"))
-                pane.max_size.y = wxAtoi(value.c_str());
-            else if (val_name == wxT("floatx"))
-                pane.floating_pos.x = wxAtoi(value.c_str());
-            else if (val_name == wxT("floaty"))
-                pane.floating_pos.y = wxAtoi(value.c_str());
-            else if (val_name == wxT("floatw"))
-                pane.floating_size.x = wxAtoi(value.c_str());
-            else if (val_name == wxT("floath"))
-                pane.floating_size.y = wxAtoi(value.c_str());
-            else {
-                wxFAIL_MSG(wxT("Bad Perspective String"));
-            }
+            pane_part = LoadPaneInfo(pane_part, pane);
         }
 
-        // replace escaped characters so we can
-        // split up the string easily
-        pane.name.Replace(wxT(""), wxT("|"));
-        pane.name.Replace(wxT(""), wxT(";"));
-        pane.caption.Replace(wxT(""), wxT("|"));
-        pane.caption.Replace(wxT(""), wxT(";"));
-
         wxPaneInfo& p = GetPane(pane.name);
         if (!p.IsOk())
         {
@@ -1058,10 +1136,8 @@
             return false;
         }
 
-        pane.window = p.window;
-        pane.frame = p.frame;
-        pane.buttons = p.buttons;
-        p = pane;
+        p.SafeSet(pane);
+
     }
 
     if (update)
@@ -1070,7 +1146,6 @@
     return true;
 }
 
-
 void wxFrameManager::GetPanePositionsAndSizes(wxDockInfo& dock,
                                               wxArrayInt& positions,
                                               wxArrayInt& sizes)
@@ -1261,7 +1336,9 @@
     {
         sizer_item = vert_pane_sizer->Add(pane.window, 1, wxEXPAND);
         // Don't do this because it breaks the pane size in floating windows
-        // vert_pane_sizer->SetItemMinSize(pane.window, 1, 1);
+        // BIW: Right now commenting this out is causing problems with
+        // an mdi client window as the center pane.
+        vert_pane_sizer->SetItemMinSize(pane.window, 1, 1);
     }
 
     part.type = wxDockUIPart::typePane;
@@ -1889,13 +1966,13 @@
                                                   this,
                                                   p);
 
-                // on MSW, if the owner desires transparent dragging, and
+#if wxCHECK_VERSION(2,7,0)
+                // on MSW and Mac, if the owner desires transparent dragging, and
                 // the dragging is happening right now, then the floating
                 // window should have this style by default
-#ifdef __WXMSW__
                 if (m_action == actionDragFloatingPane &&
                     (m_flags & wxAUI_MGR_TRANSPARENT_DRAG))
-                        MakeWindowTransparent(frame, 150);
+                        frame->SetTransparent(150);
 #endif
 
                 frame->SetPaneWindow(p);
@@ -1913,7 +1990,8 @@
                 if (p.frame->GetPosition() != p.floating_pos)
                 {
                     p.frame->SetSize(p.floating_pos.x, p.floating_pos.y,
-                                     -1, -1, wxSIZE_USE_EXISTING);
+                                     wxDefaultCoord, wxDefaultCoord,
+                                     wxSIZE_USE_EXISTING);
                     //p.frame->Move(p.floating_pos.x, p.floating_pos.y);
                 }
 
@@ -2136,7 +2214,7 @@
 // if a dock operation is allowed, the new dock position is copied into
 // the target info.  If the operation was allowed, the function returns true.
 
-static bool ProcessDockResult(wxPaneInfo& target,
+bool wxFrameManager::ProcessDockResult(wxPaneInfo& target,
                               const wxPaneInfo& new_pos)
 {
     bool allowed = false;
@@ -2516,112 +2594,145 @@
 
 void wxFrameManager::OnHintFadeTimer(wxTimerEvent& WXUNUSED(event))
 {
-    bool realtransparency = !(m_hint_wnd && m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)));
-    if (!m_hint_wnd || m_hint_fadeamt >= (realtransparency?50:128))
+    if (!m_hint_wnd || m_hint_fadeamt >= m_hint_fademax)
     {
         m_hint_fadetimer.Stop();
         return;
     }
-    
-    m_hint_fadeamt += 5;
-    MakeWindowTransparent(m_hint_wnd, m_hint_fadeamt);
+
+    m_hint_fadeamt += 4;
+#if wxCHECK_VERSION(2,7,0)
+    m_hint_wnd->SetTransparent(m_hint_fadeamt);
+#else
+    if (m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)))
+        ((wxPseudoTransparentFrame *)m_hint_wnd)->SetTransparent(m_hint_fadeamt);
+#endif
 }
 
 void wxFrameManager::ShowHint(const wxRect& rect)
 {
+    if ((m_flags & wxAUI_MGR_TRANSPARENT_HINT) != 0
+        && m_hint_wnd
+        // Finally, don't use a venetian blind effect if it's been specifically disabled
+        && !((m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame))) &&
+             (m_flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS))
+       )
+    {
+        if (m_last_hint == rect)
+            return;
+        m_last_hint = rect;
 
-    static bool realtransparency = false;
-    // First, determine if the operating system can handle transparency.
-    // Transparency is available on Win2000 and above
-#ifdef __WXMSW__
-    static int os_type = -1;
-    static int ver_major = -1;
+        m_hint_fadeamt = m_hint_fademax;
+        if ((m_flags & wxAUI_MGR_TRANSPARENT_HINT_FADE)
+            && !((m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame))) &&
+                 (m_flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE))
+            )
+            m_hint_fadeamt = 0;
 
-    if (os_type == -1)
-        os_type = ::wxGetOsVersion(&ver_major);
+        if (! m_hint_wnd->IsShown())
+            m_hint_wnd->Show();
 
-    realtransparency = (m_flags & wxAUI_MGR_TRANSPARENT_HINT) && os_type == wxWINDOWS_NT && ver_major >= 5;
+        // if we are dragging a floating pane, set the focus
+        // back to that floating pane (otherwise it becomes unfocused)
+        if (m_action == actionDragFloatingPane && m_action_window)
+            m_action_window->SetFocus();
+
+#if wxCHECK_VERSION(2,7,0)
+        m_hint_wnd->SetTransparent(m_hint_fadeamt);
+#else
+        if (m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)))
+            ((wxPseudoTransparentFrame *)m_hint_wnd)->SetTransparent(m_hint_fadeamt);
 #endif
+        m_hint_wnd->SetSize(rect);
+        m_hint_wnd->Raise();
 
-    // If the transparent flag is set, and the OS supports it,
-    // go ahead and use a transparent hint
 
-    if (m_last_hint == rect)
-        return;
-    m_last_hint = rect;
+        if (m_hint_fadeamt != m_hint_fademax) //  Only fade if we need to
+        {
+            // start fade in timer
+            m_hint_fadetimer.SetOwner(this, 101);
+            m_hint_fadetimer.Start(5);
+        }
+    }
 
-    int initial_fade = realtransparency?50:128;
-    if (m_flags & wxAUI_MGR_TRANSPARENT_HINT_FADE)
-        initial_fade = 0;
+    else  // Not using a transparent hint window...
+    {
 
+        if (m_last_hint != rect)
+        {
+            // remove the last hint rectangle
+            m_last_hint = rect;
+            m_frame->Refresh();
+            m_frame->Update();
+        }
 
-    if (m_hint_wnd == NULL)
-    {
-        wxPoint pt = rect.GetPosition();
-        wxSize size = rect.GetSize();
+        wxScreenDC screendc;
+        wxRegion clip(1, 1, 10000, 10000);
 
-        if (realtransparency)
+        // clip all floating windows, so we don't draw over them
+        int i, pane_count;
+        for (i = 0, pane_count = m_panes.GetCount(); i < pane_count; ++i)
         {
-#ifdef __WXMSW__
-            m_hint_wnd = new wxFrame(m_frame, -1, wxEmptyString, pt, size,
-                                        wxFRAME_TOOL_WINDOW |
-                                        wxFRAME_FLOAT_ON_PARENT |
-                                        wxFRAME_NO_TASKBAR |
-                                        wxNO_BORDER);
-            m_hint_wnd->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION));
+            wxPaneInfo& pane = m_panes.Item(i);
+
+            if (pane.IsFloating() &&
+                pane.frame->IsShown())
+            {
+                wxRect rect = pane.frame->GetRect();
+#ifdef __WXGTK__
+                // wxGTK returns the client size, not the whole frame size
+                rect.width += 15;
+                rect.height += 35;
+                rect.Inflate(5);
 #endif
+
+                clip.Subtract(rect);
+            }
         }
-        else
-        {
-            m_hint_wnd = new wxPseudoTransparentFrame (m_frame, -1, wxEmptyString, pt, size,
-                                        wxFRAME_TOOL_WINDOW |
-                                        wxFRAME_FLOAT_ON_PARENT |
-                                        wxFRAME_NO_TASKBAR |
-                                        wxNO_BORDER);
-        }
 
-        MakeWindowTransparent(m_hint_wnd, initial_fade);
-        m_hint_wnd->Show();
+        // As we can only hide the hint by redrawing the managed window, we
+        // need to clip the region to the managed window too or we get
+        // nasty redrawn problems.
+        clip.Intersect(m_frame->GetRect());
 
-        // if we are dragging a floating pane, set the focus
-        // back to that floating pane (otherwise it becomes unfocused)
-        if (m_action == actionDragFloatingPane && m_action_window)
-            m_action_window->SetFocus();
+        screendc.SetClippingRegion(clip);
 
-    }
-    else
-    {
-        MakeWindowTransparent(m_hint_wnd, initial_fade);
-        m_hint_wnd->SetSize(rect);
-    }
+        wxBitmap stipple = wxPaneCreateStippleBitmap();
+        wxBrush brush(stipple);
+        screendc.SetBrush(brush);
+        screendc.SetPen(*wxTRANSPARENT_PEN);
 
-    if (m_flags & wxAUI_MGR_TRANSPARENT_HINT_FADE)
-    {
-        // start fade in timer
-        m_hint_fadeamt = 0;
-        m_hint_fadetimer.SetOwner(this, 101);
-        m_hint_fadetimer.Start(5);
+        screendc.DrawRectangle(rect.x, rect.y, 5, rect.height);
+        screendc.DrawRectangle(rect.x+5, rect.y, rect.width-10, 5);
+        screendc.DrawRectangle(rect.x+rect.width-5, rect.y, 5, rect.height);
+        screendc.DrawRectangle(rect.x+5, rect.y+rect.height-5, rect.width-10, 5);
     }
-
-    return;
 }
 
 void wxFrameManager::HideHint()
 {
-    // hides a transparent window hint (currently wxMSW only)
+    // hides a transparent window hint, if there is one
     if (m_hint_wnd)
     {
-        MakeWindowTransparent(m_hint_wnd, 0);
+        m_hint_wnd->Show(false);
+#if wxCHECK_VERSION(2,7,0)
+        m_hint_wnd->SetTransparent(0);
+#else
+        if (m_hint_wnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame)))
+        ((wxPseudoTransparentFrame *)m_hint_wnd)->SetTransparent(0);
+#endif
         m_hint_fadetimer.Stop();
         m_last_hint = wxRect();
-        m_hint_wnd->Hide();
-
-        // We don't need to destroy the hint window here, as it gets reused, but let's try.
-        m_hint_wnd->Destroy();
-        m_hint_wnd=NULL;
-
         return;
     }
+
+    // hides a painted hint by redrawing the frame window
+    if (!m_last_hint.IsEmpty())
+    {
+        m_frame->Refresh();
+        m_frame->Update();
+        m_last_hint = wxRect();
+    }
 }
 
 
@@ -2649,6 +2760,7 @@
     wxDockUIPartArray uiparts;
     wxPaneInfo hint = GetPane(pane_window);
     hint.name = wxT("__HINT__");
+    hint.Show();
 
     if (!hint.IsOk())
         return;
@@ -2714,9 +2826,9 @@
     wxPaneInfo& pane = GetPane(wnd);
     wxASSERT_MSG(pane.IsOk(), wxT("Pane window not found"));
 
-#ifdef __WXMSW__
+#if wxCHECK_VERSION(2,7,0)
     if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
-        MakeWindowTransparent(pane.frame, 150);
+        pane.frame->SetTransparent(150);
 #endif
 }
 
@@ -2803,26 +2915,22 @@
 
     // if a key modifier is pressed while dragging the frame,
     // don't dock the window
-    if (wxGetKeyState(WXK_CONTROL) || wxGetKeyState(WXK_ALT))
+    if (!wxGetKeyState(WXK_CONTROL) && !wxGetKeyState(WXK_ALT))
     {
-        HideHint();
-        return;
+        // do the drop calculation
+        DoDrop(m_docks, m_panes, pane, client_pt, action_offset);
     }
 
-
-    // do the drop calculation
-    DoDrop(m_docks, m_panes, pane, client_pt, action_offset);
-
     // if the pane is still floating, update it's floating
     // position (that we store)
     if (pane.IsFloating())
     {
         pane.floating_pos = pane.frame->GetPosition();
 
-        #ifdef __WXMSW__
+#if wxCHECK_VERSION(2,7,0)
         if (m_flags & wxAUI_MGR_TRANSPARENT_DRAG)
-            MakeWindowTransparent(pane.frame, 255);
-        #endif
+            pane.frame->SetTransparent(255);
+#endif
     }
 
     Update();
@@ -2852,7 +2960,7 @@
     e.SetPane(&pane);
     e.SetCanVeto(evt.CanVeto());
     ProcessMgrEvent(e);
-    
+
     if (e.GetVeto())
     {
         evt.Veto();
@@ -2883,12 +2991,14 @@
     }
 }
 
-// Render() draws all of the pane captions, sashes,
+// OnRender() draws all of the pane captions, sashes,
 // backgrounds, captions, grippers, pane borders and buttons.
 // It renders the entire user interface.
 
-void wxFrameManager::Render(wxDC* dc)
+void wxFrameManager::OnRender(wxFrameManagerEvent& evt)
 {
+    wxDC* dc = evt.GetDC();
+
 #ifdef __WXMAC__
     dc->Clear() ;
 #endif
@@ -2928,6 +3038,20 @@
     }
 }
 
+
+// Render() fire a render event, which is normally handled by
+// wxFrameManager::OnRender().  This allows the render function to
+// be overridden via the render event.  This can be useful for paintin
+// custom graphics in the main window. Default behavior can be
+// invoked in the overridden function by calling OnRender()
+
+void wxFrameManager::Render(wxDC* dc)
+{
+    wxFrameManagerEvent e(wxEVT_AUI_RENDER);
+    e.SetDC(dc);
+    ProcessMgrEvent(e);
+}
+
 void wxFrameManager::Repaint(wxDC* dc)
 {
 #ifdef __WXMAC__
@@ -3561,6 +3685,8 @@
             m_frame->Refresh();
         }
     }
+
+    event.Skip();
 }
 
 
@@ -3569,7 +3695,7 @@
 void wxFrameManager::OnPaneButton(wxFrameManagerEvent& evt)
 {
     wxASSERT_MSG(evt.pane, wxT("Pane Info passed to wxFrameManager::OnPaneButton must be non-null"));
-    
+
     wxPaneInfo& pane = *(evt.pane);
 
     if (evt.button == wxPaneInfo::buttonClose)
@@ -3578,7 +3704,7 @@
         wxFrameManagerEvent e(wxEVT_AUI_PANECLOSE);
         e.SetPane(evt.pane);
         ProcessMgrEvent(e);
-        
+
         if (!e.GetVeto())
         {
             pane.Hide();
Index: Trunk/XaraLX/wxXtra/dockart.h
===================================================================
--- Trunk/XaraLX/wxXtra/dockart.h	(revision 1522)
+++ Trunk/XaraLX/wxXtra/dockart.h	(revision 1523)
@@ -43,8 +43,8 @@
     virtual wxFont GetFont(int id) = 0;
     virtual wxColour GetColour(int id) = 0;
     virtual void SetColour(int id, const wxColor& colour) = 0;
-    wxColor GetColor(int id) { return GetColour(id); }
-    void SetColor(int id, const wxColor& color) { SetColour(id, color); }
+    wxColour GetColor(int id) { return GetColour(id); }
+    void SetColor(int id, const wxColour& color) { SetColour(id, color); }
 
     virtual void DrawSash(wxDC& dc,
                           int orientation,
Index: Trunk/XaraLX/wxOil/camframe.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camframe.cpp	(revision 1522)
+++ Trunk/XaraLX/wxOil/camframe.cpp	(revision 1523)
@@ -359,7 +359,7 @@
 #if defined(USE_WXAUI)
 	m_pFrameManager = new CamFrameManager;
 	if (!m_pFrameManager) return FALSE;
-	m_pFrameManager->SetFrame(this);
+	m_pFrameManager->SetManagedWindow(this);
 	
 	m_pFrameManager->SetFlags(m_pFrameManager->GetFlags() |
 							wxAUI_MGR_ALLOW_FLOATING


Xara