KiCad PCB EDA Suite
confirm.h File Reference

This file is part of the common library. More...

#include <wx/window.h>

Go to the source code of this file.

Functions

int DisplayExitDialog (wxWindow *aParent, const wxString &aMessage)
 Function DisplayExitDialog displays a dialog with 3 buttons: Save and Exit Cancel Exit without save. More...
 
void DisplayError (wxWindow *parent, const wxString &aMessage, int displaytime=0)
 Function DisplayError displays an error or warning message box with aMessage. More...
 
void DisplayErrorMessage (wxWindow *aParent, const wxString &aMessage, const wxString aExtraInfo=wxEmptyString)
 Function DisplayErrorMessage displays an error message with aMessage. More...
 
void DisplayInfoMessage (wxWindow *parent, const wxString &aMessage, const wxString aExtraInfo=wxEmptyString)
 Function DisplayInfoMessage displays an informational message box with aMessage. More...
 
bool IsOK (wxWindow *aParent, const wxString &aMessage)
 Function IsOK displays a yes/no dialog with aMessage and returns the user response. More...
 
int YesNoCancelDialog (wxWindow *aParent, const wxString &aPrimaryMessage, const wxString &aSecondaryMessage, const wxString &aYesButtonText=wxEmptyString, const wxString &aNoButtonText=wxEmptyString, const wxString &aCancelButtonText=wxEmptyString)
 Function YesNoCancelDialog displays a yes/no/cancel dialog with aMessage and returns the user response. More...
 
void DisplayHtmlInfoMessage (wxWindow *parent, const wxString &title, const wxString &aMessage, const wxSize &size=wxDefaultSize)
 Function DisplayHtmlInforMessage displays aMessage in HTML format. More...
 

Detailed Description

This file is part of the common library.

See also
common.h

Definition in file confirm.h.

Function Documentation

void DisplayError ( wxWindow *  parent,
const wxString &  aMessage,
int  displaytime = 0 
)

Function DisplayError displays an error or warning message box with aMessage.

Warning
Setting displaytime does not work. Do not use it.

