X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e08b761b0c5ecb6df295785b78f1f3637331887..dfe8399aa013a1fa6487d008bf1176078f218c6d:/contrib/src/fl/bardragpl.cpp diff --git a/contrib/src/fl/bardragpl.cpp b/contrib/src/fl/bardragpl.cpp index 26b927e93a..50ee1a43af 100644 --- a/contrib/src/fl/bardragpl.cpp +++ b/contrib/src/fl/bardragpl.cpp @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// 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__ @@ -293,8 +293,8 @@ void cbBarDragPlugin::StickToPane( cbDockPane* pPane, wxPoint& mousePos ) : 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 ) { @@ -341,10 +341,9 @@ void cbBarDragPlugin::StickToPane( cbDockPane* pPane, wxPoint& mousePos ) 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; @@ -371,7 +370,7 @@ void cbBarDragPlugin::UnstickFromPane( cbDockPane* pPane, wxPoint& mousePos ) 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 ); @@ -471,7 +470,7 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) if ( mpSrcPane->mProps.mRealTimeUpdatesOn == FALSE ) { - // do hevy calculations first + // do heavy calculations first wxRect actualRect = mHintRect; // will be adjusted depending on drag-settings @@ -652,9 +651,7 @@ void cbBarDragPlugin::OnMouseMove( cbMotionEvent& event ) else mpCurCursor = mpLayout->mpNECursor; } - if ( pPrevCurs != mpCurCursor ) - mpLayout->GetParentFrame().SetCursor( *mpCurCursor ); } @@ -696,7 +693,13 @@ void cbBarDragPlugin::OnLButtonUp( cbLeftUpEvent& event ) 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 );