45#include <wx/clipbrd.h>
46#include <wx/dcmemory.h>
49#include <wx/richmsgdlg.h>
60 wxASSERT( aSheet && aCurrentSheet );
68 if( destFilePath.IsEmpty() )
76 wxASSERT_MSG( wxFileName( destFilePath ).IsAbsolute(), destFilePath + wxS(
" is not absolute" ) );
80 msg.Printf(
_(
"The sheet changes cannot be made because the destination sheet already "
81 "has the sheet '%s' or one of its subsheets as a parent somewhere in the "
82 "schematic hierarchy." ),
94 wxASSERT( aSheet && aSheet->
GetScreen() );
101 msg.Printf(
_(
"The schematic '%s' has not had its symbol library links remapped "
102 "to the symbol library table. The project this schematic belongs to "
103 "must first be remapped before it can be imported into the current "
174 bool* aClearAnnotationNewItems,
bool* aIsUndoable,
175 const wxString* aSourceSheetFilename )
181 wxFileName sheetFileName(
ExpandTextVars( aNewFilename, &schematic.Project() ) );
184 wxCHECK( currentScreen,
false );
187 wxFileName currentScreenFileName = currentScreen->
GetFileName();
188 wxFileName screenFileName( sheetFileName );
191 currentScreenFileName.GetPath() ) )
193 msg = wxString::Format(
_(
"Cannot normalize new sheet schematic file path:\n"
195 "against parent sheet schematic file path:\n"
197 sheetFileName.GetPath(),
198 currentScreenFileName.GetPath() );
203 wxString newAbsoluteFilename = screenFileName.GetFullPath();
204 newAbsoluteFilename.Replace( wxT(
"\\" ), wxT(
"/" ) );
211 bool renameFile =
false;
212 bool loadFromFile =
false;
213 bool clearAnnotation =
false;
214 bool isExistingSheet =
false;
219 if( !schematic.Root().SearchHierarchy( newAbsoluteFilename, &useScreen ) )
221 loadFromFile = wxFileExists( newAbsoluteFilename );
225 loadFromFile ?
"found" :
"not found" );
231 if( useScreen || loadFromFile )
233 clearAnnotation =
true;
235 if( !
IsOK(
this, wxString::Format(
_(
"'%s' already exists." ),
236 sheetFileName.GetFullName() )
238 + wxString::Format(
_(
"Link '%s' to this file?" ),
239 newAbsoluteFilename ) ) )
244 else if( aSourceSheetFilename && !aSourceSheetFilename->IsEmpty() )
249 if( !wxCopyFile( *aSourceSheetFilename, newAbsoluteFilename,
false ) )
251 msg.Printf(
_(
"Failed to copy schematic file '%s' to destination '%s'." ),
252 *aSourceSheetFilename,
253 newAbsoluteFilename );
260 InitSheet( aSheet, newAbsoluteFilename );
266 isExistingSheet =
true;
269 oldAbsoluteFilename.Replace( wxT(
"\\" ), wxT(
"/" ) );
271 if( newAbsoluteFilename.Cmp( oldAbsoluteFilename ) != 0 )
275 *aIsUndoable =
false;
277 if( useScreen || loadFromFile )
279 clearAnnotation =
true;
282 if( !
IsOK(
this, wxString::Format(
_(
"Change '%s' link from '%s' to '%s'?" ),
285 sheetFileName.GetFullName() )
287 +
_(
"This action cannot be undone." ) ) )
300 if( !
IsOK(
this, wxString::Format(
_(
"Create new file '%s' with contents "
302 sheetFileName.GetFullName(),
305 +
_(
"This action cannot be undone." ) ) )
325 pi->SaveSchematicFile( newAbsoluteFilename, aSheet, &schematic );
329 msg = wxString::Format(
_(
"Error occurred saving schematic file '%s'." ),
330 newAbsoluteFilename );
333 msg = wxString::Format(
_(
"Failed to save schematic '%s'" ),
334 newAbsoluteFilename );
354 std::unique_ptr<SCH_SHEET> tmpSheet = std::make_unique<SCH_SHEET>( &schematic );
356 tmpSheet->SetScreen( useScreen );
368 else if( loadFromFile )
370 bool restoreSheet =
false;
372 if( isExistingSheet )
378 if( !
LoadSheetFromFile( aSheet, ¤tSheet, newAbsoluteFilename,
false,
true )
396 if( aClearAnnotationNewItems )
397 *aClearAnnotationNewItems = clearAnnotation;
409 const wxString& aFileName,
bool aSkipRecursionCheck,
412 wxASSERT( aSheet && aCurrentSheet );
415 wxFileName currentSheetFileName;
416 bool libTableChanged =
false;
420 if( schFileType == SCH_IO_MGR::SCH_FILE_UNKNOWN )
421 schFileType = SCH_IO_MGR::SCH_KICAD;
424 std::unique_ptr< SCH_SHEET> tmpSheet = std::make_unique<SCH_SHEET>( &
Schematic() );
429 const_cast<KIID&
>( tmpSheet->m_Uuid ) = aSheet->
m_Uuid;
431 wxFileName fileName( aFileName );
433 if( !fileName.IsAbsolute() && !fileName.MakeAbsolute() )
435 wxFAIL_MSG( wxString::Format(
"Cannot make file name '%s' path absolute.", aFileName ) );
439 wxString fullFilename = fileName.GetFullPath();
445 tmpSheet.reset( pi->LoadSchematicFile( fullFilename, &
Schematic() ) );
449 tmpSheet->SetFileName( fullFilename );
450 pi->LoadSchematicFile( fullFilename, &
Schematic(), tmpSheet.get() );
453 if( !pi->GetError().IsEmpty() )
455 msg =
_(
"The entire schematic could not be loaded. Errors occurred attempting "
456 "to load hierarchical sheet schematics." );
459 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
460 wxCENTER | wxICON_QUESTION );
461 msgDlg1.SetOKLabel( wxMessageDialog::ButtonLabel(
_(
"Use partial schematic" ) ) );
462 msgDlg1.SetExtendedMessage( pi->GetError() );
464 if( msgDlg1.ShowModal() == wxID_CANCEL )
470 msg.Printf(
_(
"Error loading schematic '%s'." ), fullFilename );
473 msg.Printf(
_(
"Failed to load '%s'." ), fullFilename );
484 if( fileName.GetPathWithSep() !=
Prj().GetProjectPath() )
492 if( sheetPath.size() == 1 )
497 for(
unsigned i = 1; i < sheetPath.size(); i++ )
500 wxCHECK2( sheet,
continue );
503 wxCHECK2( screen,
continue );
506 wxFileName loadedSheetFileName = screen->
GetFileName();
507 wxCHECK2( loadedSheetFileName.IsAbsolute(),
continue );
509 wxFileName tmp = loadedSheetFileName;
510 wxString sheetFileName;
512 if( tmp.MakeRelativeTo( lastSheetPath ) )
513 sheetFileName = tmp.GetFullPath();
515 sheetFileName = loadedSheetFileName.GetFullPath();
517 sheetFileName.Replace( wxT(
"\\" ), wxT(
"/" ) );
519 lastSheetPath = loadedSheetFileName.GetPath();
541 wxArrayString newLibNames;
547 KICAD_MESSAGE_DIALOG::ButtonLabel okButtonLabel(
_(
"Continue Load" ) );
548 KICAD_MESSAGE_DIALOG::ButtonLabel cancelButtonLabel(
_(
"Cancel Load" ) );
554 if( ( tmpSheet->GetScreen()->GetFileFormatVersionAtLoad() < 20221002 )
555 && tmpSheet->GetScreen()->GetSymbolInstances().empty() )
557 msg =
_(
"There are hierarchical sheets in the loaded schematic file from an older "
558 "file version resulting in missing symbol instance data. This will "
559 "result in all of the symbols in the loaded schematic to use either the "
560 "default instance setting or fall back to the library symbol settings. "
561 "Loading the project that uses this schematic file and saving to the "
562 "latest file version will resolve this issue.\n\n"
563 "Do you wish to continue?" );
565 wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxCENTER | wxICON_QUESTION );
566 msgDlg7.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
568 if( msgDlg7.ShowModal() == wxID_CANCEL )
572 if( !aSkipLibCheck && !prjScreens.
HasSchematic( fullFilename ) )
574 if( fileName.GetPathWithSep() ==
Prj().GetProjectPath() )
580 for(
const wxString&
name : names )
583 newLibNames.Add(
name );
586 if( !newLibNames.IsEmpty() )
588 msg =
_(
"There are library names in the selected schematic that are missing "
589 "from the current project library table. This may result in broken "
590 "symbol library references for the loaded schematic.\n\n"
591 "Do you wish to continue?" );
593 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
594 wxCENTER | wxICON_QUESTION );
595 msgDlg3.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
597 if( msgDlg3.ShowModal() == wxID_CANCEL )
601 else if( fileName.GetPathWithSep() !=
Prj().GetProjectPath() && projectTable )
609 wxArrayString duplicateLibNames;
611 for(
const wxString&
name : names )
614 newLibNames.Add(
name );
616 duplicateLibNames.Add(
name );
624 if( !newLibNames.IsEmpty() || !duplicateLibNames.IsEmpty() )
626 if( !symLibTableFn.Exists() || !symLibTableFn.IsFileReadable() )
628 msg =
_(
"The selected file was created as part of a different project. "
629 "Linking the file to this project may result in missing or "
630 "incorrect symbol library references.\n\n"
631 "Do you wish to continue?" );
633 wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxCENTER
635 msgDlg4.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
637 if( msgDlg4.ShowModal() == wxID_CANCEL )
644 msg.Printf(
_(
"Error loading the symbol library table '%s'." ),
645 symLibTableFn.GetFullPath() );
655 if( !newLibNames.IsEmpty() )
657 bool missingLibNames =
table.Rows().empty();
659 if( !missingLibNames )
661 for(
const wxString& newLibName : newLibNames )
663 if( !
table.HasRow( newLibName ) )
665 missingLibNames =
true;
671 if( missingLibNames )
673 msg =
_(
"There are symbol library names in the selected schematic that "
674 "are missing from the selected schematic project library table. "
675 "This may result in broken symbol library references.\n\n"
676 "Do you wish to continue?" );
678 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
679 wxCENTER | wxICON_QUESTION );
680 msgDlg5.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
682 if( msgDlg5.ShowModal() == wxID_CANCEL )
690 if( !duplicateLibNames.IsEmpty() && !
table.Rows().empty() )
692 bool libNameConflict =
false;
694 for(
const wxString& duplicateLibName : duplicateLibNames )
700 thisRow = *adapter->
GetRow( duplicateLibName );
702 if(
table.HasRow( duplicateLibName ) )
703 otherRow = *
table.Row( duplicateLibName );
706 if( thisRow && !otherRow )
709 if( !thisRow || !otherRow )
712 wxFileName otherUriFileName;
716 if( otherURI.Contains(
"${KIPRJMOD}" ) || otherURI.Contains(
"$(KIPRJMOD)" ) )
720 otherUriFileName.SetPath( fileName.GetPath() );
721 otherUriFileName.SetFullName( otherURI.AfterLast(
'}' ) );
722 otherURI = otherUriFileName.GetFullPath();
725 if( thisURI != otherURI )
727 libNameConflict =
true;
732 if( libNameConflict )
734 msg =
_(
"A duplicate library name that references a different library exists "
735 "in the current library table. This conflict cannot be resolved and "
736 "may result in broken symbol library references.\n\n"
737 "Do you wish to continue?" );
739 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
740 wxCENTER | wxICON_QUESTION );
741 msgDlg6.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
743 if( msgDlg6.ShowModal() == wxID_CANCEL )
751 if( !newLibNames.IsEmpty() && !
table.Rows().empty() )
753 for(
const wxString& libName : newLibNames )
767 if( uri.Contains(
"${KIPRJMOD}" ) || uri.Contains(
"$(KIPRJMOD)" ) )
771 newLib.SetPath( fileName.GetPath() );
772 newLib.SetFullName( uri.AfterLast(
'}' ) );
773 uri = newLib.GetFullPath();
791 libTableChanged =
true;
797 SCH_SCREEN* newScreen = tmpSheet->GetScreen();
798 wxCHECK_MSG( newScreen,
false,
"No screen defined for sheet." );
800 if( libTableChanged && projectTable )
802 projectTable->
Save().map_error(
806 wxOK | wxICON_ERROR );
807 dlg.SetExtendedMessage( aError.
message );
845 bool* aIsUndoable,
bool* aClearAnnotationNewItems,
846 bool* aUpdateHierarchyNavigator,
847 wxString* aSourceSheetFilename )
849 if( aSheet ==
nullptr || aHierarchy ==
nullptr )
854 aUpdateHierarchyNavigator, aSourceSheetFilename );
876 double inch2Iu = 1000.0 *
schIUScale.IU_PER_MILS;
877 double scale = ppi / inch2Iu;
879 wxSize dcsize = drawArea.GetSize();
881 int maxdim = std::max( dcsize.x, dcsize.y );
884 const int maxbitmapsize = 5600;
886 while(
int( maxdim *
scale ) > maxbitmapsize )
889 scale = ppi / inch2Iu;
903 wxBitmap
image( dcsize );
904 dc.SelectObject(
image );
922 dc.SetUserScale( 1.0, 1.0 );
933 wxLogMessage(
_(
"Cannot create the schematic image") );
937 wxLogMessage(
"printout internal error" );
941 dc.SelectObject( wxNullBitmap );
946 if( wxTheClipboard->Open() )
949 wxBitmapDataObject* clipbrd_data =
new wxBitmapDataObject(
image );
950 wxTheClipboard->SetData( clipbrd_data );
951 wxTheClipboard->Flush();
952 wxTheClipboard->Close();
964 const wxString& aSchematicFileName )
968 wxFileName fn = aSchematicFileName;
970 wxCHECK( fn.IsAbsolute(),
false );
972 auto can_cause_issues = [&]() ->
bool
975 wxFileName rhs = aSchematicFileName;
976 wxFileName old = aOldName;
977 wxString oldLower = old.GetFullName().Lower();
978 wxString rhsLower = rhs.GetFullName().Lower();
983 wxCHECK( rhs.IsAbsolute(),
false );
987 lhs = sheet.LastScreen()->GetFileName();
989 if( lhs.GetPath() != rhs.GetPath() )
992 lhsLower = lhs.GetFullName().Lower();
994 if( lhsLower == rhsLower && lhs.GetFullName() != rhs.GetFullName() )
1000 if( oldLower == rhsLower )
1006 if(
eeconfig()->m_Appearance.show_sheet_filename_case_sensitivity_dialog && can_cause_issues() )
1008 msg.Printf(
_(
"The file name '%s' can cause issues with an existing file name\n"
1009 "already defined in the schematic on systems that support case\n"
1010 "insensitive file names. This will cause issues if you copy this\n"
1011 "project to an operating system that supports case insensitive file\n"
1012 "names.\n\nDo you wish to continue?" ),
1015 wxRichMessageDialog dlg(
this, msg,
_(
"Warning" ),
1016 wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION );
1017 dlg.ShowCheckBox(
_(
"Do not show this message again." ) );
1018 dlg.SetYesNoLabels( wxMessageDialog::ButtonLabel(
_(
"Create New Sheet" ) ),
1019 wxMessageDialog::ButtonLabel(
_(
"Cancel" ) ) );
1021 if( dlg.ShowModal() == wxID_NO )
1025 !dlg.IsCheckBoxChecked();
constexpr EDA_IU_SCALE schIUScale
Handles how to draw a screen (a board, a schematic ...)
VECTOR2I m_DrawOrg
offsets for drawing the circuit on the screen
VECTOR2I m_StartVisu
Coordinates in drawing units of the current view position (upper left corner of device)
void SetContentModified(bool aModified=true)
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
PAGE_SETTINGS m_PageSettings
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
void SetLayerColor(int aLayer, const COLOR4D &aColor)
Change the color used to draw a layer.
void SetDefaultFont(const wxString &aFont)
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void SetPrintDC(wxDC *aDC)
wxDC * GetPrintDC() const
std::optional< LIBRARY_TABLE * > ProjectTable() const
Retrieves the project library table for this adapter type, or nullopt if one doesn't exist.
bool HasLibrary(const wxString &aNickname, bool aCheckEnabled=false) const
Test for the existence of aNickname in the library tables.
std::optional< LIBRARY_TABLE_ROW * > GetRow(const wxString &aNickname, LIBRARY_TABLE_SCOPE aScope=LIBRARY_TABLE_SCOPE::BOTH) const
Like LIBRARY_MANAGER::GetRow but filtered to the LIBRARY_TABLE_TYPE of this adapter.
std::optional< wxString > GetFullURI(LIBRARY_TABLE_TYPE aType, const wxString &aNickname, bool aSubstituted=false)
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
void SetOptions(const wxString &aOptions)
void SetNickname(const wxString &aNickname)
void SetType(const wxString &aType)
void SetDescription(const wxString &aDescription)
const wxString & Type() const
void SetURI(const wxString &aUri)
const wxString & Description() const
const wxString & Options() const
LIBRARY_RESULT< void > Save()
LIBRARY_TABLE_ROW & InsertRow()
Builds a new row and inserts it at the end of the table; returning a reference to the row.
static SYMBOL_LIBRARY_ADAPTER * SymbolLibAdapter(PROJECT *aProject)
Accessor for project symbol library manager adapter.
virtual const wxString GetProjectPath() const
Return the full path of the project.
Holds all the data relating to one schematic.
SCH_SHEET_LIST Hierarchy() const
Return the full schematic flattened hierarchical sheet list.
SCH_RENDER_SETTINGS * GetRenderSettings()
const VECTOR2I GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
EESCHEMA_SETTINGS * eeconfig() const
const PAGE_INFO & GetPageSettings() const override
bool AllowCaseSensitiveFileNameClashes(const wxString &aOldName, const wxString &aSchematicFileName)
Check aSchematicFileName for a potential file name case sensitivity clashes.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void InitSheet(SCH_SHEET *aSheet, const wxString &aNewFilename)
bool LoadSheetFromFile(SCH_SHEET *aSheet, SCH_SHEET_PATH *aCurrentSheet, const wxString &aFileName, bool aSkipRecursionCheck=false, bool aSkipLibCheck=false)
Load a the KiCad schematic file aFileName into the sheet aSheet.
SCH_SHEET_PATH & GetCurrentSheet() const
void RecalculateConnections(SCH_COMMIT *aCommit, SCH_CLEANUP_FLAGS aCleanupFlags, PROGRESS_REPORTER *aProgressReporter=nullptr)
Generate the connection data for the entire schematic hierarchy.
SCHEMATIC & Schematic() const
void DrawCurrentSheetToClipboard()
Use the wxWidgets print code to draw an image of the current sheet onto the clipboard.
bool checkForNoFullyDefinedLibIds(SCH_SHEET *aSheet)
Verify that the symbol library links aSheet and all of its child sheets have been remapped to the sym...
bool EditSheetProperties(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, bool *aIsUndoable=nullptr, bool *aClearAnnotationNewItems=nullptr, bool *aUpdateHierarchyNavigator=nullptr, wxString *aSourceSheetFilename=nullptr)
Edit an existing sheet or add a new sheet to the schematic.
bool CheckSheetForRecursion(SCH_SHEET *aSheet, SCH_SHEET_PATH *aCurrentSheet)
Verify that aSheet will not cause a recursion error in aCurrentSheet.
bool ChangeSheetFile(SCH_SHEET *aSheet, const wxString &aNewFilename, bool *aClearAnnotationNewItems=nullptr, bool *aIsUndoable=nullptr, const wxString *aSourceSheetFilename=nullptr)
Change the file backing a schematic sheet.
static SCH_FILE_T GuessPluginTypeFromSchPath(const wxString &aSchematicPath, int aCtl=0)
Return a plugin type given a schematic using the file extension of aSchematicPath.
Custom print out for printing schematics.
bool PrintPage(SCH_SCREEN *aScreen, wxDC *aDC, bool aForPrinting)
Print the current SCH_SCREEN using a given wxDC.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
bool HasNoFullyDefinedLibIds()
Test all of the schematic symbols to see if all LIB_ID objects library nickname is not set.
int ReplaceDuplicateTimeStamps()
Test all sheet and symbol objects in the schematic for duplicate time stamps and replaces them as nec...
bool HasSchematic(const wxString &aSchematicFileName)
Check if one of the schematics in the list of screens is aSchematicFileName.
size_t GetLibNicknames(wxArrayString &aLibNicknames)
Fetch all of the symbol library nicknames into aLibNicknames.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
void SetPageSettings(const PAGE_INFO &aPageSettings)
const wxString & GetFileName() const
void SetFileName(const wxString &aFileName)
Set the file name for this screen to aFileName.
const std::vector< SCH_SYMBOL_INSTANCE > & GetSymbolInstances() const
bool Remove(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
Remove aItem from the schematic associated with this screen.
int GetFileFormatVersionAtLoad() const
TITLE_BLOCK & GetTitleBlock()
void MigrateSimModels()
Migrate any symbols having V6 simulation models to their V7 equivalents.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void AddNewSymbolInstances(const SCH_SHEET_PATH &aPrefixSheetPath, const wxString &aProjectName)
Attempt to add new symbol instances for all symbols in this list of sheet paths prefixed with aPrefix...
int GetLastVirtualPageNumber() const
void UpdateSymbolInstanceData(const std::vector< SCH_SYMBOL_INSTANCE > &aSymbolInstances)
Update all of the symbol instance information using aSymbolInstances.
void AddNewSheetInstances(const SCH_SHEET_PATH &aPrefixSheetPath, int aLastVirtualPageNumber)
void BuildSheetList(SCH_SHEET *aSheet, bool aCheckIntegrity)
Build the list of sheets and their sheet path from aSheet.
bool TestForRecursion(const SCH_SHEET_LIST &aSrcSheetHierarchy, const wxString &aDestFileName)
Test every SCH_SHEET_PATH in this SCH_SHEET_LIST to verify if adding the sheets stored in aSrcSheetHi...
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
SCH_SCREEN * LastScreen()
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetFileName(const wxString &aFilename)
wxString GetFileName() const
Return the filename corresponding to this sheet.
SCH_SCREEN * GetScreen() const
int GetScreenCount() const
Return the number of times the associated screen for the sheet is being used.
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
An interface to the global shared library manager that is schematic-specific and linked to one projec...
Hold the information shown in the lower right corner of a plot, printout, or editing view.
const wxString & GetCompany() const
void SetRevision(const wxString &aRevision)
void SetComment(int aIdx, const wxString &aComment)
const wxString & GetRevision() const
void SetTitle(const wxString &aTitle)
const wxString & GetDate() const
const wxString & GetComment(int aIdx) const
void SetCompany(const wxString &aCompany)
const wxString & GetTitle() const
void SetDate(const wxString &aDate)
Set the date field, and defaults to the current time and date.
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
#define KICAD_MESSAGE_DIALOG
void GRForceBlackPen(bool flagforce)
void GRResetPenAndBrush(wxDC *DC)
static const std::string SymbolLibraryTableFileName
const wxChar *const tracePathsAndFiles
Flag to enable path and file name debug output.
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
@ LAYER_SCHEMATIC_DRAWINGSHEET
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
bool title_block
Whether or not to print title block.
bool show_sheet_filename_case_sensitivity_dialog
std::vector< std::vector< std::string > > table
wxLogTrace helper definitions.
VECTOR2< int32_t > VECTOR2I
wxSize ToWxSize(const VECTOR2I &aSize)
Definition of file extensions used in Kicad.
#define FN_NORMALIZE_FLAGS
Default flags to pass to wxFileName::Normalize().