本文整理汇总了C++中TRACK::ClearFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ TRACK::ClearFlags方法的具体用法?C++ TRACK::ClearFlags怎么用?C++ TRACK::ClearFlags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRACK
的用法示例。
在下文中一共展示了TRACK::ClearFlags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartMoveOneNodeOrSegment
void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aCommand )
{
if( !aTrack )
return;
EraseDragList();
// Change highlighted net: the new one will be highlighted
GetBoard()->PushHighLight();
if( GetBoard()->IsHighLightNetON() )
HighLight( aDC );
PosInit = GetCrossHairPosition();
if( aTrack->Type() == PCB_VIA_T )
{
aTrack->SetFlags( IS_DRAGGED | STARTPOINT | ENDPOINT );
AddSegmentToDragList( aTrack->GetFlags(), aTrack );
if( aCommand != ID_POPUP_PCB_MOVE_TRACK_SEGMENT )
{
Collect_TrackSegmentsToDrag( GetBoard(), aTrack->GetStart(),
aTrack->GetLayerSet(),
aTrack->GetNetCode(), aTrack->GetWidth() / 2 );
}
PosInit = aTrack->GetStart();
}
else
{
STATUS_FLAGS diag = aTrack->IsPointOnEnds( GetCrossHairPosition(), -1 );
wxPoint pos;
switch( aCommand )
{
case ID_POPUP_PCB_MOVE_TRACK_SEGMENT: // Move segment
aTrack->SetFlags( IS_DRAGGED | ENDPOINT | STARTPOINT );
AddSegmentToDragList( aTrack->GetFlags(), aTrack );
break;
case ID_POPUP_PCB_DRAG_TRACK_SEGMENT: // drag a segment
pos = aTrack->GetStart();
Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerSet(),
aTrack->GetNetCode(), aTrack->GetWidth() / 2 );
pos = aTrack->GetEnd();
aTrack->SetFlags( IS_DRAGGED | ENDPOINT | STARTPOINT );
Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerSet(),
aTrack->GetNetCode(), aTrack->GetWidth() / 2 );
break;
case ID_POPUP_PCB_MOVE_TRACK_NODE: // Drag via or move node
pos = (diag & STARTPOINT) ? aTrack->GetStart() : aTrack->GetEnd();
Collect_TrackSegmentsToDrag( GetBoard(), pos, aTrack->GetLayerSet(),
aTrack->GetNetCode(), aTrack->GetWidth() / 2 );
PosInit = pos;
break;
}
aTrack->SetFlags( IS_DRAGGED );
}
// Prepare the Undo command
ITEM_PICKER picker( aTrack, UR_CHANGED );
picker.SetLink( aTrack->Clone() );
s_ItemsListPicker.PushItem( picker );
for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ )
{
TRACK* draggedtrack = g_DragSegmentList[ii].m_Track;
picker.SetItem( draggedtrack );
picker.SetLink( draggedtrack->Clone() );
s_ItemsListPicker.PushItem( picker );
draggedtrack = (TRACK*) picker.GetLink();
draggedtrack->SetStatus( 0 );
draggedtrack->ClearFlags();
}
s_LastPos = PosInit;
m_canvas->SetMouseCapture( Show_MoveNode, Abort_MoveTrack );
GetBoard()->SetHighLightNet( aTrack->GetNetCode() );
GetBoard()->HighLightON();
GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() );
m_canvas->CallMouseCapture( aDC, wxDefaultPosition, true );
UndrawAndMarkSegmentsToDrag( m_canvas, aDC );
}