本文整理汇总了C++中TEXTE_MODULE::SetBold方法的典型用法代码示例。如果您正苦于以下问题:C++ TEXTE_MODULE::SetBold方法的具体用法?C++ TEXTE_MODULE::SetBold怎么用?C++ TEXTE_MODULE::SetBold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEXTE_MODULE
的用法示例。
在下文中一共展示了TEXTE_MODULE::SetBold方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PlaceDXF
//.........这里部分代码省略.........
break;
}
}
else if ( evt->IsClick( BUT_RIGHT ) )
{
showContextMenu();
}
else if( evt->IsClick( BUT_LEFT ) )
{
// Place the drawing
BOARD_ITEM_CONTAINER* parent = m_frame->GetModel();
for( auto item : preview )
{
if( m_editModules )
{
// Modules use different types for the same things,
// so we need to convert imported items to appropriate classes.
BOARD_ITEM* converted = NULL;
switch( item->Type() )
{
case PCB_TEXT_T:
{
TEXTE_PCB* text = static_cast<TEXTE_PCB*>( item );
TEXTE_MODULE* textMod = new TEXTE_MODULE( (MODULE*) parent );
// Assignment operator also copies the item PCB_TEXT_T type,
// so it cannot be added to a module which handles PCB_MODULE_TEXT_T
textMod->SetPosition( text->GetPosition() );
textMod->SetText( text->GetText() );
textMod->SetSize( text->GetSize() );
textMod->SetThickness( text->GetThickness() );
textMod->SetOrientation( text->GetOrientation() );
textMod->SetTextPosition( text->GetTextPosition() );
textMod->SetSize( text->GetSize() );
textMod->SetMirrored( text->IsMirrored() );
textMod->SetAttributes( text->GetAttributes() );
textMod->SetItalic( text->IsItalic() );
textMod->SetBold( text->IsBold() );
textMod->SetHorizJustify( text->GetHorizJustify() );
textMod->SetVertJustify( text->GetVertJustify() );
textMod->SetMultilineAllowed( text->IsMultilineAllowed() );
converted = textMod;
break;
}
case PCB_LINE_T:
{
DRAWSEGMENT* seg = static_cast<DRAWSEGMENT*>( item );
EDGE_MODULE* modSeg = new EDGE_MODULE( (MODULE*) parent );
// Assignment operator also copies the item PCB_LINE_T type,
// so it cannot be added to a module which handles PCB_MODULE_EDGE_T
modSeg->SetWidth( seg->GetWidth() );
modSeg->SetStart( seg->GetStart() );
modSeg->SetEnd( seg->GetEnd() );
modSeg->SetAngle( seg->GetAngle() );
modSeg->SetShape( seg->GetShape() );
modSeg->SetType( seg->GetType() );
modSeg->SetBezControl1( seg->GetBezControl1() );
modSeg->SetBezControl2( seg->GetBezControl2() );
modSeg->SetBezierPoints( seg->GetBezierPoints() );
modSeg->SetPolyPoints( seg->GetPolyPoints() );
converted = modSeg;
break;
}
default:
assert( false );
break;
}
if( converted )
converted->SetLayer( item->GetLayer() );
delete item;
item = converted;
}
if( item )
commit.Add( item );
}
commit.Push( _( "Place a DXF drawing" ) );
break;
}
}
preview.Clear();
m_controls->ShowCursor( false );
m_controls->SetSnapping( false );
m_controls->SetAutoPan( false );
m_controls->CaptureCursor( false );
m_view->Remove( &preview );
return 0;
}