KiCad PCB EDA Suite
invoke_pcb_dialog.h File Reference

Go to the source code of this file.

Functions

int InvokePcbLibTableEditor (wxTopLevelWindow *aCaller, FP_LIB_TABLE *aGlobal, FP_LIB_TABLE *aProject)
 Function InvokePcbLibTableEditor shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables. More...
 
void Invoke3DShapeLibsDownloaderWizard (wxTopLevelWindow *aCaller)
 Function Invoke3DShapeLibsDownloaderWizard Runs the downloader wizard for easy 3D shape libraries download from the official Kicad Github repository of *.3Dshape libraries. More...
 
void InvokePluginOptionsEditor (wxTopLevelWindow *aCaller, const wxString &aNickname, const wxString &aPluginType, const wxString &aOptions, wxString *aResult)
 Function InvokePluginOptionsEditor calls DIALOG_FP_PLUGIN_OPTIONS dialog so that plugin options set can be edited. More...
 
bool InvokeDXFDialogBoardImport (PCB_BASE_FRAME *aCaller)
 Function InvokeDXFDialogBoardImport shows the modal DIALOG_DXF_IMPORT for importing a DXF file to a board. More...
 
bool InvokeDXFDialogModuleImport (PCB_BASE_FRAME *aCaller, MODULE *aModule)
 Function InvokeDXFDialogModuleImport shows the modal DIALOG_DXF_IMPORT for importing a DXF file as footprint outlines. More...
 
bool InvokeLayerSetup (PCB_EDIT_FRAME *aCaller, BOARD *aBoard)
 Function InvokeLayerSetup shows the layer setup dialog. More...
 
bool InvokeSVGPrint (wxTopLevelWindow *aCaller, BOARD *aBoard, PCB_PLOT_PARAMS *aSettings)
 Function InvokeSVGPrint shows the SVG print dialog. More...
 
bool InvokeFPEditorPrefsDlg (FOOTPRINT_EDIT_FRAME *aCaller)
 Function InvokeSVGPrint shows the SVG print dialog. More...
 

Function Documentation

void Invoke3DShapeLibsDownloaderWizard ( wxTopLevelWindow *  aCaller)

Function Invoke3DShapeLibsDownloaderWizard Runs the downloader wizard for easy 3D shape libraries download from the official Kicad Github repository of *.3Dshape libraries.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.

Definition at line 58 of file wizard_3DShape_Libs_downloader.cpp.

References WIZARD_3DSHAPE_LIBS_DOWNLOADER::GetFirstPage().

Referenced by PCB_EDIT_FRAME::Process_Config().

59 {
60  WIZARD_3DSHAPE_LIBS_DOWNLOADER wizard( aCaller );
61  wizard.RunWizard( wizard.GetFirstPage() );
62 }
bool InvokeDXFDialogBoardImport ( PCB_BASE_FRAME aCaller)

Function InvokeDXFDialogBoardImport shows the modal DIALOG_DXF_IMPORT for importing a DXF file to a board.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.
Returns
true if the import was made.

Definition at line 307 of file dialog_dxf_import.cpp.

References BOARD::Add(), PCB_BASE_FRAME::GetBoard(), DIALOG_DXF_IMPORT::GetImportedItems(), PCB_BASE_FRAME::OnModify(), PICKED_ITEMS_LIST::PushItem(), PCB_BASE_FRAME::SaveCopyInUndoList(), and UR_NEW.

Referenced by PCB_EDIT_FRAME::Process_Special_Functions().

308 {
309  DIALOG_DXF_IMPORT dlg( aCaller );
310  bool success = ( dlg.ShowModal() == wxID_OK );
311 
312  if( success )
313  {
314  const std::list<BOARD_ITEM*>& list = dlg.GetImportedItems();
315  PICKED_ITEMS_LIST picklist;
316  BOARD* board = aCaller->GetBoard();
317 
318  std::list<BOARD_ITEM*>::const_iterator it, itEnd;
319  for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it )
320  {
321  BOARD_ITEM* item = *it;
322  board->Add( item );
323 
324  ITEM_PICKER itemWrapper( item, UR_NEW );
325  picklist.PushItem( itemWrapper );
326  }
327 
328  aCaller->SaveCopyInUndoList( picklist, UR_NEW, wxPoint( 0, 0 ) );
329  aCaller->OnModify();
330  }
331 
332  return success;
333 }
Class BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class...
BOARD * GetBoard() const
void PushItem(const ITEM_PICKER &aItem)
Function PushItem pushes aItem to the top of the list.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_INSERT) override
Adds an item to the container.
Class PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:169
virtual void SaveCopyInUndoList(BOARD_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))=0
Function SaveCopyInUndoList (virtual pure) Creates a new entry in undo list of commands.
bool InvokeDXFDialogModuleImport ( PCB_BASE_FRAME aCaller,
MODULE aModule 
)

Function InvokeDXFDialogModuleImport shows the modal DIALOG_DXF_IMPORT for importing a DXF file as footprint outlines.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.
aModuleis the footprint currently edited.
Returns
true if the import was made.

Definition at line 336 of file dialog_dxf_import.cpp.

References MODULE::Add(), DIALOG_DXF_IMPORT::GetImportedItems(), PCB_BASE_FRAME::OnModify(), PCB_BASE_FRAME::SaveCopyInUndoList(), and UR_CHANGED.

