10 * This file is part of LyX, the document processor.
11 * Licence details can be found in the file COPYING.
15 * Full author contact details are available in file CREDITS
22 #include "support/lstrings.h"
26 string const papersize(Buffer const * buffer) ;
31 Format(string const & n, string const & e, string const & p,
32 string const & s, string const & v);
36 bool isChildFormat() const;
38 string const parentFormat() const;
40 string const & name() const {
44 string const & extension() const {
48 string const & prettyname() const {
52 string const & shortcut() const {
56 string const & viewer() const {
60 void setViewer(string const & v) {
76 bool operator<(Format const & a, Format const & b);
82 typedef std::vector<Format> FormatList;
84 typedef FormatList::const_iterator const_iterator;
86 Format const & get(FormatList::size_type i) const {
90 Format const * getFormat(string const & name) const;
92 int getNumber(string const & name) const;
94 void add(string const & name);
96 void add(string const & name, string const & extension,
97 string const & prettyname, string const & shortcut);
99 void erase(string const & name);
103 void setViewer(string const & name, string const & command);
105 bool view(Buffer const * buffer, string const & filename,
106 string const & format_name) const;
108 string const prettyName(string const & name) const;
110 string const extension(string const & name) const;
112 const_iterator begin() const {
113 return formatlist.begin();
116 const_iterator end() const {
117 return formatlist.end();
120 FormatList::size_type size() const {
121 return formatlist.size();
125 FormatList formatlist;
128 extern Formats formats;
130 extern Formats system_formats;