// Created: 06/10/98
// RCS-ID: $Id$
// Copyright: (c) Aleksandras Gluchovas
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
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 ),
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 ),
//wxPoint drg = mDragOrigin;
//int dif = event.mPos.x - mDragOrigin.x;
- mDragStarted = TRUE;
- mDecisionMode = FALSE;
+ mDragStarted = true;
+ mDecisionMode = false;
mDragOrigin = pos;
PrepareForRowDrag();
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;
if ( HitTestCollapsedRowIcon( i, pos ) )
{
CheckPrevItemInFocus( NULL, i );
- SetMouseCapture( TRUE );
+ SetMouseCapture( true );
- focusFound = TRUE;
+ focusFound = true;
mCollapsedIconInFocus = i;
mpRowInFocus = NULL;
mpRowInFocus = NULL;
mCollapsedIconInFocus = -1;
- SetMouseCapture( FALSE );
+ SetMouseCapture( false );
}
if ( !ItemIsInFocus() )
if ( mpPane->IsHorizontal() )
{
- // DBG::
- wxPoint p = event.mPos;
- wxPoint d = mDragOrigin;
-// int dif = event.mPos.x - mDragOrigin.x;
-
// row is dragged up or down;
ShowDraggedRow( pos.y - mDragOrigin.y );
}
else
{
- // DBG::
- wxPoint p = event.mPos;
- wxPoint d = mDragOrigin;
-// int dif = event.mPos.x - mDragOrigin.x;
-
// row is dragged left or right
ShowDraggedRow( pos.x - mDragOrigin.x );
}
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
{
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 );
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;
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;
}
}
// first, let other plugins add their decorations now
GetNextHandler()->ProcessEvent( event );
- event.Skip(FALSE);
+ event.Skip(false);
}
wxClientDC dc( &mpLayout->GetParentFrame() );
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 )
{
- wxNode* pNode = mHiddenBars.First();
+ wxNode* pNode = mHiddenBars.GetFirst();
int maxIconNo = -1;
while( pNode )
{
- cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->Data();
+ cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->GetData();
if ( pHBInfo->mAlignment == pPane->mAlignment )
maxIconNo = wxMax( maxIconNo, pHBInfo->mIconNo );
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
return ( maxIconNo + 1 );
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 )
// hide it
if ( pBar->mpBarWnd )
- pBar->mpBarWnd->Show( FALSE );
+ pBar->mpBarWnd->Show( false );
pBar->mState = wxCBAR_HIDDEN;
SetPaneMargins();
- mpLayout->RecalcLayout(FALSE);
+ mpLayout->RecalcLayout(false);
mpRowInFocus = NULL;
cbRowInfo* pNewRow = new cbRowInfo();
- wxNode* pNode = mHiddenBars.First();
+ wxNode* pNode = mHiddenBars.GetFirst();
int rowNo = 0;
while( pNode )
{
- cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->Data();
+ cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->GetData();
if ( pHBInfo->mAlignment == mpPane->mAlignment &&
pHBInfo->mIconNo == collapsedIconIdx )
// remove bar info from internal list
- wxNode* pNext = pNode->Next();
+ wxNode* pNext = pNode->GetNext();
delete pHBInfo;
mHiddenBars.DeleteNode( pNode );
--pHBInfo->mIconNo;
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
}
SetPaneMargins();
- mpLayout->RecalcLayout(FALSE);
+ mpLayout->RecalcLayout(false);
mCollapsedIconInFocus = -1;
SetPaneMargins();
- mpLayout->RecalcLayout(FALSE);
+ mpLayout->RecalcLayout(false);
mCollapsedIconInFocus = -1;
//wxClientDC dc( &mpLayout->GetParentFrame() );
//mpPane->PaintRow( mpRowInFocus, dc );
- //DrawRowDragHint( mpRowInFocus, dc, FALSE );
+ //DrawRowDragHint( mpRowInFocus, dc, false );
}
}
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()
}
}
-void cbRowDragPlugin::DrawRowsDragHintsBorder( wxDC& dc )
+void cbRowDragPlugin::DrawRowsDragHintsBorder( wxDC& WXUNUSED(dc) )
{
// FIXME:: what was that?
}