本文整理汇总了C++中BOARD_ITEM::DeleteStructure方法的典型用法代码示例。如果您正苦于以下问题:C++ BOARD_ITEM::DeleteStructure方法的具体用法?C++ BOARD_ITEM::DeleteStructure怎么用?C++ BOARD_ITEM::DeleteStructure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BOARD_ITEM
的用法示例。
在下文中一共展示了BOARD_ITEM::DeleteStructure方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DeleteMarkedItems
/* Delete marked items
*/
void DeleteMarkedItems( MODULE* module )
{
BOARD_ITEM* item;
BOARD_ITEM* next_item;
D_PAD* pad;
D_PAD* next_pad;
if( module == NULL )
return;
pad = module->Pads();
for( ; pad != NULL; pad = next_pad )
{
next_pad = pad->Next();
if( !pad->IsSelected() )
continue;
pad->DeleteStructure();
}
item = module->GraphicalItems();
for( ; item != NULL; item = next_item )
{
next_item = item->Next();
if( !item->IsSelected() )
continue;
item->DeleteStructure();
}
}
示例2: Block_Delete
void PCB_EDIT_FRAME::Block_Delete()
{
OnModify();
SetCurItem( NULL );
PICKED_ITEMS_LIST* itemsList = &GetScreen()->m_BlockLocate.GetItems();
itemsList->m_Status = UR_DELETED;
// unlink items and clear flags
for( unsigned ii = 0; ii < itemsList->GetCount(); ii++ )
{
BOARD_ITEM* item = (BOARD_ITEM*) itemsList->GetPickedItem( ii );
itemsList->SetPickedItemStatus( UR_DELETED, ii );
GetBoard()->GetConnectivity()->Remove( item );
switch( item->Type() )
{
case PCB_MODULE_T:
{
MODULE* module = (MODULE*) item;
module->ClearFlags();
module->UnLink();
m_Pcb->m_Status_Pcb = 0;
}
break;
case PCB_ZONE_AREA_T: // a zone area
m_Pcb->Remove( item );
break;
case PCB_LINE_T: // a segment not on copper layers
case PCB_TEXT_T: // a text on a layer
case PCB_TRACE_T: // a track segment (segment on a copper layer)
case PCB_VIA_T: // a via (like track segment on a copper layer)
case PCB_DIMENSION_T: // a dimension (graphic item)
case PCB_TARGET_T: // a target (graphic item)
item->UnLink();
break;
// These items are deleted, but not put in undo list
case PCB_MARKER_T: // a marker used to show something
case PCB_ZONE_T: // SEG_ZONE items are now deprecated
item->UnLink();
itemsList->RemovePicker( ii );
ii--;
item->DeleteStructure();
break;
default:
wxMessageBox( wxT( "PCB_EDIT_FRAME::Block_Delete( ) error: unexpected type" ) );
break;
}
}
SaveCopyInUndoList( *itemsList, UR_DELETED );
Compile_Ratsnest( NULL, true );
m_canvas->Refresh( true );
}
示例3: DeleteMarkedItems
/* Delete marked items
*/
void DeleteMarkedItems( MODULE* module )
{
if( module == NULL )
return;
D_PAD* next_pad;
BOARD* board = module->GetBoard();
for( D_PAD* pad = module->Pads(); pad; pad = next_pad )
{
next_pad = pad->Next();
if( !pad->IsSelected() )
continue;
if( board )
board->PadDelete( pad );
else
pad->DeleteStructure();
}
BOARD_ITEM* next_item;
for( BOARD_ITEM* item = module->GraphicalItems(); item; item = next_item )
{
next_item = item->Next();
if( !item->IsSelected() )
continue;
item->DeleteStructure();
}
// Ref and value can be flagged, but cannot be deleted
ClearMarkItems( module );
}