/// Some formats are both (e.g. pdf), they have this flag set.
document = 1,
/// Set if this format can contain vector graphics.
- vector = 2,
+ vector = 2
};
///
Format(std::string const & n, std::string const & e, std::string const & p,
/// Name fo the parent format
std::string const parentFormat() const;
///
- std::string const & name() const {
- return name_;
- }
+ std::string const & name() const { return name_; }
///
- std::string const & extension() const {
- return extension_;
- }
+ void setName(std::string const & v) { name_ = v; }
///
- std::string const & prettyname() const {
- return prettyname_;
- }
+ std::string const & extension() const { return extension_; }
///
- std::string const & shortcut() const {
- return shortcut_;
- }
+ void setExtension(std::string const & v) { extension_ = v; }
///
- std::string const & viewer() const {
- return viewer_;
- }
+ std::string const & prettyname() const { return prettyname_; }
///
- void setViewer(std::string const & v) {
- viewer_ = v;
- }
+ void setPrettyname(std::string const & v) { prettyname_ = v; }
///
- std::string const & editor() const {
- return editor_;
- }
+ std::string const & shortcut() const { return shortcut_; }
///
- void setEditor(std::string const & v) {
- editor_ = v;
- }
+ void setShortcut(std::string const & v) { shortcut_ = v; }
///
- bool documentFormat() const {
- return flags_ & document;
- }
+ std::string const & viewer() const { return viewer_; }
///
- bool vectorFormat() const {
- return flags_ & vector;
- }
+ void setViewer(std::string const & v) { viewer_ = v; }
+ ///
+ std::string const & editor() const { return editor_; }
+ ///
+ void setEditor(std::string const & v) { editor_ = v; }
+ ///
+ bool documentFormat() const { return flags_ & document; }
+ ///
+ bool vectorFormat() const { return flags_ & vector; }
+ ///
+ void setFlags(int v) { flags_ = v; }
private:
/// Internal name. Needs to be unique.
std::string name_;
///
typedef FormatList::const_iterator const_iterator;
///
- Format const & get(FormatList::size_type i) const {
- return formatlist[i];
- }
+ Format const & get(FormatList::size_type i) const { return formatlist[i]; }
+ ///
+ Format & get(FormatList::size_type i) { return formatlist[i]; }
/// \returns format named \p name if it exists, otherwise 0
Format const * getFormat(std::string const & name) const;
/*!
///
void setViewer(std::string const & name, std::string const & command);
///
+ void setEditor(std::string const & name, std::string const & command);
+ /// View the given file. Buffer used for DVI's paper orientation.
bool view(Buffer const & buffer, support::FileName const & filename,
std::string const & format_name) const;
///