]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.h
Various fixes, removed "default" language, inserted new lyxrc tag
[lyx.git] / src / lyxrc.h
index 8e1f5f1bc8988f5b41fc9180fb3a232f0d1f6a87..5db59f319899e962e1b6ccfb2de7454fb64a2ed9 100644 (file)
 // -*- C++ -*-
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *      
- *         Copyright (C) 1995 1996 Matthias Ettrich
- *           and the LyX Team.
+ *           Copyright 1995 Matthias Ettrich
+ *           Copyright 1995-2000 The LyX Team.
  *
- *======================================================*/
+ * ====================================================== */
 
-#ifndef _LYXRC_H
-#define _LYXRC_H
+#ifndef LYXRC_H
+#define LYXRC_H
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-#include "toolbar.h"
+#include "bufferparams.h"
+#include "support/utility.hpp"
 
 /// This contains the runtime configuration of LyX
-class LyXRC {
+class LyXRC : public noncopyable {
 public:
        ///
        LyXRC();
        ///
-       ~LyXRC();
+       void setDefaults();
        ///
-       int Read (LString const & filename);
+       int read (string const & filename);
        ///
-        void Print();
+       void write(string const & filename) const;
+       ///
+        void print() const;
+       ///
+       void output(std::ostream & os) const;
        /// Is a bind file already (or currently) read?
        bool hasBindFile;
        ///
-       int ReadBindFile(LString name = "cua");
+       int ReadBindFile(string const & name = "cua");
+       ///
+       string bind_file;
        ///
-       Toolbar toolbar;
+       string ui_file;
        ///
-       LString printer;
+       string printer;
        ///
-       LString print_command;
+       string print_command;
        ///
-       LString print_evenpage_flag;
+       string print_evenpage_flag;
        ///
-       LString print_oddpage_flag;
+       string print_oddpage_flag;
        ///
-       LString print_pagerange_flag;
+       string print_pagerange_flag;
        ///
-       LString print_copies_flag;
+       string print_copies_flag;
        ///
-       LString print_collcopies_flag;
+       string print_collcopies_flag;
        ///
-       LString print_reverse_flag;
+       string print_reverse_flag;
        ///
-       LString print_landscape_flag;
+       string print_landscape_flag;
        ///
-       LString print_to_printer;
+       string print_to_printer;
        ///
        bool print_adapt_output;
        ///
-       LString print_to_file;
+       string print_to_file;
        ///
-       LString print_file_extension;
+       string print_file_extension;
        ///
-       LString print_extra_options;
+       string print_extra_options;
        ///
-       LString print_spool_command;
+       string print_spool_command;
         ///
-       LString print_spool_printerprefix;
+       string print_spool_printerprefix;
        ///
-       LString print_paper_flag;
+       string print_paper_flag;
        ///
-       LString print_paper_dimension_flag;
+       string print_paper_dimension_flag;
        ///
-        LString custom_export_command;
+        string custom_export_command;
        ///
-       LString custom_export_format;
+       string custom_export_format;
+       ///
+       bool pdf_mode;
        /// program for running latex
-       LString latex_command;
+       string latex_command;
+       ///
+       string pdflatex_command;
+       ///
+       string pdf_to_ps_command;
+       ///
+       string dvi_to_ps_command;
         /// program for performing literate programming
-        LString literate_command;
-        LString literate_extension;
-        LString literate_error_filter;
+        string literate_command;
+       ///
+        string literate_extension;
+       ///
+        string literate_error_filter;
         /// program for compiling
-        LString build_command;
-        LString build_error_filter;
+        string build_command;
+       ///
+        string build_error_filter;
        /// program for running relyx
-       LString relyx_command;
+       string relyx_command;
        /// postscript interpreter (in general "gs", if it is installed)
-       LString ps_command;
+       string ps_command;
        /// program for viewing postscript output (default "ghostview -swap")
-       LString view_ps_command;
+       string view_ps_command;
        /// program for viewing postscript pictures (default "ghostview")
-       LString view_pspic_command;
+       string view_pspic_command;
        /// program for viewing dvi output (default "xdvi")
-       LString view_dvi_command;
+       string view_dvi_command;
+       /// option for telling the dvi viewer about the paper size
+       string view_dvi_paper_option;
+       /// program for viewing pdf output (default "xpdf")
+       string view_pdf_command;
         /// default paper size for local xdvi/dvips/ghostview/whatever
-        LYX_PAPER_SIZE default_papersize;
+        BufferParams::PAPER_SIZE default_papersize;
        /// command to run chktex incl. options
-       LString chktex_command;
-       ///
-       LString sgml_extra_options;
+       string chktex_command;
+       /// command to run an html converter incl. options
+       string html_command;
        ///
-       LString document_path;
+       string document_path;
        ///
-       LString template_path;
+       string template_path;
        ///
-       LString tempdir_path;
+       string tempdir_path;
        ///
        bool use_tempdir;
        ///
@@ -113,45 +135,68 @@ public:
        /// flag telling whether lastfiles should be checked for existance
        bool check_lastfiles;
        /// filename for lastfiles file
-       LString lastfiles;
+       string lastfiles;
        /// maximal number of lastfiles
        unsigned int num_lastfiles;
+       /// shall a backup file be created
+       bool make_backup;
+       /// A directory for storing backup files
+       string backupdir_path;
        /// Zoom factor for screen fonts
        unsigned int zoom;
+       /// parameter for button_4 and button_5 (scrollwheel)
+       unsigned int wheel_jump;
        /// Screen font sizes in points for each font size
        float font_sizes[10];
        /// Allow the use of scalable fonts? Default is yes.
        bool use_scalable_fonts;
        /// DPI of monitor
        float dpi;
+       /// Whether lyx should handle deadkeys by itself
+       bool override_x_deadkeys;
+       ///
+       string fontenc;
+       ///
+       string roman_font_name;
        ///
-       LString fontenc;
+       string sans_font_name;
        ///
-       LString roman_font_name;
+       string typewriter_font_name;
        ///
-       LString sans_font_name;
+       string menu_font_name;
        ///
-       LString typewriter_font_name;
+       string popup_font_name;
        ///
-       LString menu_font_name;
+       string font_norm;
        ///
-       LString popup_font_name;
+       enum FontEncoding {
+               ///
+               ISO_10646_1,
+               ///
+               ISO_8859_6_8,
+               ///
+               OTHER_ENCODING
+       };
        ///
-       LString font_norm;
+       FontEncoding font_norm_type;
+       ///
+       void set_font_norm_type();
+       ///
+       string font_norm_menu;
        ///
        unsigned int autosave;
        ///
-       LString fax_command;
+       string fax_command;
        ///
-       LString phone_book;
+       string phone_book;
        ///
-       LString fax_program;
+       string fax_program;
        ///
-       LString ascii_roff_command;
+       string ascii_roff_command;
        ///
        unsigned int ascii_linelen;
        /// Ispell command
-       LString isp_command;
+       string isp_command;
        /// Accept compound words in spellchecker?
        bool isp_accept_compound;
        /// Pass input encoding switch to ispell?
@@ -163,11 +208,11 @@ public:
        /// Use escape chars?
        bool isp_use_esc_chars;
        /// Alternate language for ispell
-       LString isp_alt_lang;
+       string isp_alt_lang;
        /// Alternate personal dictionary file for ispell
-       LString isp_pers_dict;
+       string isp_pers_dict;
        /// Escape characters
-       LString isp_esc_chars;
+       string isp_esc_chars;
        ///
        bool use_kbmap;
        /// Ask for confirmation of exit when there are unsaved documents?
@@ -175,15 +220,53 @@ public:
        /// Should we display short-cut information in the minibuffer?
        bool display_shortcuts;
        ///
-       LString primary_kbmap;
+       string primary_kbmap;
        ///
-       LString secondary_kbmap;
+       string secondary_kbmap;
        ///
-       LString lyxpipes;
-
-private:
+       string lyxpipes;
+       ///
+       string date_insert_format;
+       ///
+       string language_package;
+       ///
+       bool language_auto_begin;
+       ///
+       bool language_auto_end;
+       ///
+       string language_command_begin;
+       ///
+       string language_command_end;
+       ///
+       bool rtl_support;
+       ///
+       bool auto_number;
+       ///
+       bool mark_foreign_language;
+       ///
+       bool show_banner;
+       /// Do we have to use a GUI?
+       bool use_gui;
+       ///
+       string linuxdoc_to_lyx_command;
+       ///
+       string linuxdoc_to_html_command;
+       ///
+       string linuxdoc_to_latex_command;
+       ///
+       string docbook_to_dvi_command;
+       ///
+       string docbook_to_html_command;
+       ///
+       string docbook_to_pdf_command;
+       ///
+       bool new_ask_filename;
        ///
-       void defaultKeyBindings();
+       string default_language;
 };
 
+///
+extern LyXRC lyxrc;
+///
+//extern LyXRC system_lyxrc;
 #endif