KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIPLATFORM::PRINTING Namespace Reference

Classes

class  WIN_PDF_PRINTER
 

Enumerations

enum class  PRINT_RESULT {
  OK = 0 , CANCELLED , FILE_NOT_FOUND , FAILED_TO_LOAD ,
  FAILED_TO_PRINT , UNSUPPORTED , UNKNOWN_ERROR
}
 

Functions

const wxString PrintResultToString (PRINT_RESULT aResult)
 
PRINT_RESULT PrintPDF (const std::string &aFile)
 
void ResetPrintToFilePath (wxPrintData &aData)
 Clear any leftover "print to file" destination from aData.
 
PRINT_RESULT PrintPDF (const std::string &aFile, bool fit_to_page)
 
static std::wstring Utf8ToWide (std::string const &s)
 

Enumeration Type Documentation

◆ PRINT_RESULT

Enumerator
OK 
CANCELLED 
FILE_NOT_FOUND 
FAILED_TO_LOAD 
FAILED_TO_PRINT 
UNSUPPORTED 
UNKNOWN_ERROR 

Definition at line 33 of file printing.h.

Function Documentation

◆ PrintPDF() [1/2]

PRINT_RESULT KIPLATFORM::PRINTING::PrintPDF ( const std::string & aFile)

Definition at line 232 of file unix/printing.cpp.

References PrintPDF().

Referenced by PrintPDF(), and DIALOG_PRINT::TransferDataFromWindow().

◆ PrintPDF() [2/2]

PRINT_RESULT KIPLATFORM::PRINTING::PrintPDF ( const std::string & aFile,
bool fit_to_page )

Definition at line 151 of file unix/printing.cpp.

References CANCELLED, FAILED_TO_LOAD, FAILED_TO_PRINT, FILE_NOT_FOUND, OK, and result.

◆ PrintResultToString()

const wxString KIPLATFORM::PRINTING::PrintResultToString ( PRINT_RESULT aResult)
inline

◆ ResetPrintToFilePath()

void KIPLATFORM::PRINTING::ResetPrintToFilePath ( wxPrintData & aData)

Clear any leftover "print to file" destination from aData.

On GTK the native print settings retain the output URI chosen after a print-to-file operation (a temporary /tmp/gtkprintXXXXXX path). Left in place it becomes the default destination the next time the print dialog is opened. Clearing it here is required because the wx-level filename does not track the native GtkPrintSettings output URI.

Definition at line 237 of file unix/printing.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), InvokeDialogPrint(), DIALOG_PRINT_GENERIC::onPrintButtonClick(), and DIALOG_PRINT::TransferDataFromWindow().

◆ Utf8ToWide()

static std::wstring KIPLATFORM::PRINTING::Utf8ToWide ( std::string const & s)
static

Definition at line 389 of file windows/printing.cpp.

References L.