本文整理汇总了C++中TEXTE_MODULE::SetFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ TEXTE_MODULE::SetFlags方法的具体用法?C++ TEXTE_MODULE::SetFlags怎么用?C++ TEXTE_MODULE::SetFlags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEXTE_MODULE
的用法示例。
在下文中一共展示了TEXTE_MODULE::SetFlags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateTextModule
/* Add a new graphical text to the active module (footprint)
* Note there always are 2 mandatory texts: reference and value.
* New texts have the member TEXTE_MODULE.GetType() set to TEXT_is_DIVERS
*/
TEXTE_MODULE* FOOTPRINT_EDIT_FRAME::CreateTextModule( MODULE* aModule, wxDC* aDC )
{
TEXTE_MODULE* text = new TEXTE_MODULE( aModule );
text->SetFlags( IS_NEW );
if( LSET::AllTechMask().test( GetActiveLayer() ) ) // i.e. a possible layer for a text
text->SetLayer( GetActiveLayer() );
InstallTextOptionsFrame( text, NULL );
if( text->GetText().IsEmpty() )
{
delete text;
return NULL;
}
// Add the new text object to the beginning of the footprint draw list.
if( aModule )
aModule->GraphicalItemsList().PushFront( text );
text->ClearFlags();
if( aDC )
text->Draw( m_canvas, aDC, GR_OR );
SetMsgPanel( text );
return text;
}
示例2: CreateTextModule
/* Add a new graphical text to the active module (footprint)
* Note there always are 2 mandatory texts: reference and value.
* New texts have the member TEXTE_MODULE.GetType() set to TEXT_is_DIVERS
*/
TEXTE_MODULE* FOOTPRINT_EDIT_FRAME::CreateTextModule( MODULE* aModule, wxDC* aDC )
{
TEXTE_MODULE* text = new TEXTE_MODULE( aModule );
text->SetFlags( IS_NEW );
GetDesignSettings().m_ModuleTextWidth = Clamp_Text_PenSize( GetDesignSettings().m_ModuleTextWidth,
std::min( GetDesignSettings().m_ModuleTextSize.x, GetDesignSettings().m_ModuleTextSize.y ), true );
text->SetTextSize( GetDesignSettings().m_ModuleTextSize );
text->SetThickness( GetDesignSettings().m_ModuleTextWidth );
text->SetPosition( GetCrossHairPosition() );
if( LSET::AllTechMask().test( GetActiveLayer() ) ) // i.e. a possible layer for a text
text->SetLayer( GetActiveLayer() );
InstallTextModOptionsFrame( text, NULL );
m_canvas->MoveCursorToCrossHair();
if( text->GetText().IsEmpty() )
{
delete text;
return NULL;
}
// Add the new text object to the beginning of the footprint draw list.
if( aModule )
aModule->GraphicalItems().PushFront( text );
text->ClearFlags();
if( aDC )
text->Draw( m_canvas, aDC, GR_OR );
SetMsgPanel( text );
return text;
}