本文整理汇总了C++中PICKED_ITEMS_LIST::ContainsItem方法的典型用法代码示例。如果您正苦于以下问题:C++ PICKED_ITEMS_LIST::ContainsItem方法的具体用法?C++ PICKED_ITEMS_LIST::ContainsItem怎么用?C++ PICKED_ITEMS_LIST::ContainsItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PICKED_ITEMS_LIST
的用法示例。
在下文中一共展示了PICKED_ITEMS_LIST::ContainsItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunActionPlugin
//.........这里部分代码省略.........
// If item has a list it's mean that the element is on the board
if( item->GetList() == NULL )
{
deletedItemsList.PushItem( picker );
}
break;
case PCB_ZONE_AREA_T:
{
bool zoneFound = false;
for( int ii = 0; ii < currentPcb->GetAreaCount(); ii++ )
zoneFound |= currentPcb->GetArea( ii ) == item;
if( !zoneFound )
{
deletedItemsList.PushItem( picker );
}
break;
}
default:
wxString msg;
msg.Printf( _( "(PCB_EDIT_FRAME::OnActionPlugin) needs work: "
"BOARD_ITEM type (%d) not handled" ),
item->Type() );
wxFAIL_MSG( msg );
break;
}
}
// Mark deleted elements in undolist
for( unsigned int i = 0; i < deletedItemsList.GetCount(); i++ )
{
oldBuffer->PushItem( deletedItemsList.GetItemWrapper( i ) );
}
// Find new modules
for( BOARD_ITEM* item = currentPcb->m_Modules; item != NULL; item = item->Next() )
{
if( !oldBuffer->ContainsItem( item ) )
{
ITEM_PICKER picker( item, UR_NEW );
oldBuffer->PushItem( picker );
}
}
for( BOARD_ITEM* item = currentPcb->m_Track; item != NULL; item = item->Next() )
{
if( !oldBuffer->ContainsItem( item ) )
{
ITEM_PICKER picker( item, UR_NEW );
oldBuffer->PushItem( picker );
}
}
for( BOARD_ITEM* item = currentPcb->m_Drawings; item != NULL; item = item->Next() )
{
if( !oldBuffer->ContainsItem( item ) )
{
ITEM_PICKER picker( item, UR_NEW );
oldBuffer->PushItem( picker );
}
}
for( BOARD_ITEM* item = currentPcb->m_SegZoneDeprecated; item != NULL; item = item->Next() )
{
if( !oldBuffer->ContainsItem( item ) )
{
ITEM_PICKER picker( item, UR_NEW );
oldBuffer->PushItem( picker );
}
}
for( int ii = 0; ii < currentPcb->GetAreaCount(); ii++ )
{
if( !oldBuffer->ContainsItem( (EDA_ITEM*) currentPcb->GetArea( ii ) ) )
{
ITEM_PICKER picker( (EDA_ITEM*) currentPcb->GetArea(
ii ), UR_NEW );
oldBuffer->PushItem( picker );
}
}
GetScreen()->PushCommandToUndoList( oldBuffer );
if( IsGalCanvasActive() )
{
UseGalCanvas( GetGalCanvas() );
}
else
{
UpdateUserInterface();
GetScreen()->SetModify();
Refresh();
}
}