~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/include/ipedoc.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2005-02-24 22:09:16 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050224220916-9vxiiqjz066r5489
Tags: 6.0pre23-2
debian/control: Ipe should depend on exact version of libipe.
Closes: #296771.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include "ipeimage.h"
38
38
 
39
39
class IpeStyleSheet;
 
40
class IpeFontPool;
40
41
 
41
42
// --------------------------------------------------------------------
42
43
 
63
64
    IpeString iCreator;
64
65
  };
65
66
 
 
67
  //! There are several Ipe document save formats.
 
68
  enum TFormat {
 
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
 
75
  };
 
76
 
 
77
  //! Options for saving Ipe documents (to PDF and Postscript)
 
78
  enum {
 
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
 
83
  };
 
84
 
66
85
  IpeDocument();
67
86
  ~IpeDocument();
68
87
 
 
88
  static TFormat FileFormat(IpeDataSource &source);
 
89
 
 
90
  static IpeDocument *New(IpeDataSource &source, TFormat format, int &reason);
69
91
  static IpeDocument *New(const char *fname, int &reason);
70
92
 
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;
 
97
 
72
98
  void SaveAsXml(IpeStream &stream, IpeString creator,
73
 
                 bool usePdfBitmaps = false);
 
99
                 bool usePdfBitmaps = false) const;
 
100
 
 
101
  bool AddStyleSheet(IpeDataSource &source);
 
102
 
 
103
  int TotalViews() const;
 
104
 
 
105
  IpePage *NewPage(int gridSize);
74
106
 
75
107
  //! Return document properties.
76
108
  inline SProperties Properties() const { return iProperties; }
85
117
  bool IsEdited() const;
86
118
  void SetEdited(bool edited);
87
119
 
 
120
  void SetFontPool(IpeFontPool *fontPool);
 
121
  //! Return the current IpeFontPool.
 
122
  inline const IpeFontPool *FontPool() const { return iFontPool; }
 
123
  bool HasTrueTypeFonts() const;
 
124
 
88
125
  bool CheckStyle(IpeAttributeSeq &seq) const;
89
126
 
90
127
  //! Return attribute repository.
100
137
  SProperties iProperties;
101
138
  bool iEdited;
102
139
  IpeRepository iRepository;
 
140
  IpeFontPool *iFontPool;
103
141
};
104
142
 
105
143
// --------------------------------------------------------------------