44 #include <wx/checkbox.h> 45 #include <wx/stdpaths.h> 63 #include <wx/wupdlock.h> 64 #include <wx/filedlg.h> 69 #define USE_INSTRUMENTATION 0 82 bool aKicadFilesOnly )
125 wxFileName fileName( *aFileName );
126 wxString fileFilters;
128 if( aKicadFilesOnly )
130 std::vector<std::string> fileExtensions;
132 for(
unsigned ii = 0; ii < 2; ++ii )
134 if( !fileFilters.IsEmpty() )
135 fileFilters += wxChar(
'|' );
137 fileFilters += wxGetTranslation( loaders[ii].
filter );
140 wxCHECK( plugin,
false );
141 fileExtensions.push_back( plugin->GetFileExtension().ToStdString() );
145 + wxT(
"|" ) + fileFilters;
149 wxString allWildcards;
151 for(
unsigned ii = 2; ii <
arrayDim( loaders ); ++ii )
153 if( !fileFilters.IsEmpty() )
154 fileFilters += wxChar(
'|' );
156 fileFilters += wxGetTranslation( loaders[ii].
filter );
159 wxCHECK( plugin,
false );
160 allWildcards += wxT(
"*." ) +
formatWildcardExt( plugin->GetFileExtension() ) + wxT(
";" );
163 fileFilters =
_(
"All supported formats|" ) + allWildcards + wxT(
"|" ) + fileFilters;
170 if( fileName.FileExists() )
172 path = fileName.GetPath();
173 name = fileName.GetFullName();
184 wxFileDialog dlg( aParent,
185 aKicadFilesOnly ?
_(
"Open Board File" ) :
_(
"Import Non KiCad Board File" ),
186 path,
name, fileFilters, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
188 if( dlg.ShowModal() == wxID_OK )
194 *aFileName = dlg.GetPath();
195 aParent->
SetMruPath( wxFileName( dlg.GetPath() ).GetPath() );
213 _(
"Create a new project for this board" ) );
216 "design rules, net classes, and layer presets" ) );
218 wxBoxSizer* sizer =
new wxBoxSizer( wxHORIZONTAL );
221 SetSizerAndFit( sizer );
229 static wxWindow*
Create( wxWindow* aParent )
251 wxFileName fn = *aFileName;
255 wxFileDialog dlg( aParent,
_(
"Save Board File As" ), fn.GetPath(), fn.GetFullName(), wildcard,
256 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
262 if( dlg.ShowModal() != wxID_OK )
270 *aFileName = fn.GetFullPath();
272 if( wxWindow* extraControl = dlg.GetExtraControl() )
273 *aCreateProject = static_cast<CREATE_PROJECT_CHECKBOX*>( extraControl )->GetValue();
275 *aCreateProject =
true;
289 if( !wxFileName::IsFileReadable( fn ) )
308 int id =
event.GetId();
340 wxFileName fn = currfn;
343 fn.SetName( rec_name );
345 if( !fn.FileExists() )
347 msg.Printf(
_(
"Recovery file '%s' not found." ), fn.GetFullPath() );
352 msg.Printf(
_(
"OK to load recovery file '%s'?" ), fn.GetFullPath() );
354 if( !
IsOK(
this, msg ) )
375 wxString saveMsg =
_(
"Current board will be closed, save changes to '%s' before " 389 if( !
IsOK(
this,
_(
"Current Board will be closed. Continue?" ) ) )
414 if( !
GetBoard()->GetFileName().IsEmpty() )
425 wxFileName::SplitPath(
GetBoard()->GetFileName(),
nullptr,
nullptr, &orig_name,
nullptr );
427 if( orig_name.IsEmpty() )
430 wxFileName savePath(
Prj().GetProjectFullName() );
432 if( !savePath.IsOk() || !savePath.IsDirWritable() )
436 if( !savePath.IsOk() || !savePath.IsDirWritable() )
441 wxString filename = fn.GetFullPath();
442 bool createProject =
false;
449 return SavePcbFile( filename, addToHistory, createProject );
468 wxFileName fn = aFileName;
522 for(
int i = 0; i < collector.
GetCount(); i++ )
526 int itemWidth = static_cast<PCB_SHAPE*>( collector[i] )->GetWidth();
528 if( edgeWidth != -1 && edgeWidth != itemWidth )
531 edgeWidth = std::max( edgeWidth, itemWidth );
535 edgeWidth = itemWidth;
543 wxMessageBox(
_(
"If the zones on this board are refilled the Copper Edge Clearance " 544 "setting will be used (see Board Setup > Design Rules > Constraints).\n" 545 "This may result in different fills from previous KiCad versions which " 546 "used the line thicknesses of the board boundary on the Edge Cuts " 548 _(
"Edge Clearance Warning" ), wxOK | wxICON_WARNING,
this );
551 return std::max( 0, edgeWidth / 2 );
558 if( aFileSet.size() != 1 )
560 UTF8 msg =
StrPrintf(
"Pcbnew:%s() takes a single filename", __func__ );
565 wxString fullFileName( aFileSet[0] );
566 wxFileName wx_filename( fullFileName );
573 wxASSERT_MSG( wx_filename.IsAbsolute(), wxT(
"Path is not absolute!" ) );
575 std::unique_ptr<wxSingleInstanceChecker> lockFile =
::LockFile( fullFileName );
577 if( !lockFile || lockFile->IsAnotherRunning() )
579 msg.Printf(
_(
"PCB '%s' is already open." ), wx_filename.GetFullName() );
600 wxFileName pro = fullFileName;
603 bool is_new = !wxFileName::IsFileReadable( fullFileName );
609 msg.Printf(
_(
"PCB '%s' does not exist. Do you wish to create it?" ), fullFileName );
611 if( !
IsOK(
this, msg ) )
619 :
_(
"Loading PCB" ), 1 );
666 BOARD* loadedBoard =
nullptr;
670 dynamic_cast< LAYER_REMAPPABLE_PLUGIN* >( (
PLUGIN*) pi );
672 if( layerRemappablePlugin )
681 bool failedLoad =
false;
693 props[
"page_width"] = xbuf;
694 props[
"page_height"] = ybuf;
696 #if USE_INSTRUMENTATION 701 loadedBoard = pi->
Load( fullFileName,
nullptr, &props, &
Prj(), &progressReporter );
703 #if USE_INSTRUMENTATION 705 printf(
"PLUGIN::Load(): %u usecs\n", stopTime - startTime );
710 msg.Printf(
_(
"Error loading PCB '%s'." ), fullFileName );
711 progressReporter.Hide();
718 if( ioe.
Problem() != wxT(
"CANCEL" ) )
720 msg.Printf(
_(
"Error loading PCB '%s'." ), fullFileName );
721 progressReporter.Hide();
727 catch(
const std::bad_alloc& )
729 msg.Printf(
_(
"Memory exhausted loading PCB '%s'" ), fullFileName );
730 progressReporter.Hide();
750 SetBoard( loadedBoard,
false, &progressReporter );
800 && loadedBoard->
GetGenerator().Lower() != wxT(
"gerbview" ) ) )
805 "It will be converted to the new format when saved." ),
815 wxFileName loadedBoardFn( fullFileName );
816 wxString libNickName = loadedBoardFn.GetName();
827 if( newLibPath.Length() > 0 )
831 for(
FOOTPRINT* footprint : loadedFootprints )
835 if( !footprint->GetFPID().GetLibItemName().empty() )
837 footprint->SetReference(
"REF**" );
838 piSexpr->FootprintSave( newLibPath, footprint );
844 wxLogError(
_(
"Error saving footprint %s to project specific library." )
846 footprint->GetFPID().GetUniStringLibItemName(),
853 wxString rel_path, env_path;
855 wxASSERT_MSG( wxGetEnv( project_env, &env_path ),
856 wxT(
"There is no project variable?" ) );
858 wxString result( newLibPath );
859 rel_path = result.Replace( env_path,
860 wxT(
"$(" ) + project_env + wxT(
")" ) )
862 : wxString( wxEmptyString );
865 wxT(
"KiCad" ), wxEmptyString );
876 wxLogError(
_(
"Error saving project specific footprint library table." )
884 LIB_ID libId = footprint->GetFPID();
890 footprint->SetFPID( libId );
897 wxFileName fn = fullFileName;
902 wxString fname = fn.GetFullPath();
916 progressReporter.
Report(
_(
"Updating nets" ) );
931 #if 0 && defined(DEBUG) 955 bool aChangeProject )
958 wxFileName pcbFileName = aFileName;
968 wxString msg =
wxString::Format(
_(
"Insufficient permissions to write file '%s'." ),
969 pcbFileName.GetFullPath() );
976 wxFileName projectFile( pcbFileName );
977 wxFileName rulesFile( pcbFileName );
983 if( !projectFile.FileExists() && aChangeProject )
991 if( currentRules.FileExists() && !rulesFile.FileExists() && aChangeProject )
992 KiCopyFile( currentRules.GetFullPath(), rulesFile.GetFullPath(), msg );
997 rulesFile.GetFullPath() ) );
1000 if( projectFile.FileExists() )
1010 wxStandardPaths& paths = wxStandardPaths::Get();
1011 wxString tempFile = wxFileName::CreateTempFileName(
1012 paths.GetTempDir() + wxFileName::GetPathSeparator() + wxT(
"pcbnew" ) );
1020 pi->Save( tempFile,
GetBoard(),
nullptr );
1025 pcbFileName.GetFullPath(),
1028 lowerTxt.Printf(
_(
"Failed to create temporary file '%s'." ), tempFile );
1033 wxRemoveFile( tempFile );
1039 if( !wxRenameFile( tempFile, pcbFileName.GetFullPath() ) )
1042 "Failed to rename temporary file '%s." ),
1043 pcbFileName.GetFullPath(),
1046 lowerTxt.Printf(
_(
"Failed to rename temporary file '%s'." ),
1054 if( !
Kiface().IsSingle() )
1065 LockFile( pcbFileName.GetFullPath() );
1072 wxFileName autoSaveFileName = pcbFileName;
1076 if( autoSaveFileName.FileExists() )
1077 wxRemoveFile( autoSaveFileName.GetFullPath() );
1079 lowerTxt.Printf(
_(
"File '%s' saved." ), pcbFileName.GetFullPath() );
1081 SetStatusText( lowerTxt, 0 );
1098 wxFileName pcbFileName = aFileName;
1106 pcbFileName.GetFullPath() ) );
1120 wxASSERT( pcbFileName.IsAbsolute() );
1122 pi->Save( pcbFileName.GetFullPath(),
GetBoard(), nullptr );
1127 pcbFileName.GetFullPath(),
1133 wxFileName projectFile( pcbFileName );
1134 wxFileName rulesFile( pcbFileName );
1140 if( aCreateProject && !projectFile.FileExists() )
1145 if( aCreateProject && currentRules.FileExists() && !rulesFile.FileExists() )
1146 KiCopyFile( currentRules.GetFullPath(), rulesFile.GetFullPath(), msg );
1148 if( !msg.IsEmpty() )
1151 rulesFile.GetFullPath() ) );
1155 pcbFileName.GetFullPath() ) );
1163 wxFileName tmpFileName;
1169 wxString title = GetTitle();
1171 if(
GetBoard()->GetFileName().IsEmpty() )
1182 wxFileName autoSaveFileName = tmpFileName;
1187 if( !autoSaveFileName.IsOk() )
1192 if( !autoSaveFileName.IsDirWritable() )
1194 autoSaveFileName.SetPath( wxFileName::GetTempDir() );
1196 if( !autoSaveFileName.IsOk() || !autoSaveFileName.IsDirWritable() )
1201 wxT(
"Creating auto save file <" ) + autoSaveFileName.GetFullPath() + wxT(
">" ) );
1203 if(
SavePcbFile( autoSaveFileName.GetFullPath(),
false, false ) )
1210 if( !
Kiface().IsSingle() &&
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
void UpdateTitle()
Set the main window title bar text.
Plugin class for import plugins that support remappable layers.
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
LSET m_VisibleLayers
Board settings.
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
void OnModify() override
Must be called after a board change to set the modified flag.
bool HandleUnsavedChanges(wxWindow *aParent, const wxString &aMessage, const std::function< bool()> &aSaveFunction)
Display a dialog with Save, Cancel and Discard Changes buttons.
void SetCopperEdgeClearance(int aDistance)
#define SEXPR_BOARD_FILE_VERSION
Current s-expression file format version. 2 was the last legacy format version.
const UTF8 & GetLibItemName() const
#define WIN_STRING_DIR_SEP
#define KICTL_IMPORT_LIB
import all footprints into a project library.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
wxString EaglePcbFileWildcard()
Pcbnew PLUGIN for CADSTAR PCB Archive (*.cpa) format: an ASCII format based on S-expressions.
static const KICAD_T AllBoardItems[]
A scan list for all editable board items.
bool m_LegacyDesignSettingsLoaded
True if the legacy board design settings were loaded from a file.
void SetMruPath(const wxString &aPath)
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
bool IsContentModified() const override
Get if the current board has been modified but not saved.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
IO_MGR::PCB_FILE_T plugin_type(const wxString &aFileName, int aCtl)
SETTINGS_MANAGER * GetSettingsManager() const
const wxChar *const traceAutoSave
Flag to enable auto save feature debug tracing.
bool SaveProject(const wxString &aFullPath=wxEmptyString, PROJECT *aProject=nullptr)
Saves a loaded project.
wxString GetDesignRulesPath()
Return the absolute path to the design rules file for the currently-loaded board.
EDA_3D_VIEWER_FRAME * Get3DViewerFrame()
Hold a record identifying a library accessed by the appropriate footprint library PLUGIN object in th...
bool InsertRow(LIB_TABLE_ROW *aRow, bool doReplace=false)
Adds aRow if it does not already exist or if doReplace is true.
This file is part of the common library.
const std::string ProjectFileExtension
const std::string LegacyPcbFileExtension
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
virtual BOARD * Load(const wxString &aFileName, BOARD *aAppendToMe, const PROPERTIES *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Load information from some input file format that this PLUGIN implementation knows about into either ...
#define UNIX_STRING_DIR_SEP
bool doAutoSave() override
Perform auto save when the board has been modified and not saved within the auto save interval.
virtual PROJECT_FILE & GetProjectFile() const
#define KICTL_CREATE
caller thinks requested project files may not exist.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Class that computes missing connections on a PCB.
void ResolveDRCExclusions()
Update markers to match recorded exclusions.
const std::string DesignRulesFileExtension
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.
bool LoadProjectSettings()
Load the current project's file configuration settings which are pertinent to this PCB_EDIT_FRAME ins...
void KiCopyFile(const wxString &aSrcPath, const wxString &aDestPath, wxString &aErrors)
void ReleaseFile()
Release the current file marked in use.
void Collect(BOARD_ITEM *aBoard, const KICAD_T aScanList[])
Test a BOARD_ITEM using this class's Inspector method, which does the collection.
CREATE_PROJECT_CHECKBOX(wxWindow *aParent)
NET_SETTINGS & NetSettings()
bool SavePcbCopy(const wxString &aFileName, bool aCreateProject=false)
Write the board data structures to aFileName.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
#define KICTL_EAGLE_BRD
chosen *.brd file is Eagle according to user.
const wxString & GetGenerator() const
int inferLegacyEdgeClearance(BOARD *aBoard)
wxString AltiumCircuitMakerPcbFileWildcard()
Collect all BOARD_ITEM objects on a given layer.
const std::string KiCadPcbFileExtension
void RebuildNetClassAssignments()
Rebuild netclass assignments from the netclass membership lists.
A logical library item identifier and consists of various portions much like a URI.
A name/value tuple with unique names and optional values.
virtual void Report(const wxString &aMessage) override
Display aMessage in the progress bar dialog.
const wxString & GetFileName() const
virtual const wxString Problem() const
what was the problem?
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
std::unique_ptr< wxSingleInstanceChecker > m_file_checker
void UpdateFileHistory(const wxString &FullFileName, FILE_HISTORY *aFileHistory=nullptr)
Update the list of recently opened files.
void SetLayerId(PCB_LAYER_ID aLayerId)
virtual void RegisterLayerMappingCallback(LAYER_MAPPING_HANDLER aLayerMappingHandler)
Register a different handler to be called when mapping of input layers to KiCad layers occurs.
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
This file contains miscellaneous commonly used macros and functions.
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
wxString GetFileFromHistory(int cmdId, const wxString &type, FILE_HISTORY *aFileHistory=nullptr)
Fetches the file name from the file history list.
This is the end of the layers used for visibility bit masks in Pcbnew.
bool HasCloseButton() const
int StrPrintf(std::string *result, const char *format,...)
This is like sprintf() but the output is appended to a std::string instead of to a character array.
bool m_LegacyCopperEdgeClearanceLoaded
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
wxString FabmasterPcbFileWildcard()
int GetCount() const
Return the number of objects in the list.
void SynchronizeNetsAndNetClasses()
Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.
void OnClearFileHistory(wxCommandEvent &aEvent)
wxString GetMruPath() const
virtual std::vector< FOOTPRINT * > GetImportedCachedLibraryFootprints()
Return a container with the cached library footprints generated in the last call to Load.
bool AskSaveBoardFileName(PCB_EDIT_FRAME *aParent, wxString *aFileName, bool *aCreateProject)
Put up a wxFileDialog asking for a BOARD filename to save.
wxString LegacyPcbFileWildcard()
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
Multi-thread safe progress reporter dialog, intended for use of tasks that parallel reporting back of...
wxString CreateNewProjectLibrary(const wxString &aLibName=wxEmptyString, const wxString &aProposedName=wxEmptyString)
GAL_SET m_VisibleItems
The GAL layers (aka items) that are turned on for viewing (.
virtual void CheckForAutoSaveFile(const wxFileName &aFileName)
Check if an auto save file exists for aFileName and takes the appropriate action depending on the use...
bool AskLoadBoardFileName(PCB_EDIT_FRAME *aParent, int *aCtl, wxString *aFileName, bool aKicadFilesOnly)
Show a wxFileDialog asking for a BOARD filename to open.
#define GAL_LAYER_INDEX(x)
Use this macro to convert a GAL layer to a 0-indexed offset from LAYER_VIAS.
virtual const wxString What() const
A composite of Problem() and Where()
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Load a KiCad board (.kicad_pcb) from aFileName.
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
MESSAGE_TYPE GetMessageType() const
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
static wxWindow * Create(wxWindow *aParent)
void onBoardLoaded()
Update the state of the GUI after a new board is loaded or created.
bool TriggerBackupIfNeeded(REPORTER &aReporter) const
Calls BackupProject if a new backup is needed according to the current backup policy.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
void SetBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr) override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
FOOTPRINTS & Footprints()
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
static void ResolvePossibleSymlinks(wxFileName &aFilename)
void SynchronizeProperties()
Copy the current project's text variables into the boards property cache.
Definition of file extensions used in Kicad.
wxString formatWildcardExt(const wxString &aWildcard)
Format wildcard extension to support case sensitive file dialogs.
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
wxLogTrace helper definitions.
virtual void SetFocus() override
void SetFileName(const wxString &aFileName)
virtual const wxString GetProjectFullName() const
Return the full path and name of the project.
virtual bool IsNullProject() const
Check if this project is a null project (i.e.
wxCheckBox * m_cbCreateProject
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
wxString AltiumDesignerPcbFileWildcard()
int GetFileFormatVersionAtLoad() const
A wrapper for reporting to a wxString object.
virtual FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
int SetLibNickname(const UTF8 &aNickname)
Override the logical library name portion of the LIB_ID to aNickname.
void ClearFileHistory(FILE_HISTORY *aFileHistory=nullptr)
Removes all files from the file history.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void SetContentModified(bool aModified=true)
void BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
static wxString GetAutoSaveFilePrefix()
wxString AltiumCircuitStudioPcbFileWildcard()
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
void SetProject(PROJECT *aProject)
Link a board to a given project.
< Helper widget to select whether a new project should be created for a file when saving
static wxString GetDefaultUserProjectsPath()
Gets the default path we point users to create projects.
static std::map< wxString, PCB_LAYER_ID > GetMapModal(wxWindow *aParent, const std::vector< INPUT_LAYER_DESC > &aLayerDesc)
Create and show a dialog (modal) and returns the data from it after completion.
void OnFileHistory(wxCommandEvent &event)
virtual void SetReadOnly(bool aReadOnly=true)
void SaveProjectCopy(const wxString &aFullPath, PROJECT *aProject=nullptr)
Saves a copy of the current project under the given path.
Legacy Pcbnew file formats prior to s-expression.
bool SavePcbFile(const wxString &aFileName, bool addToHistory=true, bool aChangeProject=true)
Write the board data structures to a aFileName.
bool IsWritable(const wxFileName &aFileName, bool aVerbose=true)
Checks if aFileName can be written.
Information pertinent to a Pcbnew printed circuit board.
void Files_io(wxCommandEvent &event)
Call Files_io_from_id with the wxCommandEvent id.
unsigned GetRunningMicroSecs()
An alternate way to calculate an elapsed time (in microsecondes) to class PROF_COUNTER.
static PLUGIN * PluginFind(PCB_FILE_T aFileType)
Return a PLUGIN which the caller can use to import, export, save, or load design documents.
static TOOL_ACTION repairBoard
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Saves, unloads and unregisters the given PROJECT.
A base class that BOARD loading and saving plugins should derive from.
#define NAMELESS_PROJECT
default name for nameless projects
The main frame for Pcbnew.
wxString PcbFileWildcard()
void Save(const wxString &aFileName) const
Write this library table to aFileName in s-expression form.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
OUTDATED_SAVE Messages that should be cleared on save.
void SaveProjectAs(const wxString &aFullPath, PROJECT *aProject=nullptr)
Sets the currently loaded project path and saves it (pointers remain valid) Note that this will not m...
const wxSize GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
bool Files_io_from_id(int aId)
Read and write board files according to aId.
WX_INFOBAR * GetInfoBar()
static REPORTER & GetInstance()
wxString CadstarPcbArchiveFileWildcard()
bool OverrideLock(wxWindow *aParent, const wxString &aMessage)
Display a dialog indicating the file is already open, with an option to reset the lock.
Message panel definition file.
PCB_FILE_T
The set of file types that the IO_MGR knows about, and for which there has been a plugin written.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
class PCB_SHAPE, a segment not on copper layers
wxString PCadPcbFileWildcard()
bool Clear_Pcb(bool aQuery, bool aFinal=false)
Delete all and reinitialize the current board.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
LSET m_LegacyVisibleLayers
Visibility settings stored in board prior to 6.0, only used for loading legacy files.
bool IsSingle() const
Is this KIFACE running under single_top?
virtual const wxString FootprintLibTblName() const
Returns the path and filename of this project's footprint library table.
bool LockFile(const wxString &aFileName)
Mark a schematic file as being in use.
wxString AddFileExtListToFilter(const std::vector< std::string > &aExts)
Build the wildcard extension file dialog wildcard filter to add to the base message dialog.
S-expression Pcbnew file format.
static const wxString GetFileExtension(PCB_FILE_T aFileType)
Return the file extension for aFileType.
void AddCloseButton(const wxString &aTooltip=_("Hide this message."))
Add the default close button to the infobar on the right side.
GAL_SET m_LegacyVisibleItems