X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a570d5b302bf1280452f35fa23ffd1c71b960b23..25088f1eea365f0da7aeb565932dd4fe0fd5d20e:/contrib/src/fl/bardragpl.cpp diff --git a/contrib/src/fl/bardragpl.cpp b/contrib/src/fl/bardragpl.cpp index 50ee1a43af..a1ef597f87 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 ) { @@ -510,6 +499,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(); @@ -641,16 +642,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 +669,7 @@ void cbBarDragPlugin::OnLButtonDown( cbLeftDownEvent& event ) { if ( mBarDragStarted ) { - wxMessageBox("DblClick!"); + wxMessageBox(wxT("DblClick!")); } event.Skip(); @@ -687,9 +697,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 +780,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;