Kirix Support Forums

Small addition in floating pane dragging

Please post any wxAUI patches or modifications you've created here. Thanks!

Small addition in floating pane dragging

Postby mandrav on Sat Jan 07, 2006 2:47 pm

Some times you want to drag a floating pane around without it being docked (say, because it's in the way).
This patch looks if ALT is pressed while dragging and, if so, doesn't allow dropping. It also disables the hint rect.

Code: Select all
--- manager-base.cpp   Wed Dec 14 18:04:54 2005
+++ manager.cpp   Sat Jan 07 15:40:28 2006
@@ -2976,7 +2988,10 @@
+    if (!wxGetKeyState(WXK_ALT))
     DrawHintRect(wnd, client_pt, action_offset);
+    else
+        RemoveHint();

     #ifdef __WXGTK__
     // this cleans up some screen artifacts that are caused on GTK because
@@ -3005,6 +3020,7 @@
     wxPoint action_offset(pt.x-frame_pos.x, pt.y-frame_pos.y);
     // do the drop calculation
+    if (!wxGetKeyState(WXK_ALT))
     DoDrop(m_docks, m_panes, pane, client_pt, action_offset);

     // if the pane is still floating, update it's floating
Registered User
Posts: 6
Joined: Sat Jan 07, 2006 2:31 pm
Location: Athens, Greece

Postby Guest on Sun Jan 08, 2006 1:29 am

Yeah, I agree too. I also thought that maybe we might want a keyboard modifier to prevent docking. I'll try out the patch on Monday.


Return to wxAUI Patches & Modifications