26#include <wx/filename.h> 
  131    EMBEDDED_FILE* 
AddFile( 
const wxFileName& aName, 
bool aOverwrite );
 
  136    void AddFile( EMBEDDED_FILE* aFile );
 
  168        wxFileName fileName( 
name );
 
 
  228        auto it = 
m_files.find( aName );
 
  230        return it == 
m_files.end() ? nullptr : it->second;
 
 
  255    virtual std::set<KIFONT::OUTLINE_FONT*> 
GetFonts()
 const 
  257        return std::set<KIFONT::OUTLINE_FONT*>();
 
 
 
std::vector< wxString > m_fontFiles
 
virtual void EmbedFonts()
 
void RemoveFile(const wxString &name, bool aErase=true)
Remove a file from the collection and frees the memory.
 
void SetFileAddedCallback(FILE_ADDED_CALLBACK callback)
 
@ PERMISSIONS_ERROR
Could not read/write file.
 
@ FILE_ALREADY_EXISTS
File already exists in the collection.
 
@ OUT_OF_MEMORY
Could not allocate memory.
 
@ FILE_NOT_FOUND
File not found on disk.
 
@ CHECKSUM_ERROR
Checksum in file does not match data.
 
EMBEDDED_FILE * GetEmbeddedFile(const wxString &aName) const
Returns the embedded file with the given name or nullptr if it does not exist.
 
wxFileName GetTemporaryFileName(const wxString &aName) const
 
void WriteEmbeddedFiles(OUTPUTFORMATTER &aOut, bool aWriteData) const
Output formatter for the embedded files.
 
const std::vector< wxString > * UpdateFontFiles()
Helper function to get a list of fonts for fontconfig to add to the library.
 
FILE_ADDED_CALLBACK m_fileAddedCallback
 
static RETURN_CODE DecompressAndDecode(EMBEDDED_FILE &aFile)
Takes data from the #compressedEncodedData buffer and Base64 decodes it.
 
wxString GetEmbeddedFileLink(const EMBEDDED_FILE &aFile) const
Return the link for an embedded file.
 
bool HasFile(const wxString &name) const
 
virtual void RunOnNestedEmbeddedFiles(const std::function< void(EMBEDDED_FILES *)> &aFunction)
Provide access to nested embedded files, such as symbols in schematics and footprints in boards.
 
void ClearEmbeddedFiles(bool aDeleteFiles=true)
 
void ClearEmbeddedFonts()
Remove all embedded fonts from the collection.
 
EMBEDDED_FILES & operator=(EMBEDDED_FILES &&other) noexcept
 
virtual std::set< KIFONT::OUTLINE_FONT * > GetFonts() const
 
EMBEDDED_FILE * AddFile(const wxFileName &aName, bool aOverwrite)
Load a file from disk and adds it to the collection.
 
const std::vector< wxString > * GetFontFiles() const
If we just need the cached version of the font files, we can use this function which is const and wil...
 
wxFileName GetTemporaryFileName(EMBEDDED_FILE *aFile) const
 
const std::map< wxString, EMBEDDED_FILE * > & EmbeddedFileMap() const
 
void SetAreFontsEmbedded(bool aEmbedFonts)
 
std::function< void(EMBEDDED_FILE *)> FILE_ADDED_CALLBACK
 
FILE_ADDED_CALLBACK GetFileAddedCallback() const
 
static RETURN_CODE CompressAndEncode(EMBEDDED_FILE &aFile)
Take data from the #decompressedData buffer and compresses it using ZSTD into the #compressedEncodedD...
 
std::map< wxString, EMBEDDED_FILE * > m_files
 
bool m_embedFonts
If set, fonts will be embedded in the element on save.
 
bool GetAreFontsEmbedded() const
 
Class OUTLINE_FONT implements outline font drawing.
 
A streaming C++ equivalent for MurmurHash3_x64_128.
 
FORCE_INLINE void add(const std::string &input)
 
FORCE_INLINE HASH_128 digest()
 
static const std::string KiCadUriPrefix
 
std::vector< char > decompressedData
 
std::string compressedEncodedData
 
Definition of file extensions used in Kicad.