Definition at line 71 of file confirm.cpp.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions(), DIALOG_KEEPOUT_AREA_PROPERTIES::AcceptOptionsForKeepOut(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddAliasOfPart(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::AddFootprintFilter(), NETLIST_EXPORTER::addPinToComponentPinList(), PCBNEW_CONTROL::AppendBoard(), SCH_EDIT_FRAME::AppendOneEEProject(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), PCB_EDIT_FRAME::Begin_Self(), DIALOG_TRACK_VIA_SIZE::check(), DIALOG_TRACK_VIA_PROPERTIES::check(), FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList(), SCH_EDIT_FRAME::ConvertPart(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions(), create_backup_file(), PCB_EDIT_FRAME::Create_MuWaveComponent(), PCB_EDIT_FRAME::Create_MuWavePolygonShape(), SCH_EDIT_FRAME::CreateArchiveLibrary(), DIALOG_GEN_MODULE_POSITION::CreateFiles(), LIB_EDIT_FRAME::CreateGraphicItem(), MICROWAVE_TOOL::createInductorBetween(), SPICE_SIMULATOR::CreateInstance(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), LIB_EDIT_FRAME::CreateNewLibraryPart(), SCH_EDIT_FRAME::CreateNewText(), PCB_EDIT_FRAME::Delete_Drawings_All_Layer(), FOOTPRINT_EDIT_FRAME::Delete_Edge_Module(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAliasOfPart(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllAliasOfPart(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), LIB_EDIT_FRAME::DeleteOnePart(), FOOTPRINT_EDIT_FRAME::DlgGlobalChange_PadSettings(), PCB_EDIT_FRAME::DlgGlobalChange_PadSettings(), PCB_EDIT_FRAME::Edit_Gap(), SCH_EDIT_FRAME::EditSheet(), ExecuteFile(), FOOTPRINT_EDIT_FRAME::Export_Module(), GBR_TO_PCB_EXPORTER::ExportPcb(), DIALOG_SVG_PRINT::ExportSVGFile(), PCB_EDIT_FRAME::ExportToGenCAD(), PCB_EDIT_FRAME::Files_io_from_id(), FootprintWriteShape(), NETLIST_EXPORTER_PSPICE::Format(), PCB_EDIT_FRAME::GenD356File(), DIALOG_GENDRILL::GenDrillAndMapFiles(), DIALOG_SPICE_MODEL::generatePowerSource(), PCB_EDIT_FRAME::GenFootprintsReport(), genPlacementRoutingMatrix(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), GetAssociatedDocument(), PCB_BASE_FRAME::GlobalChange_PadSettings(), EDA_DRAW_FRAME::HandleBlockBegin(), FOOTPRINT_EDIT_FRAME::HandleBlockEnd(), LIB_EDIT_FRAME::HandleBlockEnd(), PCB_EDIT_FRAME::HandleBlockEnd(), SCH_EDIT_FRAME::HandleBlockEnd(), FOOTPRINT_EDIT_FRAME::HandleBlockPlace(), LIB_EDIT_FRAME::HandleBlockPlace(), PCB_EDIT_FRAME::HandleBlockPlace(), SCH_EDIT_FRAME::HandleBlockPlace(), FOOTPRINT_EDIT_FRAME::Import_Module(), ALIGN_DISTRIBUTE_TOOL::Init(), POINT_EDITOR::Init(), POSITION_RELATIVE_TOOL::Init(), EDIT_TOOL::Init(), PCB_EDIT_FRAME::ListAndSelectModuleName(), SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile(), SCH_EDIT_FRAME::LoadOneEEFile(), LIB_EDIT_FRAME::LoadOneLibraryPart(), LIB_EDIT_FRAME::LoadOneSymbol(), SIM_PLOT_FRAME::menuOpenWorkbook(), SIM_PLOT_FRAME::menuSaveWorkbook(), PCB_EDIT_FRAME::MuWaveCommand(), DIALOG_CONFIG_EQUFILES::OnAddFiles(), DIALOG_DESIGN_RULES::OnAddNetclassClick(), DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick(), DIALOG_EESCHEMA_CONFIG::OnAddOrInsertPath(), DIALOG_FIND::onButtonFindItemClick(), DIALOG_FIND::onButtonFindMarkerClick(), FOOTPRINT_EDIT_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnExportPart(), LIB_EDIT_FRAME::OnImportPart(), FOOTPRINT_EDIT_FRAME::OnLeftClick(), PCB_EDIT_FRAME::OnLeftClick(), DIALOG_DRC_CONTROL::OnListUnconnectedClick(), SCH_EDIT_FRAME::OnNewProject(), DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick(), DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick(), DIALOG_NON_COPPER_ZONES_EDITOR::OnOkClick(), DIALOG_DIMENSION_EDITOR::OnOKClick(), EDA_DRAW_PANEL_GAL::onPaint(), PCB_EDIT_FRAME::OnPlaceOrRouteFootprints(), DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick(), DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick(), DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview(), DIALOG_PRINT_USING_PRINTER::OnPrintPreview(), FOOTPRINT_EDIT_FRAME::OnRightClick(), LIB_EDIT_FRAME::OnSaveCurrentPart(), FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs(), SCH_EDIT_FRAME::OnSaveProject(), DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar(), KICAD_MANAGER_FRAME::OnSelectPreferredPdfBrowser(), SIM_PLOT_FRAME::onSettings(), DIALOG_DRC_CONTROL::OnStartdrcClick(), KICAD_MANAGER_FRAME::OnUnarchiveFiles(), SCH_EDIT_FRAME::OnUpdatePCB(), PCB_EDIT_FRAME::OnUpdatePCBFromSch(), FOOTPRINT_EDIT_FRAME::OnVerticalToolbar(), ROUTER_TOOL::onViaCommand(), WIZARD_3DSHAPE_LIBS_DOWNLOADER::OnWizardFinished(), WIZARD_FPLIB_TABLE::OnWizardFinished(), OpenPDF(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), PCB_PARSER::parseZONE_CONTAINER(), SYMBOL_GRID_TRICKS::paste_text(), FP_GRID_TRICKS::paste_text(), SCH_EDIT_FRAME::PasteListOfItems(), DIALOG_PLOT::Plot(), DIALOG_BOM::pluginInit(), ROUTER_TOOL::prepareInteractive(), DIALOG_PRINT_USING_PRINTER::PreparePrintPrms(), LIB_EDIT_FRAME::Process_Config(), SCH_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Process_Config(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), LIB_EDIT_FRAME::Process_Special_Functions(), PCB_EDIT_FRAME::Process_Special_Functions(), PCB_EDIT_FRAME::ProcessMuWaveFunctions(), NETLIST_EXPORTER_PSPICE::ProcessNetlist(), FOOTPRINT_EDIT_FRAME::ProcessPreferences(), GERBVIEW_FRAME::Read_EXCELLON_File(), GERBVIEW_FRAME::Read_GERBER_File(), MWAVE_POLYGONAL_SHAPE_DLG::ReadDataShapeDescr(), PCB_EDIT_FRAME::RecreateBOMFileFromBoard(), PCB_EDIT_FRAME::RecreateCmpFileFromBoard(), FOOTPRINT_EDIT_FRAME::RemoveStruct(), PCB_EDIT_FRAME::RemoveStruct(), KIGFX::VERTEX_MANAGER::Reserve(), Retrace(), MODULE::RunOnChildren(), save_library(), LIB_EDIT_FRAME::SaveActiveLibrary(), FOOTPRINT_EDIT_FRAME::SaveCurrentModule(), SCH_EDIT_FRAME::SaveEEFile(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), LIB_EDIT_FRAME::SaveOneSymbol(), PCB_EDIT_FRAME::SavePcbCopy(), PCB_EDIT_FRAME::SavePcbFile(), PCB_BASE_FRAME::SelectFootprint(), SCH_BASE_FRAME::SelectLibraryFromList(), KIGFX::GPU_MANAGER::SetShader(), PCB_EDIT_FRAME::SpreadFootprints(), PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope(), SIM_PLOT_FRAME::StartSimulation(), EDA_DRAW_PANEL_GAL::SwitchBackend(), DIALOG_LAYERS_SETUP::testLayerNames(), DIALOG_LABEL_EDITOR::TextPropertiesAccept(), FOOTPRINT_EDIT_FRAME::ToPrinter(), PCB_EDIT_FRAME::ToPrinter(), GERBVIEW_FRAME::ToPrinter(), DIALOG_GLOBAL_SYM_LIB_TABLE_CONFIG::TransferDataFromWindow(), DialogEditModuleText::TransferDataFromWindow(), DIALOG_EDIT_ONE_FIELD::TransferDataFromWindow(), DIALOG_SIM_SETTINGS::TransferDataFromWindow(), DIALOG_PCB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_MODULE_MODULE_EDITOR::TransferDataFromWindow(), DIALOG_MODULE_BOARD_EDITOR::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::transferDataToPad(), SPICE_VALIDATOR::Validate(), KIGFX::VERTEX_MANAGER::Vertex(), KIGFX::VERTEX_MANAGER::Vertices(), NETLIST_EXPORTER_ORCADPCB2::WriteNetlist(), NETLIST_EXPORTER_KICAD::WriteNetlist(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), and PCB_EDITOR_CONTROL::ZoneDuplicate().

72 {
73  wxMessageDialog* dialog;
74 
75  int icon = displaytime > 0 ? wxICON_INFORMATION : wxICON_ERROR;
76 
77  dialog = new wxMessageDialog( parent, text, _( "Warning" ),
78  wxOK | wxCENTRE | wxRESIZE_BORDER | icon );
79 
80  dialog->ShowModal();
81  dialog->Destroy();
82 }
void DisplayErrorMessage ( wxWindow *  aParent,
const wxString &  aMessage,
const wxString  aExtraInfo = wxEmptyString 
)

Function DisplayErrorMessage displays an error message with aMessage.

Parameters
aParentis the parent window
aMessageis the message text to display
aExtraInfois extra data that can be optionally displayed in a collapsible pane

Definition at line 85 of file confirm.cpp.

Referenced by PCB_EDIT_FRAME::AppendBoardFile(), PCB_EDIT_FRAME::Begin_Zone(), checkGlError(), copy_pro_file_template(), PCB_EDIT_FRAME::duplicateZone(), PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines(), PCB_EDIT_FRAME::End_Zone(), PCB_EDIT_FRAME::ExportSpecctraFile(), PCB_EDIT_FRAME::ImportSpecctraSession(), PCB_EDIT_FRAME::OnExportSTEP(), CV::IFACE::OnKifaceStart(), SCH::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), PCB_EDIT_FRAME::OnLeftDClick(), KICAD_MANAGER_FRAME::OnNewProject(), PCB_EDIT_FRAME::OnSelectOptionToolbar(), PCB_EDIT_FRAME::OpenProjectFiles(), PROJECT::PcbFootprintLibs(), PCB_EDIT_FRAME::Process_Config(), PCB_EDIT_FRAME::Remove_Zone_Corner(), and FOOTPRINT_EDIT_FRAME::ToolOnRightClick().

86 {
87  wxRichMessageDialog* dlg;
88 
89  dlg = new wxRichMessageDialog( aParent, aText, _( "Error" ),
90  wxOK | wxCENTRE | wxRESIZE_BORDER | wxICON_ERROR );
91 
92  if( !aExtraInfo.IsEmpty() )
93  {
94  dlg->ShowDetailedText( aExtraInfo );
95  }
96 
97  dlg->ShowModal();
98  dlg->Destroy();
99 }
int DisplayExitDialog ( wxWindow *  aParent,
const wxString &  aMessage 
)

Function DisplayExitDialog displays a dialog with 3 buttons: Save and Exit Cancel Exit without save.

Parameters
aParent= the parent window
aMessage= the main message to put in dialog If empty, the standard message will be shown: Save the changes before closing?
Returns
wxID_YES, wxID_CANCEL, wxID_NO.

Definition at line 59 of file confirm.cpp.

Referenced by DIALOG_BOM_EDITOR::CanCloseDialog(), FOOTPRINT_EDIT_FRAME::OnCloseWindow(), PL_EDITOR_FRAME::OnCloseWindow(), CVPCB_MAINFRAME::OnCloseWindow(), SCH_EDIT_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnCloseWindow(), and PCB_EDIT_FRAME::OnCloseWindow().

60 {
61  DIALOG_EXIT dlg( parent, aMessage );
62 
63  int ret = dlg.ShowModal();
64 
65  // Returns wxID_YES, wxID_NO, or wxID_CANCEL
66  return ret;
67 }
void DisplayHtmlInfoMessage ( wxWindow *  parent,
const wxString &  title,
const wxString &  aMessage,
const wxSize &  size = wxDefaultSize 
)

Function DisplayHtmlInforMessage displays aMessage in HTML format.

Definition at line 119 of file confirm.cpp.

References HTML_MESSAGE_BOX::AddHTML_Text().

Referenced by DisplayHotkeyList().

121 {
122  HTML_MESSAGE_BOX dlg( parent, title, wxDefaultPosition, size );
123 
124  dlg.AddHTML_Text( text );
125  dlg.ShowModal();
126 }
Class HTML_MESSAGE_BOX.
void DisplayInfoMessage ( wxWindow *  parent,
const wxString &  aMessage,
const wxString  aExtraInfo = wxEmptyString 
)

Function DisplayInfoMessage displays an informational message box with aMessage.

Parameters
aParentis the parent window
aMessageis the message text to display
aExtraInfois the extra data that can be optionally displayed in a collapsible pane

Definition at line 102 of file confirm.cpp.

Referenced by SCH_EDIT_FRAME::AnnotateComponents(), PCB_EDIT_FRAME::ArchiveModulesOnBoard(), PCB_BASE_FRAME::CreateNewModule(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), PCB_EDIT_FRAME::duplicateZone(), FOOTPRINT_EDIT_FRAME::Export_Module(), GERBVIEW_FRAME::ExportDataInPcbnewFormat(), PCB_EDIT_FRAME::Files_io_from_id(), DISPLAY_FOOTPRINTS_FRAME::Get_Module(), PGM_BASE::GetEditorName(), SCH_EDIT_FRAME::ImportSheetPin(), SCH_EDIT_FRAME::LoadOneEEFile(), SIM_PLOT_FRAME::onAddSignal(), LIB_EDIT_FRAME::OnCheckComponent(), LIB_EDIT_FRAME::OnExportPart(), CV::IFACE::OnKifaceStart(), PCB::IFACE::OnKifaceStart(), FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs(), PCB_EDIT_FRAME::OnSelectTool(), DIALOG_NETLIST::OnTestFootprintsClick(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), DIALOG_PLOT::Plot(), SCH_EDIT_FRAME::Process_Special_Functions(), PCB_EDIT_FRAME::Process_Special_Functions(), FOOTPRINT_EDIT_FRAME::SaveCurrentModule(), FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary(), PCB_EDIT_FRAME::SavePcbCopy(), PCB_BASE_FRAME::SelectCopperLayerPair(), DIALOG_PRINT_USING_PRINTER::SetPrintParameters(), SIM_PLOT_FRAME::StartSimulation(), PCBNEW_CONTROL::ToBeDone(), and FOOTPRINT_EDIT_FRAME::Transform().

103 {
104  wxRichMessageDialog* dlg;
105 
106  dlg = new wxRichMessageDialog( aParent, aMessage, _( "Info" ),
107  wxOK | wxCENTRE | wxRESIZE_BORDER | wxICON_INFORMATION );
108 
109  if( !aExtraInfo.IsEmpty() )
110  {
111  dlg->ShowDetailedText( aExtraInfo );
112  }
113 
114  dlg->ShowModal();
115  dlg->Destroy();
116 }
bool IsOK ( wxWindow *  aParent,
const wxString &  aMessage 
)

Function IsOK displays a yes/no dialog with aMessage and returns the user response.

Parameters
aParentis the parent window. NULL can be used if the parent is the top level window.
aMessageis the message to display in the dialog box.
Returns
True if user selected the yes button, otherwise false.

Definition at line 129 of file confirm.cpp.

Referenced by DIALOG_COPPER_ZONE::AcceptOptions(), DIALOG_GLOBAL_DELETION::AcceptPcbDelete(), PCB_EDIT_FRAME::AutoPlaceModule(), DIALOG_EXCHANGE_MODULE::changeAllFootprints(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::ChangeNbUnitsPerPackage(), DIALOG_EXCHANGE_MODULE::changeSameFootprints(), SELECTION_TOOL::CheckLock(), GERBVIEW_FRAME::Clear_DrawLayers(), FOOTPRINT_EDIT_FRAME::Clear_Pcb(), PCB_EDIT_FRAME::Clear_Pcb(), PCB_BASE_EDIT_FRAME::CreateNewLibrary(), LIB_EDIT_FRAME::CreateNewLibraryPart(), CVPCB_MAINFRAME::DelAssociations(), PCB_EDIT_FRAME::Delete_Drawings_All_Layer(), PCB_EDIT_FRAME::Delete_net(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllAliasOfPart(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter(), deleteItem(), FOOTPRINT_EDIT_FRAME::DeleteModuleFromCurrentLibrary(), LIB_EDIT_FRAME::DeleteOnePart(), PCB_BASE_FRAME::DeletePad(), FOOTPRINT_EDIT_FRAME::Edit_Edge_Layer(), SCH_EDIT_FRAME::EditSheet(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), PL_EDITOR_FRAME::Files_io(), PCB_EDIT_FRAME::Files_io_from_id(), getOptimalModulePlacement(), PGM_BASE::InitPgm(), ROUTER_TOOL::InlineDrag(), PCB_EDIT_FRAME::InstallNetlistFrame(), LIB_EDIT_FRAME::LoadComponentAndSelectLib(), FOOTPRINT_EDIT_FRAME::LoadModuleFromBoard(), LIB_EDIT_FRAME::LoadOneLibraryPart(), SCH_EDIT_FRAME::OnAppendProject(), LIB_EDIT_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnEditPin(), PL_EDITOR_FRAME::OnFileHistory(), KICAD_MANAGER_FRAME::OnNewProject(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick(), PCB_EDIT_FRAME::OnPlaceOrRouteFootprints(), DIALOG_NETLIST::OnReadNetlistFileClick(), DIALOG_BOM_EDITOR::OnRevertFieldChanges(), DIALOG_PAGES_SETTINGS::OnWksFileSelection(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), ROUTER_TOOL::performDragging(), LIB_EDIT_FRAME::PlacePin(), SCH_EDIT_FRAME::prepareForNetlist(), FOOTPRINT_EDIT_FRAME::Process_Special_Functions(), SCH_EDIT_FRAME::Process_Special_Functions(), CVPCB_MAINFRAME::ReadNetListAndFpFiles(), LIB_EDIT_FRAME::SaveActiveLibrary(), LIB_EDIT_FRAME::SaveOnePart(), DIALOG_EDIT_COMPONENT_IN_LIBRARY::SetUnsetConvert(), PCB_EDIT_FRAME::Solve(), and DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::TransferDataFromWindow().

130 {
131  wxMessageDialog dlg( aParent, aMessage, _( "Confirmation" ),
132  wxYES_NO | wxCENTRE | wxICON_QUESTION );
133 
134  return dlg.ShowModal() == wxID_YES;
135 }
int YesNoCancelDialog ( wxWindow *  aParent,
const wxString &  aPrimaryMessage,
const wxString &  aSecondaryMessage,
const wxString &  aYesButtonText = wxEmptyString,
const wxString &  aNoButtonText = wxEmptyString,
const wxString &  aCancelButtonText = wxEmptyString 
)

Function YesNoCancelDialog displays a yes/no/cancel dialog with aMessage and returns the user response.

Parameters
aParentis the parent window. NULL can be used if the parent is the top level window.
aPrimaryMessageis the message to display in the top part of the dialog box using a bold font.
aSecondaryMessageis the message to display in the lower part of the dialog box using the default system UI font.
aYesButtonTextis the text to display in the yes button when defined.
aNoButtonTextis the text to display in the no button when defiend.
aCancelButtonTextis the text to display in the cancel button when defined.
Returns
wxID_YES, wxID_NO, or wxID_CANCEL depending on the button the user selected.

Definition at line 166 of file confirm.cpp.

Referenced by SCH_EDIT_FRAME::OpenProjectFiles(), and PCB_EDIT_FRAME::OpenProjectFiles().

172 {
173  DIALOG_YES_NO_CANCEL dlg( aParent, aPrimaryMessage, aSecondaryMessage,
174  aYesButtonText, aNoButtonText, aCancelButtonText );
175 
176  return dlg.ShowModal();
177 }