X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8552e6f031ded8ae61b4a5b489fbf06962365da7..b2c13097deb7736a86a278c02d0b3f7cd9873750:/contrib/src/fl/rowdragpl.cpp?ds=sidebyside diff --git a/contrib/src/fl/rowdragpl.cpp b/contrib/src/fl/rowdragpl.cpp index 21bd0e653a..d5ab85ea04 100644 --- a/contrib/src/fl/rowdragpl.cpp +++ b/contrib/src/fl/rowdragpl.cpp @@ -6,7 +6,7 @@ // Created: 06/10/98 // RCS-ID: $Id$ // Copyright: (c) Aleksandras Gluchovas -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -66,10 +66,10 @@ cbRowDragPlugin::cbRowDragPlugin(void) mTrianInnerColor ( 0,0,255 ), mTrianInnerPen ( mTrianInnerColor, 1, wxSOLID ), - mDragStarted ( FALSE ), - mDecisionMode ( FALSE ), + mDragStarted ( false ), + mDecisionMode ( false ), mCurDragOfs ( 0 ), - mCaptureIsOn ( FALSE ), + mCaptureIsOn ( false ), mSvTopMargin ( -1 ), mSvBottomMargin ( -1 ), mSvLeftMargin ( -1 ), @@ -95,10 +95,10 @@ cbRowDragPlugin::cbRowDragPlugin( wxFrameLayout* pLayout, int paneMask ) mTrianInnerColor ( 0,0,255 ), mTrianInnerPen ( mTrianInnerColor, 1, wxSOLID ), - mDragStarted ( FALSE ), - mDecisionMode ( FALSE ), + mDragStarted ( false ), + mDecisionMode ( false ), mCurDragOfs ( 0 ), - mCaptureIsOn ( FALSE ), + mCaptureIsOn ( false ), mSvTopMargin ( -1 ), mSvBottomMargin ( -1 ), mSvLeftMargin ( -1 ), @@ -152,8 +152,8 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event ) //wxPoint drg = mDragOrigin; //int dif = event.mPos.x - mDragOrigin.x; - mDragStarted = TRUE; - mDecisionMode = FALSE; + mDragStarted = true; + mDecisionMode = false; mDragOrigin = pos; PrepareForRowDrag(); @@ -166,16 +166,16 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event ) cbRowInfo* pRow = GetFirstRow(); - bool focusFound = FALSE; + bool focusFound = false; while( pRow ) { if ( HitTestRowDragHint( pRow, pos ) ) { CheckPrevItemInFocus( pRow, -1 ); - SetMouseCapture( TRUE ); + SetMouseCapture( true ); - focusFound = TRUE; + focusFound = true; mpRowInFocus = pRow; mCollapsedIconInFocus = -1; @@ -194,9 +194,9 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event ) if ( HitTestCollapsedRowIcon( i, pos ) ) { CheckPrevItemInFocus( NULL, i ); - SetMouseCapture( TRUE ); + SetMouseCapture( true ); - focusFound = TRUE; + focusFound = true; mCollapsedIconInFocus = i; mpRowInFocus = NULL; @@ -212,7 +212,7 @@ void cbRowDragPlugin::OnMouseMove( cbMotionEvent& event ) mpRowInFocus = NULL; mCollapsedIconInFocus = -1; - SetMouseCapture( FALSE ); + SetMouseCapture( false ); } if ( !ItemIsInFocus() ) @@ -248,14 +248,14 @@ void cbRowDragPlugin::OnLButtonDown( cbLeftDownEvent& event ) if ( ItemIsInFocus() ) { - mDecisionMode = TRUE; + mDecisionMode = true; wxPoint pos = event.mPos; mpPane->PaneToFrame( &pos.x, &pos.y ); mDragOrigin = pos; - SetMouseCapture( TRUE ); + SetMouseCapture( true ); } else // propagate event to other plugins @@ -276,10 +276,10 @@ void cbRowDragPlugin::OnLButtonUp ( cbLeftUpEvent& event ) { cbDockPane* pPane = mpPane; - SetMouseCapture( FALSE ); + SetMouseCapture( false ); - mDecisionMode = FALSE; - mDragStarted = FALSE; + mDecisionMode = false; + mDragStarted = false; wxPoint frmPos = event.mPos; pPane->PaneToFrame( &frmPos.x, &frmPos.y ); @@ -322,19 +322,19 @@ void cbRowDragPlugin::OnLButtonUp ( cbLeftUpEvent& event ) mpLayout->GetUpdatesManager().OnStartChanges(); - pRow->mUMgrData.SetDirty(TRUE); + pRow->mUMgrData.SetDirty(true); cbBarInfo* pBar = mpRowInFocus->mBars[0]; while ( pBar ) { - pBar->mUMgrData.SetDirty(TRUE); + pBar->mUMgrData.SetDirty(true); if ( pBar->mpBarWnd ) { // do complete refresh - pBar->mpBarWnd->Show(FALSE); - pBar->mpBarWnd->Show(TRUE); + pBar->mpBarWnd->Show(false); + pBar->mpBarWnd->Show(true); } pBar = pBar->mpNext; @@ -355,15 +355,15 @@ void cbRowDragPlugin::OnLButtonUp ( cbLeftUpEvent& event ) mpRowInFocus = NULL; - mpLayout->RecalcLayout(FALSE); + mpLayout->RecalcLayout(false); // finish change "transaction" mpLayout->GetUpdatesManager().OnFinishChanges(); mpLayout->GetUpdatesManager().UpdateNow(); // finish drag action - SetMouseCapture( FALSE ); - mDragStarted = FALSE; + SetMouseCapture( false ); + mDragStarted = false; } } @@ -378,7 +378,7 @@ void cbRowDragPlugin::OnDrawPaneBackground ( cbDrawPaneDecorEvent& event ) // first, let other plugins add their decorations now GetNextHandler()->ProcessEvent( event ); - event.Skip(FALSE); + event.Skip(false); } wxClientDC dc( &mpLayout->GetParentFrame() ); @@ -402,13 +402,13 @@ void cbRowDragPlugin::OnDrawPaneBackground ( cbDrawPaneDecorEvent& event ) while( pRow ) { - DrawRowDragHint( pRow, dc, FALSE ); + DrawRowDragHint( pRow, dc, false ); pRow = pRow->mpNext; } for( int i = 0; i != cnt; ++i ) - DrawCollapsedRowIcon(i, dc, FALSE ); + DrawCollapsedRowIcon(i, dc, false ); } int cbRowDragPlugin::GetHRowsCountForPane( cbDockPane* pPane ) @@ -514,11 +514,11 @@ void cbRowDragPlugin::UnhighlightItemInFocus() if ( mpRowInFocus ) - DrawRowDragHint( mpRowInFocus, dc, FALSE ); + DrawRowDragHint( mpRowInFocus, dc, false ); else if ( mCollapsedIconInFocus != - 1 ) - DrawCollapsedRowIcon( mCollapsedIconInFocus, dc, FALSE ); + DrawCollapsedRowIcon( mCollapsedIconInFocus, dc, false ); } void cbRowDragPlugin::ShowDraggedRow( int offset ) @@ -761,7 +761,7 @@ void cbRowDragPlugin::CollapseRow( cbRowInfo* pRow ) // hide it if ( pBar->mpBarWnd ) - pBar->mpBarWnd->Show( FALSE ); + pBar->mpBarWnd->Show( false ); pBar->mState = wxCBAR_HIDDEN; @@ -781,7 +781,7 @@ void cbRowDragPlugin::CollapseRow( cbRowInfo* pRow ) SetPaneMargins(); - mpLayout->RecalcLayout(FALSE); + mpLayout->RecalcLayout(false); mpRowInFocus = NULL; @@ -857,7 +857,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx ) SetPaneMargins(); - mpLayout->RecalcLayout(FALSE); + mpLayout->RecalcLayout(false); mCollapsedIconInFocus = -1; @@ -879,7 +879,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx ) SetPaneMargins(); - mpLayout->RecalcLayout(FALSE); + mpLayout->RecalcLayout(false); mCollapsedIconInFocus = -1; @@ -905,7 +905,7 @@ void cbRowDragPlugin::InsertDraggedRowBefore( cbRowInfo* pBeforeRow ) //wxClientDC dc( &mpLayout->GetParentFrame() ); //mpPane->PaintRow( mpRowInFocus, dc ); - //DrawRowDragHint( mpRowInFocus, dc, FALSE ); + //DrawRowDragHint( mpRowInFocus, dc, false ); } } @@ -925,12 +925,12 @@ void cbRowDragPlugin::CheckPrevItemInFocus( cbRowInfo* pRow, int iconIdx ) if ( iconIdx != - 1 ) - DrawCollapsedRowIcon( iconIdx, dc, TRUE ); + DrawCollapsedRowIcon( iconIdx, dc, true ); else if ( pRow != NULL ) - DrawRowDragHint( pRow, dc, TRUE ); + DrawRowDragHint( pRow, dc, true ); } cbRowInfo* cbRowDragPlugin::GetFirstRow()