]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.h
infrastructure for 'graceful asserts'
[lyx.git] / src / LyX.h
index 5d0cf3340c696e3e1758163aa9a5e5111002020a..3d98e42b8edb5100c719d27152f7e0c6e6018969 100644 (file)
--- a/src/LyX.h
+++ b/src/LyX.h
 
 namespace lyx {
 
-namespace support {
-class FileName;
-}
-
-class Buffer;
 class BufferList;
+class CmdDef;
 class Converters;
 class ErrorItem;
-class Inset;
+class KeyMap;
 class LyXFunc;
-class Server;
-class ServerSocket;
 class Messages;
 class Mover;
 class Movers;
+class Server;
+class ServerSocket;
 class Session;
-class KeyMap;
-class CmdDef;
 
 extern bool use_gui;
 
@@ -54,6 +48,11 @@ public:
        /// Execute LyX.
        int exec(int & argc, char * argv[]);
 
+       /// 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 exit(int exit_code = 0) const;
+
        static LyX & ref();
        static LyX const & cref();
 
@@ -80,10 +79,6 @@ public:
        frontend::Application & application();
        frontend::Application const & application() const;
 
-       ///
-       KeyMap & topLevelKeymap();
-       KeyMap const & topLevelKeymap() const;
-
        ///
        CmdDef & topLevelCmdDef();
 
@@ -105,7 +100,7 @@ public:
        void execBatchCommands();
 
        ///
-       void addFileToLoad(support::FileName const &);
+       void addFileToLoad(std::string const &);
 
 private:
        /// noncopyable
@@ -130,13 +125,8 @@ private:
        */
        void loadFiles();
 
-       /// Create a View, load files and restore GUI Session.
-       void restoreGuiSession();
-
        /// initial LyX set up
        bool init();
-       /// set up the default dead key bindings if requested
-       void deadKeyBindings(KeyMap * kbmap);
        /** Check for the existence of the user's support directory and,
         *  if not present, create it. Exits the program if the directory
         *  cannot be created.
@@ -173,6 +163,7 @@ private:
        friend void setMover(std::string const & fmt, std::string const & command);
        friend Movers & theSystemMovers();
        friend frontend::Application * theApp();
+       friend KeyMap & theTopLevelKeymap();
 };
 
 } // namespace lyx