本文整理汇总了C++中FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList方法的典型用法代码示例。如果您正苦于以下问题:C++ FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList方法的具体用法?C++ FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList怎么用?C++ FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FOOTPRINT_VIEWER_FRAME
的用法示例。
在下文中一共展示了FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Process_Config
//.........这里部分代码省略.........
"table:\n\n%s" ),
GetChars( ioe.errorText.GetData() )
);
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
}
}
// If no board file is defined, do not save the project specific library table. It
// is kept in memory and created in the path when the new board is saved.
if( (r & 2) && !GetBoard()->GetFileName().IsEmpty() )
{
wxString tblName = Prj().FootprintLibTblName();
try
{
Prj().PcbFootprintLibs()->Save( tblName );
tableChanged = true;
}
catch( const IO_ERROR& ioe )
{
wxString msg = wxString::Format( _(
"Error occurred saving project specific footprint library "
"table:\n\n%s" ),
GetChars( ioe.errorText )
);
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
}
}
FOOTPRINT_VIEWER_FRAME* viewer;
if( tableChanged && (viewer = (FOOTPRINT_VIEWER_FRAME*)Kiway().Player( FRAME_PCB_MODULE_VIEWER, false )) != NULL )
{
viewer->ReCreateLibraryList();
}
}
break;
case ID_PCB_3DSHAPELIB_WIZARD:
#ifdef BUILD_GITHUB_PLUGIN
Invoke3DShapeLibsDownloaderWizard( this );
#endif
break;
case ID_PCB_MASK_CLEARANCE:
{
DIALOG_PADS_MASK_CLEARANCE dlg( this );
if( dlg.ShowModal() == 1 && IsGalCanvasActive() )
{
for( MODULE* module = GetBoard()->m_Modules; module; module = module->Next() )
module->ViewUpdate();
GetGalCanvas()->Refresh();
}
}
break;
case wxID_PREFERENCES:
{
DIALOG_GENERALOPTIONS dlg( this );
dlg.ShowModal();
}
break;
case ID_PCB_PAD_SETUP:
示例2: ProcessPreferences
void FOOTPRINT_EDIT_FRAME::ProcessPreferences( wxCommandEvent& event )
{
int id = event.GetId();
switch( id )
{
// Hotkey IDs
case ID_PREFERENCES_HOTKEY_EXPORT_CONFIG:
ExportHotkeyConfigToFile( g_Module_Editor_Hokeys_Descr, wxT( "pcbnew" ) );
break;
case ID_PREFERENCES_HOTKEY_IMPORT_CONFIG:
ImportHotkeyConfigFromFile( g_Module_Editor_Hokeys_Descr, wxT( "pcbnew" ) );
break;
case ID_PREFERENCES_HOTKEY_SHOW_EDITOR:
InstallHotkeyFrame( this, g_Module_Editor_Hokeys_Descr );
break;
case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
// Display current hotkey list for the footprint editor.
DisplayHotkeyList( this, g_Module_Editor_Hokeys_Descr );
break;
case ID_PCB_LIB_WIZARD:
case ID_PCB_LIB_TABLE_EDIT:
{
bool tableChanged = false;
int r = 0;
if( id == ID_PCB_LIB_TABLE_EDIT )
r = InvokePcbLibTableEditor( this, &GFootprintTable, Prj().PcbFootprintLibs() );
else
r = InvokeFootprintWizard( this, &GFootprintTable, Prj().PcbFootprintLibs() );
if( r & 1 )
{
try
{
FILE_OUTPUTFORMATTER sf( FP_LIB_TABLE::GetGlobalTableFileName() );
GFootprintTable.Format( &sf, 0 );
tableChanged = true;
}
catch( const IO_ERROR& ioe )
{
wxString msg = wxString::Format( _(
"Error occurred saving the global footprint library "
"table:\n\n%s" ),
GetChars( ioe.errorText.GetData() )
);
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
}
}
if( r & 2 )
{
wxString tblName = Prj().FootprintLibTblName();
try
{
Prj().PcbFootprintLibs()->Save( tblName );
tableChanged = true;
}
catch( const IO_ERROR& ioe )
{
wxString msg = wxString::Format( _(
"Error occurred saving project specific footprint library "
"table:\n\n%s" ),
GetChars( ioe.errorText )
);
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
}
}
FOOTPRINT_VIEWER_FRAME* viewer;
viewer = (FOOTPRINT_VIEWER_FRAME*)Kiway().Player( FRAME_PCB_MODULE_VIEWER, false );
if( tableChanged && viewer != NULL )
viewer->ReCreateLibraryList();
}
break;
case wxID_PREFERENCES:
InvokeFPEditorPrefsDlg( this );
break;
default:
DisplayError( this, wxT( "FOOTPRINT_EDIT_FRAME::ProcessPreferences error" ) );
}
}
示例3: Process_Config
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{
int id = event.GetId();
wxFileName fn;
switch( id )
{
case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG:
m_show_layer_manager_tools = ! m_show_layer_manager_tools;
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
m_auimgr.Update();
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
m_show_layer_manager_tools ?
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
break;
case ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR:
m_show_microwave_tools = ! m_show_microwave_tools;
m_auimgr.GetPane( wxT( "m_microWaveToolBar" ) ).Show( m_show_microwave_tools );
m_auimgr.Update();
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
m_show_microwave_tools ?
_( "Hide Microwave Toolbar" ): _( "Show Microwave Toolbar" ));
break;
case ID_PCB_LAYERS_SETUP:
InstallDialogLayerSetup();
break;
case ID_PCB_LIB_TABLE_EDIT:
{
bool tableChanged = false;
int r = InvokePcbLibTableEditor( this, &GFootprintTable, FootprintLibs() );
if( r & 1 )
{
try
{
FILE_OUTPUTFORMATTER sf( FP_LIB_TABLE::GetGlobalTableFileName() );
GFootprintTable.Format( &sf, 0 );
tableChanged = true;
}
catch( const IO_ERROR& ioe )
{
wxString msg = wxString::Format( _(
"Error occurred saving the global footprint library "
"table:\n\n%s" ),
GetChars( ioe.errorText.GetData() )
);
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
}
}
// If no board file is defined, do not save the project specific library table. It
// is kept in memory and created in the path when the new board is saved.
if( (r & 2) && !GetBoard()->GetFileName().IsEmpty() )
{
wxString tblName = Prj().FootprintLibTblName();
try
{
FootprintLibs()->Save( tblName );
tableChanged = true;
}
catch( const IO_ERROR& ioe )
{
wxString msg = wxString::Format( _(
"Error occurred saving project specific footprint library "
"table:\n\n%s" ),
GetChars( ioe.errorText )
);
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
}
}
FOOTPRINT_VIEWER_FRAME* viewer;
if( tableChanged && (viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer( this )) != NULL )
{
viewer->ReCreateLibraryList();
}
}
break;
case ID_PCB_MASK_CLEARANCE:
{
DIALOG_PADS_MASK_CLEARANCE dlg( this );
dlg.ShowModal();
}
break;
case wxID_PREFERENCES:
{
DIALOG_GENERALOPTIONS dlg( this );
dlg.ShowModal();
}
//.........这里部分代码省略.........