Referenced by FOOTPRINT_EDIT_FRAME::Process_Special_Functions().

337 {
338  wxASSERT( aModule );
339 
340  DIALOG_DXF_IMPORT dlg( aCaller, true );
341  bool success = ( dlg.ShowModal() == wxID_OK );
342 
343  if( success )
344  {
345  const std::list<BOARD_ITEM*>& list = dlg.GetImportedItems();
346 
347  aCaller->SaveCopyInUndoList( aModule, UR_CHANGED );
348  aCaller->OnModify();
349 
350  std::list<BOARD_ITEM*>::const_iterator it, itEnd;
351 
352  for( it = list.begin(), itEnd = list.end(); it != itEnd; ++it )
353  {
354  aModule->Add( *it );
355  }
356  }
357 
358  return success;
359 }
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_INSERT) override
>
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
virtual void SaveCopyInUndoList(BOARD_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, const wxPoint &aTransformPoint=wxPoint(0, 0))=0
Function SaveCopyInUndoList (virtual pure) Creates a new entry in undo list of commands.
bool InvokeFPEditorPrefsDlg ( FOOTPRINT_EDIT_FRAME aCaller)

Function InvokeSVGPrint shows the SVG print dialog.

Parameters
aCalleris the FOOTPRINT_EDIT_FRAME which is invoking the dialog.
Returns
bool - true if user pressed OK (did not abort), else false.

Definition at line 69 of file dialog_modedit_options.cpp.

Referenced by FOOTPRINT_EDIT_FRAME::ProcessPreferences().

70 {
71  DIALOG_MODEDIT_OPTIONS dlg( aCaller );
72 
73  int ret = dlg.ShowModal();
74 
75  return ret == wxID_OK;
76 }
bool InvokeLayerSetup ( PCB_EDIT_FRAME aCaller,
BOARD aBoard 
)

Function InvokeLayerSetup shows the layer setup dialog.

Parameters
aCalleris the PCB_EDIT_FRAME which is invoking the dialog.
aBoardis the currently edited board.
Returns
bool - true if user pressed OK (did not abort), else false.

Definition at line 903 of file dialog_layers_setup.cpp.

Referenced by PCB_EDIT_FRAME::Process_Config().

904 {
905  DIALOG_LAYERS_SETUP dlg( aCaller, aBoard );
906 
907  return dlg.ShowModal() == wxID_OK;
908 }
int InvokePcbLibTableEditor ( wxTopLevelWindow *  aCaller,
FP_LIB_TABLE aGlobal,
FP_LIB_TABLE aProject 
)

Function InvokePcbLibTableEditor shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.
aGlobalis the common footprint library table file being edited.
aProjectis the project specific footprint library table file being edited.
Returns
int - bits 0 and 1 tell whether a change was made to the aGlobal and/or the aProject table, respectively. If set, table was modified.

Definition at line 837 of file dialog_fp_lib_table.cpp.

Referenced by CVPCB_MAINFRAME::OnEditFootprintLibraryTable(), PCB_EDIT_FRAME::Process_Config(), and FOOTPRINT_EDIT_FRAME::ProcessPreferences().

839 {
840  DIALOG_FP_LIB_TABLE dlg( aCaller, aGlobal, aProject );
841 
842  int dialogRet = dlg.ShowModal(); // returns value passed to EndModal() above
843 
844  return dialogRet;
845 }
Class DIALOG_FP_LIB_TABLE shows and edits the PCB library tables.
void InvokePluginOptionsEditor ( wxTopLevelWindow *  aCaller,
const wxString &  aNickname,
const wxString &  aPluginType,
const wxString &  aOptions,
wxString *  aResult 
)

Function InvokePluginOptionsEditor calls DIALOG_FP_PLUGIN_OPTIONS dialog so that plugin options set can be edited.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.
aNicknameis the footprint library whose options are being edited.
aPluginTypeis something that will pass through IO_MGR::EnumFromStr().
aOptionsis the options string on calling into this function.
aResultis where to put the result of the editing.

Definition at line 392 of file dialog_fp_plugin_options.cpp.

Referenced by DIALOG_FP_LIB_TABLE::optionsEditor().

395 {
396  DIALOG_FP_PLUGIN_OPTIONS dlg( aCaller, aNickname, aPluginType, aOptions, aResult );
397 
398  dlg.ShowModal();
399 }
Class DIALOG_FP_PLUGIN_OPTIONS is an options editor in the form of a two column name/value spreadshee...
bool InvokeSVGPrint ( wxTopLevelWindow *  aCaller,
BOARD aBoard,
PCB_PLOT_PARAMS aSettings 
)

Function InvokeSVGPrint shows the SVG print dialog.

Parameters
aCalleris the wxTopLevelWindow which is invoking the dialog.
aBoardis the currently edited board.
aSettingsis the current pcb plot parameters.
Returns
bool - true if user pressed OK (did not abort), else false.

Definition at line 436 of file dialog_SVG_print.cpp.

Referenced by PCB_EDIT_FRAME::SVG_Print().

437 {
438  DIALOG_SVG_PRINT dlg( aCaller, aBoard, aSettings );
439 
440  return dlg.ShowModal() == wxID_OK;
441 }