X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyX.h;h=c9674eba37ad29ecd55d063536dcdec0a6ad288b;hb=c7e6a677c4df14b0f2f7d701e1f1976c4005a629;hp=f46b3a025a54e421815336cb04e51032a2e013ff;hpb=5ec4d801626d22da5f1929fdd668eae50b55b537;p=lyx.git diff --git a/src/LyX.h b/src/LyX.h index f46b3a025a..c9674eba37 100644 --- a/src/LyX.h +++ b/src/LyX.h @@ -4,7 +4,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * \author Jean-Marc Lasgouttes * \author John Levon * @@ -16,28 +16,45 @@ #include "support/strfwd.h" +#include + namespace lyx { class BufferList; class CmdDef; class Converters; +class DispatchResult; class ErrorItem; class FuncRequest; class FuncStatus; class KeyMap; -class LyXFunc; class Messages; class Mover; class Movers; class Server; class ServerSocket; class Session; +class SpellChecker; + +enum RunMode { + NEW_INSTANCE, + USE_REMOTE, + PREFERRED +}; + +enum OverwriteFiles { + NO_FILES, + MAIN_FILE, + ALL_FILES, + UNSPECIFIED +}; extern bool use_gui; +extern RunMode run_mode; +extern OverwriteFiles force_overwrite; namespace frontend { class Application; -class LyXView; } namespace graphics { @@ -54,9 +71,6 @@ public: /// Execute LyX. int exec(int & argc, char * argv[]); - /// - frontend::LyXView * newLyXView(); - private: /// noncopyable LyX(LyX const &); @@ -120,14 +134,15 @@ 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 LyXFunc & theLyXFunc(); friend Server & theServer(); friend ServerSocket & theServerSocket(); friend Converters & theConverters(); friend Converters & theSystemConverters(); - friend Messages & getMessages(std::string const & language); - friend Messages & getGuiMessages(); + friend Messages const & getMessages(std::string const & language); + friend Messages const & getGuiMessages(); friend KeyMap & theTopLevelKeymap(); friend Movers & theMovers(); friend Mover const & getMover(std::string const & fmt); @@ -137,10 +152,12 @@ private: friend graphics::Previews & thePreviews(); friend Session & theSession(); 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 = 0); + friend void lyx_exit(int exit_code); }; @@ -149,12 +166,22 @@ void emergencyCleanup(); /// Try to exit LyX properly. /// \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 = 0); +void lyx_exit(int exit_code); /// Set the language defined by the user. void setRcGuiLanguage(); /// Execute batch commands if available. void execBatchCommands(); +/// +FuncStatus getStatus(FuncRequest const & action); + +/// +void dispatch(FuncRequest const & action); + +/// +void dispatch(FuncRequest const & action, DispatchResult & dr); + } // namespace lyx #endif // LYX_H +