X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyX.h;h=70b8b7e8c6384f60aa93b92ac78b1ad613f4f3bf;hb=9ca242e5bf1919e510c99f315e3c2506509e2b1d;hp=dd98a370a5240f38c6546927ef56e9e5eaf2b62d;hpb=b121ac47c6c578ae9e2e3e073222e73859603edc;p=lyx.git diff --git a/src/LyX.h b/src/LyX.h index dd98a370a5..70b8b7e8c6 100644 --- a/src/LyX.h +++ b/src/LyX.h @@ -16,6 +16,8 @@ #include "support/strfwd.h" +#include + namespace lyx { class BufferList; @@ -26,6 +28,7 @@ class ErrorItem; class FuncRequest; class FuncStatus; class KeyMap; +class LaTeXFonts; class Messages; class Mover; class Movers; @@ -34,23 +37,27 @@ class ServerSocket; class Session; class SpellChecker; -enum overwrite_files { +enum RunMode { + NEW_INSTANCE, + USE_REMOTE, + PREFERRED +}; + +enum OverwriteFiles { NO_FILES, MAIN_FILE, - ALL_FILES + ALL_FILES, + UNSPECIFIED }; extern bool use_gui; -extern overwrite_files force_overwrite; +extern RunMode run_mode; +extern OverwriteFiles force_overwrite; namespace frontend { class Application; } -namespace graphics { -class Previews; -} - /// initial startup class LyX { public: @@ -98,7 +105,9 @@ private: */ bool queryUserLyXDir(bool explicit_userdir); /// read lyxrc/preferences - bool readRcFile(std::string const & name); + /// \param check_format: whether to try to convert the format of + /// the file, if there is a mismatch. + bool readRcFile(std::string const & name, bool check_format = false); /// read the given languages file bool readLanguagesFile(std::string const & name); /// read the encodings. @@ -125,6 +134,7 @@ private: friend FuncStatus getStatus(FuncRequest const & action); friend void dispatch(FuncRequest const & action); friend void dispatch(FuncRequest const & action, DispatchResult & dr); + friend std::vector & theFilesToLoad(); friend BufferList & theBufferList(); friend Server & theServer(); friend ServerSocket & theServerSocket(); @@ -134,16 +144,15 @@ private: friend Messages const & getGuiMessages(); friend KeyMap & theTopLevelKeymap(); friend Movers & theMovers(); - friend Mover const & getMover(std::string const & fmt); + friend Mover const & getMover(std::string const & fmt); friend void setMover(std::string const & fmt, std::string const & command); friend Movers & theSystemMovers(); friend frontend::Application * theApp(); - friend graphics::Previews & thePreviews(); friend Session & theSession(); + friend LaTeXFonts & theLaTeXFonts(); friend CmdDef & theTopLevelCmdDef(); friend SpellChecker * theSpellChecker(); friend void setSpellChecker(); - friend void setRcGuiLanguage(); friend void emergencyCleanup(); friend void execBatchCommands(); friend void lyx_exit(int exit_code); @@ -156,8 +165,6 @@ void emergencyCleanup(); /// \p exit_code is 0 by default, if a non zero value is passed, /// emergencyCleanup() will be called before exiting. void lyx_exit(int exit_code); -/// Set the language defined by the user. -void setRcGuiLanguage(); /// Execute batch commands if available. void execBatchCommands(); @@ -173,4 +180,3 @@ void dispatch(FuncRequest const & action, DispatchResult & dr); } // namespace lyx #endif // LYX_H -