47#include <wx/clipbrd.h>
48#include <wx/dcmemory.h>
51#include <wx/richmsgdlg.h>
62 wxASSERT( aSheet && aCurrentSheet );
70 if( destFilePath.IsEmpty() )
78 wxASSERT_MSG( wxFileName( destFilePath ).IsAbsolute(), destFilePath + wxS(
" is not absolute" ) );
82 msg.Printf(
_(
"The sheet changes cannot be made because the destination sheet already "
83 "has the sheet '%s' or one of its subsheets as a parent somewhere in the "
84 "schematic hierarchy." ),
96 wxASSERT( aSheet && aSheet->
GetScreen() );
103 msg.Printf(
_(
"The schematic '%s' has not had its symbol library links remapped "
104 "to the symbol library table. The project this schematic belongs to "
105 "must first be remapped before it can be imported into the current "
176 bool* aClearAnnotationNewItems,
bool* aIsUndoable,
177 const wxString* aSourceSheetFilename )
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();
445 std::map<std::string, UTF8> loadProps;
446 loadProps[
"hierarchical_sheet_load"] =
"1";
452 tmpSheet.reset( pi->LoadSchematicFile( fullFilename, &
Schematic(),
nullptr, &loadProps ) );
456 tmpSheet->SetFileName( fullFilename );
457 pi->LoadSchematicFile( fullFilename, &
Schematic(), tmpSheet.get(), &loadProps );
460 if( !pi->GetError().IsEmpty() )
462 msg =
_(
"The entire schematic could not be loaded. Errors occurred attempting "
463 "to load hierarchical sheet schematics." );
466 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
467 wxCENTER | wxICON_QUESTION );
468 msgDlg1.SetOKLabel( wxMessageDialog::ButtonLabel(
_(
"Use partial schematic" ) ) );
469 msgDlg1.SetExtendedMessage( pi->GetError() );
471 if( msgDlg1.ShowModal() == wxID_CANCEL )
477 msg.Printf(
_(
"Error loading schematic '%s'." ), fullFilename );
480 msg.Printf(
_(
"Failed to load '%s'." ), fullFilename );
491 if( fileName.GetPathWithSep() !=
Prj().GetProjectPath() )
499 if( sheetPath.size() == 1 )
504 for(
unsigned i = 1; i < sheetPath.size(); i++ )
507 wxCHECK2( sheet,
continue );
510 wxCHECK2( screen,
continue );
513 wxFileName loadedSheetFileName = screen->
GetFileName();
514 wxCHECK2( loadedSheetFileName.IsAbsolute(),
continue );
516 wxFileName tmp = loadedSheetFileName;
517 wxString sheetFileName;
519 if( tmp.MakeRelativeTo( lastSheetPath ) )
520 sheetFileName = tmp.GetFullPath();
522 sheetFileName = loadedSheetFileName.GetFullPath();
524 sheetFileName.Replace( wxT(
"\\" ), wxT(
"/" ) );
526 lastSheetPath = loadedSheetFileName.GetPath();
548 wxArrayString newLibNames;
554 KICAD_MESSAGE_DIALOG::ButtonLabel okButtonLabel(
_(
"Continue Load" ) );
555 KICAD_MESSAGE_DIALOG::ButtonLabel cancelButtonLabel(
_(
"Cancel Load" ) );
561 if( ( tmpSheet->GetScreen()->GetFileFormatVersionAtLoad() < 20221002 )
562 && tmpSheet->GetScreen()->GetSymbolInstances().empty() )
564 msg =
_(
"There are hierarchical sheets in the loaded schematic file from an older "
565 "file version resulting in missing symbol instance data. This will "
566 "result in all of the symbols in the loaded schematic to use either the "
567 "default instance setting or fall back to the library symbol settings. "
568 "Loading the project that uses this schematic file and saving to the "
569 "latest file version will resolve this issue.\n\n"
570 "Do you wish to continue?" );
572 wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxCENTER | wxICON_QUESTION );
573 msgDlg7.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
575 if( msgDlg7.ShowModal() == wxID_CANCEL )
579 if( !aSkipLibCheck && !prjScreens.
HasSchematic( fullFilename ) )
581 if( fileName.GetPathWithSep() ==
Prj().GetProjectPath() )
587 for(
const wxString&
name : names )
590 newLibNames.Add(
name );
593 if( !newLibNames.IsEmpty() )
595 msg =
_(
"There are library names in the selected schematic that are missing "
596 "from the current project library table. This may result in broken "
597 "symbol library references for the loaded schematic.\n\n"
598 "Do you wish to continue?" );
600 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
601 wxCENTER | wxICON_QUESTION );
602 msgDlg3.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
604 if( msgDlg3.ShowModal() == wxID_CANCEL )
608 else if( fileName.GetPathWithSep() !=
Prj().GetProjectPath() && projectTable )
616 wxArrayString duplicateLibNames;
618 for(
const wxString&
name : names )
621 newLibNames.Add(
name );
623 duplicateLibNames.Add(
name );
631 if( !newLibNames.IsEmpty() || !duplicateLibNames.IsEmpty() )
633 if( !symLibTableFn.Exists() || !symLibTableFn.IsFileReadable() )
635 msg =
_(
"The selected file was created as part of a different project. "
636 "Linking the file to this project may result in missing or "
637 "incorrect symbol library references.\n\n"
638 "Do you wish to continue?" );
640 wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxCENTER
642 msgDlg4.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
644 if( msgDlg4.ShowModal() == wxID_CANCEL )
651 msg.Printf(
_(
"Error loading the symbol library table '%s'." ),
652 symLibTableFn.GetFullPath() );
662 if( !newLibNames.IsEmpty() )
664 bool missingLibNames =
table.Rows().empty();
666 if( !missingLibNames )
668 for(
const wxString& newLibName : newLibNames )
670 if( !
table.HasRow( newLibName ) )
672 missingLibNames =
true;
678 if( missingLibNames )
680 msg =
_(
"There are symbol library names in the selected schematic that "
681 "are missing from the selected schematic project library table. "
682 "This may result in broken symbol library references.\n\n"
683 "Do you wish to continue?" );
685 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
686 wxCENTER | wxICON_QUESTION );
687 msgDlg5.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
689 if( msgDlg5.ShowModal() == wxID_CANCEL )
697 if( !duplicateLibNames.IsEmpty() && !
table.Rows().empty() )
699 bool libNameConflict =
false;
701 for(
const wxString& duplicateLibName : duplicateLibNames )
707 thisRow = *adapter->
GetRow( duplicateLibName );
709 if(
table.HasRow( duplicateLibName ) )
710 otherRow = *
table.Row( duplicateLibName );
713 if( thisRow && !otherRow )
716 if( !thisRow || !otherRow )
719 wxFileName otherUriFileName;
723 if( otherURI.Contains(
"${KIPRJMOD}" ) || otherURI.Contains(
"$(KIPRJMOD)" ) )
727 otherUriFileName.SetPath( fileName.GetPath() );
728 otherUriFileName.SetFullName( otherURI.AfterLast(
'}' ) );
729 otherURI = otherUriFileName.GetFullPath();
732 if( thisURI != otherURI )
734 libNameConflict =
true;
739 if( libNameConflict )
741 msg =
_(
"A duplicate library name that references a different library exists "
742 "in the current library table. This conflict cannot be resolved and "
743 "may result in broken symbol library references.\n\n"
744 "Do you wish to continue?" );
746 wxOK | wxCANCEL | wxCANCEL_DEFAULT |
747 wxCENTER | wxICON_QUESTION );
748 msgDlg6.SetOKCancelLabels( okButtonLabel, cancelButtonLabel );
750 if( msgDlg6.ShowModal() == wxID_CANCEL )
758 if( !newLibNames.IsEmpty() && !
table.Rows().empty() )
760 for(
const wxString& libName : newLibNames )
774 if( uri.Contains(
"${KIPRJMOD}" ) || uri.Contains(
"$(KIPRJMOD)" ) )
778 newLib.SetPath( fileName.GetPath() );
779 newLib.SetFullName( uri.AfterLast(
'}' ) );
780 uri = newLib.GetFullPath();
798 libTableChanged =
true;
804 SCH_SCREEN* newScreen = tmpSheet->GetScreen();
805 wxCHECK_MSG( newScreen,
false,
"No screen defined for sheet." );
807 if( libTableChanged && projectTable )
809 projectTable->
Save().map_error(
813 wxOK | wxICON_ERROR );
814 dlg.SetExtendedMessage( aError.
message );
852 bool* aIsUndoable,
bool* aClearAnnotationNewItems,
853 bool* aUpdateHierarchyNavigator,
854 wxString* aSourceSheetFilename )
856 if( aSheet ==
nullptr || aHierarchy ==
nullptr )
861 aUpdateHierarchyNavigator, aSourceSheetFilename );
883 double inch2Iu = 1000.0 *
schIUScale.IU_PER_MILS;
884 double scale = ppi / inch2Iu;
886 wxSize dcsize = drawArea.GetSize();
888 int maxdim = std::max( dcsize.x, dcsize.y );
891 const int maxbitmapsize = 5600;
893 while(
int( maxdim *
scale ) > maxbitmapsize )
896 scale = ppi / inch2Iu;
910 wxBitmap
image( dcsize );
911 dc.SelectObject(
image );
929 dc.SetUserScale( 1.0, 1.0 );
940 wxLogMessage(
_(
"Cannot create the schematic image") );
944 wxLogMessage(
"printout internal error" );
948 dc.SelectObject( wxNullBitmap );
953 if( wxTheClipboard->Open() )
956 wxBitmapDataObject* clipbrd_data =
new wxBitmapDataObject(
image );
957 wxTheClipboard->SetData( clipbrd_data );
958 wxTheClipboard->Flush();
959 wxTheClipboard->Close();
971 const wxString& aSchematicFileName )
975 wxFileName fn = aSchematicFileName;
977 wxCHECK( fn.IsAbsolute(),
false );
979 auto can_cause_issues = [&]() ->
bool
982 wxFileName rhs = aSchematicFileName;
983 wxFileName old = aOldName;
984 wxString oldLower = old.GetFullName().Lower();
985 wxString rhsLower = rhs.GetFullName().Lower();
990 wxCHECK( rhs.IsAbsolute(),
false );
994 lhs = sheet.LastScreen()->GetFileName();
996 if( lhs.GetPath() != rhs.GetPath() )
999 lhsLower = lhs.GetFullName().Lower();
1001 if( lhsLower == rhsLower && lhs.GetFullName() != rhs.GetFullName() )
1007 if( oldLower == rhsLower )
1013 if(
eeconfig()->m_Appearance.show_sheet_filename_case_sensitivity_dialog && can_cause_issues() )
1015 msg.Printf(
_(
"The file name '%s' can cause issues with an existing file name\n"
1016 "already defined in the schematic on systems that support case\n"
1017 "insensitive file names. This will cause issues if you copy this\n"
1018 "project to an operating system that supports case insensitive file\n"
1019 "names.\n\nDo you wish to continue?" ),
1022 wxRichMessageDialog dlg(
this, msg,
_(
"Warning" ),
1023 wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION );
1024 dlg.ShowCheckBox(
_(
"Do not show this message again." ) );
1025 dlg.SetYesNoLabels( wxMessageDialog::ButtonLabel(
_(
"Create New Sheet" ) ),
1026 wxMessageDialog::ButtonLabel(
_(
"Cancel" ) ) );
1028 if( dlg.ShowModal() == wxID_NO )
1032 !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.
PROJECT & Project() const
Return a reference to the project this schematic is part of.
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
void RecalculateConnections(SCH_COMMIT *aCommit, SCH_CLEANUP_FLAGS aCleanupFlags, PROGRESS_REPORTER *aProgressReporter=nullptr, bool aCleanupDone=false)
Generate the connection data for the entire schematic hierarchy.
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
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.
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.
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, RESOLUTION_CONTEXT aContext)
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().