32#ifndef INCLUDE__COMMON_H_ 
   33#define INCLUDE__COMMON_H_ 
   39#include <wx/fileconf.h> 
   41#include <wx/process.h> 
   71                                             const wxString& aBaseFilename,
 
   94                                      const std::function<
bool( wxString* )>* aResolver,
 
Container for project specific data.
 
A pure virtual class used to derive REPORTER objects from.
 
Look for files in a number of paths.
 
KICOMMON_API wxString GetGeneratedFieldDisplayName(const wxString &aSource)
Returns any variables unexpanded, e.g.
 
KICOMMON_API wxString ExpandTextVars(const wxString &aSource, const std::function< bool(wxString *)> *aResolver, int aFlags=0)
 
KICOMMON_API wxString EnsureFileExtension(const wxString &aFilename, const wxString &aExtension)
It's annoying to throw up nag dialogs when the extension isn't right.
 
KICOMMON_API long long TimestampDir(const wxString &aDirPath, const wxString &aFilespec)
A copy of ConvertFileTimeToWx() because wxWidgets left it as a static function private to src/common/...
 
KICOMMON_API bool IsGeneratedField(const wxString &aSource)
Returns true if the string is generated, e.g contains a single text var reference.
 
KICOMMON_API const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
 
KICOMMON_API const wxString ResolveUriByEnvVars(const wxString &aUri, const PROJECT *aProject)
Replace any environment and/or text variables in URIs.
 
KICOMMON_API bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter=nullptr)
Make aTargetFullFileName absolute and create the path of this file if it doesn't yet exist.
 
KICOMMON_API wxString SearchHelpFileFullPath(const wxString &aBaseName)
Return the help file's full path.
 
KICOMMON_API wxString DescribeRef(const wxString &aRef)
Returns a user-visible HTML string describing a footprint reference designator.
 
KICOMMON_API bool WarnUserIfOperatingSystemUnsupported()
Checks if the operating system is explicitly unsupported and displays a disclaimer message box.