]> git.lyx.org Git - features.git/blobdiff - src/lyx_main.h
This commits cuts down LyX::exec2 into two new methods (execBatchCommands() and resto...
[features.git] / src / lyx_main.h
index 7ea348c4417e315dfb7f3beb21a6df33efbe25b0..f8d5705007a5d11c942036ae65607f9e875c97f3 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <list>
 #include <string>
+#include <vector>
 
 class Buffer;
 class BufferList;
@@ -60,6 +61,13 @@ public:
        /// in the case of failure
        void emergencyCleanup() const;
 
+       /// Ask the LyX class to exit.
+       /**
+       In GUI mode, after this function has been called, application_ leaves
+       the main event loop and returns from the call to Application::start().
+       */
+       void quit(bool noask);
+
        ///
        BufferList & bufferList();
        BufferList const & bufferList() const;
@@ -80,6 +88,26 @@ private:
        LyX();
        int priv_exec(int & argc, char * argv[]);
 
+       /// Do some cleanup in preparation of an exit.
+       void prepareExit();
+
+       /// Early exit during the initialisation process.
+       void earlyExit(int status);
+
+       /// Initialise LyX and execute batch commands if available.
+       /**
+       \param files is filled in with the command-line file names.
+       \return exit code failure if any.
+       */
+       int execBatchCommands(int & argc, char * argv[],
+               std::vector<std::string> & files);
+
+       /// Create a View and restore GUI Session.
+       void restoreGuiSession(std::vector<std::string> const & files);
+
+       /// Initialize RC font for the GUI.
+       void initGuiFont();
+
        /// initial LyX set up
        bool init();
        /// set up the default key bindings