#include "paper.h"
#include "graphics/GraphicsTypes.h"
+#include <iosfwd>
#include <string>
+class LyXLex;
/// This contains the runtime configuration of LyX
class LyXRC //: public noncopyable {
RC_CHECKLASTFILES,
RC_VIEWDVI_PAPEROPTION,
RC_DEFAULT_PAPERSIZE,
- RC_PS_COMMAND,
RC_ACCEPT_COMPOUND,
RC_SPELL_COMMAND,
RC_USE_INP_ENC,
RC_PERS_DICT,
RC_ESC_CHARS,
RC_CHKTEX_COMMAND,
+ RC_BIBTEX_COMMAND,
RC_CURSOR_FOLLOWS_SCROLLBAR,
RC_DIALOGS_ICONIFY_WITH_MAIN,
RC_MAKE_BACKUP,
RC_USE_SPELL_LIB,
RC_USER_NAME,
RC_USER_EMAIL,
+ RC_INDEX_COMMAND,
RC_LAST
};
///
int read(std::string const & filename);
///
- void write(std::string const & filename) const;
+ int read(std::istream &);
+private:
///
- void print() const;
+ int read(LyXLex &);
+public:
///
- void output(std::ostream & os) const;
+ void write(std::string const & filename,
+ bool ignore_system_lyxrc) const;
+ ///
+ void write(std::ostream & os,
+ bool ignore_system_lyxrc) const;
+ ///
+ void print() const;
///
static std::string const getDescription(LyXRCTags);
///
std::string custom_export_command;
///
std::string custom_export_format;
- /// postscript interpreter (in general "gs", if it is installed)
- std::string ps_command;
/// option for telling the dvi viewer about the paper size
std::string view_dvi_paper_option;
/// default paper size for local xdvi/dvips/ghostview/whatever
PAPER_SIZE default_papersize;
/// command to run chktex incl. options
std::string chktex_command;
+ /// command to run bibtex incl. options
+ std::string bibtex_command;
+ /// command to run makeindex incl. options or other index programs
+ std::string index_command;
///
std::string document_path;
///
///
std::string tempdir_path;
///
- bool use_tempdir;
- ///
bool auto_region_delete;
/// flag telling whether lastfiles should be checked for existance
bool auto_reset_options;
///
bool show_banner;
///
- bool preview;
+ enum PreviewStatus {
+ PREVIEW_OFF,
+ PREVIEW_NO_MATH,
+ PREVIEW_ON
+ };
+ ///
+ PreviewStatus preview;
///
bool preview_hashed_labels;
///
std::string user_email;
};
+
+/** \c LyXRC_PreviewStatus is a wrapper for LyXRC::PreviewStatus.
+ * It can be forward-declared and passed as a function argument without
+ * having to expose lyxrc.h.
+ */
+class LyXRC_PreviewStatus {
+ LyXRC::PreviewStatus val_;
+public:
+ LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
+ operator LyXRC::PreviewStatus() const{ return val_; }
+};
+
+
///
extern LyXRC lyxrc;
///