X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a570d5b302bf1280452f35fa23ffd1c71b960b23..d1a6e2b7a103d761fbc15e0e9c1c20ab53a849d9:/contrib/src/fl/bardragpl.cpp?ds=sidebyside diff --git a/contrib/src/fl/bardragpl.cpp b/contrib/src/fl/bardragpl.cpp index 50ee1a43af..c3f75adb6c 100644 --- a/contrib/src/fl/bardragpl.cpp +++ b/contrib/src/fl/bardragpl.cpp @@ -456,17 +456,6 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) { bool wasDocked = FALSE; - if ( mpDraggedBar->mState != wxCBAR_FLOATING && !mpCurPane ) - { - mpLayout->SetBarState( mpDraggedBar, wxCBAR_FLOATING, TRUE ); - } - else - if ( mpDraggedBar->mState == wxCBAR_FLOATING && mpCurPane ) - { - mpLayout->SetBarState( mpDraggedBar, wxCBAR_DOCKED_HORIZONTALLY, FALSE ); - - wasDocked = TRUE; - } if ( mpSrcPane->mProps.mRealTimeUpdatesOn == FALSE ) { @@ -476,7 +465,10 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) if ( mpSrcPane->mProps.mExactDockPredictionOn && mpCurPane ) { - bool success = mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane, FALSE ); + #ifdef __WXDEBUG__ + bool success = + #endif + mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane, FALSE ); wxASSERT( success ); // DBG:: @@ -510,6 +502,18 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) { // otherwise, if real-time updates option is ON + if ( mpDraggedBar->mState != wxCBAR_FLOATING && !mpCurPane ) + { + mpLayout->SetBarState( mpDraggedBar, wxCBAR_FLOATING, TRUE ); + } + else + if ( mpDraggedBar->mState == wxCBAR_FLOATING && mpCurPane ) + { + mpLayout->SetBarState( mpDraggedBar, wxCBAR_DOCKED_HORIZONTALLY, FALSE ); + + wasDocked = TRUE; + } + if ( mpCurPane ) { mpLayout->GetUpdatesManager().OnStartChanges(); @@ -518,7 +522,10 @@ void cbBarDragPlugin::ShowHint( bool prevWasInClient ) mpDraggedBar->mUMgrData.SetDirty( TRUE ); - bool success = mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane, FALSE ); + #ifdef __WXDEBUG__ + bool success = + #endif + mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane, FALSE ); wxASSERT( success ); // DBG :: @@ -641,16 +648,25 @@ void cbBarDragPlugin::OnMouseMove( cbMotionEvent& event ) wxCursor* pPrevCurs = mpCurCursor; if ( mpCurPane ) - - mpCurCursor = mpLayout->mpDragCursor; + { + mpCurCursor = mpLayout->mpNormalCursor; + } else { - if ( mpLayout->mFloatingOn && mpSrcPane->mProps.mRealTimeUpdatesOn ) + // if floating is off, and we are in the client + // area, the cursor will be invalid, otherwise + // it will be the normal cursor - mpCurCursor = mpLayout->mpDragCursor; + if (mpLayout->mFloatingOn) + { + mpCurCursor = mpLayout->mpNormalCursor; + } else + { mpCurCursor = mpLayout->mpNECursor; } + + } if ( pPrevCurs != mpCurCursor ) mpLayout->GetParentFrame().SetCursor( *mpCurCursor ); } @@ -659,7 +675,7 @@ void cbBarDragPlugin::OnLButtonDown( cbLeftDownEvent& event ) { if ( mBarDragStarted ) { - wxMessageBox("DblClick!"); + wxMessageBox(wxT("DblClick!")); } event.Skip(); @@ -687,9 +703,26 @@ void cbBarDragPlugin::OnLButtonUp( cbLeftUpEvent& event ) mpLayout->GetUpdatesManager().UpdateNow(); } else + { + if (mpDraggedBar->mState == wxCBAR_FLOATING) + { + mpLayout->SetBarState( mpDraggedBar, wxCBAR_DOCKED_HORIZONTALLY, TRUE); + } + mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane ); } } + else + { + if (mpDraggedBar->mState != wxCBAR_FLOATING) + { + mpLayout->SetBarState(mpDraggedBar, wxCBAR_FLOATING, true); + } + + mpDraggedBar->mDimInfo.mBounds[ wxCBAR_FLOATING ] = mHintRect; + mpLayout->ApplyBarProperties( mpDraggedBar ); + } + } mHintRect.width = -1; @@ -753,7 +786,7 @@ void cbBarDragPlugin::OnStartBarDragging( cbStartBarDraggingEvent& event ) mpLayout->CaptureEventsForPane( event.mpPane ); mpLayout->CaptureEventsForPlugin( this ); - mpLayout->GetParentFrame().SetCursor( *mpLayout->mpDragCursor ); + mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor ); mBarDragStarted = TRUE;