49#include <wx/clipbrd.h>
50#include <wx/dcmemory.h>
53#include <wx/richmsgdlg.h>
64 wxASSERT( aSheet && aCurrentSheet );
72 if( destFilePath.IsEmpty() )
80 wxASSERT( wxFileName( destFilePath ).IsAbsolute() );
84 msg.Printf(
_(
"The sheet changes cannot be made because the destination sheet already "
85 "has the sheet '%s' or one of its subsheets as a parent somewhere in the "
86 "schematic hierarchy." ),
98 wxASSERT( aSheet && aSheet->
GetScreen() );
105 msg.Printf(
_(
"The schematic '%s' has not had its symbol library links remapped "
106 "to the symbol library table. The project this schematic belongs to "
107 "must first be remapped before it can be imported into the current "
178 bool* aClearAnnotationNewItems,
bool* aIsUndoable,
179 const wxString* aSourceSheetFilename )
182 wxFileName sheetFileName( aNewFilename );
186 wxCHECK( currentScreen,
false );
189 wxFileName currentScreenFileName = currentScreen->
GetFileName();
190 wxFileName screenFileName( sheetFileName );
193 currentScreenFileName.GetPath() ) )
195 msg = wxString::Format(
_(
"Cannot normalize new sheet schematic file path:\n"
197 "against parent sheet schematic file path:\n"
199 sheetFileName.GetPath(),
200 currentScreenFileName.GetPath() );
205 wxString newAbsoluteFilename = screenFileName.GetFullPath();
206 newAbsoluteFilename.Replace( wxT(
"\\" ), wxT(
"/" ) );
213 bool renameFile =
false;
214 bool loadFromFile =
false;
215 bool clearAnnotation =
false;
216 bool isExistingSheet =
false;
223 loadFromFile = wxFileExists( newAbsoluteFilename );
227 loadFromFile ?
"found" :
"not found" );
233 if( useScreen || loadFromFile )
235 clearAnnotation =
true;
237 if( !
IsOK(
this, wxString::Format(
_(
"'%s' already exists." ),
238 sheetFileName.GetFullName() )
240 + wxString::Format(
_(
"Link '%s' to this file?" ),
241 newAbsoluteFilename ) ) )
246 else if( aSourceSheetFilename && !aSourceSheetFilename->IsEmpty() )
251 if( !wxCopyFile( *aSourceSheetFilename, newAbsoluteFilename,
false ) )
253 msg.Printf(
_(
"Failed to copy schematic file '%s' to destination '%s'." ),
254 *aSourceSheetFilename,
255 newAbsoluteFilename );
262 InitSheet( aSheet, newAbsoluteFilename );
268 isExistingSheet =
true;
271 oldAbsoluteFilename.Replace( wxT(
"\\" ), wxT(
"/" ) );
273 if( newAbsoluteFilename.Cmp( oldAbsoluteFilename ) != 0 )
277 *aIsUndoable =
false;
279 if( useScreen || loadFromFile )
281 clearAnnotation =
true;
284 if( !
IsOK(
this, wxString::Format(
_(
"Change '%s' link from '%s' to '%s'?" ),
287 sheetFileName.GetFullName() )
289 +
_(
"This action cannot be undone." ) ) )
302 if( !
IsOK(
this, wxString::Format(
_(
"Create new file '%s' with contents "
304 sheetFileName.GetFullName(),
307 +
_(
"This action cannot be undone." ) ) )
327 pi->SaveSchematicFile( newAbsoluteFilename, aSheet, &schematic );
331 msg = wxString::Format(
_(
"Error occurred saving schematic file '%s'." ),
332 newAbsoluteFilename );
335 msg = wxString::Format(
_(
"Failed to save schematic '%s'" ),
336 newAbsoluteFilename );
356 std::unique_ptr<SCH_SHEET> tmpSheet = std::make_unique<SCH_SHEET>( &schematic );
358 tmpSheet->SetScreen( useScreen );
370 else if( loadFromFile )
372 bool restoreSheet =
false;
374 if( isExistingSheet )
380 if( !
LoadSheetFromFile( aSheet, ¤tSheet, newAbsoluteFilename,
false,
true )
398 if( aClearAnnotationNewItems )
399 *aClearAnnotationNewItems = clearAnnotation;
411 const wxString& aFileName,
bool aSkipRecursionCheck,
414 wxASSERT( aSheet && aCurrentSheet );
417 wxFileName currentSheetFileName;
418 bool libTableChanged =
false;
422 if( schFileType == SCH_IO_MGR::SCH_FILE_UNKNOWN )
423 schFileType = SCH_IO_MGR::SCH_KICAD;
426 std::unique_ptr< SCH_SHEET> tmpSheet = std::make_unique<SCH_SHEET>( &
Schematic() );
431 const_cast<KIID&
>( tmpSheet->m_Uuid ) = aSheet->
m_Uuid;
433 wxFileName fileName( aFileName );
435 if( !fileName.IsAbsolute() && !fileName.MakeAbsolute() )
437 wxFAIL_MSG( wxString::Format(
"Cannot make file name '%s' path absolute.", aFileName ) );
441 wxString fullFilename = fileName.GetFullPath();
447 tmpSheet.reset( pi->LoadSchematicFile( fullFilename, &
Schematic() ) );
451 tmpSheet->SetFileName( fullFilename );
452 pi->LoadSchematicFile( fullFilename, &
Schematic(), tmpSheet.get() );
455 if( !pi->GetError().IsEmpty() )
457 msg =
_(
"The entire schematic could not be loaded. Errors occurred attempting "
458 "to load hierarchical sheet schematics." );
461 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
462 wxCENTER | wxICON_QUESTION );
463 msgDlg1.SetOKLabel( wxMessageDialog::ButtonLabel(
_(
"Use partial schematic" ) ) );
464 msgDlg1.SetExtendedMessage( pi->GetError() );
466 if( msgDlg1.ShowModal() == wxID_CANCEL )
472 msg.Printf(
_(
"Error loading schematic '%s'." ), fullFilename );
475 msg.Printf(
_(
"Failed to load '%s'." ), fullFilename );
486 if( fileName.GetPathWithSep() !=
Prj().GetProjectPath() )
494 if( sheetPath.size() == 1 )
499 for(
unsigned i = 1; i < sheetPath.size(); i++ )
502 wxCHECK2( sheet,
continue );
505 wxCHECK2( screen,
continue );
508 wxFileName loadedSheetFileName = screen->
GetFileName();
509 wxCHECK2( loadedSheetFileName.IsAbsolute(),
continue );
511 wxFileName tmp = loadedSheetFileName;
512 wxString sheetFileName;
514 if( tmp.MakeRelativeTo( lastSheetPath ) )
515 sheetFileName = tmp.GetFullPath();
517 sheetFileName = loadedSheetFileName.GetFullPath();
519 sheetFileName.Replace( wxT(
"\\" ), wxT(
"/" ) );
521 lastSheetPath = loadedSheetFileName.GetPath();
543 wxArrayString newLibNames;
549 KICAD_MESSAGE_DIALOG::ButtonLabel okButtonLabel(
_(
"Continue Load" ) );
550 KICAD_MESSAGE_DIALOG::ButtonLabel cancelButtonLabel(
_(
"Cancel Load" ) );
556 if( ( tmpSheet->GetScreen()->GetFileFormatVersionAtLoad() < 20221002 )
557 && tmpSheet->GetScreen()->GetSymbolInstances().empty() )
559 msg =
_(
"There are hierarchical sheets in the loaded schematic file from an older "
560 "file version resulting in missing symbol instance data. This will "
561 "result in all of the symbols in the loaded schematic to use either the "
562 "default instance setting or fall back to the library symbol settings. "
563 "Loading the project that uses this schematic file and saving to the "
564 "latest file version will resolve this issue.\n\n"
565 "Do you wish to continue?" );
567 wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxCENTER | wxICON_QUESTION );
568 msgDlg7.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
570 if( msgDlg7.ShowModal() == wxID_CANCEL )
574 if( !aSkipLibCheck && !prjScreens.
HasSchematic( fullFilename ) )
576 if( fileName.GetPathWithSep() ==
Prj().GetProjectPath() )
582 for(
const wxString&
name : names )
585 newLibNames.Add(
name );
588 if( !newLibNames.IsEmpty() )
590 msg =
_(
"There are library names in the selected schematic that are missing "
591 "from the current project library table. This may result in broken "
592 "symbol library references for the loaded schematic.\n\n"
593 "Do you wish to continue?" );
595 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
596 wxCENTER | wxICON_QUESTION );
597 msgDlg3.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
599 if( msgDlg3.ShowModal() == wxID_CANCEL )
603 else if( fileName.GetPathWithSep() !=
Prj().GetProjectPath() && projectTable )
611 wxArrayString duplicateLibNames;
613 for(
const wxString&
name : names )
616 newLibNames.Add(
name );
618 duplicateLibNames.Add(
name );
626 if( !newLibNames.IsEmpty() || !duplicateLibNames.IsEmpty() )
628 if( !symLibTableFn.Exists() || !symLibTableFn.IsFileReadable() )
630 msg =
_(
"The selected file was created as part of a different project. "
631 "Linking the file to this project may result in missing or "
632 "incorrect symbol library references.\n\n"
633 "Do you wish to continue?" );
635 wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxCENTER
637 msgDlg4.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
639 if( msgDlg4.ShowModal() == wxID_CANCEL )
646 msg.Printf(
_(
"Error loading the symbol library table '%s'." ),
647 symLibTableFn.GetFullPath() );
657 if( !newLibNames.IsEmpty() )
659 bool missingLibNames =
table.Rows().empty();
661 if( !missingLibNames )
663 for(
const wxString& newLibName : newLibNames )
665 if( !
table.HasRow( newLibName ) )
667 missingLibNames =
true;
673 if( missingLibNames )
675 msg =
_(
"There are symbol library names in the selected schematic that "
676 "are missing from the selected schematic project library table. "
677 "This may result in broken symbol library references.\n\n"
678 "Do you wish to continue?" );
680 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
681 wxCENTER | wxICON_QUESTION );
682 msgDlg5.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
684 if( msgDlg5.ShowModal() == wxID_CANCEL )
692 if( !duplicateLibNames.IsEmpty() && !
table.Rows().empty() )
694 bool libNameConflict =
false;
696 for(
const wxString& duplicateLibName : duplicateLibNames )
702 thisRow = *adapter->
GetRow( duplicateLibName );
704 if(
table.HasRow( duplicateLibName ) )
705 otherRow = *
table.Row( duplicateLibName );
708 if( thisRow && !otherRow )
711 if( !thisRow || !otherRow )
714 wxFileName otherUriFileName;
718 if( otherURI.Contains(
"${KIPRJMOD}" ) || otherURI.Contains(
"$(KIPRJMOD)" ) )
722 otherUriFileName.SetPath( fileName.GetPath() );
723 otherUriFileName.SetFullName( otherURI.AfterLast(
'}' ) );
724 otherURI = otherUriFileName.GetFullPath();
727 if( thisURI != otherURI )
729 libNameConflict =
true;
734 if( libNameConflict )
736 msg =
_(
"A duplicate library name that references a different library exists "
737 "in the current library table. This conflict cannot be resolved and "
738 "may result in broken symbol library references.\n\n"
739 "Do you wish to continue?" );
741 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
742 wxCENTER | wxICON_QUESTION );
743 msgDlg6.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
745 if( msgDlg6.ShowModal() == wxID_CANCEL )
753 if( !newLibNames.IsEmpty() && !
table.Rows().empty() )
755 for(
const wxString& libName : newLibNames )
769 if( uri.Contains(
"${KIPRJMOD}" ) || uri.Contains(
"$(KIPRJMOD)" ) )
773 newLib.SetPath( fileName.GetPath() );
774 newLib.SetFullName( uri.AfterLast(
'}' ) );
775 uri = newLib.GetFullPath();
793 libTableChanged =
true;
799 SCH_SCREEN* newScreen = tmpSheet->GetScreen();
800 wxCHECK_MSG( newScreen,
false,
"No screen defined for sheet." );
802 if( libTableChanged && projectTable )
804 projectTable->
Save().map_error(
808 wxOK | wxICON_ERROR );
809 dlg.SetExtendedMessage( aError.
message );
847 bool* aIsUndoable,
bool* aClearAnnotationNewItems,
848 bool* aUpdateHierarchyNavigator,
849 wxString* aSourceSheetFilename )
851 if( aSheet ==
nullptr || aHierarchy ==
nullptr )
856 aUpdateHierarchyNavigator, aSourceSheetFilename );
878 double inch2Iu = 1000.0 *
schIUScale.IU_PER_MILS;
879 double scale = ppi / inch2Iu;
881 wxSize dcsize = drawArea.GetSize();
883 int maxdim = std::max( dcsize.x, dcsize.y );
886 const int maxbitmapsize = 5600;
888 while(
int( maxdim *
scale ) > maxbitmapsize )
891 scale = ppi / inch2Iu;
905 wxBitmap
image( dcsize );
906 dc.SelectObject(
image );
924 dc.SetUserScale( 1.0, 1.0 );
935 wxLogMessage(
_(
"Cannot create the schematic image") );
939 wxLogMessage(
"printout internal error" );
943 dc.SelectObject( wxNullBitmap );
948 if( wxTheClipboard->Open() )
951 wxBitmapDataObject* clipbrd_data =
new wxBitmapDataObject(
image );
952 wxTheClipboard->SetData( clipbrd_data );
953 wxTheClipboard->Flush();
954 wxTheClipboard->Close();
966 const wxString& aSchematicFileName )
970 wxFileName fn = aSchematicFileName;
972 wxCHECK( fn.IsAbsolute(),
false );
974 auto can_cause_issues = [&]() ->
bool
977 wxFileName rhs = aSchematicFileName;
978 wxFileName old = aOldName;
979 wxString oldLower = old.GetFullName().Lower();
980 wxString rhsLower = rhs.GetFullName().Lower();
985 wxCHECK( rhs.IsAbsolute(),
false );
989 lhs = sheet.LastScreen()->GetFileName();
991 if( lhs.GetPath() != rhs.GetPath() )
994 lhsLower = lhs.GetFullName().Lower();
996 if( lhsLower == rhsLower && lhs.GetFullName() != rhs.GetFullName() )
1002 if( oldLower == rhsLower )
1008 if(
eeconfig()->m_Appearance.show_sheet_filename_case_sensitivity_dialog && can_cause_issues() )
1010 msg.Printf(
_(
"The file name '%s' can cause issues with an existing file name\n"
1011 "already defined in the schematic on systems that support case\n"
1012 "insensitive file names. This will cause issues if you copy this\n"
1013 "project to an operating system that supports case insensitive file\n"
1014 "names.\n\nDo you wish to continue?" ),
1017 wxRichMessageDialog dlg(
this, msg,
_(
"Warning" ),
1018 wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION );
1019 dlg.ShowCheckBox(
_(
"Do not show this message again." ) );
1020 dlg.SetYesNoLabels( wxMessageDialog::ButtonLabel(
_(
"Create New Sheet" ) ),
1021 wxMessageDialog::ButtonLabel(
_(
"Cancel" ) ) );
1023 if( dlg.ShowModal() == wxID_NO )
1027 !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) const
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
const TITLE_BLOCK & GetTitleBlock() const
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.
bool SearchHierarchy(const wxString &aFilename, SCH_SCREEN **aScreen)
Search the existing hierarchy for an instance of screen loaded from aFileName.
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.
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
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().