34#include <drawing_sheet/drawing_sheet_lexer.h>
42using namespace DRAWINGSHEET_T;
47 return DRAWING_SHEET_LEXER::TokenName( aTok );
94 wxMessageBox( ioe.
What(),
_(
"Error writing drawing sheet file" ) );
123 wxMessageBox( ioe.
What(),
_(
"Error writing drawing sheet file" ) );
156 writer.
Format(
this, aItemsList );
164 m_out->
Print(
"(kicad_wks (version %d) (generator \"pl_editor\") (generator_version %s)",
197 wxFAIL_MSG( wxT(
"Cannot format item" ) );
206 m_out->
Print(
"(kicad_wks (version %d) (generator \"pl_editor\") (generator_version %s)",
229 for(
unsigned ii = 0; ii < aSheet->
GetCount(); ii++ )
255 if( write_thickness || write_size || aItem->
m_Bold || aItem->
m_Italic
256 || write_face || aItem->
m_TextColor != COLOR4D::UNSPECIFIED )
263 if( write_thickness )
320 if( !aItem->
m_Info.IsEmpty() )
345 if( !aItem->
m_Info.IsEmpty() )
367 if( !aItem->
m_Info.IsEmpty() )
409 if( !aItem->
m_Info.IsEmpty() )
419#define MIME_BASE64_LENGTH 76
423 while( first < out.Length() )
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
wxString GetMajorMinorVersion()
Get only the major and minor version in a string major.minor.
const wxImage * GetOriginalImageData() const
const wxMemoryBuffer & GetImageDataBuffer() const
BITMAP_BASE * m_ImageBitmap
unsigned GetPolyIndexStart(unsigned aContour) const
unsigned GetPolyIndexEnd(unsigned aContour) const
std::vector< VECTOR2D > m_Corners
GR_TEXT_H_ALIGN_T m_Hjustify
KIGFX::COLOR4D m_TextColor
VECTOR2D m_BoundingBoxSize
GR_TEXT_V_ALIGN_T m_Vjustify
Drawing sheet structure type definitions.
PAGE_OPTION GetPage1Option() const
DS_ITEM_TYPE GetType() const
VECTOR2D m_IncrementVector
DS_DATA_MODEL_FILEIO(const wxString &aFilename)
PRETTIFIED_FILE_OUTPUTFORMATTER * m_fileout
void Format(DS_DATA_MODEL *aSheet) const
virtual ~DS_DATA_MODEL_IO()
void formatRepeatParameters(DS_DATA_ITEM *aItem) const
void formatOptions(DS_DATA_ITEM *aItem) const
void format(DS_DATA_ITEM_TEXT *aItem) const
void formatCoordinate(const char *aToken, POINT_COORD &aCoord) const
~DS_DATA_MODEL_STRINGIO()
STRING_FORMATTER * m_writer
DS_DATA_MODEL_STRINGIO(wxString *aOutputString)
Handle the graphic items list to draw/plot the frame and title block.
VECTOR2D m_DefaultTextSize
unsigned GetCount() const
double m_DefaultLineWidth
DS_DATA_ITEM * GetItem(unsigned aIdx) const
double m_DefaultTextThickness
void SaveInString(wxString *aOutputString)
Save the description in a buffer.
void Save(const wxString &aFullFileName)
Save the description in a file.
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()
const char * NameAsToken() const
const wxString & GetName() const
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
static const char * getTokenName(T aTok)
#define MIME_BASE64_LENGTH
#define SEXPR_WORKSHEET_FILE_VERSION
This file contains the file format version information for the s-expression drawing sheet file format...
wxString From_UTF8(const char *cstring)
std::string FormatDouble2Str(double aValue)
Print a float number without using scientific notation and no trailing 0 This function is intended in...
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.