63
64
IpeString iCreator;
67
//! There are several Ipe document save formats.
69
EXml, //!< Save as XML
70
EPdf, //!< Save as PDF
71
EPs, //!< Save as Postscript
72
EEps, //!< Save as Encapsulated Postscript
73
EIpe5, //!< Old Ipe format
74
EUnknown //!< Unknown file format
77
//! Options for saving Ipe documents (to PDF and Postscript)
79
ESaveNormal = 0, //!< Nothing special
80
EExport = 1, //!< Don't include Ipe markup
81
ENoShading = 2, //!< Don't shade background in PDF documents
82
ELastView = 4, //!< Create last view of each page only
88
static TFormat FileFormat(IpeDataSource &source);
90
static IpeDocument *New(IpeDataSource &source, TFormat format, int &reason);
69
91
static IpeDocument *New(const char *fname, int &reason);
71
bool Save(const char *fname, IpeString creator);
93
bool Save(IpeTellStream &stream, IpeString creator,
94
TFormat format, uint flags, int compressLevel = 9) const;
95
bool Save(const char *fname, IpeString creator,
96
TFormat format, uint flags, int compressLevel = 9) const;
72
98
void SaveAsXml(IpeStream &stream, IpeString creator,
73
bool usePdfBitmaps = false);
99
bool usePdfBitmaps = false) const;
101
bool AddStyleSheet(IpeDataSource &source);
103
int TotalViews() const;
105
IpePage *NewPage(int gridSize);
75
107
//! Return document properties.
76
108
inline SProperties Properties() const { return iProperties; }
85
117
bool IsEdited() const;
86
118
void SetEdited(bool edited);
120
void SetFontPool(IpeFontPool *fontPool);
121
//! Return the current IpeFontPool.
122
inline const IpeFontPool *FontPool() const { return iFontPool; }
123
bool HasTrueTypeFonts() const;
88
125
bool CheckStyle(IpeAttributeSeq &seq) const;
90
127
//! Return attribute repository.