/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
+// Name: bardragpl.cpp
+// Purpose: cbBarDragPlugin implementation
// Author: Aleksandras Gluchovas
// Modified by:
// Created: 23/09/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
: mousePos.x > bounds.x;
// NOTE:: about all the below min/max things: they are meant to ensure
- // that mouse pointer doesn't overrun (leave) the hint-rectangle
- // when dimensions it's are recalculated upon sticking it to the pane
+ // that the mouse pointer doesn't overrun (leave) the hint-rectangle
+ // when its dimensions are recalculated upon sticking it to the pane
if ( pPane->IsHorizontal() && fromLowerEdge )
{
void cbBarDragPlugin::UnstickFromPane( cbDockPane* pPane, wxPoint& mousePos )
{
- // unsticking causes rectangle to get the shape, in which
+ // unsticking causes rectangle to get the shape in which
// dragged control-bar would be when floated
-
int newWidth = mpDraggedBar->mDimInfo.mSizes[wxCBAR_FLOATING].x;
int newHeight = mpDraggedBar->mDimInfo.mSizes[wxCBAR_FLOATING].y;
if ( pPane->IsHorizontal() && fromLowerEdge )
{
- bool fromLowerEdge = mousePos.y > bounds.y;
+// bool fromLowerEdge = mousePos.y > bounds.y;
mHintRect.y = wxMax( bounds.y + bounds.height + 1, mousePos.y - newHeight );
if ( mpSrcPane->mProps.mRealTimeUpdatesOn == FALSE )
{
- // do hevy calculations first
+ // do heavy calculations first
wxRect actualRect = mHintRect; // will be adjusted depending on drag-settings
else
mpCurCursor = mpLayout->mpNECursor;
}
-
if ( pPrevCurs != mpCurCursor )
-
mpLayout->GetParentFrame().SetCursor( *mpCurCursor );
}
mHintRect.width = -1;
- mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
+ // In Windows, at least, the frame needs to have a null cursor
+ // else child windows (such as text windows) inherit the cursor
+#if 1
+ mpLayout->GetParentFrame().SetCursor( wxNullCursor );
+#else
+ mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
+#endif
mpLayout->ReleaseEventsFromPane( event.mpPane );
mpLayout->ReleaseEventsFromPlugin( this );