本文整理汇总了C++中TEXTE_MODULE::SetType方法的典型用法代码示例。如果您正苦于以下问题:C++ TEXTE_MODULE::SetType方法的具体用法?C++ TEXTE_MODULE::SetType怎么用?C++ TEXTE_MODULE::SetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEXTE_MODULE
的用法示例。
在下文中一共展示了TEXTE_MODULE::SetType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Process_Special_Functions
//.........这里部分代码省略.........
if( GetBoard()->m_Modules )
{
// CreateModuleLibrary() only creates a new library, does not save footprint
wxString libPath = CreateNewLibrary();
if( libPath.size() )
SaveCurrentModule( &libPath );
}
break;
case ID_MODEDIT_SHEET_SET:
break;
case ID_MODEDIT_LOAD_MODULE:
wxLogDebug( wxT( "Loading module from library " ) + getLibPath() );
if( ! Clear_Pcb( true ) )
break;
SetCrossHairPosition( wxPoint( 0, 0 ) );
LoadModuleFromLibrary( GetCurrentLib(), Prj().PcbFootprintLibs(), true );
if( GetBoard() && GetBoard()->m_Modules )
{
GetBoard()->m_Modules->ClearFlags();
// if either m_Reference or m_Value are gone, reinstall them -
// otherwise you cannot see what you are doing on board
TEXTE_MODULE* ref = &GetBoard()->m_Modules->Reference();
TEXTE_MODULE* val = &GetBoard()->m_Modules->Value();
if( val && ref )
{
ref->SetType( TEXTE_MODULE::TEXT_is_REFERENCE ); // just in case ...
if( ref->GetLength() == 0 )
ref->SetText( wxT( "Ref**" ) );
val->SetType( TEXTE_MODULE::TEXT_is_VALUE ); // just in case ...
if( val->GetLength() == 0 )
val->SetText( wxT( "Val**" ) );
}
}
Zoom_Automatique( false );
{
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
if( draw3DFrame )
draw3DFrame->NewDisplay();
}
GetScreen()->ClrModify();
updateView();
m_canvas->Refresh();
break;
case ID_MODEDIT_PAD_SETTINGS:
InstallPadOptionsFrame( NULL );
break;
case ID_MODEDIT_CHECK:
示例2: Process_Special_Functions
//.........这里部分代码省略.........
SaveCurrentModule( &libPath );
}
break;
case ID_MODEDIT_SHEET_SET:
break;
case ID_MODEDIT_LOAD_MODULE:
{
wxString libPath = getLibPath(); // might be empty
wxLogDebug( wxT( "Loading module from library " ) + libPath );
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
Clear_Pcb( true );
GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) );
Load_Module_From_Library( libPath, true );
redraw = true;
}
if( GetBoard()->m_Modules )
GetBoard()->m_Modules->ClearFlags();
// if either m_Reference or m_Value are gone, reinstall them -
// otherwise you cannot see what you are doing on board
if( GetBoard() && GetBoard()->m_Modules )
{
TEXTE_MODULE* ref = GetBoard()->m_Modules->m_Reference;
TEXTE_MODULE* val = GetBoard()->m_Modules->m_Value;
if( val && ref )
{
ref->SetType( TEXT_is_REFERENCE ); // just in case ...
if( ref->m_Text.Length() == 0 )
ref->m_Text = L"Ref**";
val->SetType( TEXT_is_VALUE ); // just in case ...
if( val->m_Text.Length() == 0 )
val->m_Text = L"Val**";
}
}
GetScreen()->ClrModify();
Zoom_Automatique( false );
if( m_Draw3DFrame )
m_Draw3DFrame->NewDisplay();
break;
case ID_MODEDIT_PAD_SETTINGS:
InstallPadOptionsFrame( NULL );
break;
case ID_MODEDIT_CHECK:
break;
case ID_MODEDIT_EDIT_MODULE_PROPERTIES:
if( GetBoard()->m_Modules )
{
SetCurItem( GetBoard()->m_Modules );
DIALOG_MODULE_MODULE_EDITOR dialog( this, (MODULE*) GetScreen()-> GetCurItem() );
int ret = dialog.ShowModal();