// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation "bardragpl.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
}
}
-// helpers
+// helpers
static inline void check_upper_overrun( int& pos, int width, int mousePos )
{
// true, if hint enters the pane through it's lower edge
- bool fromLowerEdge = ( pPane->IsHorizontal() )
+ bool fromLowerEdge = ( pPane->IsHorizontal() )
? mousePos.y > bounds.y
: mousePos.x > bounds.x;
// true, if hint leaves the pane through it's lower edge
- bool fromLowerEdge = ( pPane->IsHorizontal() )
+ bool fromLowerEdge = ( pPane->IsHorizontal() )
? mousePos.y > bounds.y
: mousePos.x > bounds.x;
if ( mpSrcPane->mProps.mExactDockPredictionOn && mpCurPane )
{
#ifdef __WXDEBUG__
- bool success =
+ bool success =
#endif
mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane, false );
mPrevHintRect = actualRect;
}
- else
+ else
{
// otherwise, if real-time updates option is ON
mpDraggedBar->mUMgrData.SetDirty( true );
#ifdef __WXDEBUG__
- bool success =
+ bool success =
#endif
mpLayout->RedockBar( mpDraggedBar, mHintRect, mpCurPane, false );
cbDockPane* pPane = HitTestPanes( mHintRect );
// enable sticking again, if we've left the pane completely
- if ( !pPane )
+ if ( !pPane )
mCanStick = true;
- if ( mCanStick && pPane &&
+ if ( mCanStick && pPane &&
GetDistanceToPane( pPane, mousePos ) < GetBarHeightInPane( pPane ) )
StickToPane( pPane, mousePos );
else
{
cbDockPane* pPane = HitTestPanes( mHintRect );
- if ( pPane &&
+ if ( pPane &&
pPane != mpCurPane &&
GetDistanceToPane( pPane, mousePos ) < GetBarHeightInPane( pPane ) )
StickToPane( pPane, mousePos );
if ( mBarWasFloating && mpDraggedBar->mState != wxCBAR_FLOATING )
{
- // save bar's floating position before it was docked
+ // save bar's floating position before it was docked
mpDraggedBar->mDimInfo.mBounds[ wxCBAR_FLOATING ] = mFloatedBarBounds;
}
void cbBarDragPlugin::OnStartBarDragging( cbStartBarDraggingEvent& event )
{
mpDraggedBar = event.mpBar;
- mpSrcPane = event.mpPane;
+ mpSrcPane = event.mpPane;
mpLayout->CaptureEventsForPane( event.mpPane );
mpLayout->CaptureEventsForPlugin( this );
mPrevHintRect.x = POS_UNDEFINED;
- mCanStick = false; // we're not stuck into any pane now -
+ mCanStick = false; // we're not stuck into any pane now -
// there's nowhere to "stick-twice"
mBarWidthInSrcPane = mpDraggedBar->mDimInfo.mSizes[ mpDraggedBar->mState ].x;
- if ( mpSrcPane->mProps.mRealTimeUpdatesOn == false &&
+ if ( mpSrcPane->mProps.mRealTimeUpdatesOn == false &&
mpSrcPane->mProps.mExactDockPredictionOn )
mpLayout->GetUpdatesManager().OnStartChanges(); // capture initial state of layout
// simulate the first mouse movement
int x = event.mPos.x, y = event.mPos.y;
-
mpSrcPane->FrameToPane( &x, &y );
- cbMotionEvent motionEvt( wxPoint(x,y), event.mpPane );
-
-
+ wxPoint pt(x,y);
+ cbMotionEvent motionEvt( pt, event.mpPane );
this->OnMouseMove( motionEvt );
return; // event is "eaten" by this plugin
if ( isInClientRect )
{
- // BUG BUG BUG (wx):: somehow stippled brush works only
+ // BUG BUG BUG (wx):: somehow stippled brush works only
// when the bitmap created on stack, not
// as a member of the class
{
mpScrDc->SetPen( mpLayout->mBlackPen );
- mpScrDc->DrawLine( scrRect.x, scrRect.y,
+ mpScrDc->DrawLine( scrRect.x, scrRect.y,
scrRect.x + scrRect.width, scrRect.y );
- mpScrDc->DrawLine( scrRect.x, scrRect.y + 1,
+ mpScrDc->DrawLine( scrRect.x, scrRect.y + 1,
scrRect.x, scrRect.y + scrRect.height );
- mpScrDc->DrawLine( scrRect.x+1, scrRect.y + scrRect.height,
+ mpScrDc->DrawLine( scrRect.x+1, scrRect.y + scrRect.height,
scrRect.x + scrRect.width, scrRect.y + scrRect.height );
- mpScrDc->DrawLine( scrRect.x + scrRect.width , scrRect.y,
+ mpScrDc->DrawLine( scrRect.x + scrRect.width , scrRect.y,
scrRect.x + scrRect.width, scrRect.y + scrRect.height + 1);